Merge pull request #12134 from toyowata/lpc11u35_fix

Fix LPC11U35_401 baremetal build
pull/12619/head
Anna Bridge 2019-12-23 11:51:52 +00:00 committed by GitHub
commit bb028babc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 2 deletions

View File

@ -60,7 +60,8 @@ void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) {
// Copy and switch to dynamic vectors if first time called // Copy and switch to dynamic vectors if first time called
if((LPC_SYSCON->SYSMEMREMAP & 0x3) != 0x1) { if((LPC_SYSCON->SYSMEMREMAP & 0x3) != 0x1) {
uint32_t *old_vectors = (uint32_t *)0; // FLASH vectors are at 0x0 // Add volatile qualifier to avoid armclang aggressive optimization
volatile uint32_t *old_vectors = (uint32_t *)0; // FLASH vectors are at 0x0
for(i = 0; i < NVIC_NUM_VECTORS; i++) { for(i = 0; i < NVIC_NUM_VECTORS; i++) {
vectors[i] = old_vectors[i]; vectors[i] = old_vectors[i];
} }

View File

@ -17,6 +17,8 @@
#include "us_ticker_api.h" #include "us_ticker_api.h"
#include "PeripheralNames.h" #include "PeripheralNames.h"
#if DEVICE_USTICKER
#define US_TICKER_TIMER ((LPC_CTxxBx_Type *)LPC_CT32B1_BASE) #define US_TICKER_TIMER ((LPC_CTxxBx_Type *)LPC_CT32B1_BASE)
#define US_TICKER_TIMER_IRQn TIMER_32_1_IRQn #define US_TICKER_TIMER_IRQn TIMER_32_1_IRQn
@ -70,3 +72,5 @@ void us_ticker_free(void)
{ {
} }
#endif // DEVICE_USTICKER

View File

@ -374,8 +374,13 @@
"SERIAL", "SERIAL",
"SLEEP", "SLEEP",
"SPI", "SPI",
"SPISLAVE" "SPISLAVE",
"USTICKER"
], ],
"overrides": {
"tickless-from-us-ticker" : true,
"boot-stack-size" : "0x400"
},
"default_lib": "small", "default_lib": "small",
"release_versions": ["2"], "release_versions": ["2"],
"device_name": "LPC11U35FBD48/401" "device_name": "LPC11U35FBD48/401"