platformio / platform-atmelavr

Atmel AVR: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/atmelavr
Apache License 2.0
136 stars 104 forks source link

USBasp based on Atmega 8A cannot bake 328P because has less RAM & Flash #244

Open IoannR opened 3 years ago

IoannR commented 3 years ago

I have tried to bake my Atmega 328P with USBasp (8A) by a sketch, but got an error that I run out of memory. I have tried the same code but in Atmega IDE - it worked there.

Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
Error: The program size (14854 bytes) is greater than maximum allowed (8192 bytes)
RAM:   [======*** [checkprogsize] Explicit exit, status 1
====]  110.9% (used 1136 bytes from 1024 bytes)
Flash: [==========]  181.3% (used 14854 bytes from 8192 bytes)

The platform.ini file was set in accordance with this Official Instruction

[env:usbasp]
monitor_port = usbasp
platform = atmelavr
board = usbasp
board_build.mcu = ATmega328P
board_build.f_cpu = 8000000L
framework = arduino
lib_deps = 
    jdolinay/avr-debugger @ ~1.1
    arduino-libraries/SD@^1.2.4
build_flags = 
    -DAVR8_BREAKPOINT_MODE=1