Part Number: AM3359
Other Parts Discussed in Thread: SYSBIOS
Tool/software: TI-RTOS
Host Env: Windows
BIOS Version: 6.53.2.00
XDCTOOLS: 3.50.03.33
CCS Version: 7.2
I’ve imported the “Static Example” project from the ICE_AM3359 folder and have successfully built and run this project on my development board. At this point I would like to add HW peripherals (SPI, UART, GPIO, etc) but it’s not clear how these modules should be properly added.
As an example, I tried adding the UART peripheral. In this example I just wanted to call the UART_init() routine as seen in the code snippet below. The Error message I receive is the
Undefined reference to ‘UART_init’
Which I assume means that the build is not able to find the source file that includes the UART_init() routine.
Are the different peripherals added and linked correctly using the XGCONF tool?
I’ve looked through a few of the HW examples in the PDK package but it’s not clear how these peripherals were added.
/*
* ======== static.c ========
* The static example focuses on SYS/BIOS configuration. It shows how to
* - Use and configure various modules.
* - Create static Instances.
* - Modify Program level configuration parameters.
*/
#include <xdc/std.h>
#include <xdc/runtime/System.h>
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/knl/Swi.h>
#include <ti/sysbios/knl/Clock.h>
#include <xdc/cfg/global.h>
#include "stdio.h"
#include "stdint.h"
#include "stdlib.h"
#include "string.h"
/* UART Header files */
#include <ti/drv/uart/UART.h>
#include <ti/drv/uart/UART_stdio.h>
#include <ti/drv/uart/test/src/UART_board.h>
Bool finishFlag = FALSE;
/*
* ======== main ========
*/
Int main()
{
UART_init();
BIOS_start(); /* does not return */
return(0);
}
/*
* ======== idl0Fxn ========
*/
Void idl0Fxn()
{
if (finishFlag) {
System_printf("Calling BIOS_exit from idl0Fxn\n");
while(1)
{
/*Continue to Loop*/
}
}