AT32 evk1100 Compile Problems

schmidtw wrote on Sunday, May 04, 2008:

I just downloaded FreeRTOS 5.0.0 and tried to build with the latest avr32-* GNU toolchain from Atmel & got several compile errors.  It looks like the Atmel header files possibly changed.

First try:
$ make clean
$ make
Compiling `…/…/BOARDS/EVK1100/led.c’ to `…/…/BOARDS/EVK1100/led.o’.
…/…/BOARDS/EVK1100/led.c:77: error: ‘AVR32_PWM_PWM_0_FUNCTION’ undeclared here (not in a function)
…/…/BOARDS/EVK1100/led.c:77: error: ‘AVR32_PWM_PWM_1_FUNCTION’ undeclared here (not in a function)
…/…/BOARDS/EVK1100/led.c:77: error: ‘AVR32_PWM_PWM_2_FUNCTION’ undeclared here (not in a function)
…/…/BOARDS/EVK1100/led.c:77: error: ‘AVR32_PWM_PWM_3_FUNCTION’ undeclared here (not in a function)
make: *** […/…/BOARDS/EVK1100/led.o] Error 1

So in evk1100.h I changed AVR32_PWM_PWM_x_FUNCTION to AVR32_PWM_x_FUNCTION - problem solved.

Second try:
$ make clean
$ make
Compiling `…/…/BOARDS/EVK1100/led.c’ to `…/…/BOARDS/EVK1100/led.o’.
Compiling `…/…/DRIVERS/INTC/intc.c’ to `…/…/DRIVERS/INTC/intc.o’.
…/…/DRIVERS/INTC/intc.c:52: error: ‘AVR32_INTC_IPR0_INTLEV_SIZE’ undeclared here (not in a function)
…/…/DRIVERS/INTC/intc.c: In function ‘_get_interrupt_handler’:
…/…/DRIVERS/INTC/intc.c:111: error: ‘avr32_intc_t’ has no member named ‘icr3’
…/…/DRIVERS/INTC/intc.c: In function ‘INTC_register_interrupt’:
…/…/DRIVERS/INTC/intc.c:199: error: ‘AVR32_INTC_IPR0_INTLEV_MASK’ undeclared (first use in this function)
…/…/DRIVERS/INTC/intc.c:199: error: (Each undeclared identifier is reported only once
…/…/DRIVERS/INTC/intc.c:199: error: for each function it appears in.)
…/…/DRIVERS/INTC/intc.c:199: error: ‘AVR32_INTC_IPR0_INTLEV_OFFSET’ undeclared (first use in this function)
make: *** […/…/DRIVERS/INTC/intc.o] Error 1

This time I’m not sure what AVR32_INTC_IPR0_INTLEV_SIZE should be mapped to.

Any ideas?

Here are the avr32 versions I’m using:
---------------------------------------
avr32parts-1.9.9-1.fc8
avr32-gdb-6.7.1.atmel.1.0.3-1.fc8
avr32headers-1.9.11-1.fc8
avr32program-3.0.4-1.fc8
avr32-binutils-2.17.atmel.1.2.6-1.fc8
libavr32ocd-3.0.8-1.fc8
avr32trace-2.0.3-1.fc8
libavr32sim-0.2.1-1.fc8
avr32-gcc-newlib-4.2.2-atmel.1.0.8_1.fc8
avr32gdbproxy-3.0.11-1.fc8

Thanks,
Wes

rtel wrote on Monday, May 05, 2008:

Thanks for pointing this out.  I have searched through the header files and come up with this:

#define AVR32_INTC_IPR0_INTLEV_SIZE  2

This was in intc.h, which was marked as revision 36724, Fri 16th March 2007.

There has been some confusion over the AVR32 headers for a while, but this was historically more to do with the IAR builds than the GCC builds.

Atmel provide their own FreeRTOS.org projects that can be downloaded from the Atmel WEB site.  It might be worth looking at these to see what they have changed these constants to.  I will have to download the latest tools to make updated.

Regards.