I'm just started to work with Vectorcast and IAR for RL78 compiler. I want to build an environment in vectorcast using IAR Compiler for RL78 Microcontroller.
Code which is used for testing has been successfully compiled in IAR embedded workbench for RL78.
I am facing the below error while building an environment in vectorcast for a module.
Error:
40_MCAL\Memory\FDL\fdl_types.h", line 133: error: division by zero enum { R_FDLT02_ASSERT_LINE_133 = 1/(! !(sizeof(fdl_u16)==2)) }; ^ 40_MCAL\Memory\FDL\fdl_types.h", line 137: error: division by zero enum { R_FDLT02_ASSERT_LINE_137 = 1/(! !(sizeof(fdl_command_t)==1)) }; ^ 40_MCAL\Memory\FDL\fdl_types.h", line 138: error: division by zero enum { R_FDLT02_ASSERT_LINE_138 = 1/(! !(sizeof(fdl_status_t)==1)) }; ^ 40_MCAL\Memory\FDL\fdl_types.h", line 141: error: division by zero enum { R_FDLT02_ASSERT_LINE_141 = 1/(! !(sizeof(fdl_request_t)==8)) }; ^ 40_MCAL\Memory\FDL\fdl_types.h", line 142: error: division by zero enum { R_FDLT02_ASSERT_LINE_142 = 1/(! !(sizeof(fdl_descriptor_t)==10)) }; ^ 5 errors detected in the compilation of "Flash.c".
And the source code is below:
# define R_FDLT02_ASSERT_CONCAT_(a, b) a##b
#define R_FDLT02_ASSERT_CONCAT(a, b) R_FDLT02_ASSERT_CONCAT_(a, b)
#define R_FDLT02_STATIC_ASSERT(e) enum { R_FDLT02_ASSERT_CONCAT
(R_FDLT02_ASSERT_LINE_, __LINE__) = 1/(!!(e)) }
/* assertion if unsigned data type size is not correct, please evaluate compiler settings for integer types */
R_FDLT02_STATIC_ASSERT(sizeof(fdl_u08)==1);
R_FDLT02_STATIC_ASSERT(sizeof(fdl_u16)==2);
R_FDLT02_STATIC_ASSERT(sizeof(fdl_u32)==4);
/* assertion if enumeration type size is not correct, please evaluate compiler settings for enumeration types */
R_FDLT02_STATIC_ASSERT(sizeof(fdl_command_t)==1);
R_FDLT02_STATIC_ASSERT(sizeof(fdl_status_t)==1);
/* assertion if structure type size is not correct, please evaluate compiler settings for structure types */
R_FDLT02_STATIC_ASSERT(sizeof(fdl_request_t)==8);
R_FDLT02_STATIC_ASSERT(sizeof(fdl_descriptor_t)==10);