You need to log in to create posts and topics.

Arduino Pro Mini - 328p - new version .hex not working

Page 1 of 2Next

Hello,

SimulIDE 1.1.0-SR1

I have a problem with starting the simulation of MPe v6 to ebike (bikel.pl)  with ready ..hex file

Arduino Pro Mini ATmega 328P 16Mhz 5V

Soft version V5 starts without any problem.

The V6 is not. ( All files V6 )

V6 - not need RTC

in zip attachment - files and project

Please help me.

Greetings , Peter.

 

Uploaded files:

Hi.

Can you describe exactly what is the problem?

And I know nothing  about this circuit, what it does and how it should work.
There are also 2 MCUs and a lot on hex files.
I have no idea what to do with the files you sent.

Hi.

The project is on Arduino Pro Micro (without USB/RS)

MPeV5_5014_init.hex < Load to MCU - Initialize EEPROM settings,

run simulation - Screen show INIT OK, one time power restart ..

and after that we need load to MCU main program MPeV5_5014_MitarBT.hex

V5 Init + Main Program Work OK

I put two MCU to check if V6 runs on the Atmega 328 processor , I know a little bit messed with it

NOW V6 ... procedure is identical

Load to MCU > MPeV6_6010_init_3000W.hex  - not starting -nothing hapend , like program was stoped.

I upload to the real Arduino - the program works, in the simulator not 🙁

Thanks for the explanations.

I will have a look.

Hello I tested v6 on a real Arduino nano and v6 did not want to be loaded... the reason was the bootloader, I used hex optiboot atmega328, it works

Optibot Github : https://github.com/Optiboot/optiboot/tree/master/optiboot/bootloaders/optiboot

Uploaded files:

mega328.mcu:
mcu name="mega328" core="AVR" data="2304" prog="16384" progword="2" eeprom="1024"
inst_cycle="1" freq="16000000"
---
Optiboot boards.txt
atmega328o.upload.maximum_size=32256
I understand that this Hex needs to work with optiboot bootloader there is probably a different program start vector.
..file at the beginning of the post ..
Can I change something here to make Hex start in the simulator?

Ok, that must be the problem.
By now there is no support for bootloader in Simulide.

Quote from arcachofo on November 21, 2024, 10:41 am

Ok, that must be the problem.
By now there is no support for bootloader in Simulide.

What about a bare 328p processor, what if I put the bootloader + program into one hex file and it would run it?

How do you emulate the processor and run the program? , is it some bootloader emulator or do you start the program from the beginning? 

 

What about a bare 328p processor, what if I put the bootloader + program into one hex file and it would run it?

The problem is that to run the bootloader you need to configure a fuse that makes the reset vector to jump to the bootloader.
This is not implemented in Simulide.

 

How do you emulate the processor and run the program? , is it some bootloader emulator or do you start the program from the beginning?

The program starts normally, executing instructions at address 0.

- SOLVED -

I merged the program's hex files and finally inserted the bootloader without line BEFORE the last line of code.

It works 😅

The simulator is GREAT, great job 😁💪

Page 1 of 2Next