CMSIS-Compiler icon indicating copy to clipboard operation
CMSIS-Compiler copied to clipboard

IAR error with [--require_prototypes] build option

Open DCHSTM opened this issue 1 year ago • 2 comments

Hi

In our project, we enable this [--require_prototypes] build option in IAR.

This makes errors: "xxx\source\iar\retarget_io.c",63  Error[Pa045]: function "__write" has no prototype "xxx\source\iar\retarget_io.c",37  Error[Pa045]: function "__read" has no prototype

Please could you add the function prototypes in the source\iar\retarget_io.c file

DCHSTM avatar Sep 18 '24 08:09 DCHSTM

Hi,

I believe this will be fixed once https://github.com/ARM-software/CMSIS-Compiler/pull/58 gets merged. The reason for your error is that LowLevelIOInterface.h is not included in retarget_io.c. See https://github.com/ARM-software/CMSIS-Compiler/blob/96b1a30136d522c58e72d8fb2c98a63e6f984124/source/iar/retarget_io.c#L19 if you want to fix it manually.

VladimirUmek avatar Sep 18 '24 08:09 VladimirUmek

Hi great, we'll apply the patch. do you know when the patch will be officially delivered?

DCHSTM avatar Sep 18 '24 09:09 DCHSTM

#58 is merged to main, hence closing this issue.

VladimirUmek avatar Jun 19 '25 07:06 VladimirUmek