[En-Nut-Discussion] Using the user LED (ULED) on the Ethernut3

Douglas Pearless Douglas.Pearless at pearless.co.nz
Thu Mar 22 00:23:18 CET 2007



   I solved my problem by modifying the nut/conf/dev/dev.nut file by changing:

   ===========start of code fragment

    {
        name = "nutdev_npl",
        brief = "Nut Programmable Logic",
        description = "CPLD interrupt handling.\n"..
                      "The CPLD on the Ethernut 3 reference design  
monitors "..
                      "a number of status lines and activates IRQ0 on  
certain "..
                      "status changes. This includes RS232 handshake  
inputs, "..
                      "multimedia card detection, RTC alarms and LAN  
wakeup. "..
                      "Tested on AT91 only.",
        requires = { "DEV_IRQ_AT91" },
        provides = { "DEV_NPL" },
        sources = { "npl.c" },
    },
    {
        name = "nutdev_nplmmc",
        brief = "NPL Multimedia Card Access",
        description = "CPLD implementation of a low level MMC interface. "..
                      "Tested on AT91 only.",
        requires = { "DEV_NPL" },
        provides = { "DEV_MMCLL" },
        sources = { "nplmmc.c" },
    },   
===========end of code fragment

   To:

   ===========start of code fragment

    {
        name = "nutdev_npl",
        brief = "Nut Programmable Logic",
        description = "CPLD interrupt handling.\n"..
                      "The CPLD on the Ethernut 3 reference design  
monitors "..
                      "a number of status lines and activates IRQ0 on  
certain "..
                      "status changes. This includes RS232 handshake  
inputs, "..
                      "multimedia card detection, RTC alarms and LAN  
wakeup. "..
                      "Tested on AT91 only.",
        requires = { "DEV_IRQ_AT91" },
        provides = { "DEV_NPL" },
        sources = { "npl.c" },
    },
    {
        name = "nutdev_nplmmc",
        brief = "NPL Multimedia Card Access",
        description = "CPLD implementation of a low level MMC interface. "..
                      "Tested on AT91 only.",
        requires = { "DEV_NPL" },
        provides = { "DEV_MMCLL" },
        sources = { "nplmmc.c" },
    },
    {
        name = "nutdev_npluled",
        brief = "NPL User (green) LED Access",
        description = "CPLD implementation of a user (green) LED  
interface. "..
                      "Tested on AT91 only.",
        requires = { "DEV_NPL" },
        provides = { "DEV_NPLULED" },
        sources = { "npluled.c" },
    },

   ===========end of code fragment

   Cheers Douglas

   Quoting Douglas Pearless <Douglas.Pearless at pearless.co.nz>:

>
>
>     I have a puzzling problem, I am using Nut/OS 4.3.1, the latest
> version of Yagarto, Eclipse 3.2.
>
>     I use #include <dev/npluled.h> in my C file and it compiles fine,
> BUT the linker returns:
>
>     arm-elf-gcc  ./src/vertigocontroller.o -mcpu=arm7tdmi -nostartfiles
> -TC:/ethernut-4.3.1/nut/arch/arm/ldscripts/at91_ram.ld
> -Wl,-Map=vertigocontroller.map,--cref,--no-warn-mismatch
> -LC:/ethernut-4.3.1/nutbld-armgcc/lib
> C:/ethernut-4.3.1/nutbld-armgcc/lib/nutinit.o -Wl,--start-group
> -lnutpro -lnutos -lnutarch -lnutdev -lnutnet -lnutfs -lnutcrt
> -Wl,--end-group  -o vertigocontroller.elf
> ./src/vertigocontroller.o: In function `main':
> src/vertigocontroller.c:783: undefined reference to `NplUledCntl'
> collect2: ld returned 1 exit status
> make: *** [vertigocontroller.elf] Error 1
> make: Target `all' not remade because of errors.
>
>     Hmm, I checked my nutbld directories and there is no npluled.o
> file, I then checked the configurator and I can find not reference to
> ULED, so I assume that the npluled.c file should have been compiled
> (like all the other files from nut/dev) into my nutbld-armgcc/dev
> directory.
>
>     I note that npl.o and nplmmc.o are in my nutbld-armgcc/dev
> directory, I then checked the makefile in nut/dev and npluled.c is not
> listed, is this an omission or am I missing something?
>
> Cheers Douglas.
>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>






More information about the En-Nut-Discussion mailing list