FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [March 2008 Threads] FreeRTOS SAM7 PortPosted by Adrian Carpenter on March 1, 2008 Hi,
There is something which catches me out nearly everytime I update my FreeRTOS.
The vesion of the lib_SAM7S256.h is not compatible with the latest ones from Atmel.
In port.c where the rtos tick is installed, the following function call is used:
AT91F_AIC_ConfigureIt( AT91C_ID_SYS, AT91C_AIC_PRIOR_HIGHEST, portINT_LEVEL_SENSITIVE, ( void (*)(void) ) vNonPreemptiveTick );
The convention in the current atmel header file is:
__inline unsigned int AT91F_AIC_ConfigureIt ( AT91PS_AIC pAic, // \arg pointer to the AIC registers unsigned int irq_id, // \arg interrupt number to initialize unsigned int priority, // \arg priority to give to the interrupt unsigned int src_type, // \arg activation and sense of activation void (*newHandler) () ) // \arg address of the interrupt handler
Where the AIC peripheral is passed in as well.
Is there any chance that you can update the library version in the distribution so that it uses the library functions that are compatible with the current atmel standard.
What happens is that everytime I drop in a new FreeRTOS release into my source tree I end up wondering why it crashes and then I remember that I have to go in and modify the port.c file so that it passes the correct parameters to the configure call.
Thanks
Adrian
RE: FreeRTOS SAM7 PortPosted by Richard on March 3, 2008 Is this using GCC? I seem to recall in GCC the macro was altered and placed in the application code (rather than using the one in the header) as the headers are written for IAR and are not to easy to include in GCC builds due to their inline statements.
Regards.
RE: FreeRTOS SAM7 PortPosted by Adrian Carpenter on March 3, 2008 Yes, GCC.
The headers certainly compile fine now without alteration under gcc, not sure about older versions.
I've just downloaded the latest freertos and dropped in the latest atmel header that I have here and modified port.c and it compiles fine.
Well, actually under gcc 4.1.0 I get some warnings:
ompiling C (ARM-only): FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c arm-elf-gcc -c -mcpu=arm7tdmi -mthumb-interwork -I. -gdwarf-2 -DROM_RUN -DSAM7_GCC -DTHUMB_INTERWORK -DVECTORS_IN_RAM -I. -Ihardware/include -IFreeRTOS/Source/include -I/Common/include -IFreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S -O0 -Wall -fomit-frame-pointer -Wcast-align -Wimplicit -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wshadow -Wunused -Wa,-adhlns=FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.lst -MD -MP -MF .dep/portISR.o.d -Wnested-externs -std=gnu99 FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c -o FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.o FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c: In function ‘vPortISRStartFirstTask’: FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:87: warning: nested extern declaration of ‘pxCurrentTCB’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:87: warning: nested extern declaration of ‘ulCriticalNesting’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:87: warning: redundant redeclaration of ‘ulCriticalNesting’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:69: warning: previous definition of ‘ulCriticalNesting’ was here FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c: In function ‘SWI_Handler’: FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:107: warning: nested extern declaration of ‘pxCurrentTCB’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:107: warning: redundant redeclaration of ‘pxCurrentTCB’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:87: warning: previous declaration of ‘pxCurrentTCB’ was here FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:107: warning: nested extern declaration of ‘ulCriticalNesting’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:107: warning: redundant redeclaration of ‘ulCriticalNesting’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:69: warning: previous definition of ‘ulCriticalNesting’ was here FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:113: warning: nested extern declaration of ‘pxCurrentTCB’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:113: warning: redundant redeclaration of ‘pxCurrentTCB’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:107: warning: previous declaration of ‘pxCurrentTCB’ was here FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:113: warning: nested extern declaration of ‘ulCriticalNesting’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:113: warning: redundant redeclaration of ‘ulCriticalNesting’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:69: warning: previous definition of ‘ulCriticalNesting’ was here FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c: In function ‘vPreemptiveTick’: FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:151: warning: nested extern declaration of ‘pxCurrentTCB’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:151: warning: redundant redeclaration of ‘pxCurrentTCB’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:113: warning: previous declaration of ‘pxCurrentTCB’ was here FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:151: warning: nested extern declaration of ‘ulCriticalNesting’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:151: warning: redundant redeclaration of ‘ulCriticalNesting’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:69: warning: previous definition of ‘ulCriticalNesting’ was here FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:162: warning: nested extern declaration of ‘pxCurrentTCB’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:162: warning: redundant redeclaration of ‘pxCurrentTCB’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:151: warning: previous declaration of ‘pxCurrentTCB’ was here FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:162: warning: nested extern declaration of ‘ulCriticalNesting’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:162: warning: redundant redeclaration of ‘ulCriticalNesting’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:69: warning: previous definition of ‘ulCriticalNesting’ was here FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c: At top level: FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:174: warning: redundant redeclaration of ‘vPortDisableInterruptsFromThumb’ FreeRTOS/Source/include/../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h:218: warning: previous declaration of ‘vPortDisableInterruptsFromThumb’ was here FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:175: warning: redundant redeclaration of ‘vPortEnableInterruptsFromThumb’ FreeRTOS/Source/include/../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h:219: warning: previous declaration of ‘vPortEnableInterruptsFromThumb’ was here
But these are due to a change in the freertos code that nests some external declarations that wern't like that in previous versions.
best regards
Adrian
RE: FreeRTOS SAM7 PortPosted by Richard on March 3, 2008 ? I have never seen these warnings before.
Regards.
RE: FreeRTOS SAM7 PortPosted by Adrian Carpenter on March 3, 2008 Ahh wait, I have a warning turned on:
-Wnested-externs
That'll probably explain that!
Adrian
RE: FreeRTOS SAM7 PortPosted by Adrian Carpenter on March 3, 2008 Humn...turning that off still didn't fix those warnings:
Compiling C (ARM-only): FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c arm-elf-gcc -c -mcpu=arm7tdmi -mthumb-interwork -I. -gdwarf-2 -DROM_RUN -DSAM7_GCC -DTHUMB_INTERWORK -DVECTORS_IN_RAM -I. -Ihardware/include -IFreeRTOS/Source/include -I/Common/include -IFreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S -O0 -Wall -fomit-frame-pointer -Wcast-align -Wimplicit -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wshadow -Wunused -Wa,-adhlns=FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.lst -MD -MP -MF .dep/portISR.o.d -std=gnu99 FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c -o FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.o FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c: In function ‘vPortISRStartFirstTask’: FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:87: warning: redundant redeclaration of ‘ulCriticalNesting’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:69: warning: previous definition of ‘ulCriticalNesting’ was here FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c: In function ‘SWI_Handler’: FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:107: warning: redundant redeclaration of ‘pxCurrentTCB’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:87: warning: previous declaration of ‘pxCurrentTCB’ was here FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:107: warning: redundant redeclaration of ‘ulCriticalNesting’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:69: warning: previous definition of ‘ulCriticalNesting’ was here FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:113: warning: redundant redeclaration of ‘pxCurrentTCB’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:107: warning: previous declaration of ‘pxCurrentTCB’ was here FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:113: warning: redundant redeclaration of ‘ulCriticalNesting’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:69: warning: previous definition of ‘ulCriticalNesting’ was here FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c: In function ‘vPreemptiveTick’: FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:151: warning: redundant redeclaration of ‘pxCurrentTCB’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:113: warning: previous declaration of ‘pxCurrentTCB’ was here FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:151: warning: redundant redeclaration of ‘ulCriticalNesting’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:69: warning: previous definition of ‘ulCriticalNesting’ was here FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:162: warning: redundant redeclaration of ‘pxCurrentTCB’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:151: warning: previous declaration of ‘pxCurrentTCB’ was here FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:162: warning: redundant redeclaration of ‘ulCriticalNesting’ FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:69: warning: previous definition of ‘ulCriticalNesting’ was here FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c: At top level: FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:174: warning: redundant redeclaration of ‘vPortDisableInterruptsFromThumb’ FreeRTOS/Source/include/../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h:218: warning: previous declaration of ‘vPortDisableInterruptsFromThumb’ was here FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:175: warning: redundant redeclaration of ‘vPortEnableInterruptsFromThumb’ FreeRTOS/Source/include/../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h:219: warning: previous declaration of ‘vPortEnableInterruptsFromThumb’ was here
Adrian
RE: FreeRTOS SAM7 PortPosted by Adrian Carpenter on March 3, 2008 Ok..Sorry for the traffic here!
-Wredundant-decls
It was that warning what was generating the warnings....
Adrian
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|