Recent

This Page

User

Switching the selected C library

Recent versions of the Code Red IDE provide a simple way of switching the selected C library from Redlib <-> Newlib, and switching the library variant in use from Semihost <-> Nohost <-> None. To switch go to:

Quickstart -> Quick Settings -> Set library type

and select the required library and variant.

Alternatively, you can make the required changes to your project properties manually as follows...

The 2 libraries use different header files. When switching between Newlib and Redlib libraries you must also switch the headers. To do this:

Select the project in Project Explorer

Right-click and select Properties

Expand C/C++ Build and select Settings

In the Tools settings tab, select Target under MCU Compiler

In Use header for C library, select Newlib or Redlib

In the Tools setting tab, select Target under MCU Assembler

In Use header for C library, select Newlib or Redlib

Repeat the above sequence for all Build Configurations (typically Debug and Release).

To then change the libraries actually being linked with (assuming you are using Managed linker scripts):

Select the project in Project Explorer

Right-click and select Properties

Expand C/C++ Build and select Settings

In the Tools settings tab, select Target under MCU Linker

In Use C library, select the Newlib or Redlib library variant that you require (None, Nohost, Semihost).

Again repeat the above sequence for all Build Configurations (typically Debug and Release).