ICSP programming without Eeprom modification

Hello,

I am developing an application with a single ATMega 328P.
I program it with an Uno ICSP gateway and Arduino as ISP
I added MiniCore to my IDE 1.8.9 to configure the AT328p

The transfer of the program goes well, but each time I erase the contents of my Eeprom despite the option EEPROM retained in tools on the IDE.

Has anyone had this problem before?

thank you for your attention

Denis

Don't know if it makes a difference, but when you upload, are you using Sketch, Upload Using Programmer from the menu?

Can you show full Arduino IDE diagnostic output of your upload process via "Arduino as ISP" ?

Hello,
Yes, I upload with Programmer from the menu

IDE_Diag.txt (63.9 KB)

Hello, here are the programming tools and diagnostics

Thank you

I have checked avrdude manual and it says that the EEPROM erasing is part of the chip erase cycle, performing at every firmware uploading.
I fiound a topic on the forum which may be helpful for you:

Thank you very much,
I will try this method and keep you informed of the result

Hello,

It's OK, with MiniCore it is enough to load a bootloader
so that the Eeprom retained option is active !

Thank you

So if you choose to retain EEPROM and flash a bootloader the EEPROM is retained, but if you choose retain EEPROM and upload code (not bootloader) the EEPROM is not retained? Retain EEPROM only works whit bootloader?

Yes,
In my case it goes like this

I think it's not the bootloader, but the fuses that are programmed with it

Thanks @denis-j , I use MiniCore quite a bit and even though I have not had reason to retain the EEPROM this is good information. So now I know that if I want to reatain EEPROM and upload code, I will need to upload with the serial port.

It works even when loading with ISISP

It's possible

The "retain EEPROM" is controlled by a "fuse" bit, and the only way to set fuse bits from the Arduino IDE is with the "Burn Bootloader" command. I'm pretty sure that miniCore will not actually burn a bootloader if the tools menu is set to "no bootloader."

1 Like

Thanks you for the clarification

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.