Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit 0a96ca1

Browse files
authored
Merge pull request #2 from BeyondRobotix/1.3
1.3
2 parents af3d23e + a4b25ea commit 0a96ca1

File tree

2 files changed

+192
-2
lines changed

2 files changed

+192
-2
lines changed

ldscript-no-bootloader.ld

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
/*
2+
******************************************************************************
3+
**
4+
** @file : LinkerScript.ld
5+
**
6+
** @author : Auto-generated by STM32CubeIDE
7+
**
8+
** @brief : Linker script for STM32L431CCUx Device from STM32L4 series
9+
** 256KBytes FLASH
10+
** 64KBytes RAM
11+
** 16KBytes RAM2
12+
**
13+
** Set heap size, stack size and stack location according
14+
** to application requirements.
15+
**
16+
** Set memory bank area and size if external memory is used
17+
**
18+
** Target : STMicroelectronics STM32
19+
**
20+
** Distribution: The file is distributed as is, without any warranty
21+
** of any kind.
22+
**
23+
******************************************************************************
24+
** @attention
25+
**
26+
** Copyright (c) 2024 STMicroelectronics.
27+
** All rights reserved.
28+
**
29+
** This software is licensed under terms that can be found in the LICENSE file
30+
** in the root directory of this software component.
31+
** If no LICENSE file comes with this software, it is provided AS-IS.
32+
**
33+
******************************************************************************
34+
*/
35+
36+
/* Entry Point */
37+
ENTRY(Reset_Handler)
38+
39+
/* Highest address of the user mode stack */
40+
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
41+
42+
_Min_Heap_Size = 0x200; /* required amount of heap */
43+
_Min_Stack_Size = 0x400; /* required amount of stack */
44+
45+
/* Memories definition */
46+
MEMORY
47+
{
48+
BOOTCOM (rw) : ORIGIN = 0x20000000, LENGTH = 0x100
49+
RAM (xrw) : ORIGIN = 0x20000100, LENGTH = LD_MAX_DATA_SIZE - 0x100
50+
RAM2 (xrw) : ORIGIN = 0x10000000, LENGTH = 16K
51+
FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
52+
}
53+
54+
/* Sections */
55+
SECTIONS
56+
{
57+
/* The startup code into "FLASH" Rom type memory */
58+
.isr_vector :
59+
{
60+
. = ALIGN(4);
61+
KEEP(*(.isr_vector)) /* Startup code */
62+
. = ALIGN(4);
63+
} >FLASH
64+
65+
/* The program code and other data into "FLASH" Rom type memory */
66+
.text :
67+
{
68+
. = ALIGN(4);
69+
*(.text) /* .text sections (code) */
70+
*(.text*) /* .text* sections (code) */
71+
*(.glue_7) /* glue arm to thumb code */
72+
*(.glue_7t) /* glue thumb to arm code */
73+
*(.eh_frame)
74+
75+
KEEP (*(.init))
76+
KEEP (*(.fini))
77+
78+
. = ALIGN(4);
79+
_etext = .; /* define a global symbols at end of code */
80+
} >FLASH
81+
82+
/* Constant data into "FLASH" Rom type memory */
83+
.rodata :
84+
{
85+
. = ALIGN(4);
86+
*(.rodata) /* .rodata sections (constants, strings, etc.) */
87+
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
88+
. = ALIGN(4);
89+
} >FLASH
90+
91+
.ARM.extab (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
92+
{
93+
. = ALIGN(4);
94+
*(.ARM.extab* .gnu.linkonce.armextab.*)
95+
. = ALIGN(4);
96+
} >FLASH
97+
98+
.ARM (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
99+
{
100+
. = ALIGN(4);
101+
__exidx_start = .;
102+
*(.ARM.exidx*)
103+
__exidx_end = .;
104+
. = ALIGN(4);
105+
} >FLASH
106+
107+
.preinit_array (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
108+
{
109+
. = ALIGN(4);
110+
PROVIDE_HIDDEN (__preinit_array_start = .);
111+
KEEP (*(.preinit_array*))
112+
PROVIDE_HIDDEN (__preinit_array_end = .);
113+
. = ALIGN(4);
114+
} >FLASH
115+
116+
.init_array (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
117+
{
118+
. = ALIGN(4);
119+
PROVIDE_HIDDEN (__init_array_start = .);
120+
KEEP (*(SORT(.init_array.*)))
121+
KEEP (*(.init_array*))
122+
PROVIDE_HIDDEN (__init_array_end = .);
123+
. = ALIGN(4);
124+
} >FLASH
125+
126+
.fini_array (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
127+
{
128+
. = ALIGN(4);
129+
PROVIDE_HIDDEN (__fini_array_start = .);
130+
KEEP (*(SORT(.fini_array.*)))
131+
KEEP (*(.fini_array*))
132+
PROVIDE_HIDDEN (__fini_array_end = .);
133+
. = ALIGN(4);
134+
} >FLASH
135+
136+
/* Used by the startup to initialize data */
137+
_sidata = LOADADDR(.data);
138+
139+
/* Initialized data sections into "RAM" Ram type memory */
140+
.data :
141+
{
142+
. = ALIGN(4);
143+
_sdata = .; /* create a global symbol at data start */
144+
*(.data) /* .data sections */
145+
*(.data*) /* .data* sections */
146+
*(.RamFunc) /* .RamFunc sections */
147+
*(.RamFunc*) /* .RamFunc* sections */
148+
149+
. = ALIGN(4);
150+
_edata = .; /* define a global symbol at data end */
151+
152+
} >RAM AT> FLASH
153+
154+
/* Uninitialized data section into "RAM" Ram type memory */
155+
. = ALIGN(4);
156+
.bss :
157+
{
158+
/* This is used by the startup in order to initialize the .bss section */
159+
_sbss = .; /* define a global symbol at bss start */
160+
__bss_start__ = _sbss;
161+
*(.bss)
162+
*(.bss*)
163+
*(COMMON)
164+
165+
. = ALIGN(4);
166+
_ebss = .; /* define a global symbol at bss end */
167+
__bss_end__ = _ebss;
168+
} >RAM
169+
170+
/* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */
171+
._user_heap_stack :
172+
{
173+
. = ALIGN(8);
174+
PROVIDE ( end = . );
175+
PROVIDE ( _end = . );
176+
. = . + _Min_Heap_Size;
177+
. = . + _Min_Stack_Size;
178+
. = ALIGN(8);
179+
} >RAM
180+
181+
/* Remove information from the compiler libraries */
182+
/DISCARD/ :
183+
{
184+
libc.a ( * )
185+
libm.a ( * )
186+
libgcc.a ( * )
187+
}
188+
189+
.ARM.attributes 0 : { *(.ARM.attributes) }
190+
}

variant_BRMICRONODE.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@
107107

108108
// I2C definitions
109109
#ifndef PIN_WIRE_SDA
110-
#define PIN_WIRE_SDA PA10
110+
#define PIN_WIRE_SDA PB14
111111
#endif
112112
#ifndef PIN_WIRE_SCL
113-
#define PIN_WIRE_SCL PA9
113+
#define PIN_WIRE_SCL PB13
114114
#endif
115115

116116
// Timer Definitions

0 commit comments

Comments
 (0)