Download Open On-Chip Debugger: OpenOCD User's Guide

Transcript
Chapter 12: Flash Commands
62
flash bank str7x 0x40000000 0x00040000 0 0 $_TARGETNAME STR71x
str7x disable_jtag bank
[Command]
Activate the Debug/Readout protection mechanism for the specified flash bank.
str9x
[Flash Driver]
Most members of the STR9 microcontroller family from ST Microelectronics include
internal flash and use ARM966E cores. The str9 needs the flash controller to be
configured using the str9x flash_config command prior to Flash programming.
flash bank str9x 0x40000000 0x00040000 0 0 $_TARGETNAME
str9x flash_config 0 4 2 0 0x80000
str9x flash_config num bbsr nbbsr bbadr nbbadr
[Command]
Configures the str9 flash controller. The num parameter is a value shown by
flash banks.
• bbsr - Boot Bank Size register
• nbbsr - Non Boot Bank Size register
• bbadr - Boot Bank Start Address register
• nbbadr - Boot Bank Start Address register
tms470
[Flash Driver]
Most members of the TMS470 microcontroller family from Texas Instruments include
internal flash and use ARM7TDMI cores. This driver doesn’t require the chip and
bus width to be specified.
Some tms470-specific commands are defined:
tms470 flash_keyset key0 key1 key2 key3
[Command]
Saves programming keys in a register, to enable flash erase and write commands.
tms470 osc_mhz clock mhz
[Command]
Reports the clock speed, which is used to calculate timings.
tms470 plldis (0|1)
[Command]
Disables (1) or enables (0) use of the PLL to speed up the flash clock.
12.4.3 str9xpec driver
Here is some background info to help you better understand how this driver works.
OpenOCD has two flash drivers for the str9:
1. Standard driver ‘str9x’ programmed via the str9 core. Normally used for flash programming as it is faster than the ‘str9xpec’ driver.
2. Direct programming ‘str9xpec’ using the flash controller. This is an ISC compilant
(IEEE 1532) tap connected in series with the str9 core. The str9 core does not need
to be running to program using this flash driver. Typical use for this driver is locking/unlocking the target and programming the option bytes.
Before we run any commands using the ‘str9xpec’ driver we must first disable the str9
core. This example assumes the ‘str9xpec’ driver has been configured for flash bank 0.