Answer the question
In order to leave comments, you need to log in
How to display the amount of memory occupied in the microcontroller (avr-gcc)?
If in atmel studio the output immediately indicates how much RAM the variables occupy, how much ROM is left, then using only avr-gcc this is not clear. If the ROM can be determined by the size of the hex file, then here are the questions with the RAM. Maybe you need some kind of Linux utility for this?
Here's what I'm using:
avr-gcc -Wall -mmcu=atmega328p -O1 -funsigned-char ./SRC/main.c ./SRC/uart.c ./SRC/main.h ./SRC/uart.h -o ./BIN/output.elf
avr-objcopy -O ihex ./BIN/output.elf ./BIN/output.hex
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question