add flash scripts for m548x-bas (EmuTOS)

This commit is contained in:
Markus Fröschle
2020-08-30 15:06:00 +02:00
parent 95e9b0ca11
commit 8bb679071c
4 changed files with 30 additions and 18 deletions

View File

@@ -77,16 +77,6 @@ erase 0xE0000000 10
erase 0xE0000000 11
erase 0xE0000000 12
erase 0xE0000000 13
#erase 0xE0000000 0x2000
#erase 0xE0000000 0x3000
#erase 0xE0000000 0x4000
#erase 0xE0000000 0x5000
#erase 0xE0000000 0x00006000
#erase 0xE0000000 0x00007000
#erase 0xE0000000 0x00008000
#erase 0xE0000000 0x00009000
#erase 0xE0000000 0x0000a000
#erase 0xE0000000 0x0000b000
#erase-wait 0xe0000000
load -v ../m5484lite/bas.elf
wait

View File

@@ -0,0 +1,7 @@
#!/bin/bash
pushd ../../BaS_gcc
make clean all
popd
time bdmctrl flash_m548x_bas.bdm /dev/tblcf4

View File

@@ -5,9 +5,6 @@
open $1
reset
# Turn on RAMBAR0 at address FF10_0000
write-ctrl 0x0C04 0xFF100007
# Init CS0 (BootFLASH @ E000_0000 - E07F_FFFF 8Mbytes)
write 0xFF000500 0xE0000000 4
write 0xFF000508 0x00001180 4
@@ -34,15 +31,25 @@ write 0xFF000104 0x710D0F00 4 # SDCR (lock SDMR and enable refresh)
sleep 10
# use sram as flashlib scratch area
# use system sdram as flashlib scratch area
# flashing EmuTOS with plugin does not work yet (at least not for 64bit hosts)
#flash-plugin 0xFF101000 0xffff flashintelc3.plugin
#flash-plugin 0x1000 0xf000 flash29.plugin
# notify flashlib that we have flash at address 0xE0000000, length 0x7FFFFF, plugin is flash29
flash 0xe0000000
# Erase flash from 0xE0100000 to 0xE01FFFFF (reserved space for EmuTOS on the m5484lite)
# Erase flash from 0xE0600000 to 0xE06FFFFF (reserved space for EmuTOS)
#
# Caution: sector offset numbers need to be the ones from the x16 address range
# column and they vary in size - needs to be exactly as in the data sheet (p. 9)
#
# contrary to documentation, it seems we need to erase-wait after each sector
erase 0xe0000000 16
erase 0xe0000000 17
erase 0xe0000000 18
erase 0xe0000000 19
erase 0xe0000000 20
erase 0xe0000000 21
erase 0xe0000000 22
erase 0xe0000000 23
@@ -63,4 +70,4 @@ erase 0xe0000000 37
erase 0xe0000000 38
erase 0xe0000000 39
load ../../emutos/emutos-m548x-bas.elf
load -v emutos-m548x-bas.elf

View File

@@ -0,0 +1,8 @@
#!/bin/bash
pushd ../../emutos
make clean m548x-bas -j
m68k-elf-objcopy --alt-machine-code 4 -Isrec -Oelf32-m68k emutos-m548x-bas.s19 emutos-m548x-bas.elf
mv emutos-m548x-bas.elf ../BaS_gcc/flash_scripts/emutos-m548x-bas.elf
popd
time bdmctrl flash_m548x_etos.bdm /dev/tblcf4