AnsweredAssumed Answered

SW4STM32 Precompiler bug with MEMP_ macro (LwIP)

Question asked by andy b on Jul 18, 2017

Hello

I have made a few projects using the CubeMX that include LwIP. Each time I had compiler errors concerning MEMP_  defines which are marco-generated. If I would use any feature that require the use of one of these defines ex: when creating a pcb, The compiler gives me an error saying that the define cannot be resolved.The solution to this problem is to add : #include "lwip/memp.h" to my main.c. Which is weird because memp.h is sub included in lwip.h file (which s included in main.c).Also when deleting the error message from the list and re-building the project the compiler doesn't always trigg an error message.Could this be an error witht he macro itself , a bug in CubeMX when creating the project or a missinterpretation of the precompiler ?

Even tho I fixed the error im still curious about what is causing this.

I'm sure one of you precompiler and makefile wizzards could bring up possible causes.

I am using discoveryF4 board with most recent version of CubeMX and SW4STM32. 

-Andy

Outcomes