2015-02-12 04:51 AM
I am having a problem with LWIP code. From MX tool I enable DNS so that LWIP_DNS is defined as 1 in lwipopts.h file yet this is not detected in any of the files. For example in netdb.c:
#if LWIP_DNS && LWIP_SOCKET
LWIP_DNS comes up as being 0 (incorrect) whereas LWIP_SOCKET comes up as being 1 (correct).
A search of LWIP_SOCKET locates this in lwipopts.h whereas a search of LWIP_DNS results in it not being found in lwipopts.h - Very strange.
The relevant paths are included in the project. I am using TrueSTUDIO 4.3.1.Has anyone else seen this problem?RgdsEmilio2015-02-12 08:44 AM
Hello,
Could you please provide your ioc file so that we can investigate. If you define LWIP_DNS to 1 in a user section of lwipopts.h, does it works better? For sure if you enable LWIP_DNS in CubeMX, it should be generated in lwipopts.h ... Thanks for your reply.2015-02-12 01:44 PM
Hello eric
I have attached .ioc file. I tried moving LWIP_DNS define to user code area with no effect. LWIP_DNS is enabled in MX tool and #define LWIP_DNS 1 is generated in the lwipopts.h file - The problem is this particular define is not detected in other code modules. Thanks ________________ Attachments : com_eval429.ioc : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzWc&d=%2Fa%2F0X0000000bN8%2F_h7R7fb8YnfeRzRNZ1MJG.PXnZU6Wdbk50W5q1dTS84&asPdf=false2015-02-13 04:46 AM
Using your ioc file with IAR (EWARM), the problem you mentionned is not visible. Could you try maybe? Would it be possible to add this dummy code to be sure of the value of the parameter:
#if !LWIP_DNS #include ''lwip/dummy.h'' #endif If en error occurs at compilation phase, this will confirm that LWIP_DNS is unexpectedly to zero. Thanks for your confirmation2015-08-28 04:57 PM
Solved this some time ago with help from Atollic.
C/C++ indexes need to be rebuilt every time code is generated from MX