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.

C2000WARE-MOTORCONTROL-SDK: Title: How to configure Code Composer Studio to select the correct device folder (MCAL) without using macros in code

Part Number: C2000WARE-MOTORCONTROL-SDK

Tool/software:

Title: How to configure Code Composer Studio to select the correct device folder (MCAL) without using macros in code

Hello,

I’m working with two different microcontrollers in Code Composer Studio (CCS), and I have two separate device folders (MCAL layers), one for each MCU.

I would like to configure CCS so that when I choose a specific build configuration or target configuration, it automatically links and compiles the correct device folder (MCAL) for that microcontroller — without using any #ifdef or macro conditions in the code. The goal is to keep the application code identical and clean across devices.

Is there a recommended way to achieve this through project settings (like build variables, include paths, or linked folders) in CCS?

Thanks, Mostafa. 

  • Hi Mostafa,

    I have routed this query to our software team owner that can give you more insight on how you can leverage the CCS project properties for this case.

    It sounds like you'll need two different build configurations and define different include paths/linked folders for each build configuration. In the case of using ifdef or macro conditions, you most likely will still need these since I assume some devices have different drivers etc. 

    We have something already similar to what you're requesting for with our Universal project. In which when migrating the project will automatically pick up the new device's project properties and have the required device support files (not MCAL) though.

    https://www.ti.com/video/6327167825112

    Best,

    Ryan Ma

  • It sounds like you'll need two different build configurations and define different include paths/linked folders for each build configuration

    Ryan is correct. Using separate build configurations is the best option for this.