Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

RTOS/OMAP-L138: Linker Error when compiling basic GPIO Application

$
0
0

Part Number:OMAP-L138

Tool/software: TI-RTOS

Hi,

I have installed CCS8 and ti-processor-sdk-rtos-omapl138-lcdk-04.03.00.05-Windows-x86-Install.exe

because I bought a lcdkomapl138 development kit.

I created a simple GPIO application from the hello world sample. First of all I had to include an additional directory to the include search path so that the file:

#include <ti/drv/gpio/gpio.h>

can be found, which I found confusing because I had expected that all needed paths would be already set.

But the real problem is, that also the linker fails to link the function Board_init and I am not able to find a solution for that problem. I can not find a library anywhere which contains the Board_init function.

Here is the Program:

#include <xdc/std.h>

#include <xdc/runtime/System.h>
#include <ti/sysbios/BIOS.h>

#include <ti/board/board.h>
#include <ti/drv/gpio/gpio.h>

#define USER_LED1 1
#define GPIO_PIN_VAL_HIGH 1
#define GPIO_PIN_VAL_LOW 0

void Delay()
{
int i;

for (i=0; i<1000000; i++)
{
i++;
}
}

Int main()
{
/* Setting up for pinmux and uart */
Board_STATUS ret;
Board_initCfg boardCfg;

boardCfg = BOARD_INIT_MODULE_CLOCK | BOARD_INIT_PINMUX_CONFIG | BOARD_INIT_UART_STDIO;

ret = Board_init(boardCfg);

if (ret == BOARD_SOK)
{
while(1)
{
System_printf("hello world\n");

GPIO_write(USER_LED1, GPIO_PIN_VAL_HIGH);
Delay();
GPIO_write(USER_LED1, GPIO_PIN_VAL_LOW);
Delay();
}
}

BIOS_exit(0); /* terminates program and dumps SysMin output */
return(0);
}


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>