Commit Graph

621 Commits (5f19b6b03a71f2f9b6585fb03a573de608a5532d)

Author SHA1 Message Date
Martin Kojtal 0a6e586a9d
Merge pull request #12660 from OpenNuvoton/nuvoton_m2351_custom_board
M2351: Support custom board
2020-03-31 09:29:22 +02:00
Chun-Chieh Li e6823c6af5 M2351: Add SPDX license identifier for BSP files 2020-03-24 10:47:03 +08:00
Chun-Chieh Li d1655854c9 M2351: Add SPDX license identifier 2020-03-24 10:03:44 +08:00
Chun-Chieh Li 427e8eb777 M2351: Support custom board
1. Introduce MCU_M2351 target to be inheritable
2. Re-organize PinNames.h to be overridable
3. Enable configurability of USB/STDIO UART pins
2020-03-20 09:39:16 +08:00
Chun-Chieh Li f5cb899413 M263: Re-organize PinNames.h
This is to support custom boards based on M261 series chips.
2020-03-20 09:16:51 +08:00
Chun-Chieh Li 15fcdb1c36 M263: Support configurability for USB/STDIO UART pins
-   STDIO_UART and STDIO_UART_TX/STDIO_UART_RX
-   USB_UART and USBTX/USBRX
2020-03-20 09:16:51 +08:00
Chun-Chieh Li edcfcf0495 M263: Enable configurability for memory specification
This is to support custom boards based on M261 series chips.
2020-03-20 09:16:50 +08:00
Chun-Chieh Li 203a9fe0ec M263: Add SERIAL_TX/SERIAL_RX pin names
Don't set SERIAL_TX/SERIAL_RX to USBTX/USBRX which should be dedicated for USB VCOM and not for other uses.
2020-03-20 09:16:49 +08:00
Chun-Chieh Li 5ec86411c4 M487: Re-organize PinNames.h
This is to support custom targets based on M480 series chips.
2020-03-12 09:34:45 +08:00
Chun-Chieh Li 2cf82821dd M487: Support configurability of USB/STDIO UART pins
-   STDIO_UART and STDIO_UART_TX/STDIO_UART_RX
-   USB_UART and USBTX/USBRX
2020-03-12 09:34:45 +08:00
Chun-Chieh Li 9d26390595 M487: Make memory specification configurable
This is to support custom targets based on M480 series chips.
2020-03-12 09:34:14 +08:00
Chun-Chieh Li 98c151a9f2 M487: Make SPIM CCM mode configurable
This is to support custom targets based on M480 series chips.
2020-03-12 09:31:51 +08:00
Chun-Chieh Li 2f770b77a9 M487: Remove BUTTON1/2 for custom targets
This is to support custom targets based on M480 series chips.
2020-03-12 09:31:51 +08:00
Chun-Chieh Li c4ffd38a90 M487: Change SERIAL_TX/SERIAL_RX pin names to other than USBTX/USBRX
USBTX/USBRX should be dedicated for USB VCOM and not for other uses.
2020-03-12 09:31:51 +08:00
Chun-Chieh Li cbf1a8a6fd M487: Get around h/w issue with reset from power-down mode
When UART interrupt enabled and WDT reset from power-down mode, in the next
cycle, UART interrupt keeps breaking in and cannot block unless via NVIC. To
get around it, we deliberately make up a signal of WDT wake-up from power-down
mode in the start of boot proces when WDT reset is detected.
2020-02-27 17:46:19 +08:00
Chun-Chieh Li 55f88a0942 M487: Re-implement Reset_Handler() in naked inline assembly
This is to guarantee SRAM bank2, not initialized yet, isn't used for stack by function preamble code at the very start.
2020-02-27 17:38:53 +08:00
Martin Kojtal 119931e56d
Merge pull request #12478 from OpenNuvoton/nuvoton_m2351_minor
M2351: Fix some minor issues
2020-02-24 12:51:52 +00:00
Martin Kojtal dc733d8883
Merge pull request #12477 from fkjagodzinski/hal-gpio-get_capabilities
HAL: Add a get_capabilities() function to GPIO API
2020-02-24 07:47:39 +00:00
Filip Jagodzinski 09ecd2fdc0 Nuvoton: Add gpio_get_capabilities()
TARGET_NANO100, TARGET_NUC472 & TARGET_M451 do not support input pull
mode configuration.
2020-02-19 18:58:47 +01:00
Chun-Chieh Li 34d3d43f0d M2351: Fix NSC_Init(...)
Actually, NSC_Init(...) is not used by secure code currently. No need to rebuild secoure image/lib.
2020-02-19 17:59:49 +08:00
Chun-Chieh Li 7328467012 M2351: Fix interrupt vector with BSP update 2020-02-19 17:57:01 +08:00
Chun-Chieh Li d5620b66a7 M2351: Fix RTC comment 2020-02-19 17:51:49 +08:00
Chun-Chieh Li 8df96ec50a Nuvoton: Make SPI inter-frame (delay match configured suspend interval
In no MISO case, skip SPI read so that no more write/read delay contribute to SPI inter-frame delay when data is written successively.

Update targets:
-   NUMAKER_PFM_NANO130
-   NUMAKER_PFM_NUC472
-   NUMAKER_PFM_M453
-   NUMAKER_PFM_M487/NUMAKER_IOT_M487
-   NU_PFM_M2351_*
-   NUMAKER_IOT_M263A
-   NUMAKER_M252KG
2020-02-17 15:00:09 +08:00
Chun-Chieh Li 769781cfb3 M2351: Update PSA secure image/lib with RTC LXT 2020-02-13 11:24:02 +08:00
Chun-Chieh Li 4c9e0f1fcd M2351: Update non-PSA secure image/lib with RTC LXT 2020-02-13 11:24:02 +08:00
Chun-Chieh Li 9f9ca0acaa M2351: Fix CRYPTO_MODBASE() when crypto module is configured to secure
This bug results from BSP update:

-   CRPT: Base address of secure or non-secure crypto module, dependent on partition
-   CRPT_S: Base address of secure crypto module
-   CRPT_NS: Base address of non-secured crypto module
2020-02-13 11:24:02 +08:00
Chun-Chieh Li 834e1aad60 M2351: Fix delay code with RTC clock source
Explicitly configure RTC clock source to LXT
2020-02-13 11:24:02 +08:00
Chun-Chieh Li 28495bb075 M2351: Refine gpio_irq_set(...) with inconsistent GPIO_EnableInt(...) implementations
No logic change
2020-02-13 11:24:02 +08:00
Chun-Chieh Li 582c08c129 M2351: Refine code layout of PeripheralPins.c
No logic change
2020-02-13 11:24:01 +08:00
Chun-Chieh Li 4a1d612e90 Nuvoton: Fix delay code with RTC clock source
Explicitly configure RTC clock source to LXT

Update targets:

-   NUMAKER_PFM_NANO130
-   NUMAKER_PFM_NUC472
-   NUMAKER_PFM_M453
-   NUMAKER_PFM_M487/NUMAKER_IOT_M487
-   NUMAKER_M252KG
-   NUMAKER_IOT_M263A
2020-02-13 11:24:01 +08:00
Chun-Chieh Li 86fcae5b03 Nuvoton: Fix GPIO rising/falling edge interrupts cannot exist simultaneously
This is to pass mbed_hal_fpga_ci_test_shield-gpio_irq test.

Update targets:

-   NUMAKER_PFM_NANO130
-   NUMAKER_PFM_NUC472
-   NUMAKER_PFM_M453
-   NUMAKER_PFM_M487/NUMAKER_IOT_M487
-   NUMAKER_M252KG
-   NUMAKER_IOT_M263A
2020-02-13 11:24:01 +08:00
Martin Kojtal 8e522056a0
Merge pull request #12404 from OpenNuvoton/nuvoton_m2351_bsp
M2351: Update BSP and bugfix
2020-02-11 15:43:10 +00:00
Chun-Chieh Li 3d9c7b2519 M2351: Update PSA secure image/lib with BSP update 2020-02-10 18:37:30 +08:00
Chun-Chieh Li ee8236b22e M2351: Update non-PSA secure image/lib with BSP update 2020-02-10 17:50:15 +08:00
Chun-Chieh Li 6f793fbb5a M2351: Fix GPIO rising/falling edge interrupts cannot exist simultaneously 2020-02-10 17:44:55 +08:00
Chun-Chieh Li a2c9ae6b7d M2351: Update BSP and bugfix
Align with mainline BSP and fix relevant bugs:

1.  Align with SPI module naming
    (1) Remove SPI5
    (2) Degrade QSPI0 to SPI4 so that it can use for standard SPI
2.  Fix some code lacking GPIO H
3.  Implement __PC(...) by following BSP instead of with MBED_CALLER_ADDR()
4.  Add SCU_IRQHandler(). Change printf(...) with interrupt-safe error(...)
5.  Other minor alignment change
2020-02-10 16:23:32 +08:00
Chun-Chieh Li 82770d7e2b M2351: Refine PeripheralNames.h
No logic change and bugfix
2020-02-10 09:07:13 +08:00
Przemyslaw Stekiel a4e1354769 Remove pinmap_restricted_peripherals() function from Nuvoton (STDIO uart is restricted by default) 2020-02-07 10:45:02 +01:00
Martin Kojtal 32675cc6ac
Merge pull request #11874 from fkjagodzinski/armc6_build-enable_lto_for_release
ARMC6: Add a build profile extension with the link-time optimizer enabled
2020-02-05 14:42:16 +00:00
Chun-Chieh Li 9faa236dfc M2351: Refactor startup file
1.  Re-organize to make clear for all targets/toolchains support in single startup file
2.  Inline assembly syntax is limited, esp. on IAR. Try paving the way for accessing external symbols still in inline assembly instead of re-write in assembly.
2020-02-05 10:14:26 +08:00
Maciej Bocianski e3b8514a91 NUMAKER_IOT_M487: keep __vector_handlers symbols in LTO builds
Add a "used" attribute to __vector_handlers to fix ARMC6 build with
the "-flto" flag.
(Error: L6236E: No section matches selector - no section to be FIRST/LAST. )

This attribute, attached to a function/variable, means that code must be emitted
for the function even if it appears that the function is not referenced.
2020-02-04 12:38:37 +01:00
Maciej Bocianski 6d896f032f NU_PFM_M2351_NPSA: keep __vector_handlers symbol in LTO builds
Add a "used" attribute to __vector_handlers to fix ARMC6 build with
the "-flto" flag.
(Error: L6236E: No section matches selector - no section to be FIRST/LAST.)

This attribute, attached to a function/variable, means that code must be emitted
for the function even if it appears that the function is not referenced.
2020-02-04 12:38:26 +01:00
Maciej Bocianski 50c3b100a8 NUMAKER_PFM_NUC472: keep __vector_handlers symbol in LTO builds
Add a "used" attribute to __vector_handlers to fix ARMC6 build with
the "-flto" flag.
(Error: L6236E: No section matches selector - no section to be FIRST/LAST.)

This attribute, attached to a function/variable, means that code must be emitted
for the function even if it appears that the function is not referenced.
2020-02-04 12:30:00 +01:00
Maciej Bocianski ad7f27bf77 NUMAKER_PFM_NANO130: keep __vector_handlers symbol in LTO builds
Add a "used" attribute to __vector_handlers to fix ARMC6 build with
the "-flto" flag.
(Error: L6236E: No section matches selector - no section to be FIRST/LAST.)

This attribute, attached to a function/variable, means that code must be emitted
for the function even if it appears that the function is not referenced.
2020-02-04 12:29:59 +01:00
Maciej Bocianski ddd2cf8920 NUMAKER_PFM_M453: keep __vector_handlers symbol in LTO builds
Add a "used" attribute to __vector_handlers to fix ARMC6 build with
the "-flto" flag.
(Error: L6236E: No section matches selector - no section to be FIRST/LAST.)

This attribute, attached to a function/variable, means that code must be emitted
for the function even if it appears that the function is not referenced.
2020-02-04 12:29:59 +01:00
Maciej Bocianski f0dc4abb3f NUMAKER_M252KG: keep __vector_handlers symbol in LTO builds
Add a "used" attribute to __vector_handlers to fix ARMC6 build with
the "-flto" flag.
(Error: L6236E: No section matches selector - no section to be FIRST/LAST. )

This attribute, attached to a function/variable, means that code must be emitted
for the function even if it appears that the function is not referenced.
2020-02-04 12:29:58 +01:00
Maciej Bocianski 9aade4a816 NUMAKER_IOT_M263A: keep __vector_handlers symbol in LTO builds
Add a "used" attribute to __vector_handlers to fix ARMC6 build with
the "-flto" flag.
(Error: L6236E: No section matches selector - no section to be FIRST/LAST. )

This attribute, attached to a function/variable, means that code must be emitted
for the function even if it appears that the function is not referenced.
2020-02-04 12:29:57 +01:00
Filip Jagodzinski 28b1169b7e NUVOTON: Fix undefined reference to Reset_Handler_Cascade
Add a "used" attribute to Reset_Handler_Cascade to fix GCC build with
the "-flto" flag.
This attribute, attached to a function, means that code must be emitted
for the function even if it appears that the function is not referenced.
2020-02-04 12:29:51 +01:00
Chun-Chieh Li 94762d02a1 M2351: Support IAR
1.  Enable IAR on non-secure targets
2.  Disable IAR on secure targets because:
    (1) IAR toolchain bug: As of IAR 8.32, cmse_nonsecure_caller() is not always inlined.
    (2) TFM hasn't supported IAR yet.
2020-01-30 13:12:31 +08:00
Chun-Chieh Li 359d41adef M2351: Remove LPTICKER to spare memory for non-PSA minimal secure build 2020-01-16 09:58:32 +08:00