µTasker Forum
µTasker Forum => ATMELTM AT91SAM7X and AVR32 => Topic started by: coflynn on January 06, 2009, 03:45:05 AM
-
Hello,
I was compiling uTasker on GCC using YAGARTO, and came across a few problems/bugs:
#1:
SAM7X.C, line 255:
Currently reads:
#if defined _GNU || define ROWLEY
Should be:
#if defined _GNU || defined ROWLEY
#2:
..\..\..\Hardware\SAM7X\SAM7X.c:850: error: invalid storage class for functio
fnPhyInterrupt'
This is due to a change in recent versions of GCC I think... the function decleration needs to be moved outside the function, as so:
#ifdef SUPPORT_PORT_INTERRUPTS
#if defined INTERRUPT_TASK_PHY
static void fnPhyInterrupt(void);
#endif
#endif
// Ethernet configuration routine
//
extern void fnConfigEthernet(ETHTABLE *pars)
{
#ifdef SUPPORT_PORT_INTERRUPTS
#if defined INTERRUPT_TASK_PHY
INTERRUPT_SETUP interrupt_setup; // interrupt configuration parameters
#endif
#else
__interrupt void PortB_Interrupt(void); // phy interrupt
#endif
Described at http://lists.apple.com/archives/unix-porting/2005/Jul/msg00038.html
Regards,
-Colin
-
Hi Colin
Thanks for the feedback.
- The ROWLEY typo is probably quite old but did not seem to cause any problems(?)
- I admit to not testing SP4 with GCC (was busy with new IAR5 and Keil setups...) and GCC doesn't like prototypes declares in a function. I have corrected this in my reference version:
#if defined SUPPORT_PORT_INTERRUPTS && defined INTERRUPT_TASK_PHY // {50}
static void fnPhyInterrupt(void);
#endif
SUPPORT_PORT_INTERRUPTS is new in SP4 and allows defining user interrupts to falling, rising or both edges of any GPIO [see example when define IRQ_TEST set in application.h - in fnInitIRQ()]. However it involved reworking the original PHY interrupt line since it was previously quite a dedicated solution.
Regards
Mark
-
Hi,
- The ROWLEY typo is probably quite old but did not seem to cause any problems(?)
Gave me a hard error on my YAGARTO GCC (4.3.2)... not sure why it wasn't caught before!
I have corrected this in my reference version:
Alright great! Yes I wasn't sure the best way to fix it - I just made the compiler happy ;-)
Regards,
-Colin
-
Colin
You are right. I checked SP3 which did it as follows:
#ifdef ROWLEY
#define __root
#endif
... at a different location...
#ifdef _GNU
#define __root
#endif
Therefore it was a typo when making it conditional on GCC and ROWLEY at the same location.
Corrected as:
#if defined _GNU || defined ROWLEY // {49}
#define __root
#endif
in my reference.
Regards
Mark