Auto-launch arm-none-eabi-gdb after upload script

User avatar
Rick Kimball
Posts: 1077
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US

Re: Auto-launch arm-none-eabi-gdb after upload script

Post by Rick Kimball » Mon Feb 27, 2017 4:34 pm

I removed the my personal github as it had become too out of date and all the things I wanted changed have been included in the main trunk.

The gdb modifications were just changes to the platform.txt and board.txt. However, those files were changing so frequently it became painful to keep up and not break things. As there wasn't much interest in this, I kind of let it fall by the wayside and I can't find the modifications I did.

In platform.txt I added a new tool and its command line did all the magic. For that tools command line, I started two xterms when you did an upload. One xterm ran the stlink utility ( acting as a gdb proxy ), the other xterm ran arm-none-eabi-gdb. The gdb command connected to remote target :4242, erased the flash, loaded the new version of the program and then set a temporary break point on setup and then issued a reset mon init, continue.

In board.txt I added a new menu item that used the new programming method

If you are using linux and BMP as your upload method, you can use this one line change to platform.txt
platform.txt change wrote:tools.bmp_upload.upload.pattern=xterm -e "{path}{cmd}" -q -cd "{build.path}" {upload.verbose} -ex "layout src" -ex "set target-async off" -ex "set confirm off" -ex "set mem inaccessible-by-default off" -ex "target extended-remote {serial.port}" -ex "monitor swdp_scan" -ex "attach 1" -ex "stop" -ex "file {build.project_name}.elf" -ex "load" -ex "tbreak setup" -ex "run"

Post Reply