diff --git a/SD_CARD/BaS_gcc/mcf5474.bdm b/SD_CARD/BaS_gcc/mcf5474.bdm index 05c82cd..fb8074c 100755 --- a/SD_CARD/BaS_gcc/mcf5474.bdm +++ b/SD_CARD/BaS_gcc/mcf5474.bdm @@ -1,4 +1,4 @@ -#!/usr/local/bin/bdmctrl -v10 +#!/usr/local/bin/bdmctrl -D2 # # firebee board initialization for bdmctrl # @@ -67,11 +67,23 @@ write 0xFF000104 0x710D0F00 4 # SDCR (lock SDMR and enable refresh) write 0xFF000240 0x80000000 4 # disable watchdog arbiter # notify flashlib that we have flash at address 0xE0000000, length 0x7FFFFF, plugin is flash29 -flash 0xE0000000 flash29 +flash 0xE0000000 # do not flash yet. First check if board can be initialized correctly -# load -v bas.elf -load -v ram.elf +#flash-plugin 0x10000000 0x4000 flash29.plugin + +# contrary to documentation, it seems we need to erase-wait after each sector +erase 0xE0000000 0 +erase-wait 0xE0000000 +erase 0xE0000000 0x1000 +erase-wait 0xE0000000 +erase 0xE0000000 0x2000 +erase-wait 0xE0000000 +erase 0xE0000000 0x3000 +erase-wait 0xE0000000 + +load -v bas.elf +#load -v ram.elf wait -sleep 1000 +sleep 100 execute diff --git a/SD_CARD/BaS_gcc/sources/startcf.S b/SD_CARD/BaS_gcc/sources/startcf.S index f544dc3..6188337 100644 --- a/SD_CARD/BaS_gcc/sources/startcf.S +++ b/SD_CARD/BaS_gcc/sources/startcf.S @@ -18,7 +18,6 @@ _rom_header: */ bra.s _rom_entry // Short jump to the real entry point .short 0x4ef9 // Fake jmp instruction - /* The second long is the initial PC */ .long _rom_entry // Real entry point diff --git a/SD_CARD/BaS_gcc/sources/sysinit.c b/SD_CARD/BaS_gcc/sources/sysinit.c index 6464096..63f2d0f 100644 --- a/SD_CARD/BaS_gcc/sources/sysinit.c +++ b/SD_CARD/BaS_gcc/sources/sysinit.c @@ -41,6 +41,9 @@ extern void flush_and_invalidate_caches_before_copy(void); extern volatile long _VRAM; /* start address of video ram from linker script */ +static const int MAJOR_VERSION = 0; +static const int MINOR_VERSION = 1; + /* * wait for the specified number of us on slice timer 0. Replaces the original routines that had * the number of useconds to wait for hardcoded in their name. @@ -798,6 +801,10 @@ void initialize_hardware(void) { init_gpio(); init_serial(); init_slt(); + + xprintf("\r\nBaS_gcc for FireBee v %d.%d\r\n", MAJOR_VERSION, MINOR_VERSION); + xprintf("initializing hardware...\r\n"); + init_fbcs(); init_ddram(); init_fpga(); @@ -819,6 +826,10 @@ void initialize_hardware(void) { init_gpio(); init_serial(); init_slt(); + + xprintf("\r\nBaS_gcc for FireBee v %d.%d\r\n", MAJOR_VERSION, MINOR_VERSION); + xprintf("initializing hardware...\r\n"); + init_fbcs(); init_ddram(); init_PCI();