Good day everyone,
can I use all of 8192 bytes in ATmeg8a flash memory if I'm not using bootloader?
I set boot size fuses to 256 byte, so should these 256 byte still reserved for boot section if I'm not using a bootloader or I can use all of the memory ?
If you’re using “minicore “ (and you probably should be), set the option in the tools menu for “no bootloader “ before doing “burn bootloader” and it will set the fuses so that you can use all 8k. There is a separate but for essentially “enable bootloader”, and if it’s disabled, the bootloader size bits are irrelevant.
yes I'm using minicore and I set "no bootloader", but I'm uploading hex file using AVRDUDESS , so I'm setting fuses manually,
in ATmega8A datasheet the minimum boot size is 256 and I didn't find an option to disable boot section
so I'm not sure if i can use all flash memory or must leave some memory for boot section.
It’s the BOOTRST fuse. If not programmed, it doesn’t matter what the boot size is set to. (Hmm. It might still matter if you want to use spm.)
that's not working, I tried to set or clear the BOOTRST fuse and the program didn't work, I'm sure the problem is not in software because when I delete some strings (stored in flash not ram) the program works correctly
my full program size is 8018 bytes
I didn't know what you mean, what's spm ?
SPM is "Set Program Memory" - the avr instruction for writing to flash from within a program. It only works "from the boot section" (depending on lock bit settings?), and it might make use of the boot section size whether or not the bootload is in use (via BOOTST)
I tried to set or clear the BOOTRST fuse
What exactly are you using for fuse values now? Note that the fuses are mostly "active-low" - to disable BOOTRST it should be set to 1. You probably want HFUSE = 0xDF
I detected my problem, it was the lock bits, when I disabled them the program worked correctly, but I want to keep my program locked, I read the datasheet to understand what is the best set to lock bits but there is many situations and I didn't know what to choose.
I have no bootloader and I want to prevent clone my program, how to set lock bits ? can you give me an idea
thank you
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.