Skip to content

Support Nuvoton's NUMAKER_PFM_M2351 target #7302

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

Merged
merged 91 commits into from
Jul 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
205f8db
[M2351] Add one new target M2351, regard as M0+ with some V8M CPU con…
cyliangtw Jun 30, 2017
dcdd9fb
[M2351] Sync SDH_CardDetection type to avoid GCC compiler error
cyliangtw Jul 4, 2017
1f27546
[M2351] Support GCC & IAR toolchain
cyliangtw Jul 4, 2017
c5494eb
[M2351] Support __vector_table instead of __vector_handlers in IAR
cyliangtw Jul 4, 2017
06910bd
[M2351] remove progen, not used any more
cyliangtw Jul 5, 2017
368f8ee
[M2351] Remove mbed_sdk_init_forced
cyliangtw Jul 12, 2017
98c8427
[M2351] Add partition header file for CMSE feature
cyliangtw Aug 10, 2017
6b85478
[M2351] Modify Nuvoton common files to avoid conflicting with master
cyliangtw Aug 15, 2017
e67ed3f
[M2351] Revise nu_bitutil.h for M23
cyliangtw Aug 18, 2017
ffcc438
[M2351] Use Cortex M23 specific header files and interrupts
Aug 11, 2017
11792f6
[M2351] Added xx_ticker_fire_interrupt function for M2351 device
Aug 17, 2017
d46220c
[M2351] Set SAU Region present flag for M2351 device and include secu…
Sep 11, 2017
1117e84
[M2351] Removed device name, till device patch is added to IAR/Keil
Sep 12, 2017
f7ea847
[M2351] ARMC6 compiler related changes
Sep 14, 2017
a2aac52
[M2351] Update GCC linker for NSC Veneer
cyliangtw Sep 15, 2017
f06644a
[M2351] Linker files support both of secure & non-secure domain
cyliangtw Sep 19, 2017
ba9e5fd
[M2351] IAR linker file support both of secure & non-secure domain
cyliangtw Sep 19, 2017
18ca9b5
[M2351] Fix GCC linker file 'cannot move location counter backwards' …
cyliangtw Sep 20, 2017
2f01120
[M2351] Corrected preprocess define usage in toolchain specific linke…
Sep 27, 2017
5985dcd
[M2351] Support secure loader invoke non-secure Mbed OS
cyliangtw Sep 27, 2017
46f948a
[M2351] Link register base with partition file & correct heap size in…
cyliangtw Sep 29, 2017
eebc6e3
[M2351] Corrected Vector table address in scatter file
Sep 29, 2017
aec7c54
[M2351] Add non-secure reset handler address
Oct 10, 2017
94d95d3
[M2351] Support TrustZone in port_read/port_write
Oct 17, 2017
90fcc04
[M2351] Migrate for MP chip version, build sucessfully
cyliangtw Jan 23, 2018
331945f
[M2351] Remove redundant GetPC
cyliangtw Jan 24, 2018
6163628
[M2351] Sync IRQ arrangement to fulfill MP version
cyliangtw Jan 24, 2018
12a7830
[M2351] Resolve reset halt issue in MP chip A version
cyliangtw Jan 24, 2018
d99fbcb
[M2351] Set 48KB SRAM and UART0 as non-secure
cyliangtw Jan 25, 2018
ef7f048
[M2351] Set secure SRAM size as 24KB in SAU & SCU
cyliangtw Jan 25, 2018
2b44eea
[M2351] Add gpio_is_connected
cyliangtw Feb 7, 2018
21de229
[M2351] Disabled fault handler support
Feb 16, 2018
0c3f0f7
[M2351] To fulfill _rtc_localtime one more argument
cyliangtw Feb 22, 2018
a384693
[M2351] Fix target configuration
ccli8 Mar 14, 2018
2da6bf6
[M2351] Fix STDIO UART
ccli8 Feb 14, 2018
77e45d4
[M2351] Configure most modules to non-secure
ccli8 Mar 14, 2018
d84a90e
[M2351] Unify secure/non-secure peripheral base based on partition file
ccli8 Feb 9, 2018
135f127
[M2351] Add secure BSP driver function
ccli8 Mar 2, 2018
0cb7633
[M2351] Fix HCLK clock source
ccli8 Mar 5, 2018
2aa2b7e
[M2351] Fix SystemCoreClockUpdate isn't called in non-secure domain
ccli8 Feb 27, 2018
f16b971
[M2351] Fix GPIO to be TrustZone-aware
ccli8 Feb 26, 2018
6bfc90d
[M2351] Rework RTC
ccli8 Feb 9, 2018
236bf65
[M2351] Remove peripheral sleep management from hal_sleep/hal_deepsleep
ccli8 Feb 26, 2018
999dd33
[M2351] Rework us_ticker and lp_ticker
cyliangtw Jan 25, 2018
ebf53b9
[M2351] Support PDMA
ccli8 Feb 2, 2018
dcfe1d4
[M2351] Refine UART code
ccli8 Mar 8, 2018
3ca24b6
[M2351] Support SPI
ccli8 Feb 2, 2018
649389a
[M2351] Support I2C
ccli8 Mar 9, 2018
06cb070
[M2351] Trim HIRC48 to 48M against LXT
ccli8 Mar 19, 2018
fa0124e
[M2351] Add missing delay in lp_ticker
ccli8 Mar 16, 2018
711cb64
[M2351] Support flash IAP
ccli8 Feb 12, 2018
805049d
[M2351] Fix page size in flash IAP
ccli8 Mar 22, 2018
42aa7fe
[M2351] Upgrade partition format
ccli8 Mar 28, 2018
ca63aba
[M2351] Change NSC location
ccli8 Mar 28, 2018
dd7fd76
[M2351] Centralize size configuration for secure flash, secure SRAM, …
ccli8 Mar 28, 2018
1da430f
[M2351] Support TRNG
ccli8 Apr 2, 2018
d05ef69
[M2351] Support analog-in
ccli8 Mar 6, 2018
13e1209
[M2351] Support PWM out
ccli8 Mar 6, 2018
d3c6478
[M2351] Add GPIO debounce configuration in targets.json
ccli8 Apr 2, 2018
2854b57
[M2351] Remove dead code with '#if 0' in SPI
ccli8 Apr 10, 2018
8f1623f
[M2351] Add consistency check for CRYPTO/CRPT's secure attribute and …
ccli8 Apr 10, 2018
8f2c717
[M2351] Fix part number in IAR export
ccli8 Apr 16, 2018
767e74b
[M2351] Support TrustZone and bootloader for IAR
ccli8 Apr 16, 2018
89d3222
[M2351] Replace __attribute__((cmse_nonsecure_entry)) with compiler a…
ccli8 Apr 13, 2018
1b9fa07
[M2351] Default MBED_TZ_DEFAULT_ACCESS to 1 to control secure SYS/CLK…
ccli8 Apr 24, 2018
9906655
[M2351] Add SD pinmap
ccli8 Apr 27, 2018
de83cb2
[M2351] Add secure gateway functions SYS_LockReg_S/SYS_UnlockReg_S
ccli8 Apr 27, 2018
9cbc8b2
[M2351] Meet new us_ticker HAL spec (Mbed OS 5.9)
ccli8 May 28, 2018
6729b65
[M2351] Meet new lp_ticker HAL spec (Mbed OS 5.9)
ccli8 May 28, 2018
04f7237
[M2351] Meet new RTC HAL spec (Mbed OS 5.9)
ccli8 May 28, 2018
c3c661d
[M2351] Change secure/non-secure stack/heap size
ccli8 May 3, 2018
93ee13a
[M2351] Change secure flash/SRAM to 256KB/32KB as default
ccli8 Jun 8, 2018
c725f18
[M2351] Change pinout to meet NuMaker-PFM-M2351 V1.1
ccli8 Jun 19, 2018
c382e96
[M2351] Upgrade chip version to B from A
ccli8 Jun 19, 2018
43b98cf
Fix Greentea test code with Cortex-M23/M33
ccli8 Mar 5, 2018
0b00d0c
Allow non-secure main thread to call secure functions
ccli8 May 22, 2018
124b4ad
[M2351] Remove NUMAKER_PFM_M2351_S/_NS targets
ccli8 Jun 29, 2018
688029a
[M2351] Remove special handling for dummy interrupt in lp_ticker
ccli8 Jul 2, 2018
d350f45
[M2351] Synchronize lp_ticker code to us_ticker
ccli8 Jul 2, 2018
31bf7bf
[M2351] Fix include file name error on case-sensitive system
ccli8 Jul 3, 2018
4400765
Add `Mxx_NS` core-based labels
theotherjimmy Jul 3, 2018
778aa1e
[M2351] Place default secure binary/library
ccli8 Jul 9, 2018
6bf8e19
[M2351] Support configurable for partitioning flash/SRAM
ccli8 Jun 8, 2018
51276a6
Update compiler check to allow only v6 for OS 5
theotherjimmy Jul 11, 2018
e61c514
[M2351] Fix binary-compatible across compilers in secure functions
ccli8 Jul 12, 2018
1dbdcb2
[M2351] Remove M2351KIAAEES from iar_definitions.json
ccli8 Jul 13, 2018
2bbe043
[M2351] Adding missing ENDP for ARM
Jul 13, 2018
455f1fd
[M2351] Support only ARMC6 toolchain
Jul 13, 2018
9968b54
Allow ARMC6 only mbed 5 releases
theotherjimmy Jul 16, 2018
9899862
Correct uvision exporter support check
theotherjimmy Jul 16, 2018
a242799
Disable make_armc6 on v8m
theotherjimmy Jul 17, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions TESTS/mbedmicro-rtos-mbed/basic/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@

using utest::v1::Case;

#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
#define TEST_STACK_SIZE 512
#else
#define TEST_STACK_SIZE 256
#endif
#define ONE_MILLI_SEC 1000

volatile uint32_t elapsed_time_ms = 0;
Expand Down
4 changes: 4 additions & 0 deletions TESTS/mbedmicro-rtos-mbed/event_flags/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ using utest::v1::Case;
#error [NOT_SUPPORTED] test not supported
#endif

#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
#define THREAD_STACK_SIZE 512
#else
#define THREAD_STACK_SIZE 320 /* 512B stack on GCC_ARM compiler cause out of memory on some 16kB RAM boards e.g. NUCLEO_F070RB */
#endif

#define MAX_FLAG_POS 30
#define PROHIBITED_FLAG_POS 31
Expand Down
4 changes: 4 additions & 0 deletions TESTS/mbedmicro-rtos-mbed/mail/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@

using namespace utest::v1;

#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
#define THREAD_STACK_SIZE 512
#else
#define THREAD_STACK_SIZE 320 /* larger stack cause out of heap memory on some 16kB RAM boards in multi thread test*/
#endif
#define QUEUE_SIZE 16
#define THREAD_1_ID 1
#define THREAD_2_ID 2
Expand Down
2 changes: 2 additions & 0 deletions TESTS/mbedmicro-rtos-mbed/malloc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ volatile bool thread_should_continue = true;

#if defined(__CORTEX_A9)
#define THREAD_STACK_SIZE 512
#elif defined(__CORTEX_M23) || defined(__CORTEX_M33)
#define THREAD_STACK_SIZE 512
#else
#define THREAD_STACK_SIZE 256
#endif
Expand Down
4 changes: 4 additions & 0 deletions TESTS/mbedmicro-rtos-mbed/mutex/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@

using namespace utest::v1;

#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
#define TEST_STACK_SIZE 768
#else
#define TEST_STACK_SIZE 512
#endif

#define TEST_LONG_DELAY 20
#define TEST_DELAY 10
Expand Down
2 changes: 2 additions & 0 deletions TESTS/mbedmicro-rtos-mbed/threads/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#define THREAD_STACK_SIZE 512
#if defined(__CORTEX_A9)
#define PARALLEL_THREAD_STACK_SIZE 512
#elif defined(__CORTEX_M23) || defined(__CORTEX_M33)
#define PARALLEL_THREAD_STACK_SIZE 512
#else
#define PARALLEL_THREAD_STACK_SIZE 384
#endif
Expand Down
6 changes: 5 additions & 1 deletion features/nvstore/TESTS/nvstore/functionality/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,13 @@ static const int thr_test_num_secs = 5;
static const int thr_test_max_data_size = 32;
static const int thr_test_num_threads = 3;

#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
static const int thr_test_min_stack_size = 1280;
static const int thr_test_max_stack_size = 1280;
#else
static const int thr_test_min_stack_size = 768;
static const int thr_test_max_stack_size = 1024;

#endif

typedef struct {
uint8_t *buffs[max_test_keys][thr_test_num_buffs];
Expand Down
6 changes: 6 additions & 0 deletions rtos/TARGET_CORTEX/mbed_boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,12 @@ void mbed_start_main(void)
_main_thread_attr.cb_mem = &_main_obj;
_main_thread_attr.priority = osPriorityNormal;
_main_thread_attr.name = "main_thread";

/* Allow non-secure main thread to call secure functions */
#if defined(DOMAIN_NS) && (DOMAIN_NS == 1U)
_main_thread_attr.tz_module = 1U;
#endif

osThreadId_t result = osThreadNew((osThreadFunc_t)pre_main, NULL, &_main_thread_attr);
if ((void *)result == NULL) {
MBED_ERROR1(MBED_MAKE_ERROR(MBED_MODULE_PLATFORM, MBED_ERROR_CODE_INITIALIZATION_FAILED), "Pre main thread not created", &_main_thread_attr);
Expand Down
Loading