Program and Debug Manage

Note: all the path used in this post are examples. Do not blindly copy and paste, they depend on your system and installation!
First, make sure that your board is powered (Connect Manage to Plan, or plug USB cable). Connect the STLink/v2 programmer/debugger to Manage using the Prog Adapt cable. Make sure that it’s seen by your Linux machine.
Debugging:
Open a terminal. Make sure that you are on ~ (tip: type cd. Your prompt will show flexsea@ubuntu:~$). Call openocd -s ~/Desktop/FlexSEA/embedded-arm/openocd-bin/share/openocd/scripts/ -f interface/stlink-v2.cfg -f target/stm32f4x_stlink.cfg. Leave that window open.
pdm1+
In Eclipse, compile for Debug (Compile the Manage project). Click on the Bug icon, use “OpenOCD Debug FlexSEA”. The IDE will switch to the Debug perspective. Click Resume (F8) to start the code.
The RGB LED will be green for a few seconds then blue. LED0 will blink. (Refer to LED conventions & codes for more details, and/or for the latest details) You can use the Pause button to pause the code execution, the Step Into and Over buttons to navigate in the code, the Variables and Watch windows to inspect values, etc.
When you are done you can hit Terminate (Ctrl + F2). In your terminal Ctrl+C will close OpenOCD.
Programming:
In Eclipse, compile for Release (Compile the Manage project). Open a terminal, navigate to the release folder (cd ~/Desktop/FlexSEA/biomech-ee-svn/Code/flexsea_1_0/manage/Release/) and call openocd -s ~/Desktop/FlexSEA/embedded-arm/openocd-bin/share/openocd/scripts/ -f interface/stlink-v2.cfg -f target/stm32f4x_stlink.cfg -c init -c “reset halt” -c “sleep 100” -c “wait_halt 2” -c “flash write_image erase manage.elf” -c “sleep 100” -c “verify_image manage.elf” -c “sleep 100” -c “reset run” -c “shutdown”
pdm2
Your chip is programmed. The RGB LED will be green for a few seconds then blue. LED0 will blink. (Again, refer to LED conventions & codes for more details, and/or for the latest details.)
Comments are closed.