-2

I need to upload code on atmega328 wihout bootloader
https://github.com/EasyOne2030/test but see Sketch uses 33218 bytes (102%) of program storage space. Maximum is 32256 bytes ?

1
  • If you eliminate the use of PPT_bits, you would have sufficient memory already. Alternative, you had 4 images representing RSSI, 5 images representing battery, and 3 images representing volume, if you eliminate one each, you would have sufficient memory also. If you insists to have all of them, then change the MCU to have bigger flash.
    – hcheung
    Dec 19, 2022 at 0:53

2 Answers 2

3

In the case where the size of the program (sketch) has become too large for the available program storage space (flash memory), there are a number of options. Note that this is not the same case as exceeding the amount of dynamic memory (RAM) which requires a different set of solutions.

_1. Microcontroller (MCU) upgrade.

This can be a solution. The closer the architecture of the new MCU matches that that of the old MCU the easier this is likely to be. However, this approach can become complex, even when using a different MCU in the same series as the original, if low level configuration of (and access to) hardware peripherals such as timers, ports etc. has been used. Be aware that any libraries used may not be compatible with the new MCU so testing is important. In the worst case, there may be no supporting Arduino core available for the new MCU. Major incompatibilities can be tested with a simple compilation of a sketch for the new target MCU and this does not even require the new MCU to be present.

In the specific case of the ATmega328P, this is already the highest specified MCU in its series so a new MCU is required to increase resources such as Flash memory, RAM etc. An ATMega1284 may be a possible replacement within the AVR range. Also to consider is an ATmega4809 (newer megaAVR range) based board such as the Nano Every but here there are more significant architectural differences

_2. Optimising the use of flash memory.

_2.1 Bootloader.

Sometimes, changing the bootloader for a smaller one can help. For example, with some Arduino Nanos, this can free 1.5KB of flash memory by changing to the same bootloader which is used on the Arduino Uno (Optiboot). Dropping the bootloader altogether and using an ISP programmer (or an Arduino configured as one) to program the MCU can also save flash memory. Here it is important to select an Arduino core which supports a "No Bootloader" option to achieve the maximum benefits from this approach. The core "Minicore" https://github.com/MCUdude/MiniCore is such an example. Important to note is the the Arduino IDE (base 1.8.19) has a special upload procedure when using a programmer (Sketch--> Upload using programmer). Note also that the target (AVR) MCU must have the fuses correctly set for "no bootloader" operation. That is the fuse BOOTRST must be unset. This is achieved by using the "burn bootloader" option supplied by the core. Despite its (inappropriate) name this has the effect of setting the fuses. Alternatively, the fuses can be set manually using the AVRDUDE command line.

_2.2 General.

The compiler is quite good at optimising code however, it is important to be aware that the use of some program features can have a one time penalty when used. Examples are the String class, sprintf(), floating point handling etc. which force a large amount of code to be added to the compiled sketch. Some libraries can consume a large amount of program memory. Graphic libraries are notorious for this because often these include large font tables etc. Here the options are limited to looking for a lighter weight library or a hacking out unused parts of an existing library.

8
  • I need to upload code on atmega328 wihout bootloader
    – one next
    Dec 18, 2022 at 18:55
  • @onenext Download and install "MiniCore" from the location in the answer above. The readme.md there has a "how to install" section. Once you have correctly installed this, then from the Tools menu in the Arduino IDE select: Boards -> Minicore -> 328P. Again in the Tools menu, select the Bootloader Option and choose "No Bootloader". Once your sketch is ready to upload, you connect your programmer and use the special upload function under the sketch menu "Upload using Programmer". This procedure will give you an extra 256 bytes of program memory (flash).
    – 6v6gt
    Dec 18, 2022 at 19:36
  • I have usbasp avr programmer and AVRDUDESS Ineed hex file to uplod this code on atmega328 but When export compiled binary i see error message ........ Sketch uses 33198 bytes (102%) of program storage space. Maximum is 32256 bytes. Global variables use 966 bytes (47%) of dynamic memory, leaving 1082 bytes for local variables. Maximum is 2048 bytes ...... You can have a look at the original project youtu.be/EPfLin7sqp4 ...
    – one next
    Dec 18, 2022 at 23:36
  • To recover the 512 bytes (my first comment incorrectly said 256) which is allocated to the bootloader, the recommendation is to use minicore. You do, however, also have the option of hacking a new entry into the boards.txt file of the standard Arduino core, if you prefer. See: forum.arduino.cc/t/boards-txt-definition-for-no-bootloader/…
    – 6v6gt
    Dec 19, 2022 at 5:28
  • was unsuccessful
    – one next
    Dec 22, 2022 at 23:27
0

Using Minicore to compile and load a program onto an ATmega328P without a bootloader. Screen shots and sample output.

Resources used

  1. CH340 ATmega328P Arduino Nano clone
  2. A programmer (Nano based) running the Arduino ISP sketch
  3. Minicore 2.1.3 https://github.com/MCUdude/MiniCore
  4. Arduino IDE 1.8.19
/*
   Example sketch to use all flash memory of an ATmega328P
*/

const uint8_t bigArray[30121] PROGMEM = {0} ;

void setup() {
  Serial.begin( 115200 ) ;
  Serial.println("test-01" ) ;
  byte buffer = pgm_read_byte_near(bigArray+50); // stop compiler optimising the array away
  Serial.println(buffer ) ;
  pinMode(LED_BUILTIN, OUTPUT);
}


void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

Select Board Select Board

Select Programmer Select Programmer

Select No Bootloader Select No Bootloader

Verify Verify

Burn Bootloader /set fuses Burn Bootloader /set fuses

Yes, even though you don't want a boot loader, you have to do this to correct the fuses (specifically, BOOTRST is unset by this procedure)

. . .
. . .
Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x0f:
avrdude: load data lock data from input file 0x0f:
avrdude: input file 0x0f contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lock verified

avrdude done.  Thank you.

Upload Using Programmer Upload Using Programmer

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware -hardware C:\Users\6v6gt\Documents\ArduinoData\packages -hardware C:\Users\6v6gt\Documents\Arduino\hardware -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\tools-builder -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware\tools\avr -tools C:\Users\6v6gt\Documents\ArduinoData\packages -built-in-libraries C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries -libraries C:\Users\6v6gt\Documents\Arduino\libraries -fqbn=MiniCore:avr:328:bootloader=no_bootloader,eeprom=keep,variant=modelP,BOD=2v7,LTO=Os,clock=16MHz_external -vid-pid=1A86_7523 -ide-version=10819 -build-path C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964 -warnings=all -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\6v6gt\Documents\ArduinoData\packages\arduino\tools\avrdude\6.3.0-arduino18 -prefs=runtime.tools.avrdude-6.3.0-arduino18.path=C:\Users\6v6gt\Documents\ArduinoData\packages\arduino\tools\avrdude\6.3.0-arduino18 -prefs=runtime.tools.arduinoOTA.path=C:\Users\6v6gt\Documents\ArduinoData\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\6v6gt\Documents\ArduinoData\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\6v6gt\Documents\ArduinoData\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\6v6gt\Documents\ArduinoData\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -verbose C:\Users\6v6gt\Documents\Arduino\big_flash_V0_01\big_flash_V0_01.ino
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\arduino-builder -compile -logger=machine -hardware C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware -hardware C:\Users\6v6gt\Documents\ArduinoData\packages -hardware C:\Users\6v6gt\Documents\Arduino\hardware -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\tools-builder -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware\tools\avr -tools C:\Users\6v6gt\Documents\ArduinoData\packages -built-in-libraries C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries -libraries C:\Users\6v6gt\Documents\Arduino\libraries -fqbn=MiniCore:avr:328:bootloader=no_bootloader,eeprom=keep,variant=modelP,BOD=2v7,LTO=Os,clock=16MHz_external -vid-pid=1A86_7523 -ide-version=10819 -build-path C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964 -warnings=all -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\6v6gt\Documents\ArduinoData\packages\arduino\tools\avrdude\6.3.0-arduino18 -prefs=runtime.tools.avrdude-6.3.0-arduino18.path=C:\Users\6v6gt\Documents\ArduinoData\packages\arduino\tools\avrdude\6.3.0-arduino18 -prefs=runtime.tools.arduinoOTA.path=C:\Users\6v6gt\Documents\ArduinoData\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\6v6gt\Documents\ArduinoData\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\6v6gt\Documents\ArduinoData\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\6v6gt\Documents\ArduinoData\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -verbose C:\Users\6v6gt\Documents\Arduino\big_flash_V0_01\big_flash_V0_01.ino
Using board '328' from platform in folder: C:\Users\6v6gt\Documents\ArduinoData\packages\MiniCore\hardware\avr\2.1.3
Using core 'MCUdude_corefiles' from platform in folder: C:\Users\6v6gt\Documents\ArduinoData\packages\MiniCore\hardware\avr\2.1.3
Detecting libraries used...
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega328 -DARDUINO_ARCH_AVR "-IC:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\MiniCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\MiniCore\\hardware\\avr\\2.1.3\\variants\\standard" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\sketch\\big_flash_V0_01.ino.cpp" -o nul
Generating function prototypes...
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega328 -DARDUINO_ARCH_AVR "-IC:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\MiniCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\MiniCore\\hardware\\avr\\2.1.3\\variants\\standard" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\sketch\\big_flash_V0_01.ino.cpp" -o "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -Wall -Wextra -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega328 -DARDUINO_ARCH_AVR "-IC:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\MiniCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\MiniCore\\hardware\\avr\\2.1.3\\variants\\standard" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\sketch\\big_flash_V0_01.ino.cpp" -o "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\sketch\\big_flash_V0_01.ino.cpp.o"
Compiling libraries...
Compiling core...
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -c -g -x assembler-with-cpp -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega328 -DARDUINO_ARCH_AVR "-IC:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\MiniCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\MiniCore\\hardware\\avr\\2.1.3\\variants\\standard" "C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\MiniCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\wiring_pulse.S" -o "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\wiring_pulse.S.o"
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\hooks.c.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\WInterrupts.c.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\wiring.c.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\wiring_shift.c.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\wiring_digital.c.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\wiring_analog.c.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\wiring_pulse.c.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\CDC.cpp.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\HardwareSerial1.cpp.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\HardwareSerial2.cpp.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\HardwareSerial.cpp.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\IPAddress.cpp.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\PluggableUSB.cpp.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\HardwareSerial3.cpp.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\Stream.cpp.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\Print.cpp.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\HardwareSerial0.cpp.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\Tone.cpp.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\abi.cpp.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\USBCore.cpp.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\new.cpp.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\main.cpp.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\wiring_extras.cpp.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\WMath.cpp.o
Using previously compiled file: C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964\core\WString.cpp.o
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\wiring_pulse.S.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\WInterrupts.c.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\hooks.c.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\wiring.c.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\wiring_analog.c.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\wiring_digital.c.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\wiring_pulse.c.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\wiring_shift.c.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\CDC.cpp.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\HardwareSerial.cpp.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\HardwareSerial0.cpp.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\HardwareSerial1.cpp.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\HardwareSerial2.cpp.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\HardwareSerial3.cpp.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\IPAddress.cpp.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\PluggableUSB.cpp.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\Print.cpp.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\Stream.cpp.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\Tone.cpp.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\USBCore.cpp.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\WMath.cpp.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\WString.cpp.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\abi.cpp.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\main.cpp.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\new.cpp.o"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\core.a" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\core\\wiring_extras.cpp.o"
Linking everything together...
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -Wall -Wextra -Os -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964/big_flash_V0_01.ino.elf" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964\\sketch\\big_flash_V0_01.ino.cpp.o" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964/core\\core.a" "-LC:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964" -lm
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964/big_flash_V0_01.ino.elf" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964/big_flash_V0_01.ino.eep"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964/big_flash_V0_01.ino.elf" "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964/big_flash_V0_01.ino.hex"
cmd /C "C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objdump" --disassemble --source --line-numbers --demangle --section=.text "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964/big_flash_V0_01.ino.elf" > "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964/big_flash_V0_01.ino_atmega328p_16000000L.lst"
"C:\\Users\\6v6gt\\Documents\\ArduinoData\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\6v6gt\\AppData\\Local\\Temp\\arduino_build_577964/big_flash_V0_01.ino.elf"
Sketch uses 32640 bytes (99%) of program storage space. Maximum is 32768 bytes.
Global variables use 196 bytes (9%) of dynamic memory, leaving 1852 bytes for local variables. Maximum is 2048 bytes.
C:\Users\6v6gt\Documents\ArduinoData\packages\arduino\tools\avrdude\6.3.0-arduino18/bin/avrdude -CC:\Users\6v6gt\Documents\ArduinoData\packages\MiniCore\hardware\avr\2.1.3/avrdude.conf -v -patmega328p -cstk500v1 -PCOM6 -b19200 -Uflash:w:C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964/big_flash_V0_01.ino.with_bootloader.hex:i 

avrdude: Version 6.3-20201216
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\6v6gt\Documents\ArduinoData\packages\MiniCore\hardware\avr\2.1.3/avrdude.conf"

         Using Port                    : COM6
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964/big_flash_V0_01.ino.with_bootloader.hex"
avrdude: writing flash (32640 bytes):

Writing | ################################################## | 100% 35.80s

avrdude: 32640 bytes of flash written
avrdude: verifying flash memory against C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964/big_flash_V0_01.ino.with_bootloader.hex:
avrdude: load data flash data from input file C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964/big_flash_V0_01.ino.with_bootloader.hex:
avrdude: input file C:\Users\6v6gt\AppData\Local\Temp\arduino_build_577964/big_flash_V0_01.ino.with_bootloader.hex contains 32640 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 19.57s

avrdude: verifying ...
avrdude: 32640 bytes of flash verified

avrdude done.  Thank you.


3
  • Compiler LTO when he chose LTO enabled it work ! is this good ?
    – one next
    Dec 24, 2022 at 13:25
  • @onenext LTO = Link Time Optimisation. If the author of that project enabled it then you should also enable it.
    – 6v6gt
    Dec 25, 2022 at 8:50
  • the author of that project disabled it thank you so much I will try
    – one next
    Dec 25, 2022 at 20:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.