A
A
AiR_WiZArD2021-01-08 16:35:37
Microcontrollers
AiR_WiZArD, 2021-01-08 16:35:37

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

1 answer(s)
K
kalapanga, 2021-01-08
@AiR_WiZArD

Sizes like avr-size shows.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question