Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions cross-file/blackpill-f401cd.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This a cross-file for the blackpill-f401cd probe, providing sane default options for it.

[binaries]
c = 'arm-none-eabi-gcc'
cpp = 'arm-none-eabi-g++'
ld = 'arm-none-eabi-gcc'
ar = 'arm-none-eabi-ar'
nm = 'arm-none-eabi-nm'
strip = 'arm-none-eabi-strip'
objcopy = 'arm-none-eabi-objcopy'
objdump = 'arm-none-eabi-objdump'
size = 'arm-none-eabi-size'

[host_machine]
system = 'bare-metal'
cpu_family = 'arm'
cpu = 'arm'
endian = 'little'

[project options]
probe = 'blackpill-f401cd'
targets = 'cortexar,cortexm,riscv32,riscv64,apollo3,at32f4,ch32,ch579,efm,gd32,hc32,lpc,mm32,nrf,nxp,puya,renesas,rp,sam,stm,ti,xilinx'
rtt_support = true
bmd_bootloader = true
1 change: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ option(
'',
'96b_carbon',
'blackpill-f401cc',
'blackpill-f401cd',
'blackpill-f401ce',
'blackpill-f411ce',
'bluepill',
Expand Down
4 changes: 4 additions & 0 deletions src/platforms/blackpill-f401cd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This platform supports the Black Pill F401CD, with STM32F401CD.

Detailed information about this platform can be found found in the [readme of the common blackpill-f4 code](./../common/blackpill-f4/README.md).

31 changes: 31 additions & 0 deletions src/platforms/blackpill-f401cd/platform.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* This file is part of the Black Magic Debug project.
*
* Copyright (C) 2011 Black Sphere Technologies Ltd.
* Written by Gareth McMullin <gareth@blacksphere.co.nz>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

/* This file provides the platform specific declarations for the blackpill-f401cd implementation. */

#ifndef PLATFORMS_BLACKPILL_F401CD_PLATFORM_H
#define PLATFORMS_BLACKPILL_F401CD_PLATFORM_H

#define PLATFORM_IDENT "(BlackPill-F401CD) "
#define PLATFORM_CLOCK_FREQ RCC_CLOCK_3V3_84MHZ

#include "blackpill-f4.h"

#endif /* PLATFORMS_BLACKPILL_F401CD_PLATFORM_H */
30 changes: 30 additions & 0 deletions src/platforms/common/blackpill-f4/blackpill-f401cd.ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* This file is part of the libopenstm32 project.
*
* Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
* Copyright (C) 2024 1BitSquared <info@1bitsquared.com>
* Modified by Rachel Mant <git@dragonmux.network>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

/* Define memory regions. */
MEMORY
{
rom (rx) : ORIGIN = 0x08000000, LENGTH = 384K
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 96K
}

/* Include the platform common linker script. */
INCLUDE ../blackmagic.ld
1 change: 1 addition & 0 deletions src/platforms/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ subdir('common/tm4c')
# This is used to allow multiple probes share the same source code
probe_alias_map = {
'blackpill-f401cc': 'common/blackpill-f4',
'blackpill-f401cd': 'common/blackpill-f4',
'blackpill-f401ce': 'common/blackpill-f4',
'blackpill-f411ce': 'common/blackpill-f4',
'bluepill': 'stlink',
Expand Down
Loading