Skip to content

Commit 451c8ab

Browse files
committed
Better marking on blue pill
1 parent edbe7e8 commit 451c8ab

File tree

4 files changed

+52
-7
lines changed

4 files changed

+52
-7
lines changed

src/stm32f103/bluepill/config.h

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Copyright (c) 2016, Devan Lai
3+
*
4+
* Permission to use, copy, modify, and/or distribute this software
5+
* for any purpose with or without fee is hereby granted, provided
6+
* that the above copyright notice and this permission notice
7+
* appear in all copies.
8+
*
9+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10+
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11+
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12+
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
13+
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14+
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
15+
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
16+
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17+
*/
18+
19+
#ifndef CONFIG_H_INCLUDED
20+
#define CONFIG_H_INCLUDED
21+
22+
#define APP_BASE_ADDRESS 0x08004000
23+
#define FLASH_SIZE_OVERRIDE 0x20000
24+
#define FLASH_PAGE_SIZE 1024
25+
#define DFU_UPLOAD_AVAILABLE 1
26+
#define DFU_DOWNLOAD_AVAILABLE 1
27+
28+
#ifndef HAVE_LED
29+
#define HAVE_LED 0
30+
#endif
31+
32+
#ifndef HAVE_BUTTON
33+
#define HAVE_BUTTON 0
34+
#endif
35+
36+
#ifndef HAVE_USB_PULLUP_CONTROL
37+
#define HAVE_USB_PULLUP_CONTROL 0
38+
#endif
39+
40+
#define UF2_FAMILY 0x5ee21072
41+
42+
#undef VOLUME_LABEL
43+
#define VOLUME_LABEL "BLUEPILL"
44+
#undef PRODUCT_NAME
45+
#define PRODUCT_NAME "Blue Pill STM32F103xB"
46+
#undef BOARD_ID
47+
#define BOARD_ID "STM32F103-blue-pill-v0"
48+
49+
#endif

src/stm32f103/generic/config.h

-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,4 @@
3939

4040
#define UF2_FAMILY 0x5ee21072
4141

42-
#undef VOLUME_LABEL
43-
#define VOLUME_LABEL "BLUEPILL"
44-
4542
#endif

src/targets.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ifeq ($(TARGET),STM32F103)
2222
endif
2323
ifeq ($(TARGET),BLUEPILL)
2424
TARGET_COMMON_DIR := ./stm32f103
25-
TARGET_SPEC_DIR := ./stm32f103/generic
25+
TARGET_SPEC_DIR := ./stm32f103/bluepill
2626
LDSCRIPT := ./stm32f103/stm32f103x8.ld
2727
ARCH = STM32F1
2828
DEFS += -DHAVE_LED=1 -DLED_GPIO_PORT=GPIOC -DLED_GPIO_PIN=GPIO13 -DLED_OPEN_DRAIN=1 -DUSES_GPIOC=1

src/uf2cfg.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#define PRODUCT_NAME "STM32 Board"
22
#define BOARD_ID "STM32F103-generic-v0"
3-
#define INDEX_URL "https://pxt.io"
3+
#define INDEX_URL "https://maker.makecode.com"
44
#define UF2_NUM_BLOCKS 8000
5-
#define VOLUME_LABEL "ARCADE"
5+
#define VOLUME_LABEL "STM32"
66
// where the UF2 files are allowed to write data - we allow MBR, since it seems part of the softdevice .hex file
77
#define USER_FLASH_START (uint32_t)(APP_BASE_ADDRESS)
88
#define USER_FLASH_END (0x08000000+FLASH_SIZE_OVERRIDE)
9-

0 commit comments

Comments
 (0)