This is an example to demo TCP socket over WiFi on Nuvoton's Mbed CE enabled boards.
Check out Mbed CE for details on Mbed OS community edition.
Use cmake-based build system. Check out hello world example for getting started.
⚠️ WarningLegacy development tools below are not supported anymore.
For VS Code development or OpenOCD as upload method, install below additionally:
- NuEclipse: Nuvoton's fork of Eclipse
- Nuvoton forked OpenOCD: Shipped with NuEclipse installation package above.
Checking openocd version
openocd --version
, it should fix to0.10.022
.
In the following, we take NuMaker-IoT-M467 board as an example for Mbed CE support.
- NuMaker-IoT-M467 board
- Host OS: Windows or others
- WiFi ESP8266
-
Clone the example and navigate into it
$ git clone https://github.com/mbed-nuvoton/NuMaker-mbed-ce-wifi-tcp-example $ cd NuMaker-mbed-ce-wifi-tcp-example $ git checkout -f master
-
Deploy necessary libraries
$ git submodule update --init
Or for fast install:
$ git submodule update --init --filter=blob:none
-
Compile with cmake/ninja
$ mkdir build; cd build $ cmake .. -GNinja -DCMAKE_BUILD_TYPE=Develop -DMBED_TARGET=NUMAKER_IOT_M467 $ ninja $ cd ..
Flash by drag-n-drop built image NuMaker-mbed-ce-wifi-tcp-example.bin
or NuMaker-mbed-ce-wifi-tcp-example.hex
onto NuMaker-IoT-M467 board
On host terminal (115200/8-N-1), you should see:
Connecting to WiFi..
Connected to Network successfully
TCP client IP Address is <IP-ADDRESS>
HTTP Connection ...
HTTP: Connected to www.ifconfig.io:80