-
Notifications
You must be signed in to change notification settings - Fork 34
Support NU_PFM_M2351_NPSA_NS #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
build-only |
Remind that this PR relies on ARMmbed/mbed-os#11594 |
It was a good test for the CI, it should have reported build failures :) |
build-only |
Test run: FAILEDFailed to build following targets: posted-by-tag: https://jenkins-client.isgtesting.com/job/mbed-os-example-pelion/ |
For ARMC6 build failure, it relies on ARMmbed/mbed-os#11594. |
We find an issue with M2351. M2351 is a TrustZone target. When any of memory partition, IP security attribute, and secure gateway library in secure program (in mbed-os tree) is changed, bootloader needs rebuild accordingly. This increases maintenance effort in this repo. Please suspend this PR. |
Based on mbed-os-pelion-example master/mbed-bootloader 4.1.0/mbed-cloud-client 4.0.0, support Nuvoton targets: 1. Support Nuvoton targets: - NU_PFM_M2351_NPSA_NS 2. Support M2351 (1) Use pre-built secure image/lib (2) Build by running: $ mbed compile -m NU_PFM_M2351_NPSA_NS -t ARMC6 3. 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. 4. 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. 5. 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 6. Requirements for mbed-os version: - mbed-os 5.13.0 (or afterwards) to support kvstore with block device type being "other" - mbed-os 5.13.1 (or afterwards) to fix 'undefined pal_plat_osEntropyInject(...)' error - mbed-os 5.14.0 (or afterwards) to support NU_PFM_M2351_NPSA_NS target renaming and combined build - mbed-os 5.14.? (or afterwards) to support NU_PFM_M2351_NPSA_S default secure program which has partitioned memory for Pelion application
Description
This PR is split of #25 and to support NU_PFM_M2351_NPSA_NS.
Related PR
Relies on ARMmbed/mbed-os#11594 to integrate M2351 non-PSA default secure program into mbed-os tree which has partitioned memory for Pelion application.