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/AM3356: Starterware, RTOS and PDK differences

Part Number: AM3356
Other Parts Discussed in Thread: AM3358

Tool/software: TI-RTOS

Here is the situation:  We can connect and debug the Beaglebone with no issues.  We can compile the simple hello world and SWI examples and run them on the board with no issue. 

The problems we are having are all TI tool chain issues at this point as we try to get processor peripheral code setup and try to compile.  We are simply trying to get SYSBYOS compiling in CCS for our board with the correct drivers, etc.    We have searched for ~2 weeks trying to pull everything together and we keep running into circular references and not finding the answers to our questions.

Here is a list of questions we have:

1. What is the difference between Starterware, Processor SDK RTOS AM335X and the PDK AM335X? 

    1. Documentation is all over the map regarding all of these.

2. It appears that we need to somehow get the board setup in one of the above packages and integrated into the board.h to get code to compile.  I found that I need to start with the Pinmux tool (which I have and attached the zip file for our board – although I don’t know if I need to enable the EMIF peripheral or if that is done some other way so in the attached file it IS enabled).  What I can’t figure out is how to get the pinmux generated files to link up with my code so it will build with the correct pin configurations. 

    1. Some of the online information references the pinmux generating more files than it actually does.
    2. Help with this process would be great and help us when we end up spinning our own board this summer and have a new pinmux set of IO for the AM335X.

3. Overall documentation on drivers for the SDK and PDK – are there similar documents to the Tivaware and TI-RTOS for Tiva C documents for the AM335X processor and SDKs?

4. Overall project configuration in CCS for the AM335X processor – what packages do we need to have included when building?

5. What examples can we access/use?

    1. The PDK examples do not exist even if we compile the Processor SDK as suggested in the TI forums

It seems like we are really close to getting things running if we can get our CCS environment setup with the integration of the board pinmux files and necessary documentation. 

  • Hi Mark,

    I can help answer some of your questions:

    Standalone StarterWare is a legacy software package that we're no longer supporting. This was a package that was created for bare-metal no-OS development and there were issues integrating this package with a high level OS.

    Processors have since moved to Processor SDK, the "one software platform to rule them all." www.ti.com/.../overview.html. For AM335x devices, the starterware is still rolled into  the pdk packages essentially to reuse the bootloader and some SOC/board initialization routines and also to allow existing customers to migrate to pdk environment.. For new application development, the recommendation is to use LLD from PDK package for application development and only use bootloader from the starterware package. 


    For documentation, we have the Processor SDK RTOS Software Developer Guide that contains documentation on getting started, drivers, examples, etc.
    www.ti.com/processor_sdk_rtos - I recommend bookmarking this!

    The PDK examples are makefile based, but there is a script in the PDK directory that converts them to CCS projects. Refer to processors.wiki.ti.com/.../Rebuilding_The_PDK

    You will need to setup your PDK environment first by navigating to the PDK_folder/packages and running pdksetupenv.bat in command prompt. You can then run the pdkProjectCreate.bat script to create the CCS projects. The scripts assume you have installed the SDK in the default location (C:\ti) so if this is not the case refer to processors.wiki.ti.com/.../Processor_SDK_RTOS_Install_In_Custom_Path

    When you import the examples it will automatically include the necessary packages from the SDK.

    Hope this helps.

    Regards,
    Sahin

  • Sahin,

    Thanks for your feedback. My customer has gotten through the gmake-call, but then the system seems to break down here. It appears that the peripheral drivers are not loading properly. (we can get the basics running ('hello world') - just can't seem to get past that).

    The actual target processor is the AM3358 and Code Composer Studio 6.2.0 is the SW development platform. CCS 7 was tried, but it had too many problems to continue down that path.

    Digging through the e2e forum, it appears several people are having the same issue. My customer is trying to use TI RTOS for TivaC with CCS 7.4+  Have you heard any complaints about this? They are trying to determine why TI RTOS is not appearing in the project, despite the paths all showing that it should.

    Should we avoid using CCS 7.4+ for new development at this time and stick with a revision from the 6.x vintage?

    Here is a link on e2e that matches the issues they are having:

    Some more information regarding CCS 7 vs CCS6 with TIRTOS:

    1. When I am in CCS6, the latest TI_RTOS for TivaC is 2.16.1.14.  But when I am in CCS7, it tells me to download 2.16.0.08.  

    2. If I try to compile a project in CCS7 with 2.16.1.14 (which I have because of my CCS6 install), my project complies.  If I go into the project General settings and choose 2.16.0.08, the project does not compile and I get errors.  

    They are using all of the AM3358 peripherals except for the I2C. I can send the Pin-mux file for review if that would help.

    Is there a Driver description document anywhere?

    It appears that the TI-RTOS is having issues when peripherals are involved. Looking to the future - are there any particular libraries that will need to be included in the code compiling for the peripheral drivers??

    Thanks!3757.AM335x.pinmux.txt

  • Mark,

    I think we are dealing with quite a few issues here so I would like to help you understand Processor SDK RTOS stack and also help provide you more AM335x documentation.

    To start with, I am not sure TivaC software and Processor SDK RTOS software provide the same user experience and support same set of dependencies so there may be some first time learning in how the process works with AM335x devices.  

    To select the right version of CCS, you should always refer to the release notes of the software that specifies the version of the dependencies with which the SDK has been system tested for the best user experience.  The Processor SDK RTOS v4.2 Release Notes is available here:

    The CCS version that we are currently supporting is CCSv7.3 with the current release. Other than CCS all other tools including the compiler is part of the the Processor SDK RTOS installer.

    For AM335x, if you are using a peripheral, we recommend that you setup the example/test for the LLD driver and check the .cfg file as a starting point to create your own application.  We have also added a simple starter template that we support on the AM335x EVM that you can use as reference. this template merges multiple drivers and shows how they can be run simultaneously.

    In order to update and customize t he board library, you can refer to the following app note that describes how the default UART instance can be updated in the SDK. this walks user through changing the board package with updated pinmux, peripheral instance and testing the changes.

    Most applications using peripheral drivers require you to link in CSL library, OSAL (OS Abstraction layer) library and board library.

    The high level driver documentation is linked from the Software developer guide and the API reference guide is found at

    pdk_am335x_1_0_9\packages\API_Documentation.html

    Regards,

    Rahul

  • Let me back this up a bit.

    I asked my customer to do the following (a more step-by-step approach):

    My request to the engineer - "Can you do the following exercise – grab the following document and test the ‘example’ for changing the UART settings with the Pin-Mux tool.

    Processor SDK RTOS Customization: Modifying Board library to change UART instance (sprac32.pdf)

    Let's use this as a starting point for our conversation.  (Section 1 & 2 for the SW side of things)

    From what I can tell of the files you sent – you’ve already done something like this (maybe not exactly like this example).

    And then, section 3, ‘test the changes’. If it all works – then we are that much farther to a final solution. If not – then we know where we can start. "

    Engineer's Response:

    A couple comments on the example (and an issue with building the boards):

    1. In section 2.1,  item 1 appears to already be done, and it appears that, thankfully, al the peripherals are there so I would hope they could all be enabled and not manually entered:  
      1. Item 2.1.2 appears just to be editing the UART module from 0 to 1.  Is there a reason that both could not be enabled (just thinking for future work)
      2. Item 2.2.1: What would I do here if I wanted to enable more than UART 1?  Is it some OR combination or something totally different? It appears there can only be one line of BOARD_UART_INSTANCE
      3. 2.2.2: This step seems to be the same as step 2.1.2 but just in a pinmux file – seems redundant.
      4. I get the following errors when I try to build the board and starterware files:

       

      Board

      c:\ti\PDK_AM~1\packages>gmake board

      gmake -C ./ti/board all

      gmake[1]: Entering directory `c:/ti/PDK_AM~1/packages/ti/board'

      gmake libcores BOARD=evmAM335x

      gmake[2]: Entering directory `c:/ti/PDK_AM~1/packages/ti/board'

      gmake lib_allendians CORE=a8host BUILD_PROFILE_a8host=release

      gmake[3]: Entering directory `c:/ti/PDK_AM~1/packages/ti/board'

      gmake comp_libs ENDIAN=little

      gmake[4]: Entering directory `c:/ti/PDK_AM~1/packages/ti/board'

      gmake -C /ti/PDK_AM~1/packages/ti/board -f build/makefile.mk

      gmake[5]: Entering directory `c:/ti/PDK_AM~1/packages/ti/board'

      # Compiling evmAM335x:am335x:a8host:release:board: src/evmAM335x/evmAM335x_pinmux.c

      C:/ti/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc -MD -MF /ti/PDK_AM~1/packages/ti/binary/ti/board/board/obj/evmAM335x/a8/release/.deps/evmAM335x_pinmux.P -DMAKEFILE_BUILD -c -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mabi=aapcs -mapcs-frame -D__ARMv7 -Wimplicit -Wall -Wunused -Wunknown-pragmas -ffunction-sections -fdata-sections -Wall -MMD -MP -Werror -O2 -s -DNDEBUG -DAM335X_FAMILY_BUILD -Dam335x -DBUILDCFG_MOD_UART -DBUILDCFG_MOD_GPIO  -DBUILDCFG_MOD_I2C -DBUILDCFG_MOD_MCSPI  -DBUILDCFG_MOD_QSPI -DBUILDCFG_MOD_PRU_ETH -DBUILDCFG_MOD_MMCSD -DBUILDCFG_MOD_CPSW -DBUILDCFG_MOD_PWMSS -DBUILDCFG_MOD_DSS -DBUILDCFG_MOD_USB -DBUILDCFG_MOD_GPMC -DBUILDCFG_MOD_DCAN -DBUILDCFG_MOD_MCASP -DBUILDCFG_MOD_VPFE -DBUILDCFG_MOD_MDIO -DBUILDCFG_MOD_DMTIMER -DBUILDCFG_MOD_EDMA3CC -DBUILDCFG_MOD_EDMA3TC -DBUILDCFG_MOD_RTC -DBUILDCFG_MOD_WDT -DBUILDCFG_MOD_ADC -DBUILDCFG_MOD_LCDC -DBUILDCFG_MOD_PRU_ICSS   -DevmAM335x -DSOC_AM335x -DevmAM335x -IC:/ti/gcc-arm-none-eabi-4_9-2015q3/arm-none-eabi/include -I. -Isrc -Isrc/evmAM335x -Isrc/evmAM335x/device -Isrc/evmAM335x/include -I/ti/PDK_AM~1/packages/ti/starterware/include -I/ti/PDK_AM~1/packages/ti/starterware/include/hw -I/ti/PDK_AM~1/packages/ti/starterware/board -I/ti/PDK_AM~1/packages/ti/starterware/device -I/ti/PDK_AM~1/packages/ti/starterware/include/utils -I/ti/PDK_AM~1/packages/ti/starterware/utils -I/ti/PDK_AM~1/packages/ti/starterware/soc -I/ti/PDK_AM~1/packages/ti/starterware/board/am335x -I/ti/PDK_AM~1/packages/ti/starterware/soc/am335x -I/ti/PDK_AM~1/packages/ti/starterware/include/am335x -I/ti/PDK_AM~1/packages -IC:/ti/edma3_lld_2_12_05_29/packages -I/ti/PDK_AM~1/packages/ti/csl -I/apps/apps_nonbam/inc -I/ -I/common  -MF /ti/PDK_AM~1/packages/ti/binary/ti/board/board/obj/evmAM335x/a8/release/evmAM335x_pinmux.d -MT /ti/PDK_AM~1/packages/ti/binary/ti/board/board/obj/evmAM335x/a8/release/evmAM335x_pinmux.oa8fg -o /ti/PDK_AM~1/packages/ti/binary/ti/board/board/obj/evmAM335x/a8/release/evmAM335x_pinmux.oa8fg src/evmAM335x/evmAM335x_pinmux.c

      src/evmAM335x/evmAM335x_pinmux.c: In function 'PINMUXModuleConfig':

      src/evmAM335x/evmAM335x_pinmux.c:165:19: error: 'gGpevmPinmuxData' undeclared (first use in this function)

           pPinmuxData = gGpevmPinmuxData;

                         ^

      src/evmAM335x/evmAM335x_pinmux.c:165:19: note: each undeclared identifier is reported only once for each function it appears in

      gmake[5]: *** [/ti/PDK_AM~1/packages/ti/binary/ti/board/board/obj/evmAM335x/a8/release/evmAM335x_pinmux.oa8fg] Error 1

      gmake[5]: Leaving directory `c:/ti/PDK_AM~1/packages/ti/board'

      gmake[4]: *** [board] Error 2

      gmake[4]: Leaving directory `c:/ti/PDK_AM~1/packages/ti/board'

      gmake[3]: *** [little_lib] Error 2

      gmake[3]: Leaving directory `c:/ti/PDK_AM~1/packages/ti/board'

      gmake[2]: *** [a8host_lib] Error 2

      gmake[2]: Leaving directory `c:/ti/PDK_AM~1/packages/ti/board'

      gmake[1]: *** [evmAM335x_lib] Error 2

      gmake[1]: Leaving directory `c:/ti/PDK_AM~1/packages/ti/board'

      gmake: *** [board_lib] Error 2

       

      Starterware:

      c:\ti\PDK_AM~1\packages>gmake starterware

      cmd /C del /s ti\\starterware\\*.o ti\\starterware\\*.a > NUL

      gmake -C ./ti/starterware bootloader BUILDCFG=boot BOOTMODE=uart PLATFORM=am335x-evm PROFILE=debug -s KW_BUILD=no

      # Making am335x-evm:a8host:debug:xmodem_lib...

      # Compiling am335x-evm:a8host:debug:xmodem_lib: crc16.c

      # Compiling am335x-evm:a8host:debug:xmodem_lib: xmodem.c

      #

      # Archiving am335x-evm:a8host:debug:xmodem_lib_boot

      #

      # Making am335x-evm:a8host:debug:board...

      # Compiling am335x-evm:a8host:debug:board: board.c

      # Compiling am335x-evm:a8host:debug:board: dcard.c

      # Compiling am335x-evm:a8host:debug:board: platform.c

      # Compiling am335x-evm:a8host:debug:board: pinmux.c

      # Compiling am335x-evm:a8host:debug:board: am335x/board_am335x.c

      # Compiling am335x-evm:a8host:debug:board: am335x/dcard_am335x.c

      # Compiling am335x-evm:a8host:debug:board: am335x/am335x_gpevm.c

      am335x/am335x_gpevm.c:341:5: error: 'gGpevmPinmuxData' undeclared here (not in a function)

           gGpevmPinmuxData,

           ^

      gmake[3]: *** [c:/ti/PDK_AM~1/packages/ti/starterware/binary/board/obj/am335x-evm/a8/debug/gcc/am335x_gpevm_boot.o] Error 1

      gmake[2]: *** [board] Error 2

      gmake[1]: *** [bootloader] Error 2

      gmake: *** [starterware_boot] Error 2

    Update: 2/4/18

     I tried building just the BBB board and got this error (my update continues after the error info below):

     c:\ti\PDK_AM~1\packages>gmake board_lib LIMIT_BOARDS=bbbAM335x

    gmake -C ./ti/board all

    gmake[1]: Entering directory `c:/ti/PDK_AM~1/packages/ti/board'

    gmake libcores BOARD=bbbAM335x

    gmake[2]: Entering directory `c:/ti/PDK_AM~1/packages/ti/board'

    gmake lib_allendians CORE=a8host BUILD_PROFILE_a8host=release

    gmake[3]: Entering directory `c:/ti/PDK_AM~1/packages/ti/board'

    gmake comp_libs ENDIAN=little

    gmake[4]: Entering directory `c:/ti/PDK_AM~1/packages/ti/board'

    gmake -C /ti/PDK_AM~1/packages/ti/board -f build/makefile.mk

    gmake[5]: Entering directory `c:/ti/PDK_AM~1/packages/ti/board'

    # Compiling bbbAM335x:am335x:a8host:release:board: src/bbbAM335x/bbbAM335x_pinmux.c

    C:/ti/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc -MD -MF /ti/PDK_AM~1/packages/ti/binary/ti/board/board/obj/bbbAM335x/a8/release/.deps/bbbAM335x_pinmux.P -DMAKEFILE_BUILD -c -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mabi=aapcs -mapcs-frame -D__ARMv7 -Wimplicit -Wall -Wunused -Wunknown-pragmas -ffunction-sections -fdata-sections -Wall -MMD -MP -Werror -O2 -s -DNDEBUG -DAM335X_FAMILY_BUILD -Dam335x -DBUILDCFG_MOD_UART -DBUILDCFG_MOD_GPIO  -DBUILDCFG_MOD_I2C -DBUILDCFG_MOD_MCSPI  -DBUILDCFG_MOD_QSPI -DBUILDCFG_MOD_PRU_ETH -DBUILDCFG_MOD_MMCSD -DBUILDCFG_MOD_CPSW -DBUILDCFG_MOD_PWMSS -DBUILDCFG_MOD_DSS -DBUILDCFG_MOD_USB -DBUILDCFG_MOD_GPMC -DBUILDCFG_MOD_DCAN -DBUILDCFG_MOD_MCASP -DBUILDCFG_MOD_VPFE -DBUILDCFG_MOD_MDIO -DBUILDCFG_MOD_DMTIMER -DBUILDCFG_MOD_EDMA3CC -DBUILDCFG_MOD_EDMA3TC -DBUILDCFG_MOD_RTC -DBUILDCFG_MOD_WDT -DBUILDCFG_MOD_ADC -DBUILDCFG_MOD_LCDC -DBUILDCFG_MOD_PRU_ICSS   -DbbbAM335x -DSOC_AM335x -DbbbAM335x -IC:/ti/gcc-arm-none-eabi-4_9-2015q3/arm-none-eabi/include -I. -Isrc -Isrc/bbbAM335x -Isrc/bbbAM335x/device -Isrc/bbbAM335x/include -I/ti/PDK_AM~1/packages/ti/starterware/include -I/ti/PDK_AM~1/packages/ti/starterware/include/hw -I/ti/PDK_AM~1/packages/ti/starterware/board -I/ti/PDK_AM~1/packages/ti/starterware/device -I/ti/PDK_AM~1/packages/ti/starterware/include/utils -I/ti/PDK_AM~1/packages/ti/starterware/utils -I/ti/PDK_AM~1/packages/ti/starterware/soc -I/ti/PDK_AM~1/packages/ti/starterware/board/am335x -I/ti/PDK_AM~1/packages/ti/starterware/soc/am335x -I/ti/PDK_AM~1/packages/ti/starterware/include/am335x -I/ti/PDK_AM~1/packages -IC:/ti/edma3_lld_2_12_05_29/packages -I/ti/PDK_AM~1/packages/ti/csl -I/apps/apps_nonbam/inc -I/ -I/common  -MF /ti/PDK_AM~1/packages/ti/binary/ti/board/board/obj/bbbAM335x/a8/release/bbbAM335x_pinmux.d -MT /ti/PDK_AM~1/packages/ti/binary/ti/board/board/obj/bbbAM335x/a8/release/bbbAM335x_pinmux.oa8fg -o /ti/PDK_AM~1/packages/ti/binary/ti/board/board/obj/bbbAM335x/a8/release/bbbAM335x_pinmux.oa8fg src/bbbAM335x/bbbAM335x_pinmux.c

    src/bbbAM335x/bbbAM335x_pinmux.c: In function 'PINMUXModuleConfig':

    src/bbbAM335x/bbbAM335x_pinmux.c:118:19: error: 'gBbbPinmuxData' undeclared (first use in this function)

         pPinmuxData = gBbbPinmuxData;

                       ^

    src/bbbAM335x/bbbAM335x_pinmux.c:118:19: note: each undeclared identifier is reported only once for each function it appears in

    gmake[5]: *** [/ti/PDK_AM~1/packages/ti/binary/ti/board/board/obj/bbbAM335x/a8/release/bbbAM335x_pinmux.oa8fg] Error 1

    gmake[5]: Leaving directory `c:/ti/PDK_AM~1/packages/ti/board'

    gmake[4]: *** [board] Error 2

    gmake[4]: Leaving directory `c:/ti/PDK_AM~1/packages/ti/board'

    gmake[3]: *** [little_lib] Error 2

    gmake[3]: Leaving directory `c:/ti/PDK_AM~1/packages/ti/board'

    gmake[2]: *** [a8host_lib] Error 2

    gmake[2]: Leaving directory `c:/ti/PDK_AM~1/packages/ti/board'

    gmake[1]: *** [bbbAM335x_lib] Error 2

    gmake[1]: Leaving directory `c:/ti/PDK_AM~1/packages/ti/board'

    gmake: *** [board_lib] Error 2

     

    I saw that the error was in “src/bbbAM335x/bbbAM335x_pinmux.c” so I investigated.  I saw that the only include file in the file with the error was am335x_pinmux.h and in the bottom of the am335x_pinmux.h  file, there was reference to the pinmuxBoardCfg_t.  So I edited am335x_pinmux.h to be: pinmuxBoardCfg_t gBbbPinmuxData[]; and my board complied. 

     

    Seems like a pretty big step that was missed in the instructions…

    Update: 2/5/18

    FYI – the UART 1 example isn’t giving me any data, even after I built the board. 

     The code compiles and appears to run on the board.  I don’t get data on either the UART0 or UART1 so maybe I did something? 

    Again, I wasn’t able to rebuild starterware so maybe that is the reason. 

     

    So - Does this help you (e2e forum) understand the situation better?

  • Hi Mark,

    I took a look at the problems you brought up during the build process as highlighted in the application note. I also encountered the same errors.

    It’s been a couple of years since this app note was published, so the Processor SDK RTOS package has evolved somewhat. The pinmux tool generated syntax has also changed a bit.

    Having said that, I’m working on updating the document with the latest changes. Since you have the board library building, could you please try the following.

    In C:\ti\pdk_am335x_1_0_9\packages\ti\drv\uart\soc\am335x\UART_soc.c

    Change the interrupt number from 105 to 73 (this is a bug in the SW).

    Then rebuild the board library by doing a >gmake board.

     {

            SOC_UART_1_REGS,
            73,
            0,
            48000000U,
            CSL_EDMA3_CHA_UART1_RX,
            CSL_EDMA3_CHA_UART1_TX,
            0,
            0,
            0,
            0,
            0,
            NULL,
            UART_RXTRIGLVL_8,
            UART_TXTRIGLVL_56,
            TRUE, /* default DMA mode */
            FALSE, /* Loopback disabled by default */
    		TRUE, /* Interrupt enabled by default */
        },

    Please let us know if this works.

     Lali