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.

TI RTOS SimpleLink 2.13.00.06 released - BLE stack porting guide

Other Parts Discussed in Thread: BLE-STACK, CC2640, CC2650, SYSBIOS

*** Update July 31, 2015 ***

BLE Stack V2.1 is now released and is integrated with TI-RTOS Version 2.13.00.06. The porting instructions below are not required when using BLE-Stack V2.1. Please download the latest BLE-Stack at www.ti.com/ble-stack.

*** End update ***

Version 2.13.00.06 is released, fixing a number of issues with drivers as well as problems with periodically higher power consumption due to Power driver recharge algorithm bugs.

Chip revisions 2.0 and 2.1 are no longer supported.

Download link:
http://ti.com/tool/ti-rtos

Documentation and release notes:
tirtos_simplelink_2_13_00_06/docs/docs_overview.html

Release notes TI RTOS peripheral drivers:
tirtos_simplelink_2_13_00_06\docs\cc26xxTiRtos_drivers_release_note.txt

Patch (shows all changes needed in code base)

https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/538/ble_5F00_cc26xx_5F00_2_5F00_00_5F00_42893.patch

Known issues


The 5x5 board file does not work for CCS when using UART. See post for more details and fix:

Porting guide BLE-stack 2.0.0 to TI RTOS 2.13.00.06

Note: BLE-stack 2.0.0 has not been tested or certified with this release of TI RTOS. There might therefore be unknown issues and it is not recommended using this combination for mass production but it can be used as an intermediate step until BLE-stack 2.1 is released.

The guidelines below describe how to port the SimpleBLEPeripheral project. Porting other projects should be similar to this.

IAR

  • Goto Tools->Configure Custom Argument variables
    • Update variables as described:
      • TI_RTOS_DRIVERS_BASE = C:\ti\tirtos_simplelink_2_13_00_06\packages
      • CC26XXWARE = C:\ti\tirtos_simplelink_2_13_00_06\products\cc26xxware_2_21_01_15600
      • XDCROOT = C:\ti\xdctools_3_31_01_33_core
      • XDCPATH = C:\ti\tirtos_simplelink_2_13_00_06\products\bios_6_42_00_08\packages
  • Close work-space and re-open

Stack project

  • Open pwrmon.c, found in project under HAL->Target->CC2650->Drivers
    • Comment out function PWRMON_init (currently unused)
  • Re-build project

Application project

  • Open appBLE.cfg, remove line Boot.checkBackdoor = true;
    • TI RTOS backdoor has been removed starting from this release
  • Delete SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640\configPkg folder (created by TI RTOS build tools)
  • Delete SimpleBLEPeripheral\CC26xx\IAR\Config\src folder (created by TI RTOS build tools)
  • Re-build project

CCS

Placeholder text

Debugging

"Warm" resets of the MCU domain only are no longer supported and the HW will convert them to a full reset equivalent to a pin reset. This causes the device to lose contact with the debugger.

When debugging the device and you want to reset the recommended way of doing this is using the "Board reset" option. This option makes the debugger reset the device with a pin reset and then halts the CPU before any user code is executed.

Enjoy!

  • While building Application project:

    Warning[Pe223]: function "ROM_VIMSModeGet" declared implicitly G:\TI\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\Profiles\OAD\CC26xxST\oad_target_externalFlash.c 518

    Error[Li005]: no definition for "ROM_VIMSModeGet" [referenced from G:\TI\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SensorTag\CC26xx\IAR\ 
    Application\CC2650\FlashOnlyOAD\Obj\oad_target_externalFlash.o]

    Link time: 0.28 (CPU) 0.31 (elapsed)
    Error while running Linker

  • Thanks for finding this. I have attached a patch in the original post for the BLE stack showing all changes needed for the SimpleBLEPeripheral and SensorTag project.

    Regards,
    Svend

  • Thanks. Now it links without errors!
  • Svend,

    I'm having a hard time programming the device with this new build.  Everything seems to be building and linking but my XDC and JTAG programmer fail to work.  I have verified this by going back to my old simplelink and everything works fine.  

    When i try to use the JTAG programmer, it will successfully download the stack but will fail on the app

    When i try to use the XDS i get the following error:

    followed by:

  • uspaul, were you able to get the project to flash your device?

    Ryan
  • Ryan,

    We have seen this happen if the wrong version of ccfg.c is used causing the device configuration to get messed up.

    If you have saved your .ewp file in an older version of IAR (<7.30.3 I think) all relative include paths are switched out with paths to that version of the file. Please check your .ewp file to see whether you still have relative paths in there (e.g. $TI_RTOS_DRIVERS_BASE$\ti\drivers\SPI.c)

    Once that is in place a flash erase with Smart RF Flash Programmer 2 + re-program tends to solve the issue.

    Regards,
    Svend
  • Svend,

    I was using my own ccfg.c file so I went back to using the default and that allowed it to flash.  I'm having some reliability issues though when it comes to flashing it yet.  It seems like after i flash it once from the new project it tends to lock up the CC2640 device, any thoughts on why that is?  

    I'm getting the following error

    followed by

    Any thoughts on why that might be

    Ryan

  • I have never seen that error message before, will add our tools team to the thread to see if they know what can be causing this.
    - Do you see this when using our EVM module or a custom board?
    - Did you connect all needed signals? (TCK/TMS/RESET_N/VDD/GND).
    - Which version of IAR are you using?
    - Do you see problems also when downloading HEX files through SmartRF Flash Programmer?

    Regards,
    Svend
  • Svend,

    it is very strange indeed. Here are my answers to your questions:

    1. Custom Board
    2. YES all signals are connected
    3. IAR Embedded Workbench for ARM 7.30.4.8187, IAR Embedded Workbench common components 7.1.7.3552
    4. Haven't tried downloading hex files through SmartRF Flash Programmer.

    I have found that after i program it once (using the J-Link) the condition occurs... I can then plug it into the SmartRF Flash Programmer, do a force mass erase and everything is cleared up... i can program the board again with the J-link

    Also, my project with the old drivers and the same board can be programmed repeatedly with the J-link (but not after i get into the error condition... it always needs a force mass erase after a programming from the new drivers)

    Ryan
  • Hi, Svend,

    I'm using SmartRF06 connecting to SensorTag.

    I followed the patch to build the SensorTag project.

    But my problem after download keeps the same as before I updated the TI RTOS.

    Can you help? Thank you very much.

    BR,

    Webb

    ------------------------------------------------------------------------------------------------------------

    Warning: __vector_table symbol not found. e_entry value: 0x0000F000 does not match reset vector value: 0xFFFFFFFE Initial SP_main value:0xFFFFFFFF uncertain.

    Warning: Stack pointer is setup to incorrect alignment. Stack addr = 0xFFFFFFFF

    There were 2 warnings during the initialization of the debugging session.

    Could not go to 'main'.

  • Webb,
    This is because the vector table is found in the application project and you are most likely currently flashing the stack project.
    You also need to flash the application project afterwards.

    Svend
  • Hi, Svend,

    So can't I just click "Download and Debug" button to flash all after build stack and app?
    Or I should download active application separately?

    Sometimes I also find " Fatal error: Failed to halt after bootloader Session aborted! "
    Thank you.

    Webb
  • Does exsiting SCE code workable on this new TIRTOS release?
  • Barbara,

    There are a couple of registers that are renamed so you might need to re-generate the Sensor Controller drivers again using Sensor Controller Studio 1.0.1

    Svend
  • Svend,

    I'm now using IAR 7.40 with the xds programmer and am still having the same problem when downloading or debugging the board with the new drivers

    It all seems to program once with the XDS programmer in IAR but when i try the second time I get "Fatal error: Failed to halt the bootloader" It can still be recognized by the Programmer 2 and be force massed erased successfully. 

    Any thoughts?

    Ryan

  • When will the BLE-stack 2.1 for the CC2640/CC2650 be released?
  • Hi Peter,

    Current plan of record for v2.1 is July 17th.

    Regards,
    Svend
  • Svend,

    Do you have a short list of what additional features will be included?  

    Does TI plan to support a BLE Mesh Topology?

    Ryan

  • svendbt said:

    CCS

    Placeholder text

    Hello,

    I tried porting this on CCS. I was able to get it to build (but i did not thoroughly test it). This is what I did.

    NOTE - I used version 2.13.01.09, hence my paths reference 2.13.01.09 instead of 2.13.00.06. Simply replace 2.13.01.09 with 2.13.00.06 in the below paths where referenced if you wish to use that version:

    ---

    Go to the Project Properties (right-click on project in 'Project Explorer' and select 'Properties' in the context menu) and update the following:

    Build variables (Under ‘Build->Variables (tab)’ – note need to enable ”Show system variables” checkbox at the bottom” ):
    TI_RTOS_DRIVERS_BASE=C:/ti/tirtos_simplelink_2_13_01_09/packages (only needed for Application project)
    CC26XXWARE=C:/ti/tirtos_simplelink_2_13_01_09/products/cc26xxware_2_21_01_15600

    Linked Resource Path Variable (Under ‘Resource -> Linked Resource -> Path Variables (tab)’)
    TI_RTOS_DRIVERS_BASE=C:\ti\tirtos_simplelink_2_13_01_09\packages (only needed for Application project)
    CC26XXWARE=C:\ti\tirtos_simplelink_2_13_01_09\products\cc26xxware_2_21_01_15600

    Application project only: Modify –xdcpath list (under ‘Build -> XDCtools -> Package Repositories’) so that:
    ${COM_TI_RTSC_TIRTOSSIMPLELINK_INSTALL_DIR}/products/bios_6_42_00_08/packages

    Application project only: Under ‘General -> RTSC’
    XDCtools version: 3.31.1.33_core
    TI-RTOS for SimpleLink Wireless MCUs to version 2.13.1.09

    Application project

    In the 'Project Explorer' view:

    Open appBLE.cfg (right-click on file and select 'Open With -> Text Editor' in the context menu) and remove line 124:  ‘Boot.checkBackdoor = true;

    In Windows Explorer (or whatever system file browser):

    Browse to the following folder: C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\CCS\Config and delete the 'src' folder inside

    Stack project

    Same as mentioned previous:

    svendbt said:

    Stack project

    • Open pwrmon.c, found in project under HAL->Target->CC2650->Drivers
      • Comment out function PWRMON_init (currently unused)
    • Re-build project

    Hope this helps

    ki

  • Hi, I've been trying to get the simpleBLEbroadcaster app to compile, the stack compiles but I'm getting errors with the app project.  

    I've followed the above steps, which got me as far as having the stack compile but the app still doesn't, attached is my build output, can you see anything in there which might help?

    ccs_error.txt

  • Sorry posted this to the wrong place, and I've got it working now! I was missing a package repository .
  • Hi All ,

    We got cc2650-stk board recently , i am trying to create my own project ( Stack and Application) using code composer studio (we have ccs6.1) . I am unable to get userguide for this . can you please suggest on this . The BLE software guide explains how to port cc2541-ti-stack1.4.0 to ti-stack2.0 , but we want to use ccs.

  • Hi Ki, 

    Thanks very much for your sharing. However, I met some errors after modification under your steps. Have you met similar problems?

    Many thanks 

    Shilong

  • I'm using CCS and get the following message:
    Description Resource Path Location Type
    unresolved symbol PRCMCacheRetentionEnable, first referenced in C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\ConfBeacon\CC26xx\CCS\Config\src\sysbios\sysbios.aem3<mangled__BIOS_lib.obj> ConfBeacon C/C++ Problem
    Can you help?
  • Luiz,

    I think you need also to update the CC26XXWARE path to match the latest TI RTOS version for both the stack and application project.
    This is done in project properties under Resource->Linked Resources.

    Regards,
    Svend
  • That did the trick. Thank you very much.

  • Ki,
    With the above changes I am able to compile without any warnings or errors. But when I run the code nothing happens. Looks like the tasks got scheduled but are not executing.
    I put break points at init functions in the task and it is never hit.

    I am using cc2650DK.
    Thanks,
    Deepak
  • My stack was somehow corrupted (probably and didnt think of that). I followed Ki's instructions and now cc2650dk is functional (at least advertising and connecting) using 2.13 .00.06 RTOS.
  • what is the procedure for porting to higher version of tirtos in ccs??