Proteus Simulation Failure

Post here first, or if you can't find a relevant section!
Post Reply
shenavar
Posts: 5
Joined: Fri Feb 25, 2022 6:49 am

Proteus Simulation Failure

Post by shenavar »

I used to simulate my Arduino code in Proteus simulation software by Labcenter Electronics. I am new in STM32 field and started two weeks ago. My board is BackPill F401CC. It is very easy to program the board using STM32cubeIDE and upload it to board or simulate it using Proteus. However I can program the board using Arduino for STM32 but the resulting HEX file cannot be used in Proteus simulation and fails to simulate. What is the reason. Is there any workaround?
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Proteus Simulation Failure

Post by fpiSTM »

Hi,

first which core you used ?
What is the requirement for proteus simulation?
Maybe you need to enable debug symbol?
shenavar
Posts: 5
Joined: Fri Feb 25, 2022 6:49 am

Re: Proteus Simulation Failure

Post by shenavar »

Hi
Last edited by shenavar on Sat Feb 26, 2022 6:42 am, edited 1 time in total.
shenavar
Posts: 5
Joined: Fri Feb 25, 2022 6:49 am

Re: Proteus Simulation Failure

Post by shenavar »

fpiSTM wrote: Fri Feb 25, 2022 8:11 am Hi,

first which core you used ?
What is the requirement for proteus simulation?
Maybe you need to enable debug symbol?
Hi

I don't understand what exactly you mean by CORE. I am new to STM32 and used to work with mega328 most of the time.

As far as I know, the BlackPill F401 is Cortex M4 and I chose the Debug -g for optimization but there is no difference and the simulation doesn't work

By not working simulation I mean that the program runs the simulation but the aim of program which is blinking LED connected to pin 13 of GPIO C doesn't show up. If I use the HEX file produced by STM32cubeIDE, the simulation runs and the LED blinks accordingly.

I brought here the simulation limitation in Proteus from Labcenter Electronics website:

The following is a listing of known limitations in the current version of the ARM® Cortex™-M4:
x Clock security system is not implemented.
x SPI doesn't support IrDA and I2S audio protocols
x I2C::TRISE is not implemented
x I2C doesn't support SMBus protocol
x Tamper detection and backup functionality are not implemented
x Flash programming algorithm is not implemented.
x USB OTG Host capabilities and HNP protocol are not implemented.
x RTC doesn't perform reference clock detection
x RTC doesn't support calibration (RTC_CALR register)
x SDIO is not implemented
x Pins VCAP_1 and VCAP_2 are not modeled
x USART doesn't support Smartcard, LIN, IrDA protocols

Is it possible that one of the aforementioned limitations be the source of the weird Proteus behavior?

Thanks for your attention
shenavar
Posts: 5
Joined: Fri Feb 25, 2022 6:49 am

Re: Proteus Simulation Failure

Post by shenavar »

Hello everyone

I did a blind search on every possible combination of compile options in Arduino. I found a solution but I cannot explain why. :lol:

Two options should be changed from their default values. The first one is explicitly cast in the Proteus documentation that the optimization flag should be set to Debug -g. The second one is weird. You should choose INACTIVE or NONE for USB support. when those two are combined the resulting HEX file is ok for Proteus simulation.

Now I have this question: Why USB support result in Proteus simulation failure? :?:

Thanks
Last edited by shenavar on Sat Feb 26, 2022 6:07 pm, edited 1 time in total.
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Proteus Simulation Failure

Post by fpiSTM »

You should ask to proteus😄
shenavar
Posts: 5
Joined: Fri Feb 25, 2022 6:49 am

Re: Proteus Simulation Failure

Post by shenavar »

fpiSTM wrote: Sat Feb 26, 2022 4:07 pm You should ask to proteus😄
You are right

I didn't check the CubeIDE, but the blink program written in that environment both used Debug mode and USB omission. I guess that if those two settings are in effect, the output of CubeIDE stops working in Proteus too.
cuyrezky
Posts: 1
Joined: Thu Jun 16, 2022 5:08 am

Re: Proteus Simulation Failure

Post by cuyrezky »

shenavar wrote: Sat Feb 26, 2022 3:37 pm Hello everyone

I did a blind search on every possible combination of compile options in Arduino. I found a solution but I cannot explain why. :lol:

Two options should be changed from their default values. The first one is explicitly cast in the Proteus documentation that the optimization flag should be set to Debug -g. The second one is weird. You should choose INACTIVE or NONE for USB support. when those two are combined the resulting HEX file is ok for Proteus simulation.

Now I have this question: Why USB support result in Proteus simulation failure? :?:

Thanks
hello shenavar,
can you give me tutorial about STM32 with arduino ide and run simulation at proteus application. i new at proteus and STM32, i dont know about proteus documentation that the optimaztion flag should be set to Debug -g. where i can do this in proteus or arduino ? sorry for bad english. iam from asia region. thankyou :D
bearfoxy6
Posts: 1
Joined: Wed Jun 22, 2022 8:46 pm

Re: Proteus Simulation Failure

Post by bearfoxy6 »

I used to simulate my Arduino code in Proteus simulation software by Labcenter Electronics.
I am new in STM32 field and started two weeks ago. My board is BackPill F401CC. It is very easy to program the board using STM32cubeIDE and upload it to board or simulate it using Proteus.

However I can program the board using Arduino for STM32 but the resulting HEX file cannot be used in Proteus simulation and fails to simulate.
What is the reason. Is there any workaround?
xlwww
Posts: 14
Joined: Tue Dec 27, 2022 9:19 am

Re: Proteus Simulation Failure

Post by xlwww »

Yes, I also encountered this problem when using F103C6, proteus8.9, after making changes it can be loaded, but the code does not run normally.Have you solved it? Thanks~
Post Reply

Return to “General discussion”