C Compiler Configuration

The CMSIS library source code files are distributed between a number of folders, but when they are included using the #include directive, the relative path is not specified. To avoide the "cannot open source file" error, we should instruct the compiler to search for the files in the following folders:

$PROJ_DIR$
$PROJ_DIR$\..\..\Core\CMSIS\Include
$PROJ_DIR$\..\..\Core\Device\NXP\lpc43xx\Include
$PROJ_DIR$\..\..\Drivers\include
$PROJ_DIR$\..\..\Boards

To specify the additional include directories open the project options dialog box (menu [Project | Options...]) and navigate to the Preprocessor tab in C/C++ Compiler category. Paste the list of folders into the Additional include directories window:

IAR C Compiler preprocessor configurationWe also need to add the CORE_M4 into the Defined symbols window. 

The CMSIS library produces a number of warning during the compilation. Let's suppress them to clearly see if there are any errors or warning coming from our code. In fact, all these warnings are also suppressed in the examples that come with CMSIS library.

To suppress these warnings switch to the Diagnostics tab in the same C/C++ Compiler category and enter the following text into the Suppress these diagnostics text box: 

Pa050, Pe161

IAR C compiler warnings suppression