Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Commit ee3e0b8

Browse files
committed
misc: Support for STM32401CD Blackpill as debug probe
1 parent 742c62c commit ee3e0b8

6 files changed

Lines changed: 91 additions & 0 deletions

File tree

cross-file/blackpill-f401cd.ini

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This a cross-file for the blackpill-f401cd probe, providing sane default options for it.
2+
3+
[binaries]
4+
c = 'arm-none-eabi-gcc'
5+
cpp = 'arm-none-eabi-g++'
6+
ld = 'arm-none-eabi-gcc'
7+
ar = 'arm-none-eabi-ar'
8+
nm = 'arm-none-eabi-nm'
9+
strip = 'arm-none-eabi-strip'
10+
objcopy = 'arm-none-eabi-objcopy'
11+
objdump = 'arm-none-eabi-objdump'
12+
size = 'arm-none-eabi-size'
13+
14+
[host_machine]
15+
system = 'bare-metal'
16+
cpu_family = 'arm'
17+
cpu = 'arm'
18+
endian = 'little'
19+
20+
[project options]
21+
probe = 'blackpill-f401cd'
22+
targets = 'cortexar,cortexm,riscv32,riscv64,apollo3,at32f4,ch32,ch579,efm,gd32,hc32,lpc,mm32,nrf,nxp,puya,renesas,rp,sam,stm,ti,xilinx'
23+
rtt_support = true
24+
bmd_bootloader = true

meson_options.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ option(
55
'',
66
'96b_carbon',
77
'blackpill-f401cc',
8+
'blackpill-f401cd',
89
'blackpill-f401ce',
910
'blackpill-f411ce',
1011
'bluepill',
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
This platform supports the Black Pill F401CD, with STM32F401CD.
2+
3+
Detailed information about this platform can be found found in the [readme of the common blackpill-f4 code](./../common/blackpill-f4/README.md).
4+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* This file is part of the Black Magic Debug project.
3+
*
4+
* Copyright (C) 2011 Black Sphere Technologies Ltd.
5+
* Written by Gareth McMullin <gareth@blacksphere.co.nz>
6+
*
7+
* This program is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
*/
20+
21+
/* This file provides the platform specific declarations for the blackpill-f401cd implementation. */
22+
23+
#ifndef PLATFORMS_BLACKPILL_F401CD_PLATFORM_H
24+
#define PLATFORMS_BLACKPILL_F401CD_PLATFORM_H
25+
26+
#define PLATFORM_IDENT "(BlackPill-F401CD) "
27+
#define PLATFORM_CLOCK_FREQ RCC_CLOCK_3V3_84MHZ
28+
29+
#include "blackpill-f4.h"
30+
31+
#endif /* PLATFORMS_BLACKPILL_F401CD_PLATFORM_H */
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 libopenstm32 project.
3+
*
4+
* Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
5+
* Copyright (C) 2024 1BitSquared <info@1bitsquared.com>
6+
* Modified by Rachel Mant <git@dragonmux.network>
7+
*
8+
* This program is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* (at your option) any later version.
12+
*
13+
* This program is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU General Public License
19+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20+
*/
21+
22+
/* Define memory regions. */
23+
MEMORY
24+
{
25+
rom (rx) : ORIGIN = 0x08000000, LENGTH = 384K
26+
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 96K
27+
}
28+
29+
/* Include the platform common linker script. */
30+
INCLUDE ../blackmagic.ld

src/platforms/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ subdir('common/tm4c')
4444
# This is used to allow multiple probes share the same source code
4545
probe_alias_map = {
4646
'blackpill-f401cc': 'common/blackpill-f4',
47+
'blackpill-f401cd': 'common/blackpill-f4',
4748
'blackpill-f401ce': 'common/blackpill-f4',
4849
'blackpill-f411ce': 'common/blackpill-f4',
4950
'bluepill': 'stlink',

0 commit comments

Comments
 (0)