2016-12-19 01:17 PM
I'm using CubeMX 4.18 to generate my code for an STM32F407VG for the System Workbench using the arm-gcc. Works great, except for in socket.h it complains about redefinion of struct timeval.
When I manually set
&sharpdefine LWIP_TIMEVAL_PRIVATE 0
in socket.h
and do a
&sharpinclude <sys/time.h>
in cc.h as suggested, it builds.
But of course every time I make changes to my CubeMX project, it gets overwritten and I have manually edit again.
Please fix this in the next release!
Otherwise great tool!
Markus
#code-generation #lwip #cubemx-bug #cube2017-11-01 12:33 PM
I also still have the same issue on CubeMX 4.23.
Board nucleo-f429zi and STM32CubeF4 is of v1.17.0
Compiling with makefile arm-gcc-none-eabi version: 5.3 2016q1
All is done on linux
Here are some of the error messages after compiling
build/syscalls.o:/home/raivis/st_code/lwip_test_f429zi/Src/syscalls.c:102: first defined here
build/syscalls.o: In function `_sbrk':/home/raivis/st_code/lwip_test_f429zi/Src/syscalls.c:102: multiple definition of `initialise_monitor_handles'build/syscalls.o:/home/raivis/st_code/lwip_test_f429zi/Src/syscalls.c:102: first defined herebuild/syscalls.o: In function `_sbrk':/home/raivis/st_code/lwip_test_f429zi/Src/syscalls.c:102: multiple definition of `_getpid'build/syscalls.o:/home/raivis/st_code/lwip_test_f429zi/Src/syscalls.c:102: first defined herebuild/syscalls.o: In function `_sbrk':/home/raivis/st_code/lwip_test_f429zi/Src/syscalls.c:102: multiple definition of `_kill'build/syscalls.o:/home/raivis/st_code/lwip_test_f429zi/Src/syscalls.c:102: first defined herebuild/syscalls.o: In function `_sbrk':/home/raivis/st_code/lwip_test_f429zi/Src/syscalls.c:102: multiple definition of `_exit'build/syscalls.o:/home/raivis/st_code/lwip_test_f429zi/Src/syscalls.c:102: first defined herebuild/syscalls.o: In function `_sbrk':/home/raivis/st_code/lwip_test_f429zi/Src/syscalls.c:102: multiple definition of `_write'build/syscalls.o:/home/raivis/st_code/lwip_test_f429zi/Src/syscalls.c:102: first defined herebuild/syscalls.o: In function `_sbrk':/home/raivis/st_code/lwip_test_f429zi/Src/syscalls.c:102: multiple definition of `_close'build/syscalls.o:/home/raivis/st_code/lwip_test_f429zi/Src/syscalls.c:102: first defined herebuild/syscalls.o: In function `_sbrk':/home/raivis/st_code/lwip_test_f429zi/Src/syscalls.c:102: multiple definition of `_fstat'build/syscalls.o:/home/raivis/st_code/lwip_test_f429zi/Src/syscalls.c:102: first defined herebuild/syscalls.o: In function `_sbrk':/home/raivis/st_code/lwip_test_f429zi/Src/syscalls.c:102: multiple definition of `_isatty'build/syscalls.o:/home/raivis/st_code/lwip_test_f429zi/Src/syscalls.c:102: first defined herebuild/syscalls.o: In function `_sbrk':/home/raivis/st_code/lwip_test_f429zi/Src/syscalls.c:102: multiple definition of `_lseek'build/syscalls.o:/home/raivis/st_code/lwip_test_f429zi/Src/syscalls.c:102: first defined herebuild/syscalls.o: In function `_sbrk':/home/raivis/st_code/lwip_test_f429zi/Src/syscalls.c:102: multiple definition of `_read'....2017-11-02 03:05 AM
Hello
Strogonovs.Raivi
,I branched your second issue into a new discussion
https://community.st.com/0D50X00009XkXAgSAN
, as it's a new problem related to the makefile/Linux.Best Regards
Imen
2017-11-03 12:36 PM
Hi
SIRY.Marc
,I'm generating for GPDSC (VisualGDB).
Link to ioc :
https://drive.google.com/file/d/0Bz0PMTaNbtLgcmJCTFJXcldLUFE/view?usp=sharing
Thanks,
2018-04-29 03:09 PM
I'm not sure quite the status is of the regression/correction of this issue as of 4/29/2018, but definitely making the definition within lwipopts.h worked. It's the right way to do the wrong thing.
2018-11-27 01:55 AM
There is still bug with redefinition of 'struct timeval' when I use lwip.
Now in version 5.0.0
2018-11-27 08:41 AM
Good to know... I assume the whole V5.0.0 is a failure GUI-wise, I had hopes that at least the code generator bugs have been fixed.