Skip to content

Commit 0c49e9e

Browse files
committed
fix(core): increase stack size on F4 models
[no changelog]
1 parent ad421a7 commit 0c49e9e

7 files changed

Lines changed: 19 additions & 19 deletions

File tree

core/embed/models/D001/memory.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787

8888
// RAM layout - kernel
8989
#define K_MAIN_STACK_START 0x10000000
90-
#define K_MAIN_STACK_SIZE (8 * 1024)
90+
#define K_MAIN_STACK_SIZE (10 * 1024)
9191

9292
#define K_FB1_RAM_START 0x1000C000
9393
#define K_FB1_RAM_SIZE (0)
@@ -105,8 +105,8 @@
105105
#define AUX1_RAM_START (0x20000400)
106106
#define AUX1_RAM_SIZE (191 * 1024)
107107

108-
#define AUX2_RAM_START 0x10002000
109-
#define AUX2_RAM_SIZE (40 * 1024)
108+
#define AUX2_RAM_START 0x10002800
109+
#define AUX2_RAM_SIZE (38 * 1024)
110110

111111
// misc
112112
#define CODE_ALIGNMENT 0x200

core/embed/models/D001/memory.ld

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ S_FB1_RAM_SIZE = 0x0;
4848
S_MAIN_RAM_START = 0x10004000;
4949
S_MAIN_RAM_SIZE = 0xbf00;
5050
K_MAIN_STACK_START = 0x10000000;
51-
K_MAIN_STACK_SIZE = 0x2000;
51+
K_MAIN_STACK_SIZE = 0x2800;
5252
K_FB1_RAM_START = 0x1000c000;
5353
K_FB1_RAM_SIZE = 0x0;
5454
K_MAIN_RAM_START = 0x1000c000;
@@ -59,7 +59,7 @@ DMABUF_RAM_START = 0x20000000;
5959
DMABUF_RAM_SIZE = 0x400;
6060
AUX1_RAM_START = 0x20000400;
6161
AUX1_RAM_SIZE = 0x2fc00;
62-
AUX2_RAM_START = 0x10002000;
63-
AUX2_RAM_SIZE = 0xa000;
62+
AUX2_RAM_START = 0x10002800;
63+
AUX2_RAM_SIZE = 0x9800;
6464
CODE_ALIGNMENT = 0x200;
6565
COREAPP_ALIGNMENT = 0x200;

core/embed/models/T2B1/memory.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393

9494
// RAM layout - kernel
9595
#define K_MAIN_STACK_START 0x10000000
96-
#define K_MAIN_STACK_SIZE (8 * 1024)
96+
#define K_MAIN_STACK_SIZE (10 * 1024)
9797

9898
#define K_FB1_RAM_START 0x1000A000
9999
#define K_FB1_RAM_SIZE (8 * 1024)
@@ -111,8 +111,8 @@
111111
#define AUX1_RAM_START (0x20000400)
112112
#define AUX1_RAM_SIZE (191 * 1024)
113113

114-
#define AUX2_RAM_START 0x10002000
115-
#define AUX2_RAM_SIZE (32 * 1024)
114+
#define AUX2_RAM_START 0x10002800
115+
#define AUX2_RAM_SIZE (30 * 1024)
116116

117117
// misc
118118
#define CODE_ALIGNMENT 0x200

core/embed/models/T2B1/memory.ld

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ S_FB1_RAM_SIZE = 0x2000;
5353
S_MAIN_RAM_START = 0x10006000;
5454
S_MAIN_RAM_SIZE = 0x9f00;
5555
K_MAIN_STACK_START = 0x10000000;
56-
K_MAIN_STACK_SIZE = 0x2000;
56+
K_MAIN_STACK_SIZE = 0x2800;
5757
K_FB1_RAM_START = 0x1000a000;
5858
K_FB1_RAM_SIZE = 0x2000;
5959
K_MAIN_RAM_START = 0x1000c000;
@@ -64,7 +64,7 @@ DMABUF_RAM_START = 0x20000000;
6464
DMABUF_RAM_SIZE = 0x400;
6565
AUX1_RAM_START = 0x20000400;
6666
AUX1_RAM_SIZE = 0x2fc00;
67-
AUX2_RAM_START = 0x10002000;
68-
AUX2_RAM_SIZE = 0x8000;
67+
AUX2_RAM_START = 0x10002800;
68+
AUX2_RAM_SIZE = 0x7800;
6969
CODE_ALIGNMENT = 0x200;
7070
COREAPP_ALIGNMENT = 0x200;

core/embed/models/T2T1/memory.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888

8989
// RAM layout - kernel
9090
#define K_MAIN_STACK_START 0x10000000
91-
#define K_MAIN_STACK_SIZE (8 * 1024)
91+
#define K_MAIN_STACK_SIZE (10 * 1024)
9292

9393
#define K_FB1_RAM_START 0x1000C000
9494
#define K_FB1_RAM_SIZE (0)
@@ -106,8 +106,8 @@
106106
#define AUX1_RAM_START (0x20000400)
107107
#define AUX1_RAM_SIZE (191 * 1024)
108108

109-
#define AUX2_RAM_START 0x10002000
110-
#define AUX2_RAM_SIZE (40 * 1024)
109+
#define AUX2_RAM_START 0x10002800
110+
#define AUX2_RAM_SIZE (38 * 1024)
111111

112112
// misc
113113
#define CODE_ALIGNMENT 0x200

core/embed/models/T2T1/memory.ld

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ S_FB1_RAM_SIZE = 0x0;
4949
S_MAIN_RAM_START = 0x10004000;
5050
S_MAIN_RAM_SIZE = 0xbf00;
5151
K_MAIN_STACK_START = 0x10000000;
52-
K_MAIN_STACK_SIZE = 0x2000;
52+
K_MAIN_STACK_SIZE = 0x2800;
5353
K_FB1_RAM_START = 0x1000c000;
5454
K_FB1_RAM_SIZE = 0x0;
5555
K_MAIN_RAM_START = 0x1000c000;
@@ -60,7 +60,7 @@ DMABUF_RAM_START = 0x20000000;
6060
DMABUF_RAM_SIZE = 0x400;
6161
AUX1_RAM_START = 0x20000400;
6262
AUX1_RAM_SIZE = 0x2fc00;
63-
AUX2_RAM_START = 0x10002000;
64-
AUX2_RAM_SIZE = 0xa000;
63+
AUX2_RAM_START = 0x10002800;
64+
AUX2_RAM_SIZE = 0x9800;
6565
CODE_ALIGNMENT = 0x200;
6666
COREAPP_ALIGNMENT = 0x200;

core/embed/sys/linker/stm32f4/kernel.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ SECTIONS {
4444
} >FLASH AT>FLASH
4545

4646
.stack : ALIGN(8) {
47-
. += 8K; /* Exactly 8k allocated for stack. Overflow causes MemManage fault (when using MPU). */
47+
. += 10K; /* Exactly 10k allocated for stack. Overflow causes MemManage fault (when using MPU). */
4848
} >MAIN_STACK
4949

5050
.data : ALIGN(4) {

0 commit comments

Comments
 (0)