add support for black pill board

This commit is contained in:
King Kévin 2020-02-02 21:18:28 +01:00
parent 7002937d23
commit 31997c2c4a
3 changed files with 12 additions and 13 deletions

View File

@ -22,7 +22,8 @@ The underlying template also supports following board:
- [Maple Mini](http://leaflabs.com/docs/hardware/maple-mini.html), based on a STM32F103CBT6
- [System Board](https://wiki.cuvoodoo.info/doku.php?id=stm32f1xx#system_board), based on a STM32F103C8T6
- [blue pill](ihttps://wiki.cuvoodoo.info/doku.php?id=stm32f1xx#blue_pill), based on a STM32F103C8T6
- [blue pill](https://wiki.cuvoodoo.info/doku.php?id=stm32f1xx#blue_pill), based on a STM32F103C8T6
- [black pill](https://stm32-base.org/boards/STM32F103C8T6-Black-Pill.html), based on a STM32F103C8T6
- [core board](https://wiki.cuvoodoo.info/doku.php?id=stm32f1xx#core_board), based on a STM32F103C8T6
- [ST-LINK V2 mini](https://wiki.cuvoodoo.info/doku.php?id=jtag#mini_st-link_v2), a ST-LINK/V2 clone based on a STM32F101C8T6
- [USB-Blaster](https://wiki.cuvoodoo.info/doku.php?id=jtag#armjishu_usb-blaster), an Altera USB-Blaster clone based on a STM32F101C8T6

View File

@ -14,7 +14,7 @@ APPLICATION = "application"
FIRMWARES = [BOOTLOADER, APPLICATION]
# which development board is used
# supported are: SYSTEM_BOARD, MAPLE_MINI, BLUE_PILL, CORE_BOARD, STLINKV2, BLASTER, BUSVOODOO
# supported are: SYSTEM_BOARD, MAPLE_MINI, BLUE_PILL, BLACK_PILL, CORE_BOARD, STLINKV2, BLASTER, BUSVOODOO
BOARD = ENV["BOARD"] || "CORE_BOARD"
# libopencm3 definitions

View File

@ -611,28 +611,26 @@
* @{
*/
#if defined(SYSTEM_BOARD) || defined(CORE_BOARD)
/* on system and core board LED is on pin 11/PA1 */
#define LED_PIN PA1 /**< GPIO pin (pin PA1) */
#define LED_PIN PA1 /**< GPIO pin (pin 11) */
#define LED_ON 0 /**< LED is on when pin is low */
#elif defined(BLUE_PILL)
/* on minimum system LED is on pin 2/PC13 */
#define LED_PIN PC13 /**< GPIO pin (pin PC13 on system board) */
#define LED_PIN PC13 /**< GPIO pin */
#define LED_ON 0 /**< LED is on when pin is low */
#elif defined(BLACK_PILL)
#define LED_PIN PB12 /**< GPIO pin */
#define LED_ON 0 /**< LED is on when pin is low */
#elif defined (MAPLE_MINI)
/* on maple mini LED is on pin 19/PB1 */
#define LED_PIN PB1 /**< GPIO pin (pin PB1 on maple mini) */
#define LED_PIN PB1 /**< GPIO pin (pin 19) */
#define LED_ON 1 /**< LED is on when pin is high */
#elif defined (STLINKV2) // it's sometimes a STM32F101, but it seems to have all STM32F103 features
/* on ST-Link V2 clone dongle in aluminum case LED is on pin PA9 (remap USART1_TX if used) */
#define LED_PIN PA9 /**< GPIO pin (pin PA9) */
#define LED_PIN PA9 /**< GPIO pin */
#define LED_ON 1 /**< the color and on level depends on the clone */
#elif defined (BLASTER)
/* on Altera USB blaster clone LED is on pin PA5 */
#define LED_PIN PA5 /**< GPIO pin (pin PA5) */
#define LED_PIN PA5 /**< GPIO pin */
#define LED_ON 0 /**< red LED on when low (green LED is on when device is powered) */
#elif defined (BUSVOODOO)
/* on BusVoodoo LED is on pin PA8 */
#define LED_PIN PA8 /**< GPIO pin (pin PA8) */
#define LED_PIN PA8 /**< GPIO pin */
#define LED_ON 1 /**< blue LED is on when pin is high, red LED is on when pin is low, LED is off when LED is floating */
#endif
/** @} */