This document describes migration steps of CW MCU 10.6 projects with Processor Expert into KDS 3.0.0.
Note: We strongly recommend backup of your original CodeWarrior application.
If you want to use default configuration of compiler and debugger (toolchain) in KDS 3.0.0 use instructions described in the document Processor Expert project (CW MCU 10.6) migration into new project in KDS 3.0.0
The following document describes conversion of the whole project (toolchain configuration, source code files, Processor Expert configuration).
1. Create a new workspace in KDS 3.0.0 (it is a workaround for KDS Upgrade Assistant that does not allow selection of migrated project in non-empty workspaces)
2. Import the project by using File > Import command, see below.
The import dialog appears.
3 Convert CodeWarrior Project file by using command Convert CodeWarrior project file… in the context menu of the project in Project Explorer window, see detailed steps below.
4. Process update of the project by using Project > KDS Upgrade Assistant…
Known Issues:
5. Remove all CW MCU 10.6 startup code (delete all files in the Project_Settings/Startup_Code project folder) and add a new Startup file by using Build options of CPU component:
6. Generate code (a new startup source code file is added into Project Settings/Startup_Code folder in the project).
7.Build the application. If the application is built without errors you can use it and debug it. If there are errors (e.g. linker error) check the Console window of the compiler and linker. There can be for example missing parameter of the selected target CPU – the toolchain settings (the configuration) is damaged and cannot be used due to the following issues:
C/C++ Development Toolkit issues |
---|
Editing the toolchain may damage the project In certain conditions, changing the toolchain for a project in the C/C++ Build → Tool Chain Editor page from another plug-in to GNU ARM Eclipse plug-in might not work; even worse, there are cases when the project is permanently damaged. There is not known way to repair such a broken project; you have to create a new project and copy the content (this is a CDT bug, not a plug-in bug). See the website http://gnuarmeclipse.livius.net/blog/known-problems/#Editing_the_toolchain_may_damage_the_project. Toolchain configuration Issue When you use the latest version of the GNU ARM Eclipse plugin you can get message "Orphaned CDT build configuration [org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.debug.1561998926.1100932005.1237614533.626146708.187750101.514251714]: parent extension cfg [org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.debug] not found". The “org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.debug” ID comes from a project generated with the old version of the plug-in, no longer supported. Recreate the project with the latest version and it will work. See also http://sourceforge.net/p/gnuarmeclipse/support-requests/6/ |
In this case you must create a new configuration from a template and set all options manually. Skip following steps and continue below in the chapter Steps of the conversion by manual configuration of the toolchain.
8. Open the context menu of the project in the Project window and select Debug As > Debug Configurations. Add a new debug configuration, e.g. GDB SEGGEER J-Link Debugging.
9. Verify the settings of the debugger (for example select the Device Name).
10. Click on the Apply button and then on the Debug button.
When the previous conversion process fails you can follow these instructions. Delete the converted project (that has been damaged) from the workspace and follow these steps.
1. Import the project by using File > Import command, see detailed steps in the previous chapter – Step number 2.
2. Select the C/C++ Build / Tool Chain Editor in the Properties of the project (see following screenshot). You see the warning message “Orphaned configuration ….”. You must create a new configuration for this project (the current configuration is created by a previous version of plugins and it is not compatible).
3. Click on the Manage Configurations…
4. Click on the New button
5. Write the name of the new configuration and select the Copy Settings from. You can copy configuration from an existing project or you can use default template (the following description suppose default configuration).
6. Click on the OK button. New configuration is created.
7. Select the old configuration and click on the Delete button.
8. Click on the OK button.
9. The new configuration is selected in the Properties window, see below:
10. Click on the Apply button.
11. Select the C/C++ Build/Settings, Tools Settings tab (in the same Properties window).
12. On the Target Processor page select the correct target Processor, the ARM family e.g. cortex-m0plus for KL25Z. Click on the Apply button.
13. On the Optimization page select the Optimization Level: None (-O0). Click on the Apply button.
14. On the Debugging page select the Debug level: Maximum (-g3). Click on the Apply button.
15. On the Cross ARM C Linker / General page add the following script:
Script files (-T): "${ProjDirPath}/Project_Settings/Linker_Files/ProcessorExpert.ld"
16. On the Cross ARM C Linker / Libraries page add the following script:
Library search path (-L): "${ProjDirPath}/Project_Settings/Linker_Files/"
17. On the Cross ARM C Linker / Miscellaneous page add the following script:
Check the option: Use newlib-nano (--specs=nan.specs)
Add the following parameter to the Other linker flags: -specs=nosys.specs
18. Click on the Apply button.
19. Set the Build Artifact (see below) and click on the OK button.
20. Remove all CW MCU 10.6 startup code (delete all files in the Project_Settings/Startup_Code project folder) and add a new Startup file by using Build options of CPU component:
21. Generate code (a new startup source code file is added into Project Settings/Startup_Code folder in the project).
22. Build the application.
23. If you see the following error:
Error: Cannot run program "gcc": Launching failed
Modify the PATH variable in the Properties of the Project. Select C/C++ Build/Environment page, double-click on the PATH variable and add the absolute path to the folder KDS_3.0.0\toolchain\arm-none-eabi\bin\ (e.g. add c:\Freescale\KDS_3.0.0\toolchain\arm-none-eabi\bin\; at the beginning of the PATH values). Click on the OK button.
Build the application again.
The project should be compiled without any error. If you still see any toolchain settings error and you are not able to fix these issue use instructions described in the document
Processor Expert project (CW MCU 10.6) migration into new project in KDS 3.0.0.
24. Open the context menu of the project in the Project window and select Debug As > Debug Configurations. Add a new debug configuration, e.g. GDB SEGGEER J-Link Debugging.
25. Verify the settings of the debugger (for example select the Device Name).
26. Click on the Apply button and then on the Debug button.
The application is migrated and debugging should work properly.