Fix the following issues in TF-M to avoid emergence in the future:
1. Enable initial stack not located in SRAM bank0
On reset, only SRAM bank0 is enabled. And SRAM bank1/2 will be enabled in immediately following SystemInit().
When initial stack is located in SRAM bank1/2, we will meet trouble because SystemInit() itself needs to use initial stack.
To conquer the dilemma, we add preceding code in front of original Systeminit(), which is responsible for enabling SRAM bank1/2 and guarantees no using initial stack.
2. Fix sector maps of internal/external (SDH) Flash are incompatible, caused by TF-M's MCUboot port.
This is done by adapting external (SDH) Flash sector size to internal Flash's.
3. Enlarge firmware upgrade scratch size. There are two advantages:
(1) Get around MCUboot limit which requires scratch size not smaller than image trailer size
(2) Improve wear leveling for the scratch area
Full verbosity is adding a console line for each lock/unlock API call
- stats can be enabled with json config
- default configuration is full verbosity and add a console line for each lock/unlock command
- for STM32 targets, verbosity is reduced by default
When decimal_prec is 0 and the value is negative and needs rounding subtract 1, instead of adding 1
When decimal_prec > 0 round before printing the integer part, instead of after
1. In TF-M, enlarge ITS max asset number/size
NOTE: RSA key size is larger
2. In TF-M, enlarge mbedtls dedicated heap
NOTE: RSA algorithm needs more memory.
NOTE: psa_aead_decrypt() (for mbedtls_ssl_read()) needs memory proportional to data size.
As a default implementation is already provided by
NetworkStack, stub implementations in the child classes
are not required. Furthermore, they return unsupported for
all cases instead of redirecting to the non-control API,
which is plainly wrong.
We have clash with needs work and needs CI labels. If CI fails, we need to be in CI stage. Check for needs: CI label and apply work only if it was CI.
Otherwise we would be in the loop.
Due to post-build script not supporting custom board, both the below UART configurations are enabled on NuMaker-IoT-M2354 board:
- UART0 PA7/PA6 enabled by bl2.bin
- UART0 PB9/PB8 enabled by tfm_s.bin and later by mbed
Both PA7/PA6 and PB9/PB8 enabled on UART0, PB8 gets disturbed and stdin mis-behaves on NuMaker-IoT-M2354 board.
NuMaker-M2354 : UART TX/RX = UART0 PA7/PA6
NuMaker-IoT_M2354 : UART TX/RX = UART0 PB9/PB8
This bugfix tries to enable post-build for custom board to some degree (not completely), with Mbed CLI.
NOTE: For Mbed CLI, the build process still sees NuMaker-M2354's partition/ and applies its mcuboot build options. Custom board must align on these.