SPRUIY8 October   2024 F29H850TU , F29H859TU-Q1 , TMS320C28341 , TMS320C28342 , TMS320C28343 , TMS320C28343-Q1 , TMS320C28344 , TMS320C28345 , TMS320C28346 , TMS320C28346-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2C28 to C29 CPU Migration
    1. 2.1 Use Cases
    2. 2.2 Key Differences
    3. 2.3 Source Code Migration
      1. 2.3.1 C/C++ Source Code
        1. 2.3.1.1 Pragmas and Attributes
        2. 2.3.1.2 Macros
        3. 2.3.1.3 Intrinsics
        4. 2.3.1.4 Inline assembly
        5. 2.3.1.5 Keywords
        6. 2.3.1.6 Data Type Differences
        7. 2.3.1.7 Tooling support for Migration
      2. 2.3.2 Assembly Language Source Code
    4. 2.4 Toolchain Migration
      1. 2.4.1 Compiler
      2. 2.4.2 Linker
      3. 2.4.3 CCS Project Migration
  6. 3CLA to C29 CPU Migration
    1. 3.1 Use Cases
    2. 3.2 Key Differences
    3. 3.3 Source Code Migration
      1. 3.3.1 C/C++ Source Code
        1. 3.3.1.1 Data Type Differences
        2. 3.3.1.2 Migrating CLAmath.h Functions and Intrinsics
        3. 3.3.1.3 Migrating C28 and CLA to the Same C29 CPU
        4. 3.3.1.4 Migrating C28 and CLA to Different C29 CPUs
      2. 3.3.2 Assembly Language Source Code
    4. 3.4 Toolchain Migration
  7. 4References

C/C++ Source Code

There are key issues that can be better understood by considering

  • Existing C28+CLA development, and how system code is developed to run on both the C28 CPU and the CLA.
  • Whether the migration is to the same C29 CPU to which C28 code is being migrated, or a different C29 CPU. Each has its benefits and challenges.
  1. When moving from CLA to C29:
    1. .cla files would need to be converted to .c files
    2. CLA tasks would need to be mapped to interrupts on C29 CPU.
      1. If possible, use RTINT instead of INT for hardware context-save and superior performance
      2. Since CLA tasks run to completion and cannot be preempted, to achieve similar functionality, the interrupts can be assigned into a group. Interrupts in a given group do not preempt or nest within other interrupts in the group. For more details, see the PIPE chapter of the F29x device-specific Technical Reference Manual.
      3. The CLA background task is interruptible, so if it is enabled, it should be in a lower nesting group than the group corresponding to the rest of the CLA tasks. Another option the user can consider is moving the background task functionality into the idle loop in main().
  2. Code and data placement in LSRAM constraints would be removed. With the CLA, code and data both have to reside in LSRAM. On the C29 device, CLA code can be migrated to run on the LPAx RAM, and data can reside in the LDAx RAM.
  3. The CLA compiler has C language standard restrictions. These are mentioned in the CLA compiler description in the TMS320C28x Optimizing C/C++ Compiler v22.6.0.LTS User's Guide. For example, defining and initializing global/static data is not supported. The use of function pointers is not supported. These restrictions are lifted when moving to the C29.
  4. The CLA compiler supports a subset of C28 pragmas and attributes. These need to be addressed when porting from the CLA to the C29.
  5. Keywords - The CLA compiler supports all but 2 of the keywords (far and ioport) supported by the C28 compiler.
  6. For more information, see section in the compiler guide that discusses migrating CLA source code.