Hi,

I'm having problems debugging a linker problem. I added a new driver file
(arch/arm/src/sama5/sam_sdmmc.c and and the corresponding .h) for the
SAMA5D27 SDMMC peripheral. I added it to the chip/Make.defs file. nuttx
compiles and I see the sam_sdmmc.o being compiled and added to libarch.a.
But then I get this linker error at the final link step.

Does anyone have any ideas how to debug this? Or fix it?

The function names appear to identical in the .c and .h files, and there
are no compilation errors.

arm-none-eabi-ar rcs  libboard.a
>
sam_boot.o sam_sdmmc.o sam_sdmmci.o sam_usb.o sam_appinit.o sam_bringup.o
> sam_ostest.o sam_autoleds.o sam_buttons.o
> make[2]: Leaving directory
> '/home/adam/src/nuttx/nuttx-sama5d2-xult/nuttx/boards/arm/sama5/sama5d2-xult/src'
> LD: nuttx
> arm-none-eabi-ld:
> /home/adam/src/nuttx/nuttx-sama5d2-xult/nuttx/arch/arm/src/board/libboard.a(sam_bringup.o):
> in function `sam_bringup':
> /home/adam/src/nuttx/nuttx-sama5d2-xult/nuttx/boards/arm/sama5/sama5d2-xult/src/sam_bringup.c:149:
> undefined reference to `sam_sdmmc_sdio_initialize'
> arm-none-eabi-ld:
> /home/adam/src/nuttx/nuttx-sama5d2-xult/nuttx/boards/arm/sama5/sama5d2-xult/src/sam_bringup.c:166:
> undefined reference to `sam_sdmmc_set_sdio_card_isr'
> arm-none-eabi-ld:
> /home/adam/src/nuttx/nuttx-sama5d2-xult/nuttx/arch/arm/src/board/libboard.a(sam_sdmmc.o):
> in function `sam_sdmmc_cardetect':
> /home/adam/src/nuttx/nuttx-sama5d2-xult/nuttx/boards/arm/sama5/sama5d2-xult/src/sam_sdmmc.c:152:
> undefined reference to `sdio_mediachange'
> arm-none-eabi-ld:
> /home/adam/src/nuttx/nuttx-sama5d2-xult/nuttx/arch/arm/src/board/libboard.a(sam_sdmmc.o):
> in function `sam_sdmmc_initialize':
> /home/adam/src/nuttx/nuttx-sama5d2-xult/nuttx/boards/arm/sama5/sama5d2-xult/src/sam_sdmmc.c:239:
> undefined reference to `sam_sdmmc_sdio_initialize'
> arm-none-eabi-ld:
> /home/adam/src/nuttx/nuttx-sama5d2-xult/nuttx/boards/arm/sama5/sama5d2-xult/src/sam_sdmmc.c:263:
> undefined reference to `sdio_mediachange'
> Makefile:184: recipe for target 'nuttx' failed
> make[1]: *** [nuttx] Error 1
> make[1]: Leaving directory
> '/home/adam/src/nuttx/nuttx-sama5d2-xult/nuttx/arch/arm/src'
> tools/Makefile.unix:449: recipe for target 'pass2' failed
> make: *** [pass2] Error 2step:
>

-adam
-- 
Adam Feuer <a...@adamfeuer.com>

Reply via email to