diff options
author | inmarket <andrewh@inmarket.com.au> | 2015-10-05 11:23:31 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2015-10-05 11:23:31 +1000 |
commit | d4ef20f47ece19d3a6072d708b9ce316497e00e0 (patch) | |
tree | 08f8d522ceecc1f45cbb98a6436c60d4926a5621 /boards/base/STM32F746-Discovery/example_chibios3/openocd.cfg | |
parent | e699e549ac015cfe40da0134095a05254978bd47 (diff) | |
download | uGFX-d4ef20f47ece19d3a6072d708b9ce316497e00e0.tar.gz uGFX-d4ef20f47ece19d3a6072d708b9ce316497e00e0.tar.bz2 uGFX-d4ef20f47ece19d3a6072d708b9ce316497e00e0.zip |
Support for ChibiOS3 (master branch only currently) for the STM32F729-Discovery board.
Not working yet.
Diffstat (limited to 'boards/base/STM32F746-Discovery/example_chibios3/openocd.cfg')
-rw-r--r-- | boards/base/STM32F746-Discovery/example_chibios3/openocd.cfg | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/boards/base/STM32F746-Discovery/example_chibios3/openocd.cfg b/boards/base/STM32F746-Discovery/example_chibios3/openocd.cfg new file mode 100644 index 00000000..e2d732a4 --- /dev/null +++ b/boards/base/STM32F746-Discovery/example_chibios3/openocd.cfg @@ -0,0 +1,94 @@ +# This is a script file for OpenOCD ?.?.? +# +# It is set up for the STM32F749-Discovery board using the ST-Link JTAG adaptor. +# +# Assuming the current directory is your project directory containing this openocd.cfg file... +# +# To program your device: +# +# openocd -f openocd.cfg -c "Burn yourfile.bin" -c shutdown +# +# To debug your device: +# +# openocd +# (This will run openocd in gdb server debug mode. Leave it running in the background) +# +# gdb yourfile.elf +# (To start gdb. Then run the following commands in gdb...) +# +# target remote 127.0.0.1:3333 +# monitor Debug +# stepi +# (This last stepi resynchronizes gdb). +# +# If you want to reprogram from within gdb: +# +# monitor Burn yourfile.bin +# + +echo "" +echo "##### Loading debugger..." +source [find interface/stlink-v2-1.cfg] + +echo "" +echo "##### Loading CPU..." +source [find target/stm32f7x.cfg] + +echo "" +echo "##### Configuring..." +#reset_config srst_only srst_nogate +#cortex_m maskisr (auto|on|off) +#cortex_m vector_catch [all|none|list] +#cortex_m reset_config (srst|sysresetreq|vectreset) +#gdb_breakpoint_override hard + +proc Debug { } { + echo "" + echo "##### Debug Session Connected..." + reset init + echo "Ready..." +} + +proc Burn {file} { + echo "" + echo "##### Burning $file to device..." + halt + # Due to an issue with the combination of the ST-Link adapters and OpenOCD + # applying the stm32f2x unlock 0 command actaully applies read protection - VERY BAD! + # If this happens to you - use the ST-Link utility to set the option byte back to normal. + # If you are using a different debugger eg a FT2232 based adapter you can uncomment the line below. + #stm32f2x unlock 0 + #flash protect 0 0 last off + reset halt + flash write_image erase $file 0 elf + verify_image $file 0x0 elf + #flash protect 0 0 last on + reset + echo "Burning Complete!" +} + +echo "" +echo "##### Leaving Configuration Mode..." +init +reset init +flash probe 0 +flash banks +#flash info 0 + +echo "" +echo "##### Waiting for debug connections..." + +##### OLD ###### +#source [find interface/stlink-v2-1.cfg] +#source [find target/stm32f7x.cfg] +# +#proc flash_chip {} { +# halt +# reset halt +# flash write_image erase main.elf 0 elf +# verify_image main.elf 0 elf +# reset +# shutdown +#} +# +#init |