2024-01-26 12:28 PM
Hi All,
I am having a strange error. When I compile my code, the error directive causes the ERROR. I can not pinpoint the issue. Could you please hint me in the right direction?
Thanks and Regards,
2024-01-26 12:51 PM
Well, the error message says the cc950.c file is not needed in the current configuration and to remove it from the project.
I would guess that this means the file is not needed in the project and that you should delete it or otherwise exclude it from the build.
2024-01-26 01:04 PM - edited 2024-01-26 01:06 PM
Hello @demir
this one is easy: your project links too many .c files for code pages. This is detected by checking the value of _CODE_PAGE in each of them. As this define has a specific value, probably set by a FatFS configuration header file, the only .c file which is not generating this error should be kept from link and the others have to be removed, just as the error message says it clearly.
The reasons for this are:
By the way, the #error directive is very useful and is generally used to detect an issue imagined by the developer before the preprocessor/compiler/linker falls into it. Therefore it has to display a more explicit message for a human to understand.