添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Posted on September 25, 2015 at 08:30

I am using IAR Workbench for programming my stm32f4 Discovery board and am having trouble using functions like malloc from stdlib.h file which is present in this path: IAR Systems\Embedded Workbench 7.0\arm\inc\c. Immediately after I include <stdlib.h> and try to compile the program, I get a few error messages as follows:

Error[Pe040]: expected an identifier C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\inc\c\stdlib.h 97

Error[Pe018]: expected a '')'' C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\inc\c\stdlib.h 97

Error[Pa002]: the type attribute ''__intrinsic'' is not allowed on this declaration C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\inc\c\stdlib.h 97

Error[Pa002]: the type attribute ''__nounwind'' is not allowed on this declaration C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\inc\c\stdlib.h 97

Error[Pe040]: expected an identifier C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\inc\c\stdlib.h 408

Error[Pe018]: expected a '')'' C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\inc\c\stdlib.h 408

Error[Pe065]: expected a '';'' C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\inc\c\stdlib.h 409

However, when I am including <stdio.h> from the same location, I seem to be facing no issues. Could someone please let me know what I could be missing.

#st Cube IDE Version: 1.15.0 failed at SystemClock_Config() in STM32 MCUs products I had some problems when i want to deploy a gas classification model from STM32cubemx with cube_ai in STM32 MCUs Machine learning & AI How to Include HAL Libraries into Already Existing Project in STM32 MCUs products STM32CubeProgrammer 2.16.0 fails to program STM32L433CC via USB in STM32CubeProgrammer (MCUs)