2023-07-12 12:07 AM
I have just updated the IDE from 1.12.1 and updated my project as requested but I have encountered an issue when compiling.
I get 3 errors on previously compiling source code. as follows
Can you help with what might be the problem?
PhilW
Solved! Go to Solution.
2023-07-18 07:51 AM - edited 2023-07-18 07:52 AM
I have the impression that we should tackle the problem properly for once. I got similar warnings when I imported a rather old project.
After a little investigation, I found the cause: it probably does not depend on the respective firmware version, but occurs due to newlib and references to undeclared functions. If these functions are not used in the respective project and one could therefore debug them, it probably helps to define the functions in main.c under private defines. I have defined the functions as weak so that you can always add them and not get errors if they are defined in the project anyway, e.g.:
// to extend/modify depending on the behaviour in your project
__attribute__((weak)) void _close(void){}
__attribute__((weak)) void _lseek(void){}
__attribute__((weak)) void _read(void){}
__attribute__((weak)) void _write(void){}
Hope that helps?
Regards
/Peter
2023-07-18 08:27 AM
I had this problem on an old project.
I changed the runtime library from reduced C to runtime C and it built.
2023-08-09 04:16 AM
It's sad that this topic is already a month old and there is still no STM32CubeIDE version that fixes this.
Consider that this would affect a lot of users.
In the meantime I know some who have therefore switched to an older version.
2023-08-14 03:01 AM
Same thing happened with me when I updated my CubeIDE. It's becuase of the updated GNU toolchain.
Go to your project's properties, C/C++ Build, Settings, Open Toolchain Manager, then install a toolchain older than your current one. When done, use the GNU toolchain that you just installed and the issues should go away.
2023-08-22 11:17 PM
Unfortunately, that didn't work in my case.
2023-08-22 11:17 PM
Thanks. Changing the tollchain worked for me too :)
2023-08-23 02:34 AM
This is working just fine, Thank you Peter
2023-08-31 09:39 AM
Thanks for the fix Peter!
After upgrading to 1.13.1, I had the exact same issue as others, but this trick fixed them!
2023-09-04 08:33 AM
Hi everybody,
I have the same problem working on an old workspace with STM32L4 fw package 1.11.0. The trick suggested by Peter works for me, but I would like to know if it depends on the old fw package or there is something else. I have regenerated the code from CubeMX and I have added my sources keeping the old version of HAL, LL and CMSIS libraries. I'm also using FreeRTOS version 10.1.1. So, doing this, only the project files have been updated (.cproject and .project files), but the problem is still there. Does anyone help me to figure it out? Which library has a reference to (or use) these "undeclared functions"?
Thanks in advance.
2023-09-04 11:23 PM
Same Problem here. Solved as follows:
- create a new project with 1.13.1
- grab the files syscalls.c and sysmem.c from Core/Src
- add those files to your existing project
You're done