Northeastern-Electric-Racing / Embedded-Base

A collection of drivers, middleware, and development tools for use across systems
2 stars 1 forks source link

[DevOps] - Update Shepherd's Dockerfile #61

Closed dyldonahue closed 7 months ago

dyldonahue commented 9 months ago

Current Features

We currently have a dockerfile with helpful utilities and aliases

Desired Additional Features

We want to fix and add some features. Here is what im thinking need to be done here:

biggest change:

this command currently allows us to open openocd and gdb and start debugging in one command. The main problem is that there is no clean way to exit both gdb and openocd right now, and i think we need a bash script to do so. The general idea behind this script needs to be "on execution of this command, open both openocd and gdb (this part already happens), but when gdb is exited, kill openocd". Now, openocd will cleanly be killed when gdb is exited. Also, we want to embed this into our dockerfile. The idea here would be to use the "echo" command to copy the bash script made to a file on the spot - and alias the execution of this bash script so that the follwing command, and the bash script that helps us exit can be executed with one alias. here is the command :

"openocd -f interface/cmsis-dap.cfg -f target/stm32f4x.cfg -c "adapter speed 5000" -c "init" -c "reset halt" & sleep 1 && arm-none-eabi-gdb /home/app/build/shepherd2.elf -ex "target remote localhost:3333""

Screenshots (as needed)

No response

dyldonahue commented 8 months ago

UPDATE: second part of this ticket is duplicated here. this ticket will no longer include that but feel free to have someone take on both tickets if desired