[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #57299] util/setbaud.h incompatible with new AVR iom*.h headers

From: Matt Wette
Subject: [bug #57299] util/setbaud.h incompatible with new AVR iom*.h headers
Date: Mon, 25 Nov 2019 13:10:23 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0


                 Summary: util/setbaud.h incompatible with new AVR iom*.h
                 Project: AVR C Runtime Library
            Submitted by: mwette
            Submitted on: Mon 25 Nov 2019 10:10:21 AM PST
                Category: Header
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Header files
                  Status: None
        Percent Complete: 0%
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 2.0.0
           Fixed Release: None



Newer headers povided in the device packs from microchip include a struct for
UARTS that defines a member "BAUD".   This conflicts with the use of command
line argument "-DBAUD-9600U".   Use of this command line argument to avr-gcc
results in compile error:

/opt/local/bin/avr-gcc -mmcu=atmega4809 -DF_CPU=3333333UL -Os -I.. -I../../
-B/opt/local/avr/packs/mega-1.3.300 -DBAUD=9600UL -c main.c -o main.o
In file included from /opt/local/avr/include/avr/io.h:578,
                 from main.c:3:
<command-line>: error: expected identifier or '(' before numeric constant

A solution is to not include util/setbaud.h and instead use command line
argument -DBAUDRATE=9600UL with the following usage:


There is a workable solution but the problem of running into the obscure error
message will persist.  Maybe replacing BAUD with some other convention will


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]