
aPPendix C deVeLoPMent tooLs
aP-C-4
ePson
s1C33L17 teChniCaL ManuaL
Writing boot program using the debugger
The following shows the procedure to write a program to the boot device using the debugger and to start up
the system from the boot device.
1. Make sure that the target board (S1C33L17) and ICD33 are off.
2. Configure the S1C33L17 BOOT[1: 0] pins, as you want.
3. Turn the target board (S1C33L17) and ICD33 on and start up the debugger on the PC.
4. Execute a command file to disable the boot sequence and to write a boot program to the boot device (NAND
flash, NOR flash, SPI flash, etc.) from the debugger.
5. Terminate the debugger and turn the target board (S1C33L17) and ICD33 off.
6. Configure the S1C33L17 BOOT[1:0] pins according to the boot device.
7. Disconnect the ICD33 and turn the target board (S1C33L17) on.
The S1C33L17 boots up by the boot program written in the device specified.
The following shows an example command file to write the boot program in Step 4. Set the Boot Register
(0x300018) to 0x01 to disable the boot sequence before erasing the flash and writing the program.
Example: To write the boot program test.elf to the NOR flash located in the #CE10 area
# gwb33.cmd command file made by GWB33
c33 das 0x60000 0x84780
# set the map in the debugger
# c33 rpf c33e07.par
# load symbol information
file am29f800.elf
# decide debugger mode and port
target icd com1
# target icd usb
# load to memory
load am29f800.elf
# boot disable, CE10 = 16 bits
set {char} 0x300020 = 0x96
set {char} 0x300018 = 0x01
# flash set command
c33 fls 0xc00000 0xcfffff FLASH_ERASE FLASH_LOAD
# 0xc00000 = flash area start address
# 0xcfffff = flash area end address
# FLASH_ERASE = flash erase routine top address
# FLASH_LOAD = flash load routine top address
#flash erase command
c33 fle 0xc00000 0x0 0x0
# 0xc00000 = flash control register
# 0x0 = erase start block (0: erase all areas 1-19)
# 0x0 = erase end block (this parameter is ignored as the start block is 0)
file test.elf
target icd com1
#target icd usb
# boot disable, CE10 = 16 bits
set {char} 0x300020 = 0x96
set {char} 0x300018 = 0x01
load test.elf