We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d88ff0 commit f9242d0Copy full SHA for f9242d0
targets/TARGET_NXP/TARGET_LPC11UXX/device/cmsis_nvic.c
@@ -60,7 +60,8 @@ void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) {
60
61
// Copy and switch to dynamic vectors if first time called
62
if((LPC_SYSCON->SYSMEMREMAP & 0x3) != 0x1) {
63
- uint32_t *old_vectors = (uint32_t *)0; // FLASH vectors are at 0x0
+ // Add volatile qualifier to avoid armclang aggressive optimization
64
+ volatile uint32_t *old_vectors = (uint32_t *)0; // FLASH vectors are at 0x0
65
for(i = 0; i < NVIC_NUM_VECTORS; i++) {
66
vectors[i] = old_vectors[i];
67
}
0 commit comments