platform-atmelavr icon indicating copy to clipboard operation
platform-atmelavr copied to clipboard

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

Open IoannR opened this issue 4 years ago • 0 comments

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

IoannR avatar Feb 10 '21 10:02 IoannR