Have checked here and so far its not listed.
Understand that the Porteneta project is a big one and I need to be patient but just looking for an advance idea of what could happen.
Have checked here and so far its not listed.
Understand that the Porteneta project is a big one and I need to be patient but just looking for an advance idea of what could happen.
I know that it can be done using a debugger/ICE.
My inquiry was whether the IDE 2.0 could do it.
Hi @embedder. The "Arduino Mbed OS Portenta Boards" platform of the Arduino Portenta H7 has not yet been configured to work with the Arduino IDE 2.x integrated debugger.
There is a feature request about that here:
If you have a GitHub account, you can subscribe to that issue to get notifications of any new developments related to this subject.
The only official Arduino boards platform which has been configured for use with the IDE 2.x integrated debugger currently is the "Arduino SAMD (32-bits ARM Cortex-M0+) Boards" platform of the Zero, Nano 33 IoT, and MKR boards. The Zero is especially convenient due to having an on-board debug probe.
For now, even though debugging capability is not available within the Arduino IDE, you do have the option of using the external Lauterbach TRACE32 debugger application with the Portenta H7:
"Welcome in the club". You have hit the biggest flaw of this Portenta H7 board (even I could cry...).
Portenta H7 does NOT provide a real debug feature.
Even, it has SWD interface (Single Wire Debug), easier to access via the breakout board - it does NOT support breakpoints, not stepping through the code etc. (linked to your source code and "source code debugging" - not possible).
Even you see TRACE32 support and "free debugger" (yes, there is an interface for TRACE32) - it is not the same as "source code debugging" (with breakpoints, instruction steps):
TRACE32 is to monitor, to observe, which code is executed, in real time. It does not support to use breakpoints, not to inspect registers, not to see on which source code line you are etc. TRACE32 is more for monitoring the system when it runs, not to find bugs in source code.
OK, Portenta H7 has a SWD interface: Yes, you can connect a debugger dongle, e.g. ST-Link (or anything else supporting ARM SWD interface).
But it does not help to use breakpoints, to step through the code etc. Not really a "Debugger in Arduino (!) IDE" available.
You need an IDE where the debugger is "integrated" as a tool. But Arduino IDE, even VSMicro does not have.
Even it would be possible, the biggest problem: Arduino do not provide all code as Open Source.
In order to build my project with full debugger support - let's assume I try to use IAR IDE, the STM32Cube IDE etc. - I would need really all files as Open Source code, including the startup.S, the bootloader (when it is involved), the configuration of all board components needed (e.g. the PMIC as power controller on board).
But: I cannot find and collect all code files I would need in order to setup a project with every line of code under my control, as real source code. Arduino does not provide (and they are not willing to do so, after my request submitted).
So, you will potentially never have the feature to use breakpoints, to step through your code etc.
My "wish" is:
Due to SWD interface is provided, I can connect ST-Link debugger. But I need an IDE (e.g. STM32Cube, AC6, IAR, ...) with debugger supported (Arduino IDE and VSMicro does not, per default install).
In addition I would need all source code lines: build everything in debug mode, have also startup and system init as source code (e.g. PMIC configuration). And IDE builds a project where I can have a breakpoint on main() (which sits right now just in a *.o, in LIB file, not built for debug), So that I can single step through my C-code.
All would be fine if:
Arduino would support also other IDEs with full debugger support (e.g. STM32CubeIDE, IAR, Attolic Studio, ...)
and provide really all lines of code as Open Source (including the startup, system config, main() function etc.), at least a debug version of the LIB to link.
or a guideline how to build code which is loaded after the (proprietary) bootloader was activating it, but with a link to the debugger, so that I can step through my own code, e.g. when entering setup(), loop().
TRACE32 is NOT source-code debug. Any SWD debugger is possible to connect (via HW signals) - besides TRACE32 (a different interface), but IDE and software generation does NOT support (hardware) debug.
My best friends:
Portenta H7 is painful when it comes to debug. And a missing debug feature does not match with the promise "for professional and industrial use".
Dear Arduino team
please, can you provide a guideline how to use an (external) hardware debugger (e.g. ST-Link or other, via SWD)?
Very appreciated!
I think this approach could technically work:
OK: you do not want to disclose the bootloader, not publish the startup code, not distribute the system configuration (all code done before I enter the setup() or loop() functions remains proprietary).
OK: the FW load needs still the bootloader (this one flashing my user code located at address 0x08040000 and above). OK: the SWD debugger cannot flush the code (not able to include to write your bootloader code). But: maybe it can write FLASH ROM at the same starting entry address 0x0804000,
But let boot the system via the bootloader (flashing and entering my code).
When the code is launched (via the bootloader and ResetHandler) and it ends up in my user code - the SWD debugger could "take over": it could stop on setup() and/or loop() entry. Or: I use a "bkpt" instruction to tell SDW debugger to stop there: "I want to stop here" (before I continue). And now external SWD debugger takes over.
So, it could be a two-step action. Question is just: "how to add a real HW debugger" (in order to debug my code, not your non-disclosed code)?
The bootloader still loads all code as it do right now. But the SDW debugger is changed to "hot": and when it sees a trigger that setup() or loop() is activated (a HW breakpoint set via SWD debugger) - the debugger takes over.
From now on: the debugger let me step through my code, let me use breakpoints on my code etc. OK: I understand you do not want to allow stepping into your code (e.g. a LIB function). But this might be anyway not possible if no source code provided, the LIB code not generated in debug mode (with debug info).
The debugger can "see" and use my source code (not your code).
So, technically, it should be possible to use an external (hardware) debugger. Just a question if Arduino IDE would allow such a "complex" startup script (commands when downloading and launching new FW): load and flash code via bootloader but hand-over to debugger for user code debug.
BTW:
If Arduino IDE does not support to use an external SWD debugger: what about to support STM32Cube IDE, AC6 IDE, IAR, Attolic Studio etc. - intended for STM32 processors (as Portenta H7 is)? For my feeling anyway good to have the option and choice (especially the Arduino IDE is "soooo slow". the compile).
Debugger support (e.g. ST-Link, OpenOCD) is there (in other IDEs) - for sure. Just give use guidelines how to build, load and execute our FW code, in combination with your not-disclosed bootloader, startup code, LIB etc. - in Arduino IDE (or even in another one).
It would be nice to use an Arduino IDE, even another IDE, which supports Portenta H7 with HW debug and "follows" the approach/intention of Open Source.
Thank you.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.