Enable Dynamixel_SDK and EthernetInterface

Hello,

I’m starting using NUCLEO-F767ZI, Dynamixel servo motors and Ethernet. Then, I have two problems.
First problem ( I maybe resolved ) is that PlatformIO doesn’t include dynamixel_sdk.h properly. After I change mbed version from 6 to 5.15.6, the .h file works.
However, Second problem is that #include “EthernetInterface.h” doesn’t work properly. Before changing the mbed version, this .h file worked.

How can I resolve these problems?

Followings are my .ini file and error (EthernetInterface.h doesn’t works):

[env:nucleo_f767zi]
platform = ststm32
board = nucleo_f767zi
framework = mbed

platform_packages = 
    framework-mbed@~6.51506.201227

lib_deps = 
    https://github.com/ROBOTIS-GIT/DynamixelSDK.git

build_flags =
    -I.pio/libdeps/nucleo_f767zi/DynamixelSDK/include
    -D MBED_CONF_NSAPI_PRESENT
In file included from C:\Users\USERNAME\.platformio\packages\framework-mbed@6.51506.231105\targets\TARGET_STM\USBPhyHw.h:21,     
                 from C:\Users\USERNAME\.platformio\packages\framework-mbed@6.51506.231105\targets\TARGET_STM\USBPhy_STM32.cpp:20:
C:\Users\USERNAME\.platformio\packages\framework-mbed@6.51506.231105/mbed.h:26:10: fatal error: netsocket/nsapi.h: No such file or directory
   26 | #include "netsocket/nsapi.h"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.

Does https://github.com/platformio/platform-ststm32/tree/master/examples/mbed-rtos-ethernet-tls compile for you? That one uses the Ethernet API and stuff.

I compled it on mbed 6.17.0 just following the instructions in README.

I added following to .ini file to change mbed version to 5.15.6 for including dynamixel_sdk.h:

[env:nucleo_f767zi]
platform = ststm32
framework = mbed
board = nucleo_f767zi

platform_packages = 
    framework-mbed@~6.51506.201227

Then I got another error:

src\main.cpp:2:10: fatal error: mbed_trace.h: No such file or directory

********************************************************************
* Looking for mbed_trace.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:mbed_trace.h"
* Web  > https://registry.platformio.org/search?q=header:mbed_trace.h
*
********************************************************************

    2 | #include "mbed_trace.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.
*** [.pio\build\nucleo_f767zi\src\main.o] Error 1

Visiting the Web, I changed .ini:

[env:nucleo_f767zi]
platform = ststm32
framework = mbed
board = nucleo_f767zi

platform_packages = 
    framework-mbed@~6.51506.201227

lib_deps =
    armmbed/mbed_trace@^1.3.0

However,

Resolving nucleo_f767zi dependencies...
Library Manager: Installing armmbed/mbed_trace @ ^1.3.0
UnknownPackageError: Could not find the package with 'armmbed/mbed_trace @ ^1.3.0' requirements for your system 'windows_amd64'

I think you used a wrong name for the library - it should be armmbed/mbed-trace

I modified:

[env:nucleo_f767zi]
platform = ststm32
framework = mbed
board = nucleo_f767zi
platform_packages = 
	framework-mbed@~6.51506.201227

lib_deps =
    armmbed/mbed-trace@^1.3.0

but error:

In file included from .pio\libdeps\nucleo_f767zi\mbed-trace\source\mbed_trace.c:28:
.pio\libdeps\nucleo_f767zi\mbed-trace/mbed-trace/mbed_trace.h:56:10: fatal error: ns_types.h: No such file or directory

******************************************************************
* Looking for ns_types.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:ns_types.h"
* Web  > https://registry.platformio.org/search?q=header:ns_types.h
*
******************************************************************

   56 | #include "ns_types.h"
      |          ^~~~~~~~~~~~
compilation terminated.
*** [.pio\build\nucleo_f767zi\lib834\mbed-trace\mbed_trace.o] Error 1
src\main.cpp:2:10: fatal error: mbed_trace.h: No such file or directory

********************************************************************
* Looking for mbed_trace.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:mbed_trace.h"
* Web  > https://registry.platformio.org/search?q=header:mbed_trace.h
*
********************************************************************

    2 | #include <mbed_trace.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
*** [.pio\build\nucleo_f767zi\src\main.o] Error 1

The URL for ns_types.h shows two packages, but neither are ns_types.h. How can I resolve these?