I am building a generic CodeBlocks project using the IAR compiler.
When I attempt to build, I get the error message:
"Error[Li005]: no definition for "__write" [referenced from
putchar.o(dl7M_tlf.a)]"
It seems that the linker cannot find a definition for the IAR library function __write. The IAR compiler includes a definition for this library function in the installation directory arm/src/lib/file, where there is a write.c file. Adding the write.c file directly to the project allows me to fully link and generate a project executable. The problem is, this is very clunky and as other people at my job will be using this CodeBlocks + IAR framework, I'd prefer to not have to include a long relative path dependent on the install location of the IAR compiler.
Is there some compiler-dependent flag I can use to avoid this? Perhaps I can redirect the __write library Or some better inclusion method that doesn;t involve including a very long relative path? Even just defining a dummy void write() function somewhere?