renamed to properly identify m5484lite and firebee scripts
This commit is contained in:
@@ -57,25 +57,29 @@ flash 0xE0000000
|
|||||||
|
|
||||||
erase 0xE0000000 0x000000
|
erase 0xE0000000 0x000000
|
||||||
erase-wait 0xE0000000
|
erase-wait 0xE0000000
|
||||||
|
erase 0xE0000000 0x001000
|
||||||
|
erase-wait 0xE0000000
|
||||||
|
erase 0xE0000000 0x002000
|
||||||
|
erase-wait 0xE0000000
|
||||||
|
erase 0xE0000000 0x003000
|
||||||
|
erase-wait 0xE0000000
|
||||||
erase 0xE0000000 0x004000
|
erase 0xE0000000 0x004000
|
||||||
erase-wait 0xE0000000
|
erase-wait 0xE0000000
|
||||||
|
erase 0xE0000000 0x005000
|
||||||
|
erase-wait 0xE0000000
|
||||||
|
erase 0xE0000000 0x006000
|
||||||
|
erase-wait 0xE0000000
|
||||||
|
erase 0xE0000000 0x007000
|
||||||
|
erase-wait 0xE0000000
|
||||||
erase 0xE0000000 0x008000
|
erase 0xE0000000 0x008000
|
||||||
erase-wait 0xE0000000
|
erase-wait 0xE0000000
|
||||||
erase 0xE0000000 0x00C000
|
|
||||||
erase-wait 0xE0000000
|
|
||||||
erase 0xE0000000 0x00D000
|
|
||||||
erase-wait 0xE0000000
|
|
||||||
erase 0xE0000000 0x00E000
|
|
||||||
erase-wait 0xE0000000
|
|
||||||
erase 0xE0000000 0x00F000
|
|
||||||
erase-wait 0xE0000000
|
|
||||||
erase 0xE0000000 0x010000
|
erase 0xE0000000 0x010000
|
||||||
erase-wait 0xE0000000
|
erase-wait 0xE0000000
|
||||||
erase 0xE0000000 0x011000
|
erase 0xE0000000 0x018000
|
||||||
erase-wait 0xE0000000
|
erase-wait 0xE0000000
|
||||||
erase 0xE0000000 0x012000
|
erase 0xE0000000 0x020000
|
||||||
erase-wait 0xE0000000
|
erase-wait 0xE0000000
|
||||||
erase 0xE0000000 0x013000
|
erase 0xE0000000 0x028000
|
||||||
erase-wait 0xE0000000
|
erase-wait 0xE0000000
|
||||||
erase 0xE0000000 0x014000
|
erase 0xE0000000 0x014000
|
||||||
erase-wait 0xE0000000
|
erase-wait 0xE0000000
|
||||||
@@ -101,5 +105,5 @@ erase 0xE0000000 0x01e000
|
|||||||
erase-wait 0xE0000000
|
erase-wait 0xE0000000
|
||||||
erase 0xE0000000 0x01f000
|
erase 0xE0000000 0x01f000
|
||||||
erase-wait 0xE0000000
|
erase-wait 0xE0000000
|
||||||
load -v firebee/bas.elf
|
load -v ../firebee/bas.elf
|
||||||
wait
|
wait
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ write-ctrl 0x0C05 0xFF101001
|
|||||||
#
|
#
|
||||||
# Init CS0 (BootFLASH @ E000_0000 - E03F_FFFF 4Mbytes)
|
# Init CS0 (BootFLASH @ E000_0000 - E03F_FFFF 4Mbytes)
|
||||||
write 0xFF000500 0xE0000000 4
|
write 0xFF000500 0xE0000000 4
|
||||||
write 0xFF000508 0x00041180 4
|
#write 0xFF000508 0x00041180 4
|
||||||
|
write 0xFF000508 0x00100D80 4
|
||||||
write 0xFF000504 0x003F0001 4
|
write 0xFF000504 0x003F0001 4
|
||||||
|
|
||||||
# SDRAM Initialization @ 0000_0000 - 03FF_FFFF 64 Mbytes
|
# SDRAM Initialization @ 0000_0000 - 03FF_FFFF 64 Mbytes
|
||||||
@@ -52,26 +53,39 @@ sleep 10
|
|||||||
# This seems to be related to large flash buffers and PC-relative adressing of the plugin
|
# This seems to be related to large flash buffers and PC-relative adressing of the plugin
|
||||||
#flash-plugin 0x1000 0xf000 flash29.plugin
|
#flash-plugin 0x1000 0xf000 flash29.plugin
|
||||||
# notify flashlib that we have flash at address 0xE0000000, length 0x7FFFFF, plugin is flash29
|
# notify flashlib that we have flash at address 0xE0000000, length 0x7FFFFF, plugin is flash29
|
||||||
flash 0xE0000000 flashintelc3
|
flash 0xE0000000
|
||||||
|
flash-plugin 0x1000 0xf000 flashintelc3.plugin
|
||||||
|
|
||||||
# Erase flash from 0xE0000000 to 0xE00FFFFF (reserved space for BaS)
|
# Erase flash from 0xE0000000 to 0xE00FFFFF (reserved space for bas)
|
||||||
#
|
#
|
||||||
# Caution: sector offset numbers need to be the ones from the x16 address range
|
# 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)
|
# 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
|
# contrary to documentation, it seems we need to erase-wait after each sector
|
||||||
|
|
||||||
erase 0xE0000000 -1
|
erase 0xE0000000 0
|
||||||
#erase 0xE0000000 0x01000
|
erase 0xE0000000 1
|
||||||
#erase 0xE0000000 0x02000
|
erase 0xE0000000 2
|
||||||
#erase 0xE0000000 0x03000
|
erase 0xE0000000 3
|
||||||
#erase 0xE0000000 0x04000
|
erase 0xE0000000 4
|
||||||
#erase 0xE0000000 0x05000
|
erase 0xE0000000 5
|
||||||
#erase 0xE0000000 0x06000
|
erase 0xE0000000 6
|
||||||
#erase 0xE0000000 0x07000
|
erase 0xE0000000 7
|
||||||
#erase 0xE0000000 0x08000
|
erase 0xE0000000 8
|
||||||
#erase 0xE0000000 0x10000
|
erase 0xE0000000 9
|
||||||
|
erase 0xE0000000 10
|
||||||
|
erase 0xE0000000 11
|
||||||
|
erase 0xE0000000 12
|
||||||
|
#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
|
#erase-wait 0xe0000000
|
||||||
#blank-chk 0xE0000000 0x10000
|
load -v ../m5484lite/bas.elf
|
||||||
load -v m5484lite/bas.elf
|
|
||||||
wait
|
wait
|
||||||
|
|||||||
78
BaS_gcc/flash_scripts/flash_m548x_dbug.bdm
Executable file
78
BaS_gcc/flash_scripts/flash_m548x_dbug.bdm
Executable file
@@ -0,0 +1,78 @@
|
|||||||
|
#!/usr/local/bin/bdmctrl
|
||||||
|
#
|
||||||
|
# m548x board initialization for bdmctrl
|
||||||
|
#
|
||||||
|
open $1
|
||||||
|
reset
|
||||||
|
wait
|
||||||
|
|
||||||
|
# set VBR
|
||||||
|
write-ctrl 0x0801 0x00000000
|
||||||
|
dump-register VBR
|
||||||
|
|
||||||
|
# Turn on MBAR at 0xFF00_0000
|
||||||
|
write-ctrl 0x0C0F 0xFF000000
|
||||||
|
dump-register MBAR
|
||||||
|
|
||||||
|
# Turn on RAMBAR0 at address FF10_0000
|
||||||
|
write-ctrl 0x0C04 0xFF100007
|
||||||
|
|
||||||
|
# Turn on RAMBAR1 at address FF10_1000 (disabled - not mapped by bdm currently)
|
||||||
|
write-ctrl 0x0C05 0xFF101001
|
||||||
|
|
||||||
|
#
|
||||||
|
# Init CS0 (BootFLASH @ E000_0000 - E03F_FFFF 4Mbytes)
|
||||||
|
write 0xFF000500 0xE0000000 4
|
||||||
|
write 0xFF000508 0x00041180 4
|
||||||
|
write 0xFF000504 0x003F0001 4
|
||||||
|
|
||||||
|
# SDRAM Initialization @ 0000_0000 - 03FF_FFFF 64 Mbytes
|
||||||
|
write 0xFF000004 0x000002AA 4 # SDRAMDS configuration
|
||||||
|
write 0xFF000020 0x00000019 4 # SDRAM CS0 configuration (128Mbytes 0000_0000 - 07FF_FFFF)
|
||||||
|
write 0xFF000024 0x08000000 4 # SDRAM CS1 configuration (128Mbytes 0800_0000 - 0FFF_FFFF)
|
||||||
|
write 0xFF000028 0x10000000 4 # SDRAM CS2 configuration (128Mbytes 1000_0000 - 17FF_FFFF)
|
||||||
|
write 0xFF00002C 0x18000000 4 # SDRAM CS3 configuration (128Mbytes 1800_0000 - 1FFF_FFFF)
|
||||||
|
write 0xFF000108 0x73711630 4 # SDCFG1
|
||||||
|
write 0xFF00010C 0x46370000 4 # SDCFG2
|
||||||
|
|
||||||
|
write 0xFF000104 0xE10B0002 4 # SDCR + IPALL
|
||||||
|
write 0xFF000100 0x40010000 4 # SDMR (write to LEMR)
|
||||||
|
write 0xFF000100 0x058D0000 4 # SDMR (write to LMR)
|
||||||
|
sleep 100
|
||||||
|
write 0xFF000104 0xE10D0002 4 # SDCR + IPALL
|
||||||
|
write 0xFF000104 0xE10D0004 4 # SDCR + IREF (first refresh)
|
||||||
|
write 0xFF000104 0xE10D0004 4 # SDCR + IREF (first refresh)
|
||||||
|
write 0xFF000100 0x018D0000 4 # SDMR (write to LMR)
|
||||||
|
write 0xFF000104 0x710D0F00 4 # SDCR (lock SDMR and enable refresh)
|
||||||
|
sleep 10
|
||||||
|
|
||||||
|
|
||||||
|
# use system sdram as flashlib scratch area.
|
||||||
|
# TODO: plugin flashing seems to work o.k. now for smaller binaries, while it doesn't for larger ones (EmuTOS) yet.
|
||||||
|
# This seems to be related to large flash buffers and PC-relative adressing of the plugin
|
||||||
|
#flash-plugin 0x1000 0xf000 flash29.plugin
|
||||||
|
# notify flashlib that we have flash at address 0xE0000000, length 0x7FFFFF, plugin is flash29
|
||||||
|
flash 0xE0000000
|
||||||
|
flash-plugin 0x1000 0xf000 flashintelc3.plugin
|
||||||
|
|
||||||
|
# Erase flash from 0xE0000000 to 0xE00FFFFF (reserved space for bas)
|
||||||
|
#
|
||||||
|
# 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 0x0
|
||||||
|
#erase 0xE0002000 0x0
|
||||||
|
#erase 0xE0000000 0x00004000
|
||||||
|
#erase 0xE0000000 0x00005000
|
||||||
|
#erase 0xE0000000 0x00006000
|
||||||
|
#erase 0xE0000000 0x00007000
|
||||||
|
#erase 0xE0000000 0x00008000
|
||||||
|
#erase 0xE0000000 0x00009000
|
||||||
|
#erase 0xE0000000 0x0000a000
|
||||||
|
#erase 0xE0000000 0x0000b000
|
||||||
|
#erase-wait 0xe0000000
|
||||||
|
#blank-chk 0xE0000000 0x0
|
||||||
|
load -v m5484lite_dbug_flash.elf
|
||||||
|
wait
|
||||||
67
BaS_gcc/flash_scripts/flash_m548x_etos.bdm
Executable file
67
BaS_gcc/flash_scripts/flash_m548x_etos.bdm
Executable file
@@ -0,0 +1,67 @@
|
|||||||
|
#!/usr/local/bin/bdmctrl -D2
|
||||||
|
#
|
||||||
|
# flash EmuTOS using bdmctrl
|
||||||
|
#
|
||||||
|
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
|
||||||
|
write 0xFF000504 0x007F0001 4
|
||||||
|
|
||||||
|
# SDRAM Initialization @ 0000_0000 - 1FFF_FFFF 512Mbytes
|
||||||
|
write 0xFF000004 0x000002AA 4 # SDRAMDS configuration
|
||||||
|
write 0xFF000020 0x0000001A 4 # SDRAM CS0 configuration (128Mbytes 0000_0000 - 07FF_FFFF)
|
||||||
|
write 0xFF000024 0x0800001A 4 # SDRAM CS1 configuration (128Mbytes 0800_0000 - 0FFF_FFFF)
|
||||||
|
write 0xFF000028 0x1000001A 4 # SDRAM CS2 configuration (128Mbytes 1000_0000 - 17FF_FFFF)
|
||||||
|
write 0xFF00002C 0x1800001A 4 # SDRAM CS3 configuration (128Mbytes 1800_0000 - 1FFF_FFFF)
|
||||||
|
write 0xFF000108 0x73622830 4 # SDCFG1
|
||||||
|
write 0xFF00010C 0x46770000 4 # SDCFG2
|
||||||
|
|
||||||
|
write 0xFF000104 0xE10D0002 4 # SDCR + IPALL
|
||||||
|
write 0xFF000100 0x40010000 4 # SDMR (write to LEMR)
|
||||||
|
write 0xFF000100 0x048D0000 4 # SDMR (write to LMR)
|
||||||
|
sleep 100
|
||||||
|
write 0xFF000104 0xE10D0002 4 # SDCR + IPALL
|
||||||
|
write 0xFF000104 0xE10D0004 4 # SDCR + IREF (first refresh)
|
||||||
|
write 0xFF000104 0xE10D0004 4 # SDCR + IREF (first refresh)
|
||||||
|
write 0xFF000100 0x008D0000 4 # SDMR (write to LMR)
|
||||||
|
write 0xFF000104 0x710D0F00 4 # SDCR (lock SDMR and enable refresh)
|
||||||
|
sleep 10
|
||||||
|
|
||||||
|
|
||||||
|
# use sram as flashlib scratch area
|
||||||
|
# flashing EmuTOS with plugin does not work yet (at least not for 64bit hosts)
|
||||||
|
#flash-plugin 0xFF101000 0xffff flashintelc3.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 0xe0000000 20
|
||||||
|
erase 0xe0000000 21
|
||||||
|
erase 0xe0000000 22
|
||||||
|
erase 0xe0000000 23
|
||||||
|
erase 0xe0000000 24
|
||||||
|
erase 0xe0000000 25
|
||||||
|
erase 0xe0000000 26
|
||||||
|
erase 0xe0000000 27
|
||||||
|
erase 0xe0000000 28
|
||||||
|
erase 0xe0000000 29
|
||||||
|
erase 0xe0000000 30
|
||||||
|
erase 0xe0000000 31
|
||||||
|
erase 0xe0000000 32
|
||||||
|
erase 0xe0000000 33
|
||||||
|
erase 0xe0000000 34
|
||||||
|
erase 0xe0000000 35
|
||||||
|
erase 0xe0000000 36
|
||||||
|
erase 0xe0000000 37
|
||||||
|
erase 0xe0000000 38
|
||||||
|
erase 0xe0000000 39
|
||||||
|
|
||||||
|
load -v ../../emutos_evb/emutos2.elf
|
||||||
Reference in New Issue
Block a user