OpenCores
URL https://opencores.org/ocsvn/s6soc/s6soc/trunk

Subversion Repositories s6soc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /s6soc/trunk/sw/zipos
    from Rev 48 to Rev 52
    Reverse comparison

Rev 48 → Rev 52

/Makefile
50,7 → 50,8
HEADERS := $(wildcard *.h) $(subst .c,.h,$(DEVSRCS))
# CFLAGS := -O3 -fdump-tree-all -Wall -Wextra -nostdlib -fno-builtin
# CFLAGS := -O3 -fdump-rtl-all -DZIPOS -Wall -Wextra -nostdlib -fno-builtin
CFLAGS := -I. -I../dev -Os -DZIPOS -Wall -Wextra -nostdlib -fno-builtin -Wa,-nocis
INCS := -I. -I../dev
CFLAGS := $(INCS) -Os -DZIPOS -Wall -Wextra -nostdlib -fno-builtin -Wa,-nocis
LDFLAGS := -T cmodram.ld -Wl,-Map,$(OBJDIR)/doorbell.map -nostdlib
 
all: doorbell
94,7 → 95,7
 
define build-depends
@echo "Building dependency file(s)"
@$(CC) $(CPPFLAGS) -MM $(SOURCES) $(DEVSRCS) > $(OBJDIR)/xdepends.txt
@$(CC) $(INCS) -MM $(SOURCES) $(DEVSRCS) > $(OBJDIR)/xdepends.txt
@sed -e 's/^.*.o: /$(OBJDIR)\/&/' < $(OBJDIR)/xdepends.txt > $(OBJDIR)/depends.txt
@rm $(OBJDIR)/xdepends.txt
endef
/board.h
109,17 → 109,29
#define IOADDR 0x000400
#define SCOPEADDR 0x000800
// #define FCTLADDR 0x000c00 // Flash control, depends upon write capability
#define RAMADDR 0x004000
#define RAMSZ (RAMADDR)
#define FLASHADDR 0x1000000
#define BKRAM (void *)0x004000
#define FLASH (void *)0x1000000
#define SDRAM (void *)0
#define MEMLEN 0x04000
#define FLASHLEN 0x1000000
#define RESET_ADDR 0x1200000
#define FLASHSZ (FLASHADDR)
 
#define CLOCKFREQHZ 80000000
#define CLOCKFREQ_HZ CLOCKFREQHZ
 
static volatile IOSPACE *const _sys = (IOSPACE *)IOADDR;
#define _ZIP_HAS_WBUARTRX
#define _uartrx _sys->io_uart
#define _ZIP_HAS_LONELY_UART
#define LONELY_UART
#define _uart _sys->io_uart
#define _ZIP_HAS_WATCHDOG
#define _watchdog _sys->io_watchdog
 
static volatile WBSCOPE *const _scope = (WBSCOPE *)SCOPEADDR;
 
#define valid_ram_region(PTR,LN) (((int)(PTR)>=RAMADDR)&&((int)(PTR+LN)<RAMADDR+RAMSZ))
#define valid_flash_region(PTR,LN) (((int)(PTR)>=FLASHADDR)&&((int)(PTR+LN)<FLASHADDR+FLASHSZ))
#define valid_ram_region(PTR,LN) ((((char *)PTR)>=(char *)BKRAM)&&((((char *)PTR)+LN)<(char *)BKRAM+MEMLEN))
#define valid_flash_region(PTR,LN) ((((char *)PTR)>=(char *)FLASH)&&((((char *)PTR)+LN)<(char *)FLASH+FLASHLEN))
#define valid_mem_region(PTR,LN) ((valid_ram_region(PTR,LN))||(valid_flash_region(PTR,LN)))
 
#endif
/bootloader.h
2,7 → 2,7
//
// Filename: bootloader.h
//
// Project: Zip CPU -- a small, lightweight, RISC CPU soft core
// Project: CMod S6 System on a Chip, ZipCPU demonstration project
//
// Purpose:
//
12,7 → 12,7
//
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2015-2016, Gisselquist Technology, LLC
// Copyright (C) 2015-2017, Gisselquist Technology, LLC
//
// This program is free software (firmware): you can redistribute it and/or
// modify it under the terms of the GNU General Public License as published
24,6 → 24,11
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
// for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program. (It's in the $(ROOT)/doc directory. Run make with no
// target there if the PDF file isn't present.) If not, see
// <http://www.gnu.org/licenses/> for a copy.
//
// License: GPL, v3, as defined and found on www.gnu.org,
// http://www.gnu.org/licenses/gpl.html
//
/cmod.ld
47,15 → 47,17
 
SECTIONS
{
.rocode 0x1200000 : {
.rocode 0x1200000 : ALIGN(4) {
_boot_address = .;
*(.start) *(.boot)
*(.start) *(.boot*)
*(.text*)
*(.rodata*)
*(.strings*)
__rocode_alignment = (. + 3) & ~ 3;
. = __rocode_alignment;
} > flash
_kernel_image_start = . ;
.data : {
.data : ALIGN_WITH_INPUT {
*(.kernel*)
*(.fixdata*)
*(.data*)
63,7 → 65,7
_kernel_image_end = . ;
}> blkram AT> flash
_blkram_image_end = . ;
.bss : {
.bss : ALIGN_WITH_INPUT {
*(.bss*)
_bss_image_end = . ;
} > blkram
/kernel.c
48,6 → 48,7
#include "ktraps.h"
#include "errno.h"
#include "swint.h"
#include "txfns.h"
 
extern void kpanic(void);
extern void raw_put_uart(int val);
74,6 → 75,8
 
extern void txstr(const char *);
 
#define SET_WATCHDOG _watchdog = (CONTEXT_LENGTH*2)
 
void kernel_entry(void) {
int nheartbeats= 0, tickcount = 0, milliseconds=0, ticks = 0;
int audiostate = 0, buttonstate = 0;
97,12 → 100,13
// Then selectively turn some of them back on
_sys->io_pic = INT_ENABLE | enableset | 0x07fff;
 
txstr("HEAP: "); txhex(heap);
txstr("HEAP: "); txhex((int)heap);
 
do {
int need_resched = 0, context_has_been_saved, pic;
nheartbeats++;
 
SET_WATCHDOG;
zip_rtu();
 
last_context = current->context;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.