[AVR][Demos]: Compilation error Topic is solved

ChibiOS public support forum for topics related to the Atmel AVR family of micro-controllers.

Moderators: utzig, tfAteba

User avatar
tfAteba
Posts: 547
Joined: Fri Oct 16, 2015 11:03 pm
Location: Strasbourg, France
Has thanked: 91 times
Been thanked: 48 times

[AVR][Demos]: Compilation error

Postby tfAteba » Thu Mar 14, 2019 8:44 am

Hello Giovanni,

I have just try to compile the AVR code since a while to see if every things is ok.

There is compilation error in all AVR/demo/ from ChibiOS_18.2.2 to ChibiOS_19.1.0 and I also think that it is the same problem in trunk, I did'nt test the trunk yet.

In halconf.h there is the defined macro:
#define PAL_USE_WAIT FALSE

That value cause problem. It must be TRUE in order to compile the code.

I will whange it in all halconf.h file after, but I want to know if normaly the code must also compile with the false value of this macros?

Here is the compilation traces:

Code: Select all

Compiler Options
avr-gcc -c -mmcu=atmega2560 -I. -gdwarf-2 -DF_CPU=16000000UL -O2 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=build/lst/ -std=gnu11 -mrelax -fdata-sections -ffunction-sections -Wundef -MMD -MP -I. -I../../../os/license -I../../../os/common/ports/AVR -I../../../os/common/ports/AVR/compilers/GCC -I../../../os/rt/include -I../../../os/common/oslib/include -I../../../os/hal/include -I../../../os/hal/osal/rt -I../../../os/hal/ports/AVR/MEGA/ATMEGAxx -I../../../os/hal/ports/AVR/MEGA/LLD/ADCv1 -I../../../os/hal/ports/AVR/MEGA/LLD/EXTv1 -I../../../os/hal/ports/AVR/MEGA/LLD/GPIOv1 -I../../../os/hal/ports/AVR/MEGA/LLD/I2Cv1 -I../../../os/hal/ports/AVR/MEGA/LLD/SPIv1 -I../../../os/hal/ports/AVR/MEGA/LLD/TIMv1 -I../../../os/hal/ports/AVR/MEGA/LLD/USARTv1 -I../../../os/hal/ports/AVR/MEGA/LLD/USBv1 -I../../../os/hal/boards/ARDUINO_MEGA -I../../../os/various main.c -o main.o

Compiling chsys.c
Compiling chdebug.c
Compiling chtrace.c
Compiling chvt.c
Compiling chschd.c
Compiling chthreads.c
Compiling chregistry.c
Compiling chsem.c
Compiling chmtx.c
Compiling chcond.c
Compiling chevents.c
Compiling chmsg.c
Compiling chmboxes.c
Compiling chmemcore.c
Compiling chheap.c
Compiling chmempools.c
Compiling chcore.c
Compiling osal.c
Compiling hal.c
In file included from ../../../os/hal/include/hal_pal.h:174:0,
                 from ../../../os/hal/include/hal.h:129,
                 from ../../../os/hal/src/hal.c:25:
../../../os/hal/ports/AVR/MEGA/LLD/GPIOv1/hal_pal_lld.h:412:8: error: unknown type name ‘palevent_t’
 extern palevent_t _pal_events[16];
        ^
../../../os/common/ports/AVR/compilers/GCC/rules.mk:174: recipe for target 'build/obj/hal.o' failed
make: *** [build/obj/hal.o] Error 1


May be the current implementation must be updated?

Thanks for you advices.
regards,

Theo.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: [AVR][Demos]: Compilation error

Postby Giovanni » Thu Mar 14, 2019 11:31 am

Hi Theo,

I think some #if is needed in the LLD, probably it is missing this:

Code: Select all

#if !defined(__DOXYGEN__)
#if (PAL_USE_WAIT == TRUE) || (PAL_USE_CALLBACKS == TRUE)
extern palevent_t _pal_events[16];
#endif
#endif


When in doubt look at template files under /os/pal/templates

Giovanni

User avatar
tfAteba
Posts: 547
Joined: Fri Oct 16, 2015 11:03 pm
Location: Strasbourg, France
Has thanked: 91 times
Been thanked: 48 times

Re: [AVR][Demos]: Compilation error

Postby tfAteba » Thu Mar 14, 2019 3:44 pm

I will do that, thanks for your advices.
regards,

Theo.

User avatar
tfAteba
Posts: 547
Joined: Fri Oct 16, 2015 11:03 pm
Location: Strasbourg, France
Has thanked: 91 times
Been thanked: 48 times

Re: [AVR][Demos]: Compilation error  Topic is solved

Postby tfAteba » Sun Jan 19, 2020 3:16 pm

Hello all,

Bug fixed,

Thanks Giovanni
regards,

Theo.


Return to “AVR Support”

Who is online

Users browsing this forum: No registered users and 8 guests