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.

GIO porting

Other Parts Discussed in Thread: SYSBIOS

I am porting SPI, I2C, UART drivers from old project to new project.

Old project, I am using following.

DSP-BIOS 5.42.01.09, PSP 01.30.01, EDMA 01.11.02.05, XDC 3.22.04.45

 

New proejct, I am using

SYS-BIOS  6.35.04.50, BIOSPSP 03.00.01.00, EDMA 02.11.11.13, XDC 3.25.03.72

 

Drivers (SPI, UART, I2C) code we wrote for the old project is using GIO. I ported all the code to new environment. I can compile the project in new enviroment but I can't link the. I get following errors.

***************************************************

_GIO_ATTRS                                            ./drv_SpiFlash.obj                                                         

_GIO_create ./drv_SpiFlash.obj

_GIO_delete                                           ./drv_SpiFlash.obj                                                         

_GIO_submit                                           ./drv_SpiFlash.obj                                                         

_hEdma                                                ./drv_SpiFlash.obj                                                         

_ti_sysbios_family_c64p_EventCombiner_disableEvent__E C:/Projects/Turbo/SupportLibs/TI_Libs/Debug/bios_psp_gpio.a674<Gpio.o674>  

_ti_sysbios_family_c64p_EventCombiner_dispatchPlug__E C:/Projects/Turbo/SupportLibs/TI_Libs/Debug/bios_psp_gpio.a674<Gpio.o674>  

>> Compilation failure

_ti_sysbios_family_c64p_EventCombiner_enableEvent__E  C:/Projects/Turbo/SupportLibs/TI_Libs/Debug/bios_psp_gpio.a674<Gpio.o674>  

**************************************

Is GIO still supported ? What should I do to port the code ?              

 

  • Hi Jayesh,

    Jayesh Patel63136 said:
    Is GIO still supported ? What should I do to port the code ?          

    See: http://e2e.ti.com/support/embedded/tirtos/f/355/t/153899.aspx

    Thanks

    ki

  • Hi Ki,

    I have included <IOM.H> from BIOSPSP and compilation is fine. Which library, I need to include to link the project ?

    Thanks

    Jayesh

  • Hi Ki,

    I have included <IOM.H> from "C:\ti\bios_6_35_04_50\packages\ti\sysbios\io" and compilation is fine. Which library, I need to include to link the project ?

    Thanks

    Jayesh

  • Jayesh - I am going to move this thread to the TI-RTOS forum where the experts there can help you best.

    Thanks

    ki

  • Can you attach your .cfg file?

    Todd

  • 6607.Config_Turbo.cfg

    var Defaults = xdc.useModule('xdc.runtime.Defaults'); var Diags = xdc.useModule('xdc.runtime.Diags'); var Error = xdc.useModule('xdc.runtime.Error'); var Log = xdc.useModule('xdc.runtime.Log'); var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf'); var Main = xdc.useModule('xdc.runtime.Main'); var Memory = xdc.useModule('xdc.runtime.Memory') var SysMin = xdc.useModule('xdc.runtime.SysMin'); var System = xdc.useModule('xdc.runtime.System'); var Text = xdc.useModule('xdc.runtime.Text');

    var BIOS = xdc.useModule('ti.sysbios.BIOS'); var Clock = xdc.useModule('ti.sysbios.knl.Clock'); var Swi = xdc.useModule('ti.sysbios.knl.Swi'); var Task = xdc.useModule('ti.sysbios.knl.Task'); var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore'); var Hwi = xdc.useModule('ti.sysbios.hal.Hwi'); var Timestamp = xdc.useModule('xdc.runtime.Timestamp');

    var GIO = xdc.useModule('ti.sysbios.io.GIO'); /*var UART = xdc.useModule('ti.drivers.UART'); var I2C = xdc.useModule('ti.drivers.I2C'); var GPIO = xdc.useModule('ti.drivers.GPIO'); var SPI = xdc.useModule('ti.drivers.SPI'); */ /*  * Program.argSize sets the size of the .args section.  * The examples don't use command line args so argSize is set to 0.  */ Program.argSize = 0x0;

    /*  * Uncomment this line to globally disable Asserts.  * All modules inherit the default from the 'Defaults' module.  You  * can override these defaults on a per-module basis using Module.common$.  * Disabling Asserts will save code space and improve runtime performance. Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;  */

    /*  * Uncomment this line to keep module names from being loaded on the target.  * The module name strings are placed in the .const section. Setting this  * parameter to false will save space in the .const section.  Error and  * Assert messages will contain an "unknown module" prefix instead  * of the actual module name. Defaults.common$.namedModule = false;  */

    /*  * Minimize exit handler array in System.  The System module includes  * an array of functions that are registered with System_atexit() to be  * called by System_exit().  */ System.maxAtexitHandlers = 4;      

    /*  * Uncomment this line to disable the Error print function.   * We lose error information when this is disabled since the errors are  * not printed.  Disabling the raiseHook will save some code space if  * your app is not using System_printf() since the Error_print() function  * calls System_printf(). Error.raiseHook = null;  */

    /*  * Uncomment this line to keep Error, Assert, and Log strings from being  * loaded on the target.  These strings are placed in the .const section.  * Setting this parameter to false will save space in the .const section.  * Error, Assert and Log message will print raw ids and args instead of  * a formatted message. Text.isLoaded = false;  */

    /*  * Uncomment this line to disable the output of characters by SysMin  * when the program exits.  SysMin writes characters to a circular buffer.  * This buffer can be viewed using the SysMin Output view in ROV. SysMin.flushAtExit = false;  */

    /*  * The BIOS module will create the default heap for the system.  * Specify the size of this default heap.  */ BIOS.heapSize = 0x100000;

    /*  * Build a custom SYS/BIOS library from sources.  */ BIOS.libType = BIOS.LibType_Custom;

    /* System stack size (used by ISRs and Swis) */ Program.stack = 0x4000;

    /* Circular buffer size for System_printf() */ SysMin.bufSize = 0x400;

    /*  * Create and install logger for the whole system  */ var loggerBufParams = new LoggerBuf.Params(); loggerBufParams.numEntries = 16; var logger0 = LoggerBuf.create(loggerBufParams); Defaults.common$.logger = logger0; Main.common$.diags_INFO = Diags.ALWAYS_ON;

    System.SupportProxy = SysMin;

  • Do you have the following in your source file where you make the GIO calls?

    #include <ti/sysbios/io/GIO.h>


    Do you make calls to EventCombiner in your source? If so, you need the following in your .cfg file

    var EventCombiner = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');

    along with the following in your source file that makes the call:

    #include <ti/sysbios/family/c64p/EventCombiner.h>

    Todd

  • How can I convert following GIO code to BIOS 6.

    *********************

    I2c_Params i2cBatteryParams;

    GIO_Handle i2c_Battery_outHandle;

    GIO_Handle i2c_Battery_inHandle;

    GIO_Attrs gioAttrs = GIO_ATTRS;

     I2c_ChanParams chanParams;

     Int status = 340;

     chanParams.masterOrSlave = I2c_CommMode_MASTER;

    /* Create the I2C Channels for the TX and RX communication */

        i2c_Battery_outHandle = GIO_create("/I2C0", IOM_OUTPUT, &status, &chanParams, &gioAttrs);

        i2c_Battery_inHandle  = GIO_create("/I2C0", IOM_INPUT, &status, &chanParams, &gioAttrs);

    ***************************

    From the documents, I am assuming that GIO api, structure are changed from BIO 5 to BIOS 6.

    Thanks

    Jayesh