CodeBlocks as debugging IDE with STM32Duino

Development environment specific, Arduino, Eclipse, VS2013,Em::Blocks etc
User avatar
Slammer
Posts: 241
Joined: Tue Mar 01, 2016 10:35 pm
Location: Athens, Greece

Re: CodeBlocks as debugging IDE with STM32Duino

Postby Slammer » Wed Aug 03, 2016 8:29 pm

Adruino STM32 is using -Os optimization flag, this is very aggressive for debugging purposes. Due to optimizations it is possible to lose stepping on some lines or some variables etc...
You can change the flag on platform.txt inside STM32F1 directory from -Os to -Og for better results.

michael_l
Posts: 289
Joined: Mon Aug 24, 2015 6:11 pm

Re: CodeBlocks as debugging IDE with STM32Duino

Postby michael_l » Thu Aug 04, 2016 7:04 am

Slammer wrote:Adruino STM32 is using -Os optimization flag, this is very aggressive for debugging purposes. Due to optimizations it is possible to lose stepping on some lines or some variables etc...
You can change the flag on platform.txt inside STM32F1 directory from -Os to -Og for better results.


Yes, you're right. -0g is needed in some cases.

For the other computer not working with OpenOCD. Seems there's problem with libusb... here's dump from debugview:


Code: Select all

[10664] libusb0-dll:[os_find_busses] found bus-0
[10664] libusb0-dll:[os_find_devices] found \\.\libusb0-0001--0x0483-0x374b on bus-0
[10664] libusb0-dll:err [os_open] invalid file name virtual-hub


EDIT: Plugged in another USB port which apparently is not a HUB and now OpenOCD connects to nucleo ! took me a while to find this out.. lol. So seems that libusb does not like devicec connected to Usb Hubs which I find quite strange

michael_l
Posts: 289
Joined: Mon Aug 24, 2015 6:11 pm

Re: CodeBlocks as debugging IDE with STM32Duino

Postby michael_l » Mon Feb 06, 2017 7:37 pm

Is there a way in CodeBlocks to start only debugging for a specific .elf file ?

Now the IDE wants to compile my program first which returns an error and does not let the debugging start. I'm using Arduino IDE for compiling.


Return to “IDE's”

Who is online

Users browsing this forum: No registered users and 1 guest