Skip to content

Commit 316cd5e

Browse files
committed
Support NUMAKER_IOT_M487
1. Support Nuvoton targets: - NUMAKER_IOT_M487 V1.3 Compared to V1.2, V1.3 adds support for ESP8266 RTS/CTS/RST pins. V1.3 is incompatible with V1.2 on ESP8266. 2. Change storage to NUSD (SD card in SDIO bus mode) from SD (SD card SPI bus mode) (1) Add COMPONENT_NUSD.lib. (2) Add component NUSD (target.components_add). (3) Change default BlockDevice to NUSD: Override BlockDevice::get_default_instance (nusd.provide-default-blockdevice). Required since mbed-cloud-client 2.1.0 (arm_uc_blockdevice_ext) or in: mbed-bootloader/modules/storage/pal-blockdevice/source/arm_uc_pal_blockdevice_mbed.cpp (4) Enable kvstore with blockdevice type being "other". i) Override get_other_blockdevice() (nusd.provide-kvstore-other-blockdevice). ii) Configure storage type to "FILESYSTEM". iii)Configure file system type to "LITTLE". vi) Configure block device type to "other". v) Configure external size to 64MiB, which cannot overlap with update-client. storage-address/update-client.storage-size. 3. Change back UARTSerial tx/rx buffer size from 1024/1024 to 256/256. This can reduce memory footprint by (1024 - 256) * 2 = 1.5KiB. Because this configuration influences both ESP8266 and default console (platfrom/mbed_retarget.cpp), memory reduction can achieve 1.5KiB x 2 = 3KiB. 4. Enlarge ESP8266 'send tcp data' timeout on Nuvoton targets Pelion connection has some failure rate with this. Enlarging ESP8266_SEND_TIMEOUT can just relieve the issue. A ticket has raised to address it: ARMmbed/mbed-os#11544
1 parent c9c2dfd commit 316cd5e

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Board | Connectivity | Storage for credentials and
2626
`Embedded Planet EP_AGORA` | Cellular | SPIF | Build-only
2727
`ST NUCLEO_H743ZI2` | Ethernet | Internal Flash | Build-only
2828
`ST NUCLEO_L4R5ZI` | Wi-Fi ESP8266 | Internal Flash | Build-only
29+
`Nuvoton NUMAKER_IOT_M487` | Wi-Fi ESP8266 | SD card (NUSD) |
2930

3031
Build-only = This target is currently verified only via compilation, and is not verified at runtime.
3132

Binary file not shown.

drivers/storage/COMPONENT_NUSD.lib

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://github.com/OpenNuvoton/NuMaker-mbed-SD-driver/#56406071a4468a8302c0717a4467a241d152ade2

mbed_app.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,37 @@
182182
"esp8266.cts" : "PA_11",
183183
"esp8266.provide-default" : true
184184
},
185+
"NUMAKER_IOT_M487": {
186+
"target.extra_labels_add" : ["PSA"],
187+
"target.network-default-interface-type" : "WIFI",
188+
"target.bootloader_img" : "bootloader/mbed-bootloader-m487_iot-block_device-kvstore-v4.1.0.bin",
189+
"bootloader-size" : "(64*1024)",
190+
"target.header_offset" : "0x12000",
191+
"target.app_offset" : "0x12400",
192+
"target.components_add" : ["NUSD"],
193+
"nusd.provide-default-blockdevice" : true,
194+
"nusd.provide-kvstore-other-blockdevice" : true,
195+
"update-client.bootloader-details" : "0x0",
196+
"update-client.application-details" : "0x12000",
197+
"update-client.storage-address" : "(1024*1024*64)",
198+
"update-client.storage-size" : "((MBED_ROM_START + MBED_ROM_SIZE - APPLICATION_ADDR) * MBED_CONF_UPDATE_CLIENT_STORAGE_LOCATIONS)",
199+
"update-client.storage-locations" : 1,
200+
"mbed-cloud-client.update-storage" : "ARM_UCP_FLASHIAP_BLOCKDEVICE",
201+
"storage.storage_type" : "FILESYSTEM",
202+
"storage_filesystem.filesystem" : "LITTLE",
203+
"storage_filesystem.blockdevice" : "other",
204+
"storage_filesystem.internal_base_address" : "(MBED_ROM_START + MBED_BOOTLOADER_SIZE)",
205+
"storage_filesystem.rbp_internal_size" : "(2*4*1024)",
206+
"storage_filesystem.external_base_address" : "(0x0)",
207+
"storage_filesystem.external_size" : "(1024*1024*64)",
208+
"esp8266.tx" : "PH_8",
209+
"esp8266.rx" : "PH_9",
210+
"esp8266.rts" : "A2",
211+
"esp8266.cts" : "A3",
212+
"esp8266.rst" : "PH_3",
213+
"esp8266.provide-default" : true,
214+
"target.macros_add" : ["MBEDTLS_USER_CONFIG_FILE=\"mbedTLSConfig_mbedOS_SW_TRNG_PSA.h\"", "MBEDTLS_PSA_CRYPTO_C", "MBEDTLS_ENTROPY_NV_SEED", "PAL_USE_HW_TRNG=0", "ESP8266_SEND_TIMEOUT=8000"]
215+
},
185216
"DISCO_L475VG_IOT01A": {
186217
"target.macros_add" : ["MBEDTLS_USER_CONFIG_FILE=\"mbedTLSConfig_mbedOS.h\""],
187218
"target.network-default-interface-type" : "WIFI",

0 commit comments

Comments
 (0)