This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to use board-dm365-evm.c ?

Hi,

I created this simple program in order to use the board-dm365-evm object file that is why I did the following program:

main.c:

int main(){
evm_init_cpld();
cpld_leds_init();
return 0;
}

with this Makefile:

CC = arm-none-linux-gnueabi-gcc
all:
    $(CC) -c main.c
    $(CC) -o test gpio.o dma.o usb.o common.o sram.o gpio.o dma.o usb.o common.o sram.o mux.o dm365.o devices.o irq.o board-dm365-evm.o main.o

(all the objects are in the same folder)

And the compiler find thousands of undefined references such as :

main.o: In function `main':
main.c:(.text+0x8): undefined reference to `evm_init_cpld'
main.c:(.text+0xc): undefined reference to `cpld_leds_init'
/home/administrateur/dvsdk/git/arch/arm/mach-davinci/board-dm365-evm.o: In function `dm365evm_keyscan_enable':
board-dm365-evm.c:(.text+0x120): undefined reference to `davinci_cfg_reg'
/home/administrateur/dvsdk/git/arch/arm/mach-davinci/board-dm365-evm.o: In function `dm365evm_emac_configure':
board-dm365-evm.c:(.text+0x138): undefined reference to `davinci_cfg_reg'
board-dm365-evm.c:(.text+0x140): undefined reference to `davinci_cfg_reg'
board-dm365-evm.c:(.text+0x148): undefined reference to `davinci_cfg_reg'
board-dm365-evm.c:(.text+0x150): undefined reference to `davinci_cfg_reg'
...


I tried almost everything with the makefile...

I hope it is obvious for non-beginner !

Regards,

Thibault

  • I still need your help !

  • Hello,

    Thibault B. said:

    main.c:

    int main(){
    evm_init_cpld();
    cpld_leds_init();
    return 0;
    }

    This looks like you are mixing up kernel space and user space. Unlike a user space program, there is no 'main()' in the kernel and it does not get called automatically. Can you please explain what the objective is and I can probably provide some suggestions on how to do it.

    Thibault B. said:
    all:
        $(CC) -c main.c
        $(CC) -o test gpio.o dma.o usb.o common.o sram.o gpio.o dma.o usb.o common.o sram.o mux.o dm365.o devices.o irq.o board-dm365-evm.o main.o

     As you can see the other files are being built by providing the name of the .o and not the .c file.

    Thanks,

    Sekhar

  • Hi Sekhar,

    Thank you for your reply.

    I started to get it since few days.

    In fact my objective is to make a kind of IP Network Camera with the CMOS sensor MT9D131 that is why I have more questions :

    How to configure the ccdc for YUV 8 bits ? Have I to change the kernel or can I just call a function (which one ?) ?

    I added in board-dm365-evm.c :

        {
            .module_name = "mt9d131",
            .is_camera = 1,
            .grp_id = VPFE_SUBDEV_MT9T031,
            .num_inputs = ARRAY_SIZE(mt9t031_inputs),
            .inputs = mt9t031_inputs,
            .ccdc_if_params = {
                .if_type = VPFE_YCBCR_SYNC_8,
                .hdpol = VPFE_PINPOL_POSITIVE,
                .vdpol = VPFE_PINPOL_POSITIVE,
            },
            .board_info = {
                I2C_BOARD_INFO("mt9d131", 0x5d),*/
                /* this is for PCLK rising edge */
        /*        .platform_data = (void *)1,
            },*/

    Is this enough ?

    What to change in the dvsdk demos for a camera sensor ?

     

    I am waiting for your help !

    Best regards,

    Thibault