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.

RTOS/AM3358: DCAN example project issue

Part Number: AM3358

Tool/software: TI-RTOS

Hello,

I have a project that I am building that uses almost all the peripherals of the AM335x.  I started with the "rtos_template_app_am335x_a8" project supplied in the Processor SDK TIRTOS 4.02.00.09 and have all the peripherals working in that project except DCAN and ADC.  

As DCAN is my top priority to get working now, I would like to focus on the DCAN.

First, I was able to successfully import and build the DCAN_LoopbackExample_evmAM335x_armTestProject after doing some magic (and e2e help) to get the DAL errors figured out.

Second, I started trying to take the example code and bring it into the rtos_template_app_am335x_a8 project and I am running into loads of issues.  

It appears that the DCAN example is leveraging a lot of starerware drivers which I don't want to use because they are not supported and my project will eventually go into production.  I also tried bringing in some files in the CSL folder of the PDK and files found in the board --> diag -->dcan folder but they just aren't compiling.  All of them seem to have huge ties back to starterware.

What I really need is a basic frame Tx/Rx DCAN example working in the rtos_template_app_am335x_a8 base application so I can integrate it into my project that does not use starterware.  

Has anyone done something like this?

Thanks!

  • The RTOS team have been notified. They will respond here.
  • As an example of some other stuff I have been trying, I tried working with the DCAN loopback CSL example in the 1.0.9 PDK (even though I really need a frame example), and I get the following .cfg error saying that "Target A8F is not supported".  It appears to be hung up in the interrupt configuration using XBar.:

    It appears that this example, while included in the AM335 Processor SDK, is not actually for the AM335.

    Again, any help getting a DCAN frame example running in the rtos_template_app_am335x_a8 project is greatly appreciated.

    Thanks!

  • Alexander,

    The diag CSL example that you are looking to port is for AM57x and not AM335x.
    Unfortunately, we don't have a DCAN implementation for AM335x other than the version that uses Starterware.

    I'm trying to understand your reference to rtos_template_app_am335x_a8 and getting a DCAN example working with this template.
    DCAN_LoopbackExample_evmAM335x_armTestProject was built using this template where main() has a task for dcanTestTask.

    Would it help if you can get DCAN_LoopbackExample_evmAM335x_armTestProject working on the BBB? ( I know that you had already tried this, but just trying to see how we can help you move forward).

    Lali
  • Lali,
    I need you to take the code in the DCAN_LoopbackExample_evmAM335x_armTestProject and place it in the rtos_template_app_am335x_a8 project with the BBB as the target as a "new" example. That will allow me to directly take this "new" example you make and get it in my project. You will find out quickly how hard it is to take the DCAN_LoopbackExample_evmAM335x_armTestProject code and get it working in the rtos_template_app_am335x_a8 project.

    Also, if there are any special items you need to do (like rebuild the DAL using command line gmake) as you create this project, please let us know.

    Thanks!

    Alex
  • Alex,

    I assume you have already done the steps below to build the XDC package (assuming because you had mentioned earlier that you had the example building)?

    For the DCAN_LoopbackExample_evmAM335x_armTestProject,
    The following commands can be used to build XDC package for a particular Starterware Library

    $ cd <path_to_xdc_tools>
    $ xdc.exe -P <path_to_starterware>/<library>
    Example, to build Starterware Dal Library use the following command
    $cd <path_to_xdc_tools>
    $ xdc.exe -P <path_to_starterware>/dal

    Similarly XDC Package can be built for other Starterware Libraries.

    Lali

  • Lali,

    Yes, we can run the evm example so I have all of that done.  Where we are running into issues is getting that example code to run in the rtos example project.  Having an example that works is great but I need the code to be able to run in my project. 

    If you were able to get the evm example code running in the rtos example - just have the DCAN peripheral setup in the peripheralInit function, we should be able to take it from there.  It is really an issue of trying to hunt down all the required files and paths to get the evm example code working in the rtos example project.  We have a ton of experience using CAN here so if we have the peripheral initialized and the program compiles correctly, we can setup everything else to use the DCAN peripheral.  

    Any help you can give with that would be wonderful. 

    Alex

  • Lali,

    I am really trying to push through and get this working because I need this working in a couple weeks.  As a start to get the evm example ported over to my code, I took the main "loopback_app_main.c" file and placed it in my project while excluding my actual main from the build.  

    I then went in and added all the starterware folder directories and added all the starterware calls to the .cfg file.  

    I just ran into what appears to be a big roadblock:  The CSL and DAL libraries are not happy together.  I am using the CSL library for my critical PWM code that is working great.  The DCAN loopback example uses the DAL for it's calls so now I need that.  They don't appear to work when you have them both.  Please see the attached file for my build log - a lot of "multiple definition" stuff going on...

    What are my options here???

    The issue with the CSL implementation appeared to mainly be with setting up the interrupts - correct?  Is there a way to get a CSL example working with DCAN?  It doesn't have to be pretty - just functional at this point.

    **** Build of configuration Debug for project rtos_template_app_am335x_a8 ****
    
    "C:\\ti\\ccsv7\\utils\\bin\\gmake" -k -j 4 all -O 
     
    'Building file: "../main.cfg"'
    'Invoking: XDCtools'
    "C:/ti/xdctools_3_50_03_33_core/xs" --xdcpath="C:/ti/bios_6_52_00_12/packages;C:/ti/pdk_am335x_1_0_9/packages;C:/ti/uia_2_21_02_07/packages;C:/ti/ndk_2_26_00_08/packages;C:/ti/edma3_lld_2_12_05_30B/packages;C:/ti/ccsv7/ccs_base;" xdc.tools.configuro -o configPkg -t gnu.targets.arm.A8F -p ti.platforms.beaglebone -r release -c "C:/ti/gcc-arm-none-eabi-6-2017-q1-update" "../main.cfg"
    configuring main.xa8fg from package/cfg/main_pa8fg.cfg ...
    generating custom ti.sysbios library makefile ... 
    	Linking with library ti.starterware.examples.example_utils:../../binary/examples/example_utils/lib/am335x-evm/a8/release/gcc/libexample_utils.a
    	Linking with library ti.starterware.board:../binary/board/lib/am335x-evm/a8/release/gcc/libboard.a
    	Linking with library ti.starterware.soc:../binary/soc/lib/am335x-evm/a8/release/gcc/libsoc.a
    	Linking with library ti.starterware.utils:../binary/utils/lib/am335x-evm/a8/release/gcc/libutils.a
    	Linking with library ti.starterware.dal:../binary/dal/lib/am335x-evm/a8/release/gcc/libdal.a
    	Linking with library ti.drv.spi:./lib/am335x/a8/release/ti.drv.spi.aa8fg
    	Linking with library ti.drv.uart:./lib/am335x/a8/release/ti.drv.uart.aa8fg
    	Linking with library ti.drv.i2c:./lib/am335x/a8/release/ti.drv.i2c.aa8fg
    	Linking with library ti.csl:./lib/am335x/a8/release/ti.csl.aa8fg
    	Linking with library ti.osal:./lib/tirtos/a8/release/ti.osal.aa8fg
    Starting build of library sources ...
    making C:/Users/frickas/Documents/CATT/CODE/CCSworkspace/rtos_template_app_am335x_a8/src/sysbios/sysbios.aa8fg ...
    gmake[1]: Entering directory `C:/Users/frickas/Documents/CATT/CODE/CCSworkspace/rtos_template_app_am335x_a8/src/sysbios'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `C:/Users/frickas/Documents/CATT/CODE/CCSworkspace/rtos_template_app_am335x_a8/src/sysbios'
    Build of libraries done.
    cla8fg package/cfg/main_pa8fg.c ...
    'Finished building: "../main.cfg"'
     
    'Building target: "rtos_template_app_am335x_a8.out"'
    'Invoking: GNU Linker'
    "C:/ti/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eabi-gcc.exe" -mtune=cortex-a8 -marm -DRTOS_BUILD -DbbbAM335x -DSOC_AM335x -Dam3359 -g -gdwarf-3 -gstrict-dwarf -Wall -mfloat-abi=hard -Wl,-Map,"rtos_template_app_am335x_a8.map" -nostartfiles -static -Wl,--gc-sections -L"C:/ti/pdk_am335x_1_0_9/packages/ti/board/lib/bbbAM335x/a8/debug" -L"C:/ti/bios_6_52_00_12/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/hard" -Wl,--defsym,STACKSIZE=0x1C000 -Wl,--defsym,HEAPSIZE=0x400 --specs=nano.specs -o"rtos_template_app_am335x_a8.out" "./app.o" "./dcan_app.o" "./loopback_app_main.o" "./nimu_osal.o" -Wl,-T"configPkg/linker.cmd" -Wl,--start-group -l:ti.board.aa8fg -lgcc -lm -lrdimon -lc -Wl,--end-group 
    makefile:149: recipe for target 'rtos_template_app_am335x_a8.out' failed
    C:\ti\pdk_am335x_1_0_9\packages\ti\csl\lib\am335x\a8\release\ti.csl.aa8fg(i2c.oa8fg): In function `I2CMasterBusy':
    i2c.c:(.text.I2CMasterBusy+0x0): multiple definition of `I2CMasterBusy'
    C:\ti\pdk_am335x_1_0_9\packages\ti\starterware\binary\dal\lib\am335x-evm\a8\release\gcc\libdal.a(i2c.o):i2c.c:(.text.I2CMasterBusy+0x0): first defined here
    C:\ti\pdk_am335x_1_0_9\packages\ti\csl\lib\am335x\a8\release\ti.csl.aa8fg(i2c.oa8fg): In function `I2CSetDataCount':
    i2c.c:(.text.I2CSetDataCount+0x0): multiple definition of `I2CSetDataCount'
    C:\ti\pdk_am335x_1_0_9\packages\ti\starterware\binary\dal\lib\am335x-evm\a8\release\gcc\libdal.a(i2c.o):i2c.c:(.text.I2CSetDataCount+0x0): first defined here
    C:\ti\pdk_am335x_1_0_9\packages\ti\csl\lib\am335x\a8\release\ti.csl.aa8fg(i2c.oa8fg): In function `I2CSoftReset':
    i2c.c:(.text.I2CSoftReset+0x0): multiple definition of `I2CSoftReset'
    C:\ti\pdk_am335x_1_0_9\packages\ti\starterware\binary\dal\lib\am335x-evm\a8\release\gcc\libdal.a(i2c.o):i2c.c:(.text.I2CSoftReset+0x0): first defined here
    C:\ti\pdk_am335x_1_0_9\packages\ti\csl\lib\am335x\a8\release\ti.csl.aa8fg(i2c.oa8fg): In function `I2CAutoIdleEnable':
    i2c.c:(.text.I2CAutoIdleEnable+0x0): multiple definition of `I2CAutoIdleEnable'
    C:\ti\pdk_am335x_1_0_9\packages\ti\starterware\binary\dal\lib\am335x-evm\a8\release\gcc\libdal.a(i2c.o):i2c.c:(.text.I2CAutoIdleEnable+0x0): first defined here
    C:\ti\pdk_am335x_1_0_9\packages\ti\csl\lib\am335x\a8\release\ti.csl.aa8fg(i2c.oa8fg): In function `I2CIdleModeSelect':
    i2c.c:(.text.I2CIdleModeSelect+0x0): multiple definition of `I2CIdleModeSelect'
    C:\ti\pdk_am335x_1_0_9\packages\ti\starterware\binary\dal\lib\am335x-evm\a8\release\gcc\libdal.a(i2c.o):i2c.c:(.text.I2CIdleModeSelect+0x0): first defined here
    C:\ti\pdk_am335x_1_0_9\packages\ti\csl\lib\am335x\a8\release\ti.csl.aa8fg(i2c.oa8fg): In function `I2CClockActivitySelect':
    i2c.c:(.text.I2CClockActivitySelect+0x0): multiple definition of `I2CClockActivitySelect'
    C:\ti\pdk_am335x_1_0_9\packages\ti\starterware\binary\dal\lib\am335x-evm\a8\release\gcc\libdal.a(i2c.o):i2c.c:(.text.I2CClockActivitySelect+0x0): first defined here
    C:\ti\pdk_am335x_1_0_9\packages\ti\csl\lib\am335x\a8\release\ti.csl.aa8fg(uart.oa8fg): In function `UARTParityModeGet':
    uart.c:(.text.UARTParityModeGet+0x0): multiple definition of `UARTParityModeGet'
    C:\ti\pdk_am335x_1_0_9\packages\ti\starterware\binary\dal\lib\am335x-evm\a8\release\gcc\libdal.a(uart.o):uart.c:(.text.UARTParityModeGet+0x0): first defined here
    C:\ti\pdk_am335x_1_0_9\packages\ti\csl\lib\am335x\a8\release\ti.csl.aa8fg(uart.oa8fg): In function `UARTSubConfigTCRTLRModeEn':
    uart.c:(.text.UARTSubConfigTCRTLRModeEn+0x0): multiple definition of `UARTSubConfigTCRTLRModeEn'
    C:\ti\pdk_am335x_1_0_9\packages\ti\starterware\binary\dal\lib\am335x-evm\a8\release\gcc\libdal.a(uart.o):uart.c:(.text.UARTSubConfigTCRTLRModeEn+0x0): first defined here
    C:\ti\pdk_am335x_1_0_9\packages\ti\csl\lib\am335x\a8\release\ti.csl.aa8fg(uart.oa8fg): In function `UARTSubConfigXOFFModeEn':
    uart.c:(.text.UARTSubConfigXOFFModeEn+0x0): multiple definition of `UARTSubConfigXOFFModeEn'
    C:\ti\pdk_am335x_1_0_9\packages\ti\starterware\binary\dal\lib\am335x-evm\a8\release\gcc\libdal.a(uart.o):uart.c:(.text.UARTSubConfigXOFFModeEn+0x0): first defined here
    C:\ti\pdk_am335x_1_0_9\packages\ti\csl\lib\am335x\a8\release\ti.csl.aa8fg(uart.oa8fg): In function `UARTSubConfigMSRSPRModeEn':
    uart.c:(.text.UARTSubConfigMSRSPRModeEn+0x0): multiple definition of `UARTSubConfigMSRSPRModeEn'
    C:\ti\pdk_am335x_1_0_9\packages\ti\starterware\binary\dal\lib\am335x-evm\a8\release\gcc\libdal.a(uart.o):uart.c:(.text.UARTSubConfigMSRSPRModeEn+0x0): first defined here
    C:\ti\pdk_am335x_1_0_9\packages\ti\csl\lib\am335x\a8\release\ti.csl.aa8fg(uart.oa8fg): In function `UARTTCRTLRBitValRestore':
    uart.c:(.text.UARTTCRTLRBitValRestore+0x0): multiple definition of `UARTTCRTLRBitValRestore'
    C:\ti\pdk_am335x_1_0_9\packages\ti\starterware\binary\dal\lib\am335x-evm\a8\release\gcc\libdal.a(uart.o):uart.c:(.text.UARTTCRTLRBitValRestore+0x0): first defined here
    C:\ti\pdk_am335x_1_0_9\packages\ti\csl\lib\am335x\a8\release\ti.csl.aa8fg(uart.oa8fg): In function `UARTModuleReset':
    uart.c:(.text.UARTModuleReset+0x0): multiple definition of `UARTModuleReset'
    C:\ti\pdk_am335x_1_0_9\packages\ti\starterware\binary\dal\lib\am335x-evm\a8\release\gcc\libdal.a(uart.o):uart.c:(.text.UARTModuleReset+0x0): first defined here
    collect2.exe: error: ld returned 1 exit status
    gmake[1]: *** [rtos_template_app_am335x_a8.out] Error 1
    gmake: *** [all] Error 2
    makefile:145: recipe for target 'all' failed
    
    **** Build Finished ****
    

  • Feels like I am talking to myself here but I *may* be making progress.  

    I found that the files located in the PDK1.0.9-->packages-->ti-->board-->diag-->dcan-->src had CSL-based files and tried to get those working.

    I brought in the "dcan_loopback_app_main.c" from the above folder and the "dcan.c" file into my  a sandbox RTOS project I am working with (even though this example main file is not and RTOS file).

    I setup a compiler directory path to the above folder and tried to compile.  

    There were some #defines missing so I had to add these 3 items (they are probably wrong but I am just trying stuff for now):

    #define DCAN1_APP_INST 0

    #define DCAN2_APP_INST 1

    #define SOC_I_DRM_BASE 0

    Then, when I compile I get the attached build errors.

    **** Build of configuration Debug for project NIMU_BasicExample_bbbAM335x_armExampleproject ****
    
    "C:\\ti\\ccsv7\\utils\\bin\\gmake" -k -j 4 all -O 
     
    'Building file: "../nimu_bbbam335x.cfg"'
    'Invoking: XDCtools'
    "C:/ti/xdctools_3_50_03_33_core/xs" --xdcpath="C:/ti/ndk_2_26_00_08/packages;C:/ti/bios_6_52_00_12/packages;C:/ti/edma3_lld_2_12_05_30B/packages;C:/ti/pdk_am335x_1_0_9/packages;C:/ti/ccsv7/ccs_base;" xdc.tools.configuro -o configPkg -t gnu.targets.arm.A8F -p ti.platforms.beaglebone -r debug -c "C:/ti/gcc-arm-none-eabi-6-2017-q1-update" "../nimu_bbbam335x.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring nimu_bbbam335x.xa8fg from package/cfg/nimu_bbbam335x_pa8fg.cfg ...
    generating custom ti.sysbios library makefile ... 
    	Linking with library ti.transport.ndk.nimu:./lib/am335x/a8/release/ti.transport.ndk.nimu.aa8fg
    	Linking with library ti.drv.emac:./lib/am335x/a8/release/ti.drv.emac.aa8fg
    	Linking with library ti.drv.gpio:./lib/a8/release/ti.drv.gpio.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.board:./lib/bbbAM335x/a8/release/ti.board.aa8fg
    	Linking with library ti.osal:./lib/tirtos/a8/release/ti.osal.aa8fg
    	Linking with library ti.csl:./lib/am335x/a8/release/ti.csl.aa8fg
    Starting build of library sources ...
    making C:/Users/frickas/Documents/CATT/CODE/CCSworkspace/NIMU_BasicExample_bbbAM335x_armExampleproject/src/sysbios/sysbios.aa8fg ...
    gmake[1]: Entering directory `C:/Users/frickas/Documents/CATT/CODE/CCSworkspace/NIMU_BasicExample_bbbAM335x_armExampleproject/src/sysbios'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `C:/Users/frickas/Documents/CATT/CODE/CCSworkspace/NIMU_BasicExample_bbbAM335x_armExampleproject/src/sysbios'
    Build of libraries done.
    cla8fg package/cfg/nimu_bbbam335x_pa8fg.c ...
    'Finished building: "../nimu_bbbam335x.cfg"'
     
    'Building file: "../UART_soc.c"'
    'Invoking: GNU Compiler'
    "C:/ti/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a -marm -mfloat-abi=hard -Dam3359 -DSOC_AM335x -DBBB_AM335X -I"C:/ti/pdk_am335x_1_0_9/packages/ti/board/diag/dcan/src" -I"C:/ti/pdk_am335x_1_0_9/packages/ti/board" -I"C:/Users/frickas/Documents/CATT/CODE/CCSworkspace/NIMU_BasicExample_bbbAM335x_armExampleproject" -I"C:/ti/gcc-arm-none-eabi-6-2017-q1-update/arm-none-eabi/include" -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF"UART_soc.d" -MT"UART_soc.o" @"configPkg/compiler.opt" -o"UART_soc.o" "../UART_soc.c"
    'Finished building: "../UART_soc.c"'
     
    'Building file: "../dcan.c"'
    'Invoking: GNU Compiler'
    "C:/ti/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a -marm -mfloat-abi=hard -Dam3359 -DSOC_AM335x -DBBB_AM335X -I"C:/ti/pdk_am335x_1_0_9/packages/ti/board/diag/dcan/src" -I"C:/ti/pdk_am335x_1_0_9/packages/ti/board" -I"C:/Users/frickas/Documents/CATT/CODE/CCSworkspace/NIMU_BasicExample_bbbAM335x_armExampleproject" -I"C:/ti/gcc-arm-none-eabi-6-2017-q1-update/arm-none-eabi/include" -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF"dcan.d" -MT"dcan.o" @"configPkg/compiler.opt" -o"dcan.o" "../dcan.c"
    'Finished building: "../dcan.c"'
     
    'Building file: "../dcan_loopback_app_main.c"'
    'Invoking: GNU Compiler'
    "C:/ti/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a -marm -mfloat-abi=hard -Dam3359 -DSOC_AM335x -DBBB_AM335X -I"C:/ti/pdk_am335x_1_0_9/packages/ti/board/diag/dcan/src" -I"C:/ti/pdk_am335x_1_0_9/packages/ti/board" -I"C:/Users/frickas/Documents/CATT/CODE/CCSworkspace/NIMU_BasicExample_bbbAM335x_armExampleproject" -I"C:/ti/gcc-arm-none-eabi-6-2017-q1-update/arm-none-eabi/include" -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF"dcan_loopback_app_main.d" -MT"dcan_loopback_app_main.o" @"configPkg/compiler.opt" -o"dcan_loopback_app_main.o" "../dcan_loopback_app_main.c"
    ../dcan_loopback_app_main.c: In function 'DCAN1Prcm_clck_ram':
    ../dcan_loopback_app_main.c:289:14: warning: unused variable 'status' [-Wunused-variable]
         uint32_t status;
                  ^~~~~~
    ../dcan_loopback_app_main.c: In function 'DCAN2Prcm_clck_ram':
    ../dcan_loopback_app_main.c:440:14: warning: unused variable 'status' [-Wunused-variable]
         uint32_t status;
                  ^~~~~~
    'Finished building: "../dcan_loopback_app_main.c"'
     
    'Building file: "../nimu_osal.c"'
    'Invoking: GNU Compiler'
    "C:/ti/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a -marm -mfloat-abi=hard -Dam3359 -DSOC_AM335x -DBBB_AM335X -I"C:/ti/pdk_am335x_1_0_9/packages/ti/board/diag/dcan/src" -I"C:/ti/pdk_am335x_1_0_9/packages/ti/board" -I"C:/Users/frickas/Documents/CATT/CODE/CCSworkspace/NIMU_BasicExample_bbbAM335x_armExampleproject" -I"C:/ti/gcc-arm-none-eabi-6-2017-q1-update/arm-none-eabi/include" -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF"nimu_osal.d" -MT"nimu_osal.o" @"configPkg/compiler.opt" -o"nimu_osal.o" "../nimu_osal.c"
    'Finished building: "../nimu_osal.c"'
     
    'Building target: "NIMU_BasicExample_bbbAM335x_armExampleproject.out"'
    'Invoking: GNU Linker'
    "C:/ti/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eabi-gcc.exe" -mtune=cortex-a8 -marm -Dam3359 -DSOC_AM335x -DBBB_AM335X -g -gdwarf-3 -gstrict-dwarf -Wall -mfloat-abi=hard -Wl,-Map,"NIMU_BasicExample_bbbAM335x_armExampleproject.map" -nostartfiles -static -Wl,--gc-sections -L"C:/ti/bios_6_52_00_12/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/fpu" -L"C:/ti/ndk_2_26_00_08/packages/ti/ndk/os/lib" -L"C:/ti/pdk_am335x_1_0_8/packages/ti/starterware/binary/soc/lib/am335x-evm/a8/release/gcc" -Wl,--defsym,STACKSIZE=0x1C000 -Wl,--defsym,HEAPSIZE=0x400 -o"NIMU_BasicExample_bbbAM335x_armExampleproject.out" "./UART_soc.o" "./dcan.o" "./dcan_loopback_app_main.o" "./nimu_osal.o" -Wl,-T"configPkg/linker.cmd" -Wl,--start-group -lrdimon -lgcc -lm -lnosys -l:os.aa8fg -lsoc -lc -Wl,--end-group 
    makefile:151: recipe for target 'NIMU_BasicExample_bbbAM335x_armExampleproject.out' failed
    C:\Users\frickas\Documents\CATT\CODE\CCSworkspace\NIMU_BasicExample_bbbAM335x_armExampleproject\src\sysbios\sysbios.aa8fg(gnu_ReentSupport.o): In function `ti_sysbios_rts_gnu_ReentSupport_Module_startup__E':
    ReentSupport.c:(.text.ti_sysbios_rts_gnu_ReentSupport_Module_startup__E+0x30): undefined reference to `ti_sysbios_rts_gnu_ReentSupport_checkIfCorrectLibrary'
    collect2.exe: error: ld returned 1 exit status
    gmake[1]: *** [NIMU_BasicExample_bbbAM335x_armExampleproject.out] Error 1
    gmake: *** [all] Error 2
    makefile:147: recipe for target 'all' failed
    
    **** Build Finished ****
    

    Any thoughts?  Is this a better place to start from than the starterware example??

    Alex

  • Alex,

    I assure you that you are not talking to youself here as the team is closely following your updates on E2E. Mark and the team are following up on this issue offline. At the moment, the DCAN RTOS project and the starterware examples seems to be the only software that we are able to share at this time. We don`t have an LLD like the DCAN driver on Tiva that you pointed us to. Lali has also brought this issue up with the development team to try and understand how we can help you in the short term.

    Coming to the build issue. Please check the Processor SDK RTOS FAQ link in the wiki link below that discusses this issue. you may need to link in the correct runtime GCC library to resolve this issue:
    processors.wiki.ti.com/.../Processor_SDK_RTOS_FAQ

    Regards,
    Rahul
  • Alex,

    As Rahul mentioned, you are not talking to yourself. We have been working behind the scenes to try and find a solution.
    We don't have a LLD example at this time. However, I'm working on getting a build-able example that is based on the RTOS template to help out.

    Lali
  • Thank you Lali and Rahul for the responses.

    Lali - I have what appears to be code from the board/diag/dcan/src compiling in my rtos template project. It is not tested but it compiles (which I think is a win).

    However, to get it to compile, I had to set the following #defines manually so can you help me understand what these values should be and if they are needed?

    #define DCAN1_APP_INST 0
    #define DCAN2_APP_INST 1
    #define SOC_I_DRM_BASE 0

    This is still all un-tested so let me know how your example is coming along.

    Let me know if you want any other information. One big difference is that it appears this is for running DCAN1 and I am using the DCAN0 peripheral. I also don't know if all the other #defines and variables setup in the board/diag/dcan/src are correct for the AM335x.

    Thanks!

    Alex
  • Lali,
    As an update - my code compiles but when I try to run it on the BBB, it crashes as it hits the first DCAN call "DCANReset".

    So your example is still very much needed!

    Thanks for your continued help on this!

    Alex
  • Alex,

    Which pins on the BBB did you try to configure for DCAN?

    D15, D16?

    Lali

  • Lali,

    No, we are using pins D17 and D18.


    D17 is Dcan0 rx

    D18 is Dcan0 tx



    Thanks!

    Alex
  • Alex,

    Please try the attached project.

    This definitely goes past the DCANReset(). I could not get it to run fully, but it builds fine. Also attached are some pinmux changes.

    Run-time UART prints will come through UART0 on FTD header J1 of the BBB.

    You will have to link in a few files for the project to build. There are also a few symbols in the project properties that had to be added.

    Hope this helps.

    Lali

    /cfs-file/__key/communityserver-discussions-components-files/791/DCAN_5F00_LoopbackExample_5F00_bbbAM335x_5F00_armTestProject.zip

    /cfs-file/__key/communityserver-discussions-components-files/791/am335x_5F00_beagleboneblack_5F00_pinmux_5F00_data.c

    /cfs-file/__key/communityserver-discussions-components-files/791/2604.am335x_5F00_pinmux.h

  • Lali,

    I downloaded the project but a lot of the main files are missing - it appears they were linked files that were not zipped up.

    dcan_app.c

    dcan.c

    loopback_app_main.c

    am335x_app_dcan_evmam335x.cfg

    Also - I already have my BBB board built with my full pinmux (including DCAN0) so I shouldn't have to do anything extra with the pinmux, correct?

    I am excited about trying this out!

    Alex

  • Also, I am hoping that the project you built isn't simply the AM335x DCAN loopback example that uses Starterware and Dal, because that won't work in our application due to the CSL library usage.

    Thanks!

    Alex
  • Alex,

    I have reattached the project this time with a copy of the required files instead of links.

    The project does indeed depend on Starterware DCAN API calls to function. This is what's currently available for an AM335x BBB DCAN example.

    Lali

    /cfs-file/__key/communityserver-discussions-components-files/791/0763.DCAN_5F00_LoopbackExample_5F00_bbbAM335x_5F00_armTestProject.zip

  • Lali,

    I think we are not on the same page here.

    First, you mentioned in your March 2nd post that:

    "As Rahul mentioned, you are not talking to yourself. We have been working behind the scenes to try and find a solution.

    We don't have a LLD example at this time. However, I'm working on getting a build-able example that is based on the RTOS template to help out."

    The reason I was asking about the linked files is because I assumed you had changed something in them.  I already have that example working on the BBB as I mentioned in previous posts.  It does not seem like you actually did what you said you would do as you simply made another stand-alone example instead of getting it to work in the RTOS template.

    Second, when I tried to pull in the Starterware example code (that I had running in it's own separate project) into my main RTOS template that is using the CSL library (for other drivers like PWM), it failed because the DAL and the CSL libraries do not work together.  

    Third, my comment about not getting past the "DCANReset" function was when I was trying to use the DCAN CSL library function calls because, again, the Starterware example does not work in my project.

    To hopefully help, I have attached a small DCAN  CSL example that I have incorporated and is compiling in my main RTOS template app but fails on the DCANReset function call.   I should also note that this example has some RTOS linking error that needs to be resolved or you can put the files into a different project - I don't want to copy my entire main project and I don't have time to get this small example working perfect but it is a good example of what I was trying to do.

    Hopefully you can use my example to get a CSL example working (maybe you find that my #defines or commented out code is the reason it doesn't work and it is a simple fix).  

    Alex

    NIMU_BasicExample_bbbAM335x_armExampleproject.zip

  • Guys,
    I got an example working with my project using the CSL calls so I am good to go now.

    Thanks!

    Alex
  • Alex,

    Thanks for posting back that you found a solution to move forward.
    Would be much appreciated if you could please share some details on how you were able to enable the DCAN CSL example.

    Thanks.

    Lali