Fix linker script for NVIC vector on RAM
This commit is contained in:
parent
d5e5dbd0aa
commit
4acde45102
@ -9,7 +9,7 @@ MEMORY
|
||||
{
|
||||
/* Infinity blootloader uses 4KB */
|
||||
FLASH (rx) : ORIGIN = 4K, LENGTH = 128K - 4K
|
||||
RAM (rwx) : ORIGIN = 0x1FFFE000, LENGTH = 16K
|
||||
RAM (rwx) : ORIGIN = 0x1FFFE0F8, LENGTH = 16K - 0xF8
|
||||
}
|
||||
|
||||
/* Linker script to place sections and symbol values. Should be used together
|
||||
|
@ -5,25 +5,16 @@
|
||||
#include "PinNames.h"
|
||||
|
||||
|
||||
//DigitalOut led(PTA19);
|
||||
|
||||
int main() {
|
||||
gpio_t led;
|
||||
gpio_init_out(&led, PTA19);
|
||||
while(1) {
|
||||
gpio_write(&led, 1);
|
||||
wait_ms(500);
|
||||
gpio_write(&led, 0);
|
||||
wait_ms(500);
|
||||
uint32_t delay = 0xf;
|
||||
while (delay--) {
|
||||
uint32_t delay2 = 0xffff;
|
||||
while (delay2--) ;
|
||||
}
|
||||
gpio_write(&led, !gpio_read(&led));
|
||||
}
|
||||
/*
|
||||
SIM->SCGC6 |= SIM_SCGC5_PORTA_MASK;
|
||||
PORTA->PCR[19] = PORT_PCR_SRE_MASK | PORT_PCR_DSE_MASK | PORT_PCR_MUX(1);
|
||||
PTA->PDDR |= (1<<19);
|
||||
PTA->PSOR |= (1<<19);
|
||||
while(1) {
|
||||
PTA->PTOR |= (1<<19);
|
||||
wait_ms(500);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
@ -41,5 +41,4 @@ INCLUDE_PATHS += \
|
||||
-I$(MBED_DIR)/libraries/mbed/targets/hal/TARGET_Freescale \
|
||||
-I$(MBED_DIR)/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20D50M
|
||||
|
||||
LINKER_SCRIPT = $(MBED_DIR)/libraries/mbed/targets/cmsis/TARGET_Freescale/TARGET_K20D50M/TOOLCHAIN_GCC_ARM/MK20D5.ld
|
||||
#LINKER_SCRIPT = infinity.ld
|
||||
LINKER_SCRIPT = infinity.ld
|
||||
|
Loading…
Reference in New Issue
Block a user