Skip to content

Commit

Permalink
Better marking on blue pill
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoskal committed Feb 15, 2019
1 parent edbe7e8 commit 451c8ab
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 7 deletions.
49 changes: 49 additions & 0 deletions src/stm32f103/bluepill/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Copyright (c) 2016, Devan Lai
*
* Permission to use, copy, modify, and/or distribute this software
* for any purpose with or without fee is hereby granted, provided
* that the above copyright notice and this permission notice
* appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#ifndef CONFIG_H_INCLUDED
#define CONFIG_H_INCLUDED

#define APP_BASE_ADDRESS 0x08004000
#define FLASH_SIZE_OVERRIDE 0x20000
#define FLASH_PAGE_SIZE 1024
#define DFU_UPLOAD_AVAILABLE 1
#define DFU_DOWNLOAD_AVAILABLE 1

#ifndef HAVE_LED
#define HAVE_LED 0
#endif

#ifndef HAVE_BUTTON
#define HAVE_BUTTON 0
#endif

#ifndef HAVE_USB_PULLUP_CONTROL
#define HAVE_USB_PULLUP_CONTROL 0
#endif

#define UF2_FAMILY 0x5ee21072

#undef VOLUME_LABEL
#define VOLUME_LABEL "BLUEPILL"
#undef PRODUCT_NAME
#define PRODUCT_NAME "Blue Pill STM32F103xB"
#undef BOARD_ID
#define BOARD_ID "STM32F103-blue-pill-v0"

#endif
3 changes: 0 additions & 3 deletions src/stm32f103/generic/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,4 @@

#define UF2_FAMILY 0x5ee21072

#undef VOLUME_LABEL
#define VOLUME_LABEL "BLUEPILL"

#endif
2 changes: 1 addition & 1 deletion src/targets.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ifeq ($(TARGET),STM32F103)
endif
ifeq ($(TARGET),BLUEPILL)
TARGET_COMMON_DIR := ./stm32f103
TARGET_SPEC_DIR := ./stm32f103/generic
TARGET_SPEC_DIR := ./stm32f103/bluepill
LDSCRIPT := ./stm32f103/stm32f103x8.ld
ARCH = STM32F1
DEFS += -DHAVE_LED=1 -DLED_GPIO_PORT=GPIOC -DLED_GPIO_PIN=GPIO13 -DLED_OPEN_DRAIN=1 -DUSES_GPIOC=1
Expand Down
5 changes: 2 additions & 3 deletions src/uf2cfg.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#define PRODUCT_NAME "STM32 Board"
#define BOARD_ID "STM32F103-generic-v0"
#define INDEX_URL "https://pxt.io"
#define INDEX_URL "https://maker.makecode.com"
#define UF2_NUM_BLOCKS 8000
#define VOLUME_LABEL "ARCADE"
#define VOLUME_LABEL "STM32"
// where the UF2 files are allowed to write data - we allow MBR, since it seems part of the softdevice .hex file
#define USER_FLASH_START (uint32_t)(APP_BASE_ADDRESS)
#define USER_FLASH_END (0x08000000+FLASH_SIZE_OVERRIDE)

0 comments on commit 451c8ab

Please sign in to comment.