Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 1 month ago.
Exporting problem with SW4STM32
When I export the program to the sw4stm32 ide, each time I have got similar 2 error when I compile it
1) /mbed_config.h: No such file or directory Solving by manual adding of this file to the project.
Properties-> C/C++ Build -> Settings -> MCU GCC Compiler -> Includes -> include files (- include) Properties-> C/C++ Build -> Settings -> MCU C++ Compiler -> Includes -> include files (- include)
next you have to search in file manager that file and set direction in that both windows.
2)<<code>>
vfprintf.c:(.text.__ssprint_r+0x4c): undefined reference to `__wrap__malloc_r'
vfprintf.c:(.text.__ssprint_r+0xb8): undefined reference to `__wrap__realloc_r'
vfprintf.c:(.text.__ssprint_r+0xc6): undefined reference to `__wrap__free_r'...
<</code>>
Properties-> C/C++ Build -> Settings -> MCU C++ Linker Includes -> Miscellaneous -> Linker flags
Solving by adding '_' symbol before the flags, therefore the part of line
--wrap=_malloc_r -Wl,--wrap=_free_r -Wl,--wrap=_realloc_r -Wl,--wrap=_memalign_r -Wl,--wrap=_calloc_r -Wl
should be converted to
--wrap=__malloc_r -Wl,--wrap=__free_r -Wl,--wrap=__realloc_r -Wl,--wrap=__memalign_r -Wl,--wrap=__calloc_r -Wl
After that 2 fixes it will be compiled without any other problems... Except the code errors. I'm not sure where I can send that feedback. Maybe someone will got similar issues, and there is a guide for solving.
this worked for me as well.
posted by Shabbir Hussain 01 Nov 2019