stm32/boards/NUCLEO_G0B1RE: Add config for USB and mboot.

But leave these disabled.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2023-03-21 17:43:20 +11:00
parent 31638473b7
commit 31e7a0587d
2 changed files with 13 additions and 0 deletions

View File

@ -6,6 +6,7 @@
#define MICROPY_HW_ENABLE_RNG (0)
#define MICROPY_HW_ENABLE_RTC (1)
#define MICROPY_HW_ENABLE_DAC (0)
#define MICROPY_HW_ENABLE_USB (0) // can be enabled if USB cable connected to PA11/PA12
#define MICROPY_PY_PYB_LEGACY (0)
#define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE (1)
@ -87,3 +88,9 @@
#define MICROPY_HW_LED1 (pin_A5) // Green LD2 LED on Nucleo
#define MICROPY_HW_LED_ON(pin) (mp_hal_pin_high(pin))
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))
// USB config
#define MICROPY_HW_USB_FS (1)
#define MICROPY_HW_USB_MAIN_DEV (USB_PHY_FS_ID)
#define MICROPY_HW_USB_MSC (0)
#define MICROPY_HW_USB_HID (0)

View File

@ -1,7 +1,13 @@
MCU_SERIES = g0
CMSIS_MCU = STM32G0B1xx
AF_FILE = boards/stm32g0b1_af.csv
ifeq ($(USE_MBOOT),1)
LD_FILES = boards/stm32g0b1xe.ld boards/common_bl.ld
TEXT0_ADDR = 0x08008000
else
LD_FILES = boards/stm32g0b1xe.ld boards/common_basic.ld
endif
# LTO reduces final binary size, may be slower to build depending on gcc version and hardware
LTO ?= 1