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.

[FAQ] AM3359: How do I create a CCS project for my application which will be built on top of the PDK from Processor SDK RTOS

Part Number: AM3359
Other Parts Discussed in Thread: OMAP-L138,

I'm developing my application on top of the PDK from the Processor SDK RTOS. How do I create a CCS project for my application integrating the PDK components?

  • This answer uses the Processor SDK RTOS 6.3 for AM335x as an example. The general principles also apply to other devices such as AM437x, OMAP-L138, K2G, etc..

    Firstly, there are existing example CCS projects in the PDK. These examples use one or more PDK components such as UART, I2C, GPIO, etc. Please refer to this FAQ for how to create the example projects from the PDK. 

    Secondly, if you want to create your project from scratch, please first follow this FAQ to create a BIOS template CCS project. Then add PDK components to the project. 

    To show the necessary steps, here we’re creating a blinky LED application to run on the AM3359 ICE EVM. The application will use PDK 1.0.17 which is part of Processor SDK RTOS 6.3. The complete project including the pre-built executable .out file is attached here.

    Steps to expand the BIOS template project to this blinky LED project are listed below.

    1. Add PDK product to the project, assuming PDK has been installed to CCS. Go to Project Properties -> General -> Products and click Add… Choose am335x PDK and version 1.0.17.

    2. Update the RTSC/XDC configuration file app.cfg by adding PDK components that will be used by the application. For this example, we will need to add board lib, uart driver and gpio driver from the PDK. Please note that we also need to add OSAL which is used by UART.

    /* Load the OSAL package */
    var osType = "tirtos"
    var Osal = xdc.useModule('ti.osal.Settings');
    Osal.osType = osType;
    /*use CSL package*/
    var socType           = "am335x";
    var Csl = xdc.loadPackage('ti.csl');
    Csl.Settings.deviceType = socType;
    /* Load the gpio package */
    var GpioPackage = xdc.loadPackage('ti.drv.gpio');
    GpioPackage.Settings.enableProfiling = false;
    GpioPackage.Settings.socType = socType;
    /* Load the uart package */
    var UartPackage = xdc.loadPackage('ti.drv.uart');
    UartPackage.Settings.socType = socType;
    /* Load the board package */
    var Board = xdc.loadPackage('ti.board');
    Board.Settings.boardName = "icev2AM335x";

    Please refer to the updated app.cfg in the project zip file.

    3. Note that since this is a BIOS based project, after PDK product is added to the project and the PDK components are added to app.cfg, the compiler include paths and linker library paths are automatically resolved.

    4. Add SOC_AM335x to compiler symbols. This symbol is needed by PDK header files.

    5. Add Board_init() to main(). 

    6. Add GPIO_init() to main(). This requires the application to provide GPIO configuration for AM3359 ICE. We’ll just use an example configuration from the PDK and add source code pdk_am335x_1_0_17\packages\ti\drv\gpio\test\led_blink\src\am335x\GPIO_icev2AM335x_board.c to the project.

    7. Create a timer using BIOS API. Associate this timer with an ISR which toggles a certain LED.

    8. Add a while(1) loop to taskFxn() to make it run indefinitely.

    9. Optional: replace System_printf with UART_printf.

    10. Enable and configure timers through GEL file if needed. The CCS GEL file for AM3359 ICE EVM, ccs1040\ccs\ccs_base\emulation\boards\ice_am3359\gel\TMDXICE3359.GEL, doesn’t enable the timers. Update the CCS target configuration using the GEL file in the project zip.

    11. Setup the AM3359 ICE EVM according to these instructions. Build the project and load the executable to the EVM. Open a UART console and run the program. The Ethernet LED D1 on the board should blink and the UART_printf messages should be displayed in the UART console.