mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #348 from 0xc0170/dev_k64f_gcc_fix
[K64F] ARM GCC startup fix - watchdog, linker correction and NVIC number of ...pull/351/head
commit
37fa662c3c
|
@ -7,7 +7,7 @@ MEMORY
|
||||||
VECTORS (rx) : ORIGIN = 0x00000000, LENGTH = 0x00000400
|
VECTORS (rx) : ORIGIN = 0x00000000, LENGTH = 0x00000400
|
||||||
FLASH_PROTECTION (rx) : ORIGIN = 0x00000400, LENGTH = 0x00000010
|
FLASH_PROTECTION (rx) : ORIGIN = 0x00000400, LENGTH = 0x00000010
|
||||||
FLASH (rx) : ORIGIN = 0x00000410, LENGTH = 0x00100000 - 0x00000410
|
FLASH (rx) : ORIGIN = 0x00000410, LENGTH = 0x00100000 - 0x00000410
|
||||||
RAM (rwx) : ORIGIN = 0x1FFF0400, LENGTH = 0x00040000 - 0x00000400
|
RAM (rwx) : ORIGIN = 0x1FFF0198, LENGTH = 0x00040000 - 0x00000198
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Linker script to place sections and symbol values. Should be used together
|
/* Linker script to place sections and symbol values. Should be used together
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
#ifdef __STACK_SIZE
|
#ifdef __STACK_SIZE
|
||||||
.equ Stack_Size, __STACK_SIZE
|
.equ Stack_Size, __STACK_SIZE
|
||||||
#else
|
#else
|
||||||
.equ Stack_Size, 0x400
|
.equ Stack_Size, 0xC00
|
||||||
#endif
|
#endif
|
||||||
.globl __StackTop
|
.globl __StackTop
|
||||||
.globl __StackLimit
|
.globl __StackLimit
|
||||||
|
@ -64,7 +64,7 @@ __StackTop:
|
||||||
#ifdef __HEAP_SIZE
|
#ifdef __HEAP_SIZE
|
||||||
.equ Heap_Size, __HEAP_SIZE
|
.equ Heap_Size, __HEAP_SIZE
|
||||||
#else
|
#else
|
||||||
.equ Heap_Size, 0x80
|
.equ Heap_Size, 0x400
|
||||||
#endif
|
#endif
|
||||||
.globl __HeapBase
|
.globl __HeapBase
|
||||||
.globl __HeapLimit
|
.globl __HeapLimit
|
||||||
|
@ -199,6 +199,18 @@ Reset_Handler:
|
||||||
* __data_start__/__data_end__: RAM address range that data should be
|
* __data_start__/__data_end__: RAM address range that data should be
|
||||||
* copied to. Both must be aligned to 4 bytes boundary. */
|
* copied to. Both must be aligned to 4 bytes boundary. */
|
||||||
|
|
||||||
|
disable_watchdog:
|
||||||
|
/* unlock */
|
||||||
|
ldr r1, =0x4005200e
|
||||||
|
ldr r0, =0xc520
|
||||||
|
strh r0, [r1]
|
||||||
|
ldr r0, =0xd928
|
||||||
|
strh r0, [r1]
|
||||||
|
/* disable */
|
||||||
|
ldr r1, =0x40052000
|
||||||
|
ldr r0, =0x01d2
|
||||||
|
strh r0, [r1]
|
||||||
|
|
||||||
ldr r1, =__etext
|
ldr r1, =__etext
|
||||||
ldr r2, =__data_start__
|
ldr r2, =__data_start__
|
||||||
ldr r3, =__data_end__
|
ldr r3, =__data_end__
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#ifndef MBED_CMSIS_NVIC_H
|
#ifndef MBED_CMSIS_NVIC_H
|
||||||
#define MBED_CMSIS_NVIC_H
|
#define MBED_CMSIS_NVIC_H
|
||||||
|
|
||||||
#define NVIC_NUM_VECTORS (16 + 85) // CORE + MCU Peripherals
|
#define NVIC_NUM_VECTORS (16 + 86) // CORE + MCU Peripherals
|
||||||
#define NVIC_USER_IRQ_OFFSET 16
|
#define NVIC_USER_IRQ_OFFSET 16
|
||||||
|
|
||||||
#include "cmsis.h"
|
#include "cmsis.h"
|
||||||
|
|
Loading…
Reference in New Issue