SLAAEQ6 March   2025 MSPM0G3519

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Pre-Migration Preparation
    1. 2.1 CCS Version Comparison
    2. 2.2 Pre-Migration Preparation
  6. 3Porting Code to CCS
    1. 3.1 Prepare for Porting
    2. 3.2 Set Up CCS Environment
    3. 3.3 Import Source Code and Files in CCS
    4. 3.4 Handle Device-Specific Code
    5. 3.5 Adapt Code for CCS
    6. 3.6 Build and Debug
  7. 4Post-Migration Optimization
  8. 5Summary
  9. 6References

Handle Device-Specific Code

  1. Replace IAR Startup Code:
    1. Use TI-provided startup files (for example, startup_<device>.c from the SDK) instead of IAR’s startup_<device>.s.
    2. Update interrupt vector tables to match TI’s syntax (for example, #pragma DATA_SECTION for vectors).

  2. Adapt Hardware Abstraction:
    1. Replace IAR-specific HAL functions with TI DriverLib or register-based code.
    2. Example: use MAP_GPIO_setAsOutputPin() instead of the GPIO library of the IAR.
  3. Update Inline Assembly and Pragmas:
    1. Rewrite IAR-specific pragmas (for example, __packed becomes __attribute__((packed))).
    2. Convert inline assembly to TI Clang syntax.
      Table 3-2 Comparison of Assembly Code Example in IAR and CCS
      IAR EW CCS
      #pragma asm

      MOV R0, #0x10

      #pragma endasm

      __asm(" MOV R0, #0x10 ");