Skip to content

Commit c706962

Browse files
committed
Add STM32F103-HIGHBOOT target
1 parent d890163 commit c706962

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* This file is part of the libopencm3 project.
3+
*
4+
* Copyright (C) 2015 Karl Palsson <karlp@tweak.net.au>
5+
*
6+
* This library is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU Lesser General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* This library is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this library. If not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
20+
/* Linker script for STM32F103x8, 64k flash, 20k RAM. */
21+
22+
/* Define memory regions. */
23+
MEMORY
24+
{
25+
rom (rx) : ORIGIN = 0x08000000, LENGTH = 56K
26+
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
27+
}
28+
29+
/* Include the common ld script. */
30+
INCLUDE libopencm3_stm32f1.ld

src/targets.mk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ ifeq ($(TARGET),STM32F103-DFUBOOT)
4040
DEFS += -DDFU_AVAILABLE=1
4141
ARCH = STM32F1
4242
endif
43+
ifeq ($(TARGET),STM32F103-HIGHBOOT)
44+
TARGET_COMMON_DIR := ./stm32f103
45+
TARGET_SPEC_DIR := ./stm32f103
46+
LDSCRIPT ?= ./stm32f103/stm32f103x8-highboot.ld
47+
DEFS += -DDFU_AVAILABLE=1
48+
ARCH = STM32F1
49+
endif
4350
ifndef ARCH
4451
$(error Unknown target $(TARGET))
4552
endif

0 commit comments

Comments
 (0)