CW MCU 10.6 Processor Expert projects migration into KDS 3.0.0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CW MCU 10.6 Processor Expert projects migration into KDS 3.0.0

CW MCU 10.6 Processor Expert projects migration into KDS 3.0.0

Introduction

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).

Steps of the conversion by using CodeWarrior Converter and KDS Upgrade Assistant

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.

  • Select File > Import, from the IDE menu.

pastedImage_1.png

          The import dialog appears.

  • Expand the General tree and select Existing Projects into Workspace.

pastedImage_2.png

  • Click Next. The Import projects screen appears.
  • Click Browse and select the root directory to search for an existing Eclipse project
  • Select the projects you want to import in your Workspace
  • Check Copy project into workspace if want to create a copy of the project in the workspace (otherwise the project is linked into the workspace only).
  • Click Finish - the imported project appears in the Project Explorer view.

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.

  • Select the recently imported legacy project you want to convert.

pastedImage_7.png

  • Right-click and select Convert CodeWarrior Project file.
    Note: The context menu Convert CodeWarrior project file... will only work with GNU/gcc CodeWarrior project and not for CodeWarrior projects using the legacy Freescale compiler (for this compiler use instructions described in the chapter Steps of the conversion by manual configuration of the toolchain or Processor Expert project (CW MCU 10.6) migration into new project in KDS 3.0.0​).

pastedImage_5.png

  • The CodeWarrior to KDS project migration assistant dialog appears and prompts whether you want to convert the project.

pastedImage_8.png

  • Click Yes.
  • The CodeWarrior to KDS project migration assistant will prompt that the conversion has completed and a backup of the original *cproject file has been created in .cproject_backup.

pastedImage_10.png

  • Click to OK to close the CodeWarrior to KDS project migration assistant dialog.
    Note: To see the conversion process log, navigate to the project's root directory and open the KDSConverter.log file.

pastedImage_11.png

4. Process update of the project by using Project > KDS Upgrade Assistant…

  • Select the project:

pastedImage_3.png

pastedImage_4.png

  • Click on the Finish button to process the upgrade.

Known Issues:

    • The converter does not distinguish between Executable projects and Static Library projects. In the latter case the options for converting Newlib-nano and adding semihosting should be suppressed.
    • When selecting options to add _exit() implementation and semihosting=rdimon on projects from KSDK_1.1.0demos\hello_world\kds a Cross ARM C Linker errors reports "multiple definition of _isatty". It is necessary to remove the user definition of _isatty.
    • When you want to upgrade a converted CodeWarrior project you must use a new empty workspace otherwise the KDS Upgrade Assistant may not find the project in the workspace (the project is not displayed in the list of projects for the upgrade).
    • GNU ARM Embedded (launchpad) on Linux - because the GNU ARM Embedded tools are 32-bit only for Linux, on Ubuntu 14.04 64-bit (and others) you may see error messages suggesting that arm-none-eabi-gcc could not be found. The tools do exist, however the system doesn't know how to run them. This is because the 32-bit compatibility packages need to be installed: See http://gnuarmeclipse.livius.net/blog/toolchain-install for details and suggested solution.

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:

pastedImage_10.png

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++ BuildTool 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.

Steps of the conversion by manual configuration of the toolchain

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).

pastedImage_13.png

3. Click on the Manage Configurations…

pastedImage_44.png

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).

pastedImage_46.png

6. Click on the OK button. New configuration is created.

7. Select the old configuration and click on the Delete button.

pastedImage_47.png

8. Click on the OK button.

9. The new configuration is selected in the Properties window, see below:

pastedImage_48.png

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.

pastedImage_55.png

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:

pastedImage_57.png

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.

pastedImage_61.png

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.

No ratings
Version history
Last update:
‎06-21-2015 11:51 PM
Updated by: