Skip to content

Commit 9433b4b

Browse files
authored
Merge pull request #1923 from bridadan/tools_integration_rebase
Tools integration rebase
2 parents 3a0d561 + 9a06a75 commit 9433b4b

File tree

107 files changed

+925
-1410
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+925
-1410
lines changed

hal/targets/cmsis/TARGET_ARM_SSG/TARGET_BEETLE/TOOLCHAIN_ARM_STD/startup_BEETLE.s

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,7 @@
2626
;*/
2727

2828

29-
; <h> Stack Configuration
30-
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
31-
; </h>
32-
33-
Stack_Size EQU 0x00000400
34-
35-
AREA STACK, NOINIT, READWRITE, ALIGN=3
36-
Stack_Mem SPACE Stack_Size
37-
__initial_sp
38-
39-
40-
; <h> Heap Configuration
41-
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
42-
; </h>
43-
44-
Heap_Size EQU 0x00000C00
45-
46-
AREA HEAP, NOINIT, READWRITE, ALIGN=3
47-
__heap_base
48-
Heap_Mem SPACE Heap_Size
49-
__heap_limit
50-
29+
__initial_sp EQU 0x20020000 ; Top of RAM
5130

5231
PRESERVE8
5332
THUMB
@@ -286,31 +265,4 @@ TRNG_Handler
286265

287266
ALIGN
288267

289-
290-
; User Initial Stack & Heap
291-
292-
IF :DEF:__MICROLIB
293-
294-
EXPORT __initial_sp
295-
EXPORT __heap_base
296-
EXPORT __heap_limit
297-
298-
ELSE
299-
300-
IMPORT __use_two_region_memory
301-
EXPORT __user_initial_stackheap
302-
303-
__user_initial_stackheap PROC
304-
LDR R0, = Heap_Mem
305-
LDR R1, =(Stack_Mem + Stack_Size)
306-
LDR R2, = (Heap_Mem + Heap_Size)
307-
LDR R3, = Stack_Mem
308-
BX LR
309-
ENDP
310-
311-
ALIGN
312-
313-
ENDIF
314-
315-
316268
END
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* PackageLicenseDeclared: Apache-2.0
3+
* Copyright (c) 2015 ARM Limited
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
#ifdef __cplusplus
19+
extern "C" {
20+
#endif
21+
22+
#include <rt_misc.h>
23+
#include <stdint.h>
24+
25+
/* Get RW_IRAM1 from scatter definition */
26+
extern char Image$$RW_IRAM1$$ZI$$Limit[];
27+
28+
extern __value_in_regs struct __initial_stackheap __user_setup_stackheap(uint32_t R0, uint32_t R1, uint32_t R2, uint32_t R3) {
29+
uint32_t beetle_zi_limit = (uint32_t)Image$$RW_IRAM1$$ZI$$Limit;
30+
uint32_t beetle_sp_limit = __current_sp();
31+
32+
/* beetle_zi_limit has to be 8-byte aligned */
33+
beetle_zi_limit = (beetle_zi_limit + 7) & ~0x7;
34+
35+
struct __initial_stackheap r;
36+
r.heap_base = beetle_zi_limit;
37+
r.heap_limit = beetle_sp_limit;
38+
return r;
39+
}
40+
41+
#ifdef __cplusplus
42+
}
43+
#endif

hal/targets/cmsis/TARGET_ARM_SSG/TARGET_BEETLE/systick_timer.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static uint32_t clock;
3030
#define SYSTICK_MAX_RELOAD 0xFFFFFFFF
3131
#define SYSTICK_DIVIDER_US (SystemCoreClock/1000000)
3232

33-
void SysTick_Handler(void)
33+
void SysTick_IRQ_Handler(void)
3434
{
3535
MyTicks++;
3636
#if 0
@@ -60,6 +60,10 @@ void SysTick_Initialize(void)
6060
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk
6161
| SysTick_CTRL_ENABLE_Msk
6262
| SysTick_CTRL_TICKINT_Msk;
63+
64+
/* Register the Interrupt */
65+
NVIC_SetVector(SysTick_IRQn, (uint32_t)SysTick_IRQ_Handler);
66+
NVIC_EnableIRQ(SysTick_IRQn);
6367
}
6468

6569
/*
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@
4242
AREA STACK, NOINIT, READWRITE, ALIGN=3
4343
EXPORT __initial_sp
4444

45-
__initial_sp EQU 0x10008000 ; Top of RAM, L4-ECC-SRAM2 retained in standby
45+
__initial_sp EQU 0x20018000 ; Top of RAM, L4-ECC-SRAM2 retained in standby
4646

4747
; <h> Heap Configuration
4848
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
4949
; </h>
5050

51-
Heap_Size EQU 0x18000 ; 96KB
51+
Heap_Size EQU 0x17800 ; 94KB (96KB, -2*1KB for main thread and scheduler)
5252

5353
AREA HEAP, NOINIT, READWRITE, ALIGN=3
5454
EXPORT __heap_base

hal/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/TOOLCHAIN_ARM_MICRO/stm32l476xx.sct

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,11 @@ LR_IROM1 0x08000000 0x100000 { ; load region size_region
3636
.ANY (+RO)
3737
}
3838

39-
; Total: 98 vectors = 392 bytes (0x188) to be reserved in RAM
40-
RW_IRAM1 (0x10000000+0x188) (0x08000-0x188) { ; RW data 32k L4-ECC-SRAM2 retained in standby
39+
RW_IRAM1 0x20000000 0x00018000 { ; RW data 96k L4-SRAM1
4140
.ANY (+RW +ZI)
4241
}
43-
44-
RW_IRAM2 0x20000000 0x00018000 { ; RW data 96k L4-SRAM1
42+
; Total: 98 vectors = 392 bytes (0x188) to be reserved in RAM
43+
RW_IRAM2 (0x10000000+0x188) (0x08000-0x188) { ; RW data 32k L4-ECC-SRAM2 retained in standby
4544
.ANY (+RW +ZI)
4645
}
4746

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ __initial_sp EQU 0x20018000 ; Top of RAM, L4-ECC-SRAM2 retained in standb
4848
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
4949
; </h>
5050

51-
Heap_Size EQU 0x18000 ; 96KB
51+
Heap_Size EQU 0x17800 ; 94KB (96KB, -2*1KB for main thread and scheduler)
5252

5353
AREA HEAP, NOINIT, READWRITE, ALIGN=3
5454
EXPORT __heap_base

0 commit comments

Comments
 (0)