Skip to main content
CG3
Associate III
March 17, 2023
Solved

Please guide me how to simulate my codes inside of STM32cubeide or recommend me best one to use and if there is step by step topic. I appreciate to do not commend "use real one" Thank you in advance

  • March 17, 2023
  • 5 replies
  • 5809 views

..

This topic has been closed for replies.
Best answer by Tesla DeLorean

Proteus?

Perhaps there are videos on YouTube or yo​u could pay for some training.

5 replies

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
March 17, 2023

Proteus?

Perhaps there are videos on YouTube or yo​u could pay for some training.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
KDJEM.1
ST Technical Moderator
March 17, 2023

Hello @CG3​ ,

I recommend you to refer to Introduction to STM32CubeIDE wiki.

You can find in this wiki many Tutorials and MOOCs can help you to simulate your code with STM32CubeIDE.

I hope this help you!

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
CG3
CG3Author
Associate III
March 18, 2023

Dear @KDJEM.1​ Thank you for your recommendation

Already I checked it and there is nothing about STM32cubeIDE simulator,

I asked from ChatGTP too, and mentioned exist but can't find

Please can you guide me page , or step by step or YouTube video …

Thank you in advance

KDJEM.1
ST Technical Moderator
March 28, 2023

Hello @CG3​ ,

A similar question is already asked : Is STM32CubeIDE including a simulator in the debug mode?

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
Danish1
Lead III
March 18, 2023

What aspect(s) do you wish to simulate?

Stm32 microcontrollers consist of an Arm processor as well as Arm-designed and ST-designed peripherals.

But generally we then put the microcontroller into a system with other components.

Arm processor simulation is possible. But generally unnecessary - for most applications the compiler does a good job of translating source code into machine code.

Arm processor + peripherals is harder to simulate. I know Keil (commercial IDE) used to support this. But it misses two key issues. The first is how accurate the simulation is - often you only resort to simulation if hardware isn’t behaving as expected, and there are so many different versions of a peripheral in production that it’s hard for a simulator-provider to keep up. In particular how accurately does it cover “corner cases�? that don’t occur often and might not be clearly documented in the Reference Manual. And the second is that these peripherals interact directly with external hardware; what should the simulator assume about that!

And of course the system the stm32 sits in isn’t something the simulator-provider knows anything about. To make matters worse, so far we’ve only been simulating digital systems - the outside world is analog so it needs a completely different simulation engine.

(Analog problems can exist inside the stm32 as well - how should the simulator respond if you tell it to use an external crystal and then multiply that too much with the pll oscillator?)

Tesla DeLorean
Guru
March 18, 2023

Good simulation is very expensive, it's not paid for by a lot of people paying nothing for anything.

Hardware prices have dropped significantly, so for $10 - $30 you can get a NUCLEO board with an ST-LINK integrated.

The number of implementations has exploded, so many different parts, from so many different vendors. The exponentially increasing costs of making simulators that work for everything aren't sustainable. That's why businesses aren't rushing into this space.

>>I appreciate to do not commend "use real one"

Unless you're personally willing to bear the costs of what you "want" the solution tends to be what you can afford.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Pavel A.
March 18, 2023
CG3
CG3Author
Associate III
April 7, 2023

Thank you for all for helping :folded_hands: