Skip to content

Commit 90d7e62

Browse files
committed
Support bare-metal build for NXP LPC1114
1 parent 92cdcfb commit 90d7e62

File tree

8 files changed

+27
-13
lines changed

8 files changed

+27
-13
lines changed

features/storage/TESTS/blockdevice/heap_block_device/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
using namespace utest::v1;
2525

2626
// TODO HACK, replace with available ram/heap property
27-
#if defined(TARGET_MTB_MTS_XDOT)
27+
#if defined(TARGET_MTB_MTS_XDOT) || defined(TARGET_LPC1114)
2828
#error [NOT_SUPPORTED] Insufficient heap for heap block device tests
2929
#else
3030

features/storage/TESTS/blockdevice/mbr_block_device/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
using namespace utest::v1;
2626

2727
// TODO HACK, replace with available ram/heap property
28-
#if defined(TARGET_MTB_MTS_XDOT)
28+
#if defined(TARGET_MTB_MTS_XDOT) || defined(TARGET_LPC1114)
2929
#error [NOT_SUPPORTED] Insufficient heap for heap block device tests
3030
#else
3131

features/storage/TESTS/blockdevice/util_block_device/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
using namespace utest::v1;
2828

2929
// TODO HACK, replace with available ram/heap property
30-
#if defined(TARGET_MTB_MTS_XDOT)
30+
#if defined(TARGET_MTB_MTS_XDOT) || defined(TARGET_LPC1114)
3131
#error [NOT_SUPPORTED] Insufficient heap for heap block device tests
3232
#else
3333

targets/TARGET_NXP/TARGET_LPC11XX_11CXX/device/TOOLCHAIN_ARM_STD/TARGET_LPC11XX/LPC1114.sct

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@ LR_IROM1 0x00000000 0x8000 { ; load region size_region (32k)
2020
ARM_LIB_STACK (0x100000C0+0xF40) EMPTY -Stack_Size { ; stack
2121
}
2222
}
23-

targets/TARGET_NXP/TARGET_LPC11XX_11CXX/device/TOOLCHAIN_GCC_ARM/TARGET_LPC11XX/LPC1114.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,4 @@ SECTIONS
153153

154154
/* Check if data + heap + stack exceeds RAM limit */
155155
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
156-
}
156+
}

targets/TARGET_NXP/TARGET_LPC11XX_11CXX/device/TOOLCHAIN_GCC_ARM/startup_LPC11xx.S

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,4 +213,3 @@ Reset_Handler:
213213
def_irq_default_handler DEF_IRQHandler
214214

215215
.end
216-

targets/TARGET_NXP/TARGET_LPC11XX_11CXX/device/cmsis_nvic.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) {
6060
static volatile uint32_t* vectors = (uint32_t*)NVIC_RAM_VECTOR_ADDRESS;
6161

6262
// Copy and switch to dynamic vectors if first time called
63-
if((LPC_SYSCON->SYSMEMREMAP & 0x3) != 0x1) {
64-
uint32_t *old_vectors = (uint32_t *)0; // FLASH vectors are at 0x0
63+
if((LPC_SYSCON->SYSMEMREMAP & 0x3) != 0x1) {
64+
// Add volatile qualifier to avoid armclang aggressive optimization
65+
volatile uint32_t *old_vectors = (uint32_t *)0; // FLASH vectors are at 0x0
6566
for(i = 0; i < NVIC_NUM_VECTORS; i++) {
6667
vectors[i] = old_vectors[i];
6768
}

targets/targets.json

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@
305305
"LPCTarget"
306306
],
307307
"core": "Cortex-M0",
308-
"default_toolchain": "uARM",
308+
"default_toolchain": "ARM",
309309
"extra_labels": [
310310
"NXP",
311311
"LPC11XX_11CXX",
@@ -317,7 +317,6 @@
317317
],
318318
"supported_toolchains": [
319319
"ARM",
320-
"uARM",
321320
"GCC_ARM",
322321
"IAR"
323322
],
@@ -334,11 +333,27 @@
334333
"SLEEP",
335334
"SPI",
336335
"SPISLAVE",
337-
"STDIO_MESSAGES"
336+
"STDIO_MESSAGES",
337+
"USTICKER"
338338
],
339-
"default_lib": "small",
339+
"overrides": {
340+
"tickless-from-us-ticker": true,
341+
"boot-stack-size": "0x300"
342+
},
343+
"supported_c_libs": {
344+
"arm": [
345+
"std", "small"
346+
],
347+
"gcc_arm": [
348+
"std", "small"
349+
],
350+
"iar": [
351+
"std"
352+
]
353+
},
354+
"c_lib": "small",
340355
"release_versions": [
341-
"2"
356+
"2", "5"
342357
],
343358
"device_name": "LPC1114FN28/102",
344359
"detect_code": [

0 commit comments

Comments
 (0)