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 #cube2016-12-21 01:32 AM
Dear
Rudolf.Markus
,Your feedback is tracked internallyfor checking and further review.Thank you for your contribution.
All comments and suggestions are welcome.
Best Regards
-Imen-
2016-12-21 04:30 AM
Hello Markus,
As you noticed, LwIP internal files not generated but copied by CubeMX are overwritten at each CubeMX generation.
There is a workaround waiting for a better solution: update your cc.h file directly in the CubeMX repository I mean in the folder defined in CubeMX menu>Help>Updater Settings: Repository Folder and here in the right FW package folder like STM32Cube_FW_F4_V1.14.0\Middlewares\Third_Party\LwIP\system\arch\cc.h. By this way you will keep your update in LwIP stack.
Another suggestion is to define LWIP_TIMEVAL_PRIVATE setting in lwipopts.h generated in Inc folder within a USER SECTION so that the definition will be kept at each code generation.
I hope it will help.
Best Regards.
Eric A.
2017-07-04 07:06 AM
This issue will be fixed in next STM32CubeMX 4.22.0 release.
2017-10-17 12:25 PM
Was it fixed? Because i still get it with Version 4.22.1
2017-10-18 12:34 AM
You are right, the problem was fixed in 4.22 release but appears unfortunately again in 4.22.1 release.
Therefore, it will be definitively solved in coming 4.23 release.
Sorry for the inconvenience.
2017-10-24 03:09 AM
,
,
I have the same problem in 4.22.1 but in addition, after doing the workaround mentioned above, I'm getting 'error: redefinition of 'struct timezone' in the file syscalls.c
So I also needed to comment out 's
truct timezone' in syscalls.c (as it is enclosed in ' ♯ ifdef _SYS_TIME_H_')
Is this the same issue?
Will this also be fixed on 4.23?
When is 4.23 expected to be released?
(Target: STM32F427ZG , , ,
F4 firmware: 1.16)2017-10-30 02:41 AM
Yes it is the same issue and what you did allows waiting for the fix.
The issue has been fixed in 4.23 release, which is on the web since week 43.
Sorry for the late response.
2017-10-31 08:22 AM
I just updated to 4.23.0 and I get the same two issues.
(Target: STM32F407VG
F4 firmware: 1.17)
2017-10-31 08:53 AM
Hello
cratelle
,I confirm that regression observe in the 4.1 has been corrected in 4.
If you still encounter this issue, could you please describe your environment:
Are you using a makefile ? If yes, do you used the generated makefile by Cube ?
Are you using an IDE build ? If yes which one ?
Could you share your ioc, then we can test it in our end ?
Great thanks in advance.
Kind regards
Sirma