Search code examples
ccortex-miar

IAR compiler "stdio library"


I am using IAR embedded workbench software for ARM CORTEX M7 controller. I have already included stdio.h library and it have fopen function like this enter image description here

but when i am declaring my file pointer like this

FILE *fpointer;

Its giving me these two errors.

enter image description here

Please share your experience how can i fix it?


Solution

  • File I/O is not present in the default library. To enable it you need to tell the compiler to use full libraries. This is done by opening the project options and choosing "Full" in the "Library Options" tab if you are using the IDE or by using the command line option --dlib_config full if you are using the command line compiler.

    In addition, unless you are ok with using semihosting for input and output, you need to implement the low level I/O interface for your target.