Running ChibiOS demo on an Olimex STM32F405 and ST-Link V2 through OpenOCD
Posted: Sat Feb 11, 2017 8:37 am
Hello everyone and Happy Valentines Day! I am (of course) having trouble running ChibiOS on an Olimex STM32F405, and I am not sure exactly where my problem(s) is(are). Development env is Windows 8.1 Eclipse Mars.2 Release (4.5.2) with the GNU plugins including OpenOCD. I am using an ST-Link V2 from Adafruit as debug tool.
I followed the instructions on how to set up eclipse and use/import a ChibiOS demo.
http://www.chibios.org/dokuwiki/doku.ph ... s:eclipse1
http://gnuarmeclipse.github.io/debug/openocd/
I used the RT-STM32F407 Discovery demo, and switched the linker script in the makefile from STM32F407 to STM32F405. I also changed the led blink function to GPIOC pin 12, which is the LED on the Olimex STM32F405. The demo compiles with no errors. I don't know if these two changes are sufficient to get ChibiOS running on an Olimex STM32F405 board.
I am able to use the STM32 ST-LINK utility to load the demo onto the Olimex STM32F405, and I can read the code back from the registers, but the LED does not blink. I do not know how to verify that the code is loaded correctly or that the processor is executing code or in a soft reset or w/e. Since the LED doesn't blink when loading the bin file directly, I wonder if the RT STM32F407 Discovery demo is not the right source, or maybe there is not a ChibiOS demo that can work with the Olimex STM32F405. I hope that ChibiOS can work with the F405 as I am a fan of the qfp-64 package due to its small size, fast processor and CAN bus port.
When I try and use OpenOCD to debug the software from inside Eclipse, it seems to load but then stops. All the text is red, not sure if that's normal or not. I used these commands from the debug instructions, but with monitor stm32f4x mass_erase 0 instead of stm32f1x. My project name is ch.
monitor soft_reset_halt
monitor soft_reset_halt
monitor wait_halt
monitor poll
monitor flash probe 0
monitor stm32f4x mass_erase 0
monitor flash write_bank 0 build/ch.bin 0
monitor soft_reset_halt
The solution is probably very simple, but I have been trying for a few weeks to get this to work and I have no idea what else to try. I can post the gdb openocd debug log if that will help. I am not sure if my ChibiOS example code is incorrect or if my OpenOCD settings are incorrect, and I am not sure how to debug beyond this point.
Thank you for reading and for any help you can provide. God bless.
I followed the instructions on how to set up eclipse and use/import a ChibiOS demo.
http://www.chibios.org/dokuwiki/doku.ph ... s:eclipse1
http://gnuarmeclipse.github.io/debug/openocd/
I used the RT-STM32F407 Discovery demo, and switched the linker script in the makefile from STM32F407 to STM32F405. I also changed the led blink function to GPIOC pin 12, which is the LED on the Olimex STM32F405. The demo compiles with no errors. I don't know if these two changes are sufficient to get ChibiOS running on an Olimex STM32F405 board.
I am able to use the STM32 ST-LINK utility to load the demo onto the Olimex STM32F405, and I can read the code back from the registers, but the LED does not blink. I do not know how to verify that the code is loaded correctly or that the processor is executing code or in a soft reset or w/e. Since the LED doesn't blink when loading the bin file directly, I wonder if the RT STM32F407 Discovery demo is not the right source, or maybe there is not a ChibiOS demo that can work with the Olimex STM32F405. I hope that ChibiOS can work with the F405 as I am a fan of the qfp-64 package due to its small size, fast processor and CAN bus port.
When I try and use OpenOCD to debug the software from inside Eclipse, it seems to load but then stops. All the text is red, not sure if that's normal or not. I used these commands from the debug instructions, but with monitor stm32f4x mass_erase 0 instead of stm32f1x. My project name is ch.
monitor soft_reset_halt
monitor soft_reset_halt
monitor wait_halt
monitor poll
monitor flash probe 0
monitor stm32f4x mass_erase 0
monitor flash write_bank 0 build/ch.bin 0
monitor soft_reset_halt
The solution is probably very simple, but I have been trying for a few weeks to get this to work and I have no idea what else to try. I can post the gdb openocd debug log if that will help. I am not sure if my ChibiOS example code is incorrect or if my OpenOCD settings are incorrect, and I am not sure how to debug beyond this point.
Thank you for reading and for any help you can provide. God bless.