Hi folks,
I use Atmel AT91SAM9260-EK boards, arm-linux-gcc (GCC) 4.2.4. After I
pulled the latest code from git://git.denx.de/u-boot-at91.git, I found
that the "weak" function seems not working.

In lib_arm/board.c, we can see,
void inline __coloured_LED_init (void) {}

void inline coloured_LED_init (void) __attribute__((weak,
alias("__coloured_LED_init")));

And then I defined my own version in board/atmel/at91sam9260ek/led.c,
void coloured_LED_init(void)
{
    //.. do someting...
}

After 1)make at91sam9260ek_config and 2) make 3) download the
u-boot.bin to dataflash 4) reseting the board, I found that my version
of coloured_LED_init never gets called. Could anyone please explain
the trick behind?

BTW, If I comment out the declaration in lib_arm/board.c, my version
of coloured_LED_init can get called.

Thanks.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to