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.

TMDXICE110: Adding DAL module to tiesc build

Part Number: TMDXICE110
Other Parts Discussed in Thread: SYSBIOS

HI all.

I'm trying to add the starterware/dal module to the debug build of the tiesc code.  I edited the amic11x_app.cfg like so, mimicing what I saw in the :


var SDal = xdc.loadPackage('ti.starterware.dal');
SDal.Settings.socType = socType;
SDal.Settings.libProfile = "release"

Clearly there is more to the recipe...

When I go to build it, it doesn't get the dal library built, and doesn't appear to look for it in the right place:

/home/maps/ti/xdctools_3_55_02_22_core/xs" --xdcpath="/home/maps/ti/bios_6_76_03_01/packages;/home/maps/ti/pdk_am335x_1_0_17/packages;/home/maps/ti/ndk_3_61_01_01/packages;/home/maps/ti/edma3_lld_2_12_05_30E/packages;" xdc.tools.configuro -o configPkg -t gnu.targets.arm.A8F -p ti.platforms.evmAM3359 -r release -c "/home/maps/ti/gcc-arm-none-eabi-7-2018-q2-update" "/home/maps/ti/PRU-ICSS-EtherCAT_Slave_01.00.08.01/protocols/ethercat_slave/ecat_appl/amic11x_app.cfg"
making package.mak (because of package.bld) ...
generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
configuring amic11x_app.xa8fg from package/cfg/amic11x_app_pa8fg.cfg ...
     SoC Type is
     SoC Type is
generating custom ti.sysbios library makefile ...
    Linking with library ti.drv.spi:./lib/am335x/a8/release/ti.drv.spi.aa8fg
    Linking with library ti.board:./lib/iceAMIC110/a8/release/ti.board.aa8fg
    Linking with library ti.drv.gpio:./lib/a8/release/ti.drv.gpio.aa8fg
    Linking with library ti.drv.pruss:./lib/a8/release/ti.drv.pruss.aa8fg
    Linking with library ti.drv.i2c:./lib/a8/release/ti.drv.i2c.aa8fg
    Linking with library ti.drv.uart:./lib/a8/release/ti.drv.uart.aa8fg
    Linking with library ti.osal:./lib/tirtos/a8/release/ti.osal.aa8fg
    Linking with library ti.starterware.dal:../binary/dal/lib/am335x/a8/release/gcc/libdal.a
subdir_rules.mk:31: recipe for target 'build-912623121-inproc' failed
js: "/home/maps/ti/xdctools_3_55_02_22_core/packages/xdc/cfg/Main.xs", line 48: XDC runtime error: can't find the library '../binary/dal/lib/am335x/a8/release/gcc/libdal.a' specified by package ti.starterware.dal.  It wasn't found along the path '/home/maps/ti/bios_6_76_03_01/packages;/home/maps/ti/pdk_am335x_1_0_17/packages;/home/maps/ti/ndk_3_61_01_01/packages;/home/maps/ti/edma3_lld_2_12_05_30E/packages;/home/maps/ti/xdctools_3_55_02_22_core/packages;..;'.
gmake: *** [package.mak:218: package/cfg/amic11x_app_pa8fg.xdl] Error 1

Thanks!

John

  • Hello John,

    var SDal = xdc.loadPackage('ti.starterware.dal');
    SDal.Settings.socType = socType;
    SDal.Settings.libProfile = "release"

    What is socType in your .cfg file? Please note that pdk_am335x_1_0_17\packages\ti\starterware\binary\dal\lib has 2 subfolders: am335x-evm and amic110-ddrless. So the socType needs to be either am335x-evm or amic110-ddrless depending on the development board you have.

    Regards,

    Jianzhong

  • Hi Jianzhong.  Thanks.  The xdctools are still somewhat opaque to me.  That fixed the linking issue, but there are a bunch of duplicate symbols now.  It seems the CSL library symbols are overlapping with the DAL symbols for the i2c and gpio.  So I bailed out on using the DAL and copiet the ADC code into my own directory.  I started down this road because I'm having a problem where when I try to access the ADC registers at 0x44E0D04C I get an exception, as if the MMU isn't set up right.  In the .cfg file, there is an entry:

    /* MMU configuration for Clock Module, PRM, GPIO0, UART0, I2C0, - Non bufferable| Non Cacheable */

    /* Force peripheral section to be NON cacheable strongly-ordered memory */
    var peripheralAttrs = {
    type : Mmu.FirstLevelDesc_SECTION, // SECTION descriptor
    tex: 0,
    bufferable : false, // bufferable
    cacheable : false, // cacheable
    shareable : false, // shareable
    noexecute : false, // not executable
    };


    var peripheralBaseAddr = 0x44E00000;
    Mmu.setFirstLevelDescMeta(peripheralBaseAddr, peripheralBaseAddr, peripheralAttrs);

    Which I think should cover the ADC registers if the MMU page is 1 MB in size, which I think it is?

    I've attached a snapshot of the debugger before I step past the read from the register, which faults.

  • Also, I can't read the ADC registers in the debugger.  Just figured that out.

  • John,

    It's mostly likely because ADC module is not enabled. Are you using the board library from the PDK, i.e. calling Board_init()? If so, please check pdk_am335x_1_0_17\packages\ti\board\src\iceAMIC110\iceAMIC110.c. You'll need to add the following to function Board_moduleClockInit(): 

    status = PRCMModuleEnable(CHIPDB_MOD_ID_ADC0, 0U, 0U);

    Then you can rebuild the board library:

    C:\ti\pdk_am335x_1_0_17\packages>pdksetupenv.bat
    C:\ti\pdk_am335x_1_0_17\packages\ti\board>gmake LIMIT_SOCS=am335x LIMIT_BOARDS=iceAMIC110

    Regards,

    Jianzhong

    
    
  • Thanks!  This fixed the access issue.  I suppose I need to do this for the rest of the modules I need to use that are not used in the sample EtherCAT slave.