GithubHelp home page GithubHelp logo

Comments (3)

ZakKemble avatar ZakKemble commented on September 17, 2024 2

avr-size does not need to know the MCU to show you the memory usage (omit the --mcu arg). If you want to get the usage as a percentage then the new correct way is to use avr-objdump with the -Pmem-usage argument: avr-objdump -Pmem-usage myproject.elf which will output something like:

myproject.elf:     file format elf32-avr
AVR Memory Usage
----------------
Device: attiny402

Program:    1934 bytes (47.2% Full)
(.text + .data + .bootloader)

Data:         16 bytes (6.2% Full)
(.data + .bss + .noinit)

This is because the MCU and available memory sizes are now embedded into the .elf file. See here - https://web.archive.org/web/20211026214736/https://www.avrfreaks.net/forum/where-does-avr-size-get-data-supported-devices

from avr-gcc-build.

wanggaoteng avatar wanggaoteng commented on September 17, 2024

avr-size does not need to know the MCU to show you the memory usage (omit the --mcu arg). If you want to get the usage as a percentage then the new correct way is to use avr-objdump with the -Pmem-usage argument: avr-objdump -Pmem-usage myproject.elf which will output something like:

myproject.elf:     file format elf32-avr
AVR Memory Usage
----------------
Device: attiny402

Program:    1934 bytes (47.2% Full)
(.text + .data + .bootloader)

Data:         16 bytes (6.2% Full)
(.data + .bss + .noinit)

This is because the MCU and available memory sizes are now embedded into the .elf file. See here - https://web.archive.org/web/20211026214736/https://www.avrfreaks.net/forum/where-does-avr-size-get-data-supported-devices

I see, thank you for reply.
Best regards.

from avr-gcc-build.

atoomnetmarc avatar atoomnetmarc commented on September 17, 2024

Thanks!

I used your help to write a post-build event for Microchip Studio to get Memory Usage back: $(ToolchainDir)/avr-objdump -Pmem-usage "$(OutputDirectory)/$(OutputFileName)$(OutputFileExtension)"

from avr-gcc-build.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.