MCUx.h which is includes when assembling portasm.s causes problems with IAR
martin-mm opened this issue · 4 comments
MCUx.h which is includes when assembling portasm.s causes problems with IAR since <yvals.h> is included then which only works with the compiler
MCUx.h includes Cpu.h:
#if MCUC1_CONFIG_SDK_VERSION_USED == MCUC1_CONFIG_SDK_PROCESSOR_EXPERT
/* Include shared modules, which are used for whole project /
#include "PE_Types.h"
#include "PE_Error.h"
#include "PE_Const.h"
#include "IO_Map.h"
#include "Cpu.h" / include CPU related interfaces and defines */
Cpu.h includes PE_Types.h which includes <stdint.h> which includes <yvals.h>
The problem with the IAR is now that portasm.s includes FreeRTOSConfig.h which includes MCUx.h.
Yvals.h now can only be used with the compiler but not with the assembler:
#if (IAR_SYSTEMS_ICC < 8) || (IAR_SYSTEMS_ICC > 8)
#error "<yvals.h> compiled with wrong (version of IAR) compiler"
#endif
Solution to this:
When generating MCUx.h then exlude the include-files if IAR assembler is running:
#if MCUC1_CONFIG_SDK_VERSION_USED == MCUC1_CONFIG_SDK_PROCESSOR_EXPERT
/* Include shared modules, which are used for whole project /
#ifndef IASMARM
#include "PE_Types.h"
#include "PE_Error.h"
#include "PE_Const.h"
#include "IO_Map.h"
#include "Cpu.h" / include CPU related interfaces and defines */
#endif
should be: #ifndef IASMARM
#ifndef IASMARM
bugtracker seems to eat the leading and trailing two underscored