Commit Graph

430 Commits (0e7d172d0f3e3e424fcb7e6ac156517767cc6764)

Author SHA1 Message Date
Deepika 80f6b0e002 M2351: Update code to support IAR 8.x builds 2019-01-31 16:19:24 -06:00
Cruz Monrreal d425ec5860
Merge pull request #9197 from OpenNuvoton/nuvoton_fix_uart-flow-control
Nuvoton: Fix UART flow control CTS/RTS
2019-01-03 10:34:58 -06:00
ccli8 ad1e57bdef [Nuvoton] Refine MBED_CONF_RTOS_PRESENT check in crypto_misc.cpp 2019-01-03 09:21:05 +08:00
ccli8 39f705e033 [Nuvoton] Fix crypto_misc.cpp compile error with RTOS-absent
Replace Mutex with PlatformMutex which supports RTOS-absent
2019-01-02 15:53:31 +08:00
ccli8 388076d36d [Nuvoton] Remove unnecessary mbed_rtos_storage.h in crypto_misc.cpp 2019-01-02 14:06:03 +08:00
ccli8 17fb5b7ff2 [Nuvoton] Fix UART flow control CTS/RTS
Configure RTS pin outout to active low when RTS is disabled. This allows the peer to be able
to send data if its CTS is still enabled.
2018-12-25 18:21:11 +08:00
cyliangtw d5e643fd41 [Nuvoton] Fix NUC472 hard fault in SMCC tests 2018-12-20 19:42:42 +08:00
Cruz Monrreal 9edbcd77df
Merge pull request #9081 from OpenNuvoton/nuvoton_refine_crypto_ac
Nuvoton: Fix crypto AC management
2018-12-19 13:09:47 -06:00
ccli8 ca44675086 [Nuvoton] Fix crypto AC management
1. For SHA AC, use atomic flag to manage its ownership.
   (1) Nuvoton SHA AC doesn't support SHA context save & restore, so S/W
       SHA fallback has been supported before. To make non-blocking 'acquire'
       semantics clearer, introduce 'try_acquire' to substitute for 'acquire'.
   (2) No biting CPU due to mechanism above.
   (3) No deadlock due to mechanism above.
2. For AES/DES/ECC AC, change to mutex to manage their ownership.
   (1) Change crypto-misc.c to crypto-misc.cpp to utilize C++ SingletonPtr
       which guarantees thread-safe mutex construct-on-first-use.
   (2) With change to crypto-misc.cpp, add 'extern "C"' modifier to CRYPTO_IRQHandler()
       to avoid name mangling in C++.
   (3) No priority inversion because mutex has osMutexPrioInherit attribute
       bit set.
   (4) No deadlock because these AC are all locked for a short sequence
       of operations rather than the whole lifetime of mbedtls context.
   (5) For double mbedtls_internal_ecp_init() issue, it has been fixed in upper
       mbedtls layer. So no need to change ecc init/free flow.
2018-12-19 10:17:39 +08:00
ccli8 28b820fbf0 [NANO130] Change main thread stack size to default for stack size unification
NANO130 just has 16 KiB SRAM. User application may change it through "rtos.main-thread-stack-size"
configuration option.
2018-12-18 11:11:43 +08:00
ccli8 244d4b6405 [Nuvoton] Support boot stack size configuration option 2018-12-14 17:29:55 +08:00
Cruz Monrreal 0f0e63aaac
Merge pull request #8900 from OpenNuvoton/nuvoton_refine_uart
Nuvoton: Refine UART init/deinit
2018-12-04 11:51:16 -06:00
Martin Kojtal 179098d0f1
Merge pull request #8828 from OpenNuvoton/nuvoton_analogout
Nuvoton: Support DAC HAL
2018-12-03 13:18:57 +01:00
ccli8 a2c70f2ca4 [Nuvoton] Fix time to init/deinit stdio_uart
With support for checking H/W UART initialized or not, we can simplify stdio management:
1. When serial_init(&stdio_uart) calls in, just set the 'stdio_uart_inited' flag.
2. When serial_free(&stdio_uart) calls in, just clear the 'stdio_uart_inited' flag.
Except above, we needn't make special handling with 'stdio_uart'.
2018-11-29 10:23:22 +08:00
ccli8 a937a62bff [Nuvoton] Check configuration option for default UART baudrate setting 2018-11-28 16:59:15 +08:00
ccli8 ae98b94a10 [Nuvoton] Avoid re-configuring UART in serial_init() for the same H/W UART
The same H/W UART may be shared by multiple serial_t objects. This fix tries to avoid
re-configuring the same H/W UART in serial_init() when there are multiple serial_t
objects constructed. To re-configure UART, call serial_baud() and serial_format()
explicitly. This can avoid confusion when e.g. a newly constructed serial_t object
changes baudrate unexpectedly in serial_init().
2018-11-28 16:26:21 +08:00
ccli8 6b16112962 [Nuvoton] Remove unused pin_tx/pin_rx fields from serial_s struct 2018-11-28 16:17:39 +08:00
ccli8 e24a3c09d7 [Nuvoton] Fix license description for analog-out HAL files
1. Fix copyright year
2. Add SPDX
2018-11-27 09:44:27 +08:00
Martin Kojtal 80e2c1133a
Merge pull request #8719 from deepikabhavnani/m2351_ram_rom_changes
M2351 RAM / ROM defines updated
2018-11-26 10:57:42 +01:00
Deepika c0981a358a Addressed review comments from team-nuvoton 2018-11-22 09:07:21 -06:00
Deepika 1d8c00eccb Update parition sizes in M2351 - based on #8607
RAM/ROM sizes in tools were updated to report entire device size, and in M2351
they were used earlier to report secure/non-secure partition size.

M2351 files are updated to take full RAM/ROM device size and derive secure
and non-secure partition size based on that.
2018-11-22 09:07:21 -06:00
ccli8 e36c074359 [Nuvoton] Support DAC 2018-11-21 17:09:35 +08:00
Senthil Ramakrishnan f1926c0ea9 Fix linker script errors 2018-11-16 14:00:00 -06:00
Senthil Ramakrishnan ef8c1c3cb6 Linker script modifications for crash data region 2018-11-16 13:59:59 -06:00
Deepika 4e7cbd4d4c Add library and secure application for FlashIAP change 2018-11-09 15:12:25 -06:00
Deepika 049b5f533f Revert flash_get_value for M2351 done in PR#8589
`flash_get_erase_value` is added in hal/TARGET_FLASH_CMSIS_ALGO/flash_common_algo.c
duplicate copy of same function in targets/TARGET_NUVOTON/TARGET_M2351/flash_api.c
resulted in build issues with secure build
2018-11-09 14:17:49 -06:00
David Saada 542744d03c Support erase value in Flash HAL drivers, FlashIAP and block devices 2018-11-07 14:23:07 +02:00
Cruz Monrreal c37dc5fea8
Merge pull request #8425 from OpenNuvoton/nuvoton_m487_fix_button
M487: Fix SW2/SW3 interchange error in NUMAKER_IOT_M487
2018-10-17 08:35:46 -05:00
ccli8 67e0b7faf0 [M2351] Fix LED_GREEN naming error 2018-10-15 16:34:18 +08:00
ccli8 9d27b72950 [M487] Fix SW2/SW3 interchange error in NUMAKER_IOT_M487 2018-10-15 15:47:16 +08:00
Anna Bridge 24857d0f91
Merge pull request #5285 from c1728p9/minimum_requirements_test
Update devices to have minimum 2K RAM and heap, also added test
2018-10-12 11:04:57 +01:00
Deepika e1ecce85ba Nuvoton: Fix alignment of execute region to 8-byte boundary
--legacyalign, --no_legacyalign are deprecated from ARMC6 compiler, in order to
remove deprecated flags all linker files (GCC and IAR as well to have uniformity)
should strictly align to 8-byte boundary
2018-10-09 10:15:07 -05:00
Deepika f24ac501a8 Set main thread stack size as 3K for constrained targets 2018-10-08 13:27:35 -05:00
Cruz Monrreal b81c8a99d7
Merge pull request #8193 from OpenNuvoton/nuvoton_m2351_license
M2351: Add license file for default secure library/executable
2018-10-08 10:14:05 -05:00
Deepika f549f14a0a Set ISR stack and heap sizes for low end devices
Set the ISR stack to be 1KB. https://github.com/ARMmbed/mbed-os/pull/7238
Set the heap size to 3KB(2KB + overhead + spare) so that atleast 2KB free ram is
available for testing.
With dynamic heap size, explicit size is not required. IAR 7.8 supports
static heap, hence the change is needed in IAR linker files.
2018-10-05 12:09:46 -05:00
Amanda Butler cd996cd4c8
Copy edit REAMDE.md
Copy edit file, mostly for active voice and consistent spelling.
2018-10-04 16:55:36 -05:00
Martin Kojtal 59ce41f255
Merge pull request #8049 from OpenNuvoton/nuvoton_fix_hal_sleep
Nuvoton: Fix mbed_hal-sleep test failed
2018-10-01 11:48:25 +02:00
ccli8 96ce8ae6e3 [M2351] Add README.md for secure library/executable 2018-09-28 11:48:10 +08:00
ccli8 744f150402 [M2351] Add license file for secure library/executable 2018-09-28 11:47:50 +08:00
Cruz Monrreal 815683c2bd
Merge pull request #7941 from OpenNuvoton/nuvoton_fix_gpio_mode_mapping
Nuvoton: Fix GPIO mode mapping
2018-09-25 13:15:09 -05:00
Martin Kojtal 9d78650fcc
Merge pull request #7989 from OpenNuvoton/nuvoton_fix_m2351_stdiouart
M2351: Fix STDIO_UART error
2018-09-24 09:06:52 +02:00
Cruz Monrreal 5eb314f65f
Merge pull request #8164 from OpenNuvoton/nuvoton_iot_m487
Support Nuvoton's new target NUMAKER_IOT_M487
2018-09-21 21:31:22 -05:00
Martin Kojtal ab882c3416
Merge pull request #8030 from OpenNuvoton/nuvoton_fix_common_tickers_fail
Nuvoton: Fix Greentea test common_tickers failed
2018-09-21 14:55:28 +02:00
Cruz Monrreal 9f3437aaec
Merge pull request #7987 from OpenNuvoton/nuvoton_m2351_v1.3
M2351: Update to NuMaker-PFM-M2351 V1.3 board
2018-09-20 13:41:03 -05:00
deepikabhavnani ff80e298d2 Align to CMSIS defines for Non-secure
CMSIS updated the __DOMAIN_NS define to DOMAIN_NS. Update the define
in existing code for non-secure part.
2018-09-10 09:25:27 -05:00
ccli8 6ac163088a Support Nuvoton's NuMaker-IoT-M487 board 2018-09-10 11:32:54 +08:00
ccli8 a65e3d42e5 [M2351] Update secure library/executable
1. Remove hal_sleep/hal_deepsleep from secure library
2. Add CLK_Idle_S/CLK_PowerDown_S
2018-09-10 11:09:40 +08:00
ccli8 0550de72f5 [M2351] Fix hal_deepsleep with serial_can_deep_sleep
Add secure functions CLK_PowerDown_S/CLK_Idle_S
2018-09-10 10:55:45 +08:00
ccli8 beb04a82dc [Nuvoton] Fix serial corruption due to deep sleep
Prevent deep sleep when there is still any character being transmitted on the UART.
This allows tickless to be safely enabled.
2018-09-10 10:55:44 +08:00
ccli8 310b12a235 [Nuvoton] Fix HAL sleep test failure with lp_ticker
Replace wait_us with nu_busy_wait_us in lp_ticker since wait_us is not allowed in sleep test
which would suspend us ticker layer on which wait_us relies. nu_busy_wait_us is implemented
by calling us ticker HAL API directly rather than relying on us ticker layer.
2018-09-10 10:55:44 +08:00