Debugging Arduino sketch with STM32 Nucleo in Eclipse .. works !

Development environment specific, Arduino, Eclipse, VS2013,Em::Blocks etc
racemaniac
Posts: 345
Joined: Sat Nov 07, 2015 9:09 am

Re: Debugging Arduino sketch with STM32 Nucleo in Eclipse .. works !

Postby racemaniac » Sun Feb 21, 2016 8:42 pm

stevech wrote:
robca wrote:Windows x64.... everything works when used normally, I simply need the modified Arduino IDE at this point, to create the right .elf file

Why not use Visual Micro? Supports Arduino's concept for compiling. Supports ARM Cortex targets. It is a plugin to the free Visual Studio which IMO is the best IDE there is.
And both are free. But WIndows-only.
No tool fighting. Just use the install wizard and it works in 10 minutes. Intuitive.

I suffered a year working with Eclipse every day on a project. When that ended, I gladly stopped wearing the Eclipse shoes-with-rocks.

I'm wondering, i thought i'd also give it a try, and installed visual studio 2015 community & visual micro on it.
And when i try to build a basic arduino project for the maple mini, i get the following compiling errors:

Code: Select all

VM_DBG.cpp:In file included from
VM_DBG.h:216:2: error: 'UARTClass' does not name a type
:UARTClass *transport
VM_DBG.h:217:13: error: 'UARTClass' has not been declared
:void begin(UARTClass *theSerial, unsigned long baud)
VM_DBG.h:In member function 'void VisualMicroDebug::setVariable(T&, int, int)
VM_DBG.h:363:2: error: 'transport' was not declared in this scope
etc....

The debugging feature it has seems to be giving issues when i build (it's maybe looking for libraries that the regular arduino has, but stm32duino hasn't or so?)
Did i do something wrong?

User avatar
RogerClark
Posts: 5470
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Debugging Arduino sketch with STM32 Nucleo in Eclipse .. works !

Postby RogerClark » Sun Feb 21, 2016 9:13 pm

You'd need to speak to the Visual Mirco guys about this.

I know they have general support for ArduinoSTM32 but I have not investigated the debugging side of things

(Note. Visual Micro registered as a user on this forum, so you could PM them)

stevech
Posts: 442
Joined: Thu Aug 27, 2015 6:32 am

Re: Debugging Arduino sketch with STM32 Nucleo in Eclipse .. works !

Postby stevech » Mon Feb 22, 2016 5:07 am

Tim, Mr. Visual Mico, is very good about responding.
He put extra effort into getting Teensy ARM M4 (Freescale) working as Arduino folks kept dorking with the boards.txt strategy.

I prefer to use ST's CubeMX and HAL. Preference. Much broader support base in the HAL than Arduino-esque.
But I know many people are comfortable with Arduino concept.

racemaniac
Posts: 345
Joined: Sat Nov 07, 2015 9:09 am

Re: Debugging Arduino sketch with STM32 Nucleo in Eclipse .. works !

Postby racemaniac » Mon Feb 22, 2016 7:42 am

RogerClark wrote:You'd need to speak to the Visual Mirco guys about this.

I know they have general support for ArduinoSTM32 but I have not investigated the debugging side of things

(Note. Visual Micro registered as a user on this forum, so you could PM them)

after some looking around in the menus & project settings i finally found where to disable the debugging, and now it compiles.
I now have to figure out how to make it upload the sketch (it was complaining about missing java, so i'll have a go at installing the JDK :) )

And i'll also leave visualmicro a message about what is and isn't working for me :). It does indeed look like they stay on top of things ^^

racemaniac
Posts: 345
Joined: Sat Nov 07, 2015 9:09 am

Re: Debugging Arduino sketch with STM32 Nucleo in Eclipse .. works !

Postby racemaniac » Mon Feb 22, 2016 6:12 pm

racemaniac wrote:
RogerClark wrote:You'd need to speak to the Visual Mirco guys about this.

I know they have general support for ArduinoSTM32 but I have not investigated the debugging side of things

(Note. Visual Micro registered as a user on this forum, so you could PM them)

after some looking around in the menus & project settings i finally found where to disable the debugging, and now it compiles.
I now have to figure out how to make it upload the sketch (it was complaining about missing java, so i'll have a go at installing the JDK :) )

And i'll also leave visualmicro a message about what is and isn't working for me :). It does indeed look like they stay on top of things ^^

After installing the JDK, (and manually putting its bin file in my PATH variable...) i can now upload sketches from visual studio to my maple mini :)

stevech
Posts: 442
Joined: Thu Aug 27, 2015 6:32 am

Re: Debugging Arduino sketch with STM32 Nucleo in Eclipse .. works !

Postby stevech » Tue Feb 23, 2016 2:50 am

upload and debugging (per thread title)?

debugging = SWD or JTAG.

racemaniac
Posts: 345
Joined: Sat Nov 07, 2015 9:09 am

Re: Debugging Arduino sketch with STM32 Nucleo in Eclipse .. works !

Postby racemaniac » Tue Feb 23, 2016 7:28 am

stevech wrote:upload and debugging (per thread title)?

debugging = SWD or JTAG.

nope, just upload. The debugging still fails when building.
i'm wondering how the visual micro debugging system should work.

stevech
Posts: 442
Joined: Thu Aug 27, 2015 6:32 am

Re: Debugging Arduino sketch with STM32 Nucleo in Eclipse .. works !

Postby stevech » Tue Feb 23, 2016 7:59 pm

racemaniac wrote:
stevech wrote:upload and debugging (per thread title)?

debugging = SWD or JTAG.

nope, just upload. The debugging still fails when building.
i'm wondering how the visual micro debugging system should work.


Visual Micro's debugger is all-software; no SWD, no JTAG. The IDE has breakpoints and variable tracing but what the IDE does is insert source code to implement those. So it's valuable for simple situations, no ISR breakpoints, and so on.

SWD via ST-Link with SWD... I haven't seen it in a strictly Arduino-esque free IDE. If you use ST's Standard Peripheral Library or better, ST's HAL, and an IDE like free version (size limited, 32KB code) of IAR, or if you purchase a hobby/student license for Visual GDB, you get gdb debugging via SWD and ST-Link or the counterfeits. There's also Rowley's IDE atop GCC, and it supports, I think, SWD and has a hobbyists' license.

Maybe someone else knows of how to do real SWD debugging with free or cheap.

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

Re: Debugging Arduino sketch with STM32 Nucleo in Eclipse .. works !

Postby michael_l » Fri Jul 15, 2016 8:26 pm

After a long pause decided to try Arduino IDE 1.6.9 and latest Arduino_STM32 .zip package. It looks like Arduino IDE produces .elf binary with correct paths! So I just compiled a OLED sample project and started a debug session with Eclipse. I am using blue pill with St-Link V2 dongle. It worked just fine and I could even add 'global' expressions in Eclipse IDE. Just wanted to tell this if someone is trying so there's no need to use modified Arduino IDE

User avatar
RogerClark
Posts: 5470
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Debugging Arduino sketch with STM32 Nucleo in Eclipse .. works !

Postby RogerClark » Fri Jul 15, 2016 9:43 pm

Which OS are you using ?


Return to “IDE's”

Who is online

Users browsing this forum: No registered users and 1 guest