Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STM32Cube issues #6

Open
Crazor opened this issue Apr 23, 2024 · 2 comments
Open

STM32Cube issues #6

Crazor opened this issue Apr 23, 2024 · 2 comments

Comments

@Crazor
Copy link

Crazor commented Apr 23, 2024

Hi,
first of all thanks for these demo projects! I successfully used the STM32 Arduino demo.
I'm in the process of setting up Renode in an STM32Cube based project, but I'm stuck.

To check if this is a general issue or if this is specific to my existing project, I used your STM32 Arduino project as a base, changed the framework from Arduino to STM32cube and swapped the arduino-specific main.cpp to a trivial STM32Cube based main. The code compiles just fine, however on launching the debugger, I get

[...]
PlatformIO: Initializing remote target...
.pioinit:13: Error in sourced command file:

in the debug console, and that's it. Renode does not launch anymore, and the debugger does not connect.

TBH, I'm at a loss here. Something specific about the STM32Cube framework seems to change how the debug process is initiated, and I haven't yet learned about the finer details of how that works. I'm not sure where that .pioinit file is located, and since there are no further errors, I'm not sure how to continue analyzing the issue.

Can you give me any pointers? Have you used Renode successfully with the STM32Cube framework?

@Crazor
Copy link
Author

Crazor commented Apr 23, 2024

Alright, by running pio debug --interface=gdb -- -x .pioinit, I was able to get the error message that I thought was probably missing: (gdb) Remote communication error. Target disconnected.: Success.

So the issue really is that Renode is not running. If I trigger an upload by myself to launch Renode, I can then successfully connect the debugger either on the shell or in VS Code to the running Renode instance. This is not necessary with the Arduino STM32 example though, so I'm not sure what the difference might be that causes the example to launch Renode before connecting GDB.

@carlosedp
Copy link
Owner

It's been a while since I've used PIO and Renode together so something might have changed in the meantime.

If you find an error and could send a PR, I'd look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants