3 years, 2 months ago.

How does mbed-cli create includes and libraries

I have been trying to get the EthernetInterface library working with the nucleo f767zi. The version of the EthernetInterface in mbed-os/libraries/net/eth/ is quite different that the version in mbed-os/features/net/FEATURE_IPV4/lwip-interface/

Not sure which one is newer.

I have been trying to mess around with the json files setting turn off nsapi but the includes file down in the .build folder was same even though the mbed_config.h was different.

I tried digging into the python specifically the gcc_arm but I can't find direct settings that says using this standard list of includes.

Does anyone have any documentation how the cli handles the includes and libraries that are in the default mbed program?

Comment on this question

1 Answer

3 years, 2 months ago.


the old libraries https://github.com/ARMmbed/mbed-os/tree/master/libraries are currently reevaluted. The new FEATURE_IPV4 is the one to be used (new NetworkStack library).

Target can define features, that enables them. therefore your target should have ipv4 feature enabled and support in the new network stack.


I had a similar question, because the EthernetInterface in the IPv4 feature only supports connecting via DHCP, which I do not have available, while the old one allowed us to define a static IP/mask ourselves. Is the support for static IPs planned in the IPv4 feature, if we can't use the old library?


posted by Raphael Lejolivet 10 Aug 2016

Hi Raphael,

Unfortunately static IP addresses in the EthernetInterface in the IPv4 features did not make it into this release. We are planning on adding it soon, but it needed a bit consideration for other network interfaces.

posted by Christopher Haster 10 Aug 2016

Thanks for the details. I got my program compiling my board gets here tomorrow so we will see if it works. The big problem is that all of the documentation is out of date. The whole endpoint class looks like it has been removed or replaced with SocketAddress and there are no examples on how to use SocketAddress.

Thank for the assistance.

posted by Seth King 10 Aug 2016

Ah, thanks for pointing that out. The documentation for the new network library is over here: https://docs.mbed.com/docs/mbed-os-api-reference/en/5.1/APIs/communication/network_sockets/

I will look into what our plan is with the documentation in the handbook.

posted by Christopher Haster 10 Aug 2016

Thanks for the answer as well!

posted by Raphael Lejolivet 11 Aug 2016