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.

CC2340R5: Complete source code (including OS/Drivers) for an example

Part Number: CC2340R5
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi,

we are using CC2340R5 in our project.

we want to start with a simple link project and then add functionality on top of it.

when we create a simple link project ex: "basic_ble_LP_EM_CC2340R5_freertos_ticlang" .

and then  open the workspace, we could only see the files related to the example project and not entire source code (including the files from SDK into workspace).

ex: we couldn't see the uart driver files.

we see following concerns:

1. we do not have the complete source code for project.

2. we rely on SDK installation into PC, and can not create a separate stand alone build env. 

we earlier were working with NXP's Kw36, where when selecting any example, complete source code relevant to the example gets copied into the workspace.

this allow us to build it separately and see the complete project source code.

Please guide us as we are new to Simple Link envioronment.

Br,

Kuldeep

  • Hi !

    In order to save space, and to prevent accidental modification of the library source code, CCS resolves the content of the source code file dynamically.

    If you wish to get your entire project, including the libraries source code, you could click in the top bar File > Export, and then click on General > File System, and Finish

    Kind regards,
    Maxence

  • Hi Maxence,

    Thanks for the reply.

    However I am not getting the complete sequence of steps and when we need to perform the above.

    could you please provide me detail steps for the same? which also involve creating a fresh example project and then downloading the source code for the same.

    Br,

    Kuldeep

  • Hi !

    Here are the details steps on how to get the complete source code for the basic BLE example :

    1. Open CCS, choose a new workspace by choosing an empty folder for your workspace path, and click Launch.

    2. Once in the CCS main view, click on Project > Import CCS Projects

    3. Once the "Import CCS Projects" modal opens, click on the "Browse" button, and go to the installation path of your SDK. By default, it should be in C:\ti\simplelink_lowpower_f3_sdk_8_40_02_01

    4. Go to examples > rtos > LP_EM_CC2340R5 > ble5stack > basic_ble and click the Select folder button. The bottom folder name should say "basic_ble".

    5. In the "Import CCS Projects" modal, click on the Finish button.

    6. Now click on File > Export ...

    7. Click on the arrow next to the General folder, and double click on File System.

    8. Choose the directory to export the project to by clicking the Browse button

    9. Once you selected a folder, you should see it in the "To directory" input. In my case, I selected the "t-1498700" folder on my desktop.

    10. Click Finish. You should now see all your source code for the project in the folder you chose.

    11. To work on that project, you can re-import the project in the same way we did from step 2 to 5, but by selecting our new folder instead of the basic_ble example of the SDK.

    I hope those steps will help you fix your problem !

    Kind regards,
    Maxence

  • Thanks,

    I followed the steps mentioned, however I still can't see all the source code.

    ex: 

    1. \workspace_v12\basic_ble_source_code\basic_ble_LP_EM_CC2340R5_freertos_ticlang\common folder is almost empty, without any files under most of the folders.

    2. Except "app" folder and main folder, no other source code is available, ex: no source code for uart driver, or bt stack etc.

    I am expecting complete source code for the project, including the underline platform ,drivers, stack, board package etc.

    I hope I am clear about the request.

    Thanks for understanding.

  • Hi !

    My mistake, I forgot to tell you that you have to tick the Resolve and export linked ressources in the Export modal.

    This should export the common folder too.

    Kind regards,
    Maxence

  • Thanks.

    I got the project code after following provided steps.

    However for many files, the reference is still with the SDK files installed in the local PC.

    ex: "osal_icall_ble.c" refers to "ll.h" at "C:\ti\simplelink_lowpower_f3_sdk_8_40_00_61\source\ti\ble5stack_flash\controller\cc26xx\inc" .

    The problem I see here is: If I transfer this complete project source code into another "build desktop", then I will not be able to build unless the PC has same version of SDK install in it.

    that's the reason I am asking the complete source code including BSP, Stack, OS etc . to be available in project folder itself.

    Br,

    Kuldeep

  • Hi,

    Yes, the code you are writing is tightly linked to the version of the SDK you are using. This split between the code you are writing and the SDK code is intentional, and is made for multiple reasons :

    - to allow you to have a high-level vision of your code.
    - to make the size of your project smaller.
    - to re-use the code of the SDK in multiple places.
    - to make the versions of all the inner-tools uniform.

    Lets say that it was possible to export absolutely everything, including the SDK code, then you would now need the tools to build it. You would need to install the specific version needed of gmake, of imgtool, of java, of the compilerS, and even of proprietary TI software like sysconfig. You could do all that and take years to reproduce a SDK agnostic build system. Or you could install the correct SDK and consider it a necessary requirement of the project.

    The export function will allow you to export all the necessary components of your project, with the only remaining requirements of your project being :
    - The operating system
    - The CCS version
    - The SDK version

    If you wish to make a "build desktop" that your entire team can use, I would install CSS and the SDK on a windows machine, and then advise you to look at how to run CCS in headless mode.

    If you are worried about having access to every single source file, they are all located under C:\ti\simplelink_lowpower_f3_sdk_8_40_00_61\source, and under C:\ti\ccs1281\ccs\tools\compiler\ti-cgt-armllvm_3.2.2.LTS.

    Kind regards,
    Maxence

  • Thanks,

    I understand the purpose of it.

    let us agree with this for now. If I have any further concerns, I will come back.

    Thanks again.