Ultra simple STM32 debugger

stevestrong
Posts: 1611
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Ultra simple STM32 debugger

Post by stevestrong » Thu Sep 28, 2017 5:54 am

I am best served with Windows (Linux is a pain for me :? ).
However, I would go with Java if cross-platform needed.

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

Re: Ultra simple STM32 debugger

Post by RogerClark » Thu Sep 28, 2017 6:23 am

I can't find the docs for the Arduino Java tools, but I know Sandeep Mistry wrote a special BurnBootloader tool

https://github.com/sandeepmistry/arduin ... evice.java

and Arduino's own tools seem to be here

https://github.com/arduino/Arduino/tree ... essing/app

Perhaps someone knows where this is documented ??

stevestrong
Posts: 1611
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Ultra simple STM32 debugger

Post by stevestrong » Thu Sep 28, 2017 2:48 pm


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

Re: Ultra simple STM32 debugger

Post by RogerClark » Thu Sep 28, 2017 9:16 pm

Thanks Steve

Yes. I did mean the SoftDevice flashing tool, written by Sandeep...

i see he has a build.sh file, which can easily be ported to build.bat, so it should be possible to test the build process for these sorts of tools.

I know some people were also interested in a burn bootloader tool, so I may investigate doing that..

Also, thanks for the link to that other tool, I will read it and perhaps it shows how to integrate the debugger that Vasillis has written.

Edit.

I looked at Adublocks, but its not especially helpful, as there is no discussion about what API is available in the Arduino IDE.

I guess there is no alternative except to trawl though the code trying to understand how it does specific things.

I looked on the Arduino.cc , and they have a page about using Java with the IDE but it does not document the API which is exposed to these Java tools.

I presume ArdunoBlocks has some form of integration with the editor window in the IDE, which would be useful, but its not going to be easy to find how it updates the IDE editor without searching though all the java files :-(

stevestrong
Posts: 1611
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Ultra simple STM32 debugger

Post by stevestrong » Fri Sep 29, 2017 12:19 pm

Yea, I agree, it is a hard rocky way to reverse-engineer the Java API used by Arduino IDE in the absence of official Arduino documentation...

stevestrong
Posts: 1611
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Ultra simple STM32 debugger

Post by stevestrong » Fri Sep 29, 2017 1:40 pm

Wouldn't be easier to combine somehow the Arduino IDE (or at least its output) with Eclipse StandaloneDebugger?
Or, one step further, one could maybe use Notepad++ for editing, launch Arduino CLI to build the project and Eclipse standalone CDT to debug...

I cannot imagine any much more complicated solution :mrgreen:

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

Re: Ultra simple STM32 debugger

Post by RogerClark » Fri Sep 29, 2017 8:37 pm

I tried to use the Eclipse Standalone Debugger a few months ago, but it did not work on Windows, and as far as I could tell, no one on the Eclipse dev team was working on it.

But perhaps they have fixed it now.

Even if it work... Its a big additional program to install.

Much better if some sort if simple debugger was part of the Arduino IDE, but for some reason the management at Arduino.cc have always been very negative about debuggers and claim they are only for advanced users, and not the sort of people that use the Arduino IDE.
This is of course complete rubbish, as all browsers now contain a javascript debugger for the script kiddies to play with.

So perhaps the real reason that the Arduino IDE does not have a debugger is because of Arduino.cc's close ties to Atmel aka Microchip, as Arduino.cc tell people to use Atmel Studio if you want a debugger.

User avatar
Squonk42
Posts: 94
Joined: Thu Dec 29, 2016 9:25 am
Location: Bordeaux, France

Re: Ultra simple STM32 debugger

Post by Squonk42 » Sat Sep 30, 2017 8:27 am

Sorry, I am on Linux, others will be on Macs. So Windows only, no source => no go.

Unless you open source it so people can help you improve your idea and make it portable, this project is going to a dead end.

You can try Python or Qt to avoid proprietary traps like C#n F# or Java.

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

Re: Ultra simple STM32 debugger

Post by RogerClark » Sat Sep 30, 2017 11:01 am

Squonk42 wrote:
Sat Sep 30, 2017 8:27 am
...

You can try Python or Qt to avoid proprietary traps like C#n F# or Java.
The Arduino IDE already uses Java and the "tools" use its runtime. So if the debugger is for use with the Arduino IDE, I don't see any problem with using Java.

However if it was intended to be a general purpose / cross platform application, probably Python has the least restrictive license

User avatar
Vassilis
Posts: 313
Joined: Thu May 21, 2015 6:42 am
Location: Thessaloniki, Greece
Contact:

Re: Ultra simple STM32 debugger

Post by Vassilis » Sat Sep 30, 2017 4:49 pm

Ok guys, you have convinced me. Despite the fact that I have been a linux user (Ubuntu) for many years, I had chose to write the debugger for windows because it's the operating system I use more than linux.
I have to admit that Rick is right on that. It is better for me to write the debugger in a cross platform language. I would prefer Java instead of python because I am familiar with that language.

So, I will give a try to port the debugger to Java.
Last edited by Vassilis on Sat Sep 30, 2017 4:51 pm, edited 1 time in total.

Post Reply