Porting Code from other toolchains
Generally where example code is provided for another toolchain it will normally port across to the Code Red IDE fairly easily. Simply create a new project within the Code Red IDE, then copy the required source files across.
A few things to watch:
Sometimes, depending upon the original project, you may need to produce your own linker script, rather than use the default, managed linker script created automatically by the Code Red IDE. Details of how to go about doing this can be found in the FAQ Using your own linker scripts.
- There are sometimes slight changes required to sources due to "extensions to the C language" used by source code. Typical examples are:
Some NXP example code targeted at other toolchains (in the past at least) has used an older version of CMSIS than the Code Red IDE CMSIS library projects make use of. This can occasionally mean that slight code changes are required (or you can simply use the older sources provided by the example rather than the Code Red CMSIS library projects). More information on CMSIS in the Code Red IDE in the FAQ Support for CMSIS.
Some examples may contain conditionally compiling code blocks (#ifdef .. #else .. #endif). You may need to check the actual source code, any supplied documentation, or project/make files from the original target toolchain, to confirm what symbols you need to define to get the code to build appropriately for your needs.