Hi,
I have a working ping example on an RT1052 board using the evkbimxrt1050_lwip_lwip_ping_bm example. I can happily ping the board, no problem.
However, when I copy the example and change the nature to C++, the board fails to respond to ping requests. I do see an outgoing ARP request from the board on start-up.
To convert the example I used the "Convert to a C/C++ Project (Adds C/C++ Nature)" and then copied preprocessor and includes in the MCU C++ Compiler settings. And change extensions to cpp for main source and startup files, and declaring the SysTick_Handler as extern "C" so that the weak version is overridden.
The program compiles and runs, but does not seem to be receiving packets.
Any thoughts? Is there some other C code which needs to be extern "C" {}...?
Any help appreciated as I'm porting an existing C++ program to this new platform.
Thanks
Scott
I think I may have stumbled across the issue and the solution. When converting a C example to C++ the default settings in the Managed Linker Script are lost. Which results in the SRAM_DTC being cacheable. Restoring the following settings made the C++ converted ping example happy and replying to pings.
Hope this helps others out as this has taken a long long time to figure out.
I'm afraid our module drivers are designed in C, and are meant to be used with C projects. This is most likely the leading cause for your error.
Is there any specific reason why you need to have your project as a C++ project? I would highly recommend to maintain the C project, without converting it.