Welcome to MSPM0G3519 Development Board repository
6. Engineering transplantation
Project Porting
In many cases, we need to hand over the project we wrote to others. To ensure the project can be smoothly ported and run in a new environment, we need to package and port it according to certain steps. In this chapter, we will introduce how to port example projects from TI SDK to other platforms or devices, and provide some common precautions.
1. Find the Routine to Port and Copy It
Select the routine you need. Here we use the "empty" routine as an example.

2. Paste the Copied Routine into the SDK Root Directory
Paste the copied routine file into the SDK root directory.

3. Copy driverlib Files
Navigate to <SDK root directory>\source\ti\driverlib in the SDK directory, and copy all files in the driverlib folder (Note: Copy only files, not folders).

4. Create New ti Folder and Paste Files
Go back to the routine path, create a new ti folder, and paste all previously copied files into the new ti folder.


5. Delete Extra Folders
Delete unnecessary extra folders in the project to reduce the project size.

Complete project structure:

6. Related Configuration in Keil
Open the Keil project file.

Open Keil project management.

In the Keil project, delete files in the
Driverlibfolder (If the folder does not exist, you can skip this step).

Add the previously copied files to the new
Driverlibfolder.


Click the "Magic Wand" to update header file paths.


Modify the path in User-> Before Build/Rebuild.

The current path is:
cmd.exe /C "$P../../../../../../tools/keil/syscfg.bat '$P' empty.syscfg"
Actually, the modification method is to point to the /tools/keil/syscfg.bat under the SDK path. ../ represents going back one folder from the project's Keil launch file location. And the tools folder is under the SDK root directory. So it should be modified to the following path:
xxxxxxxxxxcmd.exe /C "$P../../tools/keil/syscfg.bat '$P' empty.syscfg"

Delete the file path in Linker -> Misc controls.

After modification, save and compile. There will be no path problems.
