Giter Club home page Giter Club logo

avr-gcc-build's Issues

Use proper make install for AVR-LibC

The build script does cumbersome commands like

cp -r "$PREFIX_LIBC"/* "$PREFIX_GCC_LINUX"

in order to "install" AVR-LibC. The proper way to install it in a location other then --prefix is:

make install prefix="${PREFIX_GCC_LINUX}"

etc.

Configure avr-gcc with `--with-gnu-ld`

Configuring GCC with --with-gnu-ld can improve the handling of @-files:

Only when the driver knows that the GNU linker is used, it will put options / objects for linking in @-file. This may be required on Windows when the inflated command line is too long for Windows. The behaviour of collect2 also depends on that flag: When the driver calls collect2 for linking with an @-file, collect2 will call ld with an @-file only with the GNU linker.

The configure scripts can't always work this out, e.g. for canadian-cross builds, because configure cannot call the host's ld.exe.

Build script uses outdated AVR LibC

The build script uses avr-libc3 which is outdated, last update was 4 years ago . Better use the original avr-libc. You may argue that there is no AVR LibC release yet, but that applies to avr-libc3, too.

The avr-size.exe is not suit for avr mcu

I download the .zip file below:
image
and unzip it, the path of avr-size.exe is:
avr-gcc-12.1.0-x64-windows\bin
look at the help of avr-size.exe:
image
It lacks the --mcu and --mlist-devices as the following picture shows:
image

small issue in delay.h

I tested the latest avr-gcc compiler here at the University of Applied Sciences in Amsterdam. We always attempt :) to compile without any warnings as all are then treated as errors.

In de the function _delay_us(double __us) in delay.h I get a warning (and thus an error) on line 279 that
uint8_t __ticks; is unitialized.

Changing this line into
uint8_t __ticks = 0;

Solved it.

My Euro 0.02 :)

GCC doesn't seem to know the size of memory available

I am building a project for ATmega640 using GCC 12.1. I'm passing a -Wl,--print-memory-usage flag to the linker to get the memory usage, but GCC thinks that the device has 128KB of flash, instead of 64KB. The RAM and EEPROM sizes are also wrong.

Linker flags: -mmcu=atmega640 -fno-exceptions -fno-rtti -Wl,--gc-sections -Wl,--print-memory-usage

Output:

Memory region         Used Size  Region Size  %age Used
            text:       49628 B       128 KB     37.86%
            data:         748 B      65440 B      1.14%
          eeprom:          0 GB        64 KB      0.00%
            fuse:          0 GB          3 B      0.00%
            lock:          0 GB         1 KB      0.00%
       signature:          0 GB         1 KB      0.00%
 user_signatures:          0 GB         1 KB      0.00%

When the command from #3, the correct percentage is displayed:

Device: atmega640

Program:   49628 bytes (75.7% Full)
(.text + .data + .bootloader)

Data:        332 bytes (4.1% Full)
(.data + .bss + .noinit)

Unfortunately, this issue means that compiler does not detect when the code exceeds the available memory.

The issue is not present on GCC 5.4, that is bundled with the Microchip Studio.

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.