Anyway PR from @Vassilis is welcome
Arduino IDE 2 & Debug feature
Re: Arduino IDE 2 & Debug feature
I have to test a standard install. I've modified my arduino cli yams to make it portable but I think it is not compatible with debug. If true then I will submit an issue to arduno.
Anyway PR from @Vassilis is welcome
Anyway PR from @Vassilis is welcome
Re: Arduino IDE 2 & Debug feature
PR was sent
https://github.com/stm32duino/Arduino_C ... /pull/1952
I have added the STM32F103 (Bluepill) to the debug support list
Of course, thanks to @luca_stm32, on the debug configuration !
https://github.com/stm32duino/Arduino_C ... /pull/1952
I have added the STM32F103 (Bluepill) to the debug support list
Of course, thanks to @luca_stm32, on the debug configuration !
Vassilis Serasidis
https://www.serasidis.gr
https://www.serasidis.gr
Re: Arduino IDE 2 & Debug feature
Thank you all.
As suspected, it seems the debug support is somehow "hardcoded" with the Arduino IDE 2.
Using default location to store installed package and it works. Moreover some variables expansions doesn't work.
I will submit an issue to Arduino IDE.
Here a new json file (available on dev branch) which add openocd link to install within the STM32 core:
https://github.com/stm32duino/BoardMana ... index.json
And here a commit to support it:
https://github.com/stm32duino/Arduino_C ... enocd_ide2
As suspected, it seems the debug support is somehow "hardcoded" with the Arduino IDE 2.
Using default location to store installed package and it works. Moreover some variables expansions doesn't work.
I will submit an issue to Arduino IDE.
Here a new json file (available on dev branch) which add openocd link to install within the STM32 core:
https://github.com/stm32duino/BoardMana ... index.json
And here a commit to support it:
https://github.com/stm32duino/Arduino_C ... enocd_ide2
-
- Posts: 23
- Joined: Tue Feb 18, 2020 3:37 pm
Re: Arduino IDE 2 & Debug feature
What I noticed last eveving is that with Stlink 2.1 (chinese clone) and Arduino IDE 2.0.3 I can program the sketch on the target, but (with OpenOCD 10.0) I can't debug. In order to use debugger, I need to use Stlink 2 (chinese clone).
Great job the inclusion of OpenOCD on STM32 tools: maybe with OpenOCD 12 it could be possible debug also with Stlink 2.1.
Great job the inclusion of OpenOCD on STM32 tools: maybe with OpenOCD 12 it could be possible debug also with Stlink 2.1.
-
- Posts: 23
- Joined: Tue Feb 18, 2020 3:37 pm
Re: Arduino IDE 2 & Debug feature
I found that under STM32Programmer folder there is a folder with all SVD files for STM32 micros: is there a way to load SVD correct file automatically using platform.tx or board.txt?
Re: Arduino IDE 2 & Debug feature
We will investigate that. Anyway as stated it seems debug support is not easily customizable.
Re: Arduino IDE 2 & Debug feature
Thanks it work for me W10 2.0.3 on F103 and ST-link2 
And on F303 Blackpill and Olimex F3

And on F303 Blackpill and Olimex F3
Last edited by umejopa on Tue Feb 21, 2023 4:53 pm, edited 1 time in total.
Re: Arduino IDE 2 & Debug feature
@fpiSTM I am confused. I really don't know what you are trying to do. Can you please explain your thoughts?
Vassilis Serasidis
https://www.serasidis.gr
https://www.serasidis.gr
Re: Arduino IDE 2 & Debug feature
@Vassilis
When we tried the first time, the core was installed in a different location than the default one. Like if we had the portable feature of the legacy 1.8.x.
Because we have a lot arduino installed so for 2.0 IDE we changed the default directories defined in the arduino-cli.yaml.
But in this case the debug do not work as it claims about unknown fqbn even if build is ok.
The second issue is the build variables expansions which is not working as expected. It will allows to define directly for each variant the correct config files but the variables (recipes) are not expanded properly.
When we tried the first time, the core was installed in a different location than the default one. Like if we had the portable feature of the legacy 1.8.x.
Because we have a lot arduino installed so for 2.0 IDE we changed the default directories defined in the arduino-cli.yaml.
But in this case the debug do not work as it claims about unknown fqbn even if build is ok.
The second issue is the build variables expansions which is not working as expected. It will allows to define directly for each variant the correct config files but the variables (recipes) are not expanded properly.
Re: Arduino IDE 2 & Debug feature
The only problem I had with setting up xpack-openocd-0.12.0-1 (Core 2.4.0, Win10 and Linux Mint 20.2, IDE 2.0.3) was that I was getting the following error when trying to click the debug button:
So, the final file path is the following:
openocd_scripts files can be stored in the scripts folder, according to your chosen platform.txt debug paths:
I have tried it on Linux Mint 20.2 and it works too
I solved this by creating a folder named 0.12.0-1 inside the xpack-openocd-0.12.0-1 folder and moved all the files to it. Then I renamed the folder xpack-openocd-0.12.0-1 to xpack-openocd.Failed to launch OpenOCD GDB Server: Error: spawn C:\Users\<USER>\AppData\Local\Arduino15\packages\STMicroelectronics\tools\xpack-openocd-0.12.0-1\openocd/bin/openocd ENOENT
So, the final file path is the following:
openocd_scripts files can be stored in the scripts folder, according to your chosen platform.txt debug paths:
Code: Select all
debug.server.openocd.path={runtime.tools.xpack-openocd-0.12.0-1.path}/bin/openocd
debug.server.openocd.scripts_dir={runtime.tools.xpack-openocd-0.12.0-1.path}/openocd/scripts
debug.server.openocd.script={debug.server.openocd.scripts_dir}/{build.openocdscript}
I have tried it on Linux Mint 20.2 and it works too
Vassilis Serasidis
https://www.serasidis.gr
https://www.serasidis.gr