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.

CC1352P7: Porting code from MSP430 to CC13xx

Part Number: CC1352P7


Good Afternoon,

I have a project to undertake that involves porting a c-code based library from the MSP430 series to the CC13xx series of devices.  I am just starting so this will probably be the first entry of many to the forum regarding this.

So far I have compiled the empty_LP_CC1352P7_1_tirtos7_gcc project.  I am looking for suggestions as well as I talk about these things, because at this point I already start to wonder if I am going in the right direction.  I noticed in several discussions and from reading manuals that it is suggested to start from an existing project because of the complexity of this device.  I was experimenting with simple changes such as switching the compilers but would run into issues.  Starting to use the TI System Configuration tool but needing more practice to use it effectively.

To start, the original library is a bare metal, single threaded application.  It is mostly driven with the #include MSP430.h to interface with the underlying registers.  The TIRTOS7 projects seem to use driverlib, driver configurations, pthread.h clib stuff, RTOS header files, etc...  Is there a way to program very low level interfaces to the registers by hand without all of these things with something similar to the MSP430.h definitions??

Moving forward with another question regarding compilers.  I have been compiling with TI v20.2.5.LTS for the MSP430 code but for this project I have opted to GNU v9.2.1 (Linaro).  Now I run into issues with several intrinsics, and possibly some #pragma code.  Is this the best path with the GNU or should I try finding a better starting point with a TI compiler.  I like using pthread, and can start with a single thread created running my single thread c-coded library.  I would like to go with C++ to introduce true object orientation but also ran into issues with the pragma and stuff even doing this just on the MSP430.

Anyways, the intrinsics issues and switching from MSP430.h type programming with registers defined are where I am starting to run into my first obstacles.  Soon I will be looking at the clocks, timers, and USCI I2C communication.  I appreciate your time and help and look forward to progressing to make very portable code.  It would be really nice to be able to use the same library for MSP430 and CC13xx devices that I might change a variable or 2 to make for easy porting between these 2 processors.  As I progress it will probably take priority to utilize the built in RF communications (like bluetooth & sub-1 GHz) along with low-power peripherals (such as peripherals configured with Sensor Controller Studio).

Best Regards,

Michael 

  • Hi Michael,

    1) The recommended approach is to start with an example from the SimpleLink CC13xx/CC26xx SDK and add your application level changes. As you say, the "empty" drivers example is a great starting point. 

    2) We have some examples without any rtos. These are found in the nortos example folder. We don't have the "empty" example, but you could use e.g. gpiostandby as your starting point. Path: C:\ti\simplelink_cc13xx_cc26xx_sdk_6_30_00_84\examples\nortos\LP_CC1352P7_1\drivers\gpiostandby 

    3) Regarding compiler this is entirely up to you. However here too you should import the example version with your intended compiler. I would not recommend changing compiler after importing the project.

    4) We have deprecated support for the TI ARM compiler in favor of the TI Clang compiler.

    5) I would recommend you to use TI drivers as much as possible and avoid using driverlib and register writes.

    Cheers,

    Marie H

  • Good Evening Marie,

    Thank you for your insight, I found it very helpful as to providing a good start point.  Working with the TI Clang compiler and going through some of the training academy modules for using TIRTOS7.  Found some good examples using SimpleLink CC13xx/CC26xx SDK within TI Resource Explorer.  Geared up now and have some new questions that I will start a new thread for.  Will ask more focused questions as I progress

    Best Regards,

    Michael