@juannavarro (juannavarro) posted a new topic, subject "Sketch uploaded through ISP, recover memory space of bootloader". It read:

   I read that if you upload a sketch through ISP, the bootloader is deleted, and its space will be available for sketch, and the execution of the sketch will start inmediatelly after power up the board, and that it will not be possible to upload a sketch through serial as there is no bootloader.
    
    But, I updlaoded a sketch through ISP, then executed the "Atmega chip detector. Written by Nick Gammon" and yes, there is no bootloader, but as the fuses was not changed (fuses does not change with a sketch upload AFAIK, chance to change fuses is while burning a bootloader) i understand that the space for the bootloader is void but stil preserved, ad so, it is not available to sketch:
    [code] 
        Bootloader is 2048 bytes starting at 7800
        
    [/code]
    
    And that the chip is goint to this memory direction, as "boot into bootloader" aka"Boot Reset vector Enabled" aka"BOOTRST" aka "Bootloader in use" fuse is still enabled.
    
    Am I missing something? Shouldn't ideally this BOOTRST fuse be set to "no boot into bootloader" that is: BOOTRST=1 if you need all available memory for sketch?
    [code] 
        Atmega chip detector.
        Written by Nick Gammon.
        Version 1.20
        Compiled on Mar  6 2022 at 10:24:34 with Arduino IDE 10819.
        Attempting to enter ICSP programming mode ...
        Entered programming mode OK.
        Signature = 0x1E 0x95 0x0F 
        Processor = ATmega328P
        Flash memory size = 32768 bytes.
        LFuse = 0xFF 
        HFuse = 0xDA 
        EFuse = 0xFD 
        Lock byte = 0xFF 
        Clock calibration = 0xA2 
        Bootloader in use: Yes
        EEPROM preserved through erase: No
        Watchdog timer always on: No
        Bootloader is 2048 bytes starting at 7800
        Bootloader:
        ...
        MD5 sum of bootloader = 0xE0 0xDE 0xEB 0xD3 0xC3 0xF5 0x60 0x21 0x2A 0xF1 0x7C 0x68 0xB9 0x34 0x4B 0xAE 
        No bootloader (all 0xFF)
        Programming mode off.
        
    [/code]

Then @kolaha (kolaha) said

    AVRDUDE.exe can set fuses.  
    if i (despite of ARDUDEPROG/USBASP and TL866A) want to use ArduinoIDE and ArduinoAsISP to programm e.g. Mini, then i would change "boards.txt" to add new bootloaderless option for Mini.

To which @david_2018 (david_2018) replied

    You can use MCUdude's MiniCore, which has a selection for "No Bootloader", and then have the IDE burn the bootloader using the ISP programmer. This effectively sets the fuses while not actually burning any bootloader code.

@juannavarro (juannavarro) replied

    david_2018:
    
    > You can use MCUdude's MiniCore
    
    I installed and tested it, and its adding a bunch of interesting seamless functionalities to the Arduino IDE.  
    I understand that are a bit overwhelmeing for the average starter at Arduino IDE platform, so does not have sense to have it in the IDE out of the box, but it is a very interesting upgrade if you start becoming a power user that need to control better sketch uploads to the Arduino.
    
    Thanks!
    
    kolaha:
    
    > i would change "boards.txt" to add new bootloaderless option for Mini.
    
    Thats what i did before, its straight and practical, if you know what you are doing, but MiniCore does this through GUI, that is easier... in any case you need to know what you are doing  
    Thanks!

@kolaha (kolaha) replied

    I've seen it has 20MHz option, co-o-ol.

After which, @david_2018 (david_2018) added

    20MHz would require physically changing the crystal.

After which, @system (system) added

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


{'source': 'discourse', 'url': 'https://forum.arduino.cc/t/sketch-uploaded-through-isp-recover-memory-space-of-bootloader/966323', 'title': 'Sketch uploaded through ISP, recover memory space of bootloader', 'views': 188, 'has_accepted_answer': True, 'word_count': 553, 'like_count': 0, 'reply_count': 3, 'participant_count': 3, 'posts': 7, 'tags': '', 'author': '@juannavarro (juannavarro)', 'participants': '@juannavarro (juannavarro), @kolaha (kolaha), @david_2018 (david_2018), @system (system)', 'image_url': [None], 'created_at': '2022-03-06T09:49:35.659Z', 'last_posted_at': '2022-09-04T14:38:26.110Z'}