ARM-software / CMSIS-Compiler

CMSIS Compiler support for Arm Compiler
https://arm-software.github.io/CMSIS-Compiler/latest/index.html
Apache License 2.0
26 stars 13 forks source link

preliminary file redirection support for IAR #58

Open RobinKastberg opened 2 months ago

RobinKastberg commented 2 months ago

I did some file redirection support for IAR. I don't have the expertise to test this properly (it seems to compile, and should get called) It is modeled after the gcc support.

RobinKastberg commented 2 months ago

Sorry I missed to test it with file redirection enabled. It is currently rife with compilation errors. Please wait a little while and I will fix it :)

RobinKastberg commented 2 months ago

There, I have a starting point. I tested this with component: CMSIS-Compiler:File Interface:Custom and - file: ../template/file_interface/retarget_fs.c and it seems to compile.

I removed errno handling, the gcc one looked like it had the incorrect sign anyways. And it is really unclear whose responsibility it is to set these. (IAR errno.h doesn't have POSIX codes anyways)

VladimirUmek commented 2 months ago

Thanks for providing PR!. I'll review and try to test making sure that we have a working solution.