Ultra simple STM32 debugger

User avatar
Pito
Posts: 1600
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Ultra simple STM32 debugger

Post by Pito » Sun Nov 12, 2017 5:34 pm

It works much better with the new jar.
Upon connect it writes "ST_Link found!" :)
The Halt/Resume is not stable, after several H/R it greys out the Halt and I see java exceptions. It seems it throws exception when looking for .ino while H/R.

Code: Select all

Error: ..\Ice40_Read_1.ino (The system cannot find the file specified)
Exception in thread "AWT-EventQueue-0" java.lang.StringIndexOutOfBoundsException
: String index out of range: -4
        at java.lang.String.substring(Unknown Source)
        at main_form.extract_filepath(main_form.java:694)
        at main_form.send_gdb_cmd(main_form.java:462)
        at main_form.btn_resumeActionPerformed(main_form.java:777)
        at main_form.access$1100(main_form.java:34)
        at main_form$9.actionPerformed(main_form.java:223)
        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour
ce)
        at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at javax.swing.JComponent.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        ..
        
I can step with Next.
I can see maple core files sources only.
When in .ino sketch and stepping the CMD window shows

Code: Select all

C:\Users\123ert\Desktop\Ultra_Simple_STM32_Debugger>java -jar Ultra_Simp
ebugger.jar
ST-Link found !
Error: ..\Ice40_Read_1.ino (The system cannot find the file specified)
Error: ..\Ice40_Read_1.ino (The system cannot find the file specified)
Error: ..\Ice40_Read_1.ino (The system cannot find the file specified)
Error: ..\Ice40_Read_1.ino (The system cannot find the file specified)
Error: ..\Ice40_Read_1.ino (The system cannot find the file specified)
Pukao Hats Cleaning Services Ltd.

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

Re: Ultra simple STM32 debugger

Post by Vassilis » Sun Nov 12, 2017 5:52 pm

Does your file path contain any space character between words ?
For example:

Code: Select all

C:\Users\123ert\Desktop\my project\test.ino
The <my project> has a space character between these two words. That is a small problem.

ps. I added the text resizing feature.
Last edited by Vassilis on Sun Nov 12, 2017 5:53 pm, edited 2 times in total.

User avatar
Pito
Posts: 1600
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Ultra simple STM32 debugger

Post by Pito » Sun Nov 12, 2017 5:52 pm

No spaces..
Do you expect the sketch location (or of any other file) at a specific path?
There is no absolute .ino path inside the elf file - there is "..\Ice40_Read_1.ino"
Last edited by Pito on Sun Nov 12, 2017 6:24 pm, edited 2 times in total.
Pukao Hats Cleaning Services Ltd.

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

Re: Ultra simple STM32 debugger

Post by Vassilis » Sun Nov 12, 2017 6:20 pm

The .elf file uses the xxxx.ino.cpp file that is in the windows temp directory (%temp%)
Go to the temp folder and then to the folder: arduino_build_XXXXXX/sketch
You will see the file YYYYYYYY.ino.cpp. Open it. At the second line (and maybe at the 3rd line) you will see the full .ino file path that is used.

User avatar
Pito
Posts: 1600
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Ultra simple STM32 debugger

Post by Pito » Sun Nov 12, 2017 6:25 pm

I do not use Arduino IDE, but Eclipse.
Pukao Hats Cleaning Services Ltd.

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

Re: Ultra simple STM32 debugger

Post by Vassilis » Sun Nov 12, 2017 6:34 pm

There is no need to use that debugger if you use Eclipse. Eclipse has its own debugging feature. The debugger I wrote is for those who use the Arduino IDE that does not support debugging ;)

User avatar
Pito
Posts: 1600
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Ultra simple STM32 debugger

Post by Pito » Sun Nov 12, 2017 6:36 pm

omg, .. :)
Pukao Hats Cleaning Services Ltd.

User avatar
LightningStalker
Posts: 21
Joined: Fri Nov 03, 2017 5:00 am
Location: GRMI
Contact:

Re: Ultra simple STM32 debugger

Post by LightningStalker » Sun Nov 12, 2017 9:59 pm

Vassilis wrote:
Sun Nov 12, 2017 4:57 pm
At this moment breakpoints function is not supported. I will add this future if there is interest in the software.
I find it quite interesting.
Vassilis wrote:
Sun Nov 12, 2017 4:57 pm
That is a good addition (text resizing). Done !
Great thanks
Pito wrote:
Sun Nov 12, 2017 6:25 pm
I do not use Arduino IDE, but Eclipse.
Never tried e-clips, right now I'm using Arduino IDE and Atom/xed when I need to.

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

Re: Ultra simple STM32 debugger

Post by stevestrong » Mon Nov 13, 2017 10:41 am

Vassilis wrote:
Tue Oct 17, 2017 7:22 pm
The Ultra Simple STM32 debugger is available at the moment on Windows (it is tested on Win 10 64-bit) and Linux (It it tested on Ubuntu 64-bit)
You can download it from my web site because the zip file is too big (7 MB) to be attached.
http://www.serasidis.gr/ARM/Ultra_simpl ... bugger.zip
Vassilis, I cannot unpack it, 7zip says "Unsupported compression method...".
How can I get it?

EDIT
OK, I could unpack it with Win10 explorer.

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

Re: Ultra simple STM32 debugger

Post by stevestrong » Mon Nov 13, 2017 10:57 am

Java throws an error when tried to halt:


EDIT
After a restart it seems to work, it shows source code.

- if you resume and halt again, the old source location will be shown. I had to press "Where" in order to refresh the right position in code.
- It does not want to go inside millis() (inline function), cannot parse header files?
- it would be nice if the displayed file could be opened by clicking on it.
- the register display is not aligned, the 16/8 bit decimal values are shifted to left compared to the 32 bit values.

Post Reply