Skip to content

Add SparkFun MicroMod STM32F405 #1987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Mar 31, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
1 change: 1 addition & 0 deletions CI/build/conf/cores_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@
"MALYANM200_F103CB",
"MALYANM300_F070CB",
"MAPLEMINI_F103CB",
"MICROMOD_F405",
"NUCLEO_F031K6",
"NUCLEO_L031K6",
"NUCLEO_L412KB",
Expand Down
69 changes: 38 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,37 +49,43 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d

## Supported boards

- [Nucleo 144 boards](#nucleo-144-boards)
- [Nucleo 64 boards](#nucleo-64-boards)
- [Nucleo 32 boards](#nucleo-32-boards)
- [Discovery boards](#discovery-boards)
- [Eval boards](#eval-boards)
- [STM32MP1 series coprocessor boards](#stm32mp1-series-coprocessor-boards)
- [Generic STM32C0 boards](#generic-stm32c0-boards)
- [Generic STM32F0 boards](#generic-stm32f0-boards)
- [Generic STM32F1 boards](#generic-stm32f1-boards)
- [Generic STM32F2 boards](#generic-stm32f2-boards)
- [Generic STM32F3 boards](#generic-stm32f3-boards)
- [Generic STM32F4 boards](#generic-stm32f4-boards)
- [Generic STM32F7 boards](#generic-stm32f7-boards)
- [Generic STM32G0 boards](#generic-stm32g0-boards)
- [Generic STM32G4 boards](#generic-stm32g4-boards)
- [Generic STM32H7 boards](#generic-stm32h7-boards)
- [Generic STM32L0 boards](#generic-stm32l0-boards)
- [Generic STM32L1 boards](#generic-stm32l1-boards)
- [Generic STM32L4 boards](#generic-stm32l4-boards)
- [Generic STM32L5 boards](#generic-stm32l5-boards)
- [Generic STM32U5 boards](#generic-stm32u5-boards)
- [Generic STM32WB boards](#generic-stm32wb-boards)
- [Generic STM32WL boards](#generic-stm32wb-boards)
- [3D printer boards](#3d-printer-boards)
- [Blues Wireless boards](#blues-wireless-boards)
- [Elecgator boards](#elecgator-boards)
- [Electronic Speed Controller boards](#electronic-speed-controller-boards)
- [Garatronics boards](#Garatronic/McHobby-boards)
- [Generic flight controllers](#generic-flight-controllers)
- [LoRa boards](#lora-boards)
- [Midatronics boards](#midatronics-boards)
- [Arduino core support for STM32 based boards](#arduino-core-support-for-stm32-based-boards)
- [Introduction](#introduction)
- [Getting Started](#getting-started)
- [Supported boards](#supported-boards)
- [Nucleo 144 boards](#nucleo-144-boards)
- [Nucleo 64 boards](#nucleo-64-boards)
- [Nucleo 32 boards](#nucleo-32-boards)
- [Discovery boards](#discovery-boards)
- [Eval boards](#eval-boards)
- [STM32MP1 series coprocessor boards](#stm32mp1-series-coprocessor-boards)
- [Generic STM32C0 boards](#generic-stm32c0-boards)
- [Generic STM32F0 boards](#generic-stm32f0-boards)
- [Generic STM32F1 boards](#generic-stm32f1-boards)
- [Generic STM32F2 boards](#generic-stm32f2-boards)
- [Generic STM32F3 boards](#generic-stm32f3-boards)
- [Generic STM32F4 boards](#generic-stm32f4-boards)
- [Generic STM32F7 boards](#generic-stm32f7-boards)
- [Generic STM32G0 boards](#generic-stm32g0-boards)
- [Generic STM32G4 boards](#generic-stm32g4-boards)
- [Generic STM32H7 boards](#generic-stm32h7-boards)
- [Generic STM32L0 boards](#generic-stm32l0-boards)
- [Generic STM32L1 boards](#generic-stm32l1-boards)
- [Generic STM32L4 boards](#generic-stm32l4-boards)
- [Generic STM32L5 boards](#generic-stm32l5-boards)
- [Generic STM32U5 boards](#generic-stm32u5-boards)
- [Generic STM32WB boards](#generic-stm32wb-boards)
- [Generic STM32WL boards](#generic-stm32wl-boards)
- [3D printer boards](#3d-printer-boards)
- [Blues Wireless boards](#blues-wireless-boards)
- [Elecgator boards](#elecgator-boards)
- [Electronic Speed Controller boards](#electronic-speed-controller-boards)
- [Garatronic/McHobby boards](#garatronicmchobby-boards)
- [Generic flight controllers](#generic-flight-controllers)
- [LoRa boards](#lora-boards)
- [Midatronics boards](#midatronics-boards)
- [Next release](#next-release)
- [Troubleshooting](#troubleshooting)


### [Nucleo 144](https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-eval-tools/stm32-mcu-eval-tools/stm32-nucleo-boards.html) boards
Expand Down Expand Up @@ -320,6 +326,7 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
| Status | Device(s) | Name | Release | Notes |
| :----: | :-------: | ---- | :-----: | :---- |
| :green_heart: | STM32F405RG | [Adafruit Feather STM32F405 Express](https://www.adafruit.com/product/4382) | *1.8.0* | |
| :green_heart: | STM32F405RG | [SparkFun MicroMod STM32](https://www.sparkfun.com/products/21326) | *2.5.0* | |
| :green_heart: | STM32F401CC | [WeAct Black Pill](https://stm32-base.org/boards/STM32F401CCU6-WeAct-Black-Pill-V1.2) | *1.7.0* | [More info](https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1) |
| :green_heart: | STM32F401CE | [WeAct Black Pill](https://stm32-base.org/boards/STM32F401CEU6-WeAct-Black-Pill-V3.0) | *2.4.0* | [More info](https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1) |
| :green_heart: | STM32F411CE | [WeAct Black Pill](https://stm32-base.org/boards/STM32F411CEU6-WeAct-Black-Pill-V2.0) | *1.9.0* | [More info](https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1) |
Expand Down
49 changes: 49 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10548,6 +10548,55 @@ Midatronics.menu.upload_method.dfuMethod.upload.protocol=2
Midatronics.menu.upload_method.dfuMethod.upload.options=-g
Midatronics.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg


################################################################################
# SparkFun Boards

SparkFun.name=SparkFun Boards

SparkFun.build.core=arduino
SparkFun.build.board=SparkFun
SparkFun.build.variant_h=variant_{build.board}.h
SparkFun.build.st_extra_flags=-D{build.product_line} {build.enable_usb} {build.xSerial}
SparkFun.upload.maximum_size=0
SparkFun.upload.maximum_data_size=0

# SparkFun MicroMod STM32F405 board
SparkFun.menu.pnum.MICROMOD_F405=SparkFun MicroMod STM32F405
SparkFun.menu.pnum.MICROMOD_F405.upload.maximum_size=1048576
SparkFun.menu.pnum.MICROMOD_F405.upload.maximum_data_size=131072
SparkFun.menu.pnum.MICROMOD_F405.build.mcu=cortex-m4
SparkFun.menu.pnum.MICROMOD_F405.build.fpu=-mfpu=fpv4-sp-d16
SparkFun.menu.pnum.MICROMOD_F405.build.float-abi=-mfloat-abi=hard
SparkFun.menu.pnum.MICROMOD_F405.build.board=MICROMOD_F405
SparkFun.menu.pnum.MICROMOD_F405.build.series=STM32F4xx
SparkFun.menu.pnum.MICROMOD_F405.build.product_line=STM32F405xx
SparkFun.menu.pnum.MICROMOD_F405.build.variant_h=variant_{build.board}.h
SparkFun.menu.pnum.MICROMOD_F405.build.variant=STM32F4xx/F405RGT_F415RGT
SparkFun.menu.pnum.MICROMOD_F405.build.peripheral_pins=-DCUSTOM_PERIPHERAL_PINS
SparkFun.menu.pnum.MICROMOD_F405.build.cmsis_lib_gcc=arm_cortexM4lf_math

# Upload menu
SparkFun.menu.upload_method.MassStorage=Mass Storage
SparkFun.menu.upload_method.MassStorage.upload.protocol=
SparkFun.menu.upload_method.MassStorage.upload.tool=massStorageCopy

SparkFun.menu.upload_method.swdMethod=STM32CubeProgrammer (SWD)
SparkFun.menu.upload_method.swdMethod.upload.protocol=0
SparkFun.menu.upload_method.swdMethod.upload.options=-g
SparkFun.menu.upload_method.swdMethod.upload.tool=stm32CubeProg

SparkFun.menu.upload_method.serialMethod=STM32CubeProgrammer (Serial)
SparkFun.menu.upload_method.serialMethod.upload.protocol=1
SparkFun.menu.upload_method.serialMethod.upload.options={serial.port.file} -s
SparkFun.menu.upload_method.serialMethod.upload.tool=stm32CubeProg

SparkFun.menu.upload_method.dfuMethod=STM32CubeProgrammer (DFU)
SparkFun.menu.upload_method.dfuMethod.upload.protocol=2
SparkFun.menu.upload_method.dfuMethod.upload.options=-g
SparkFun.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg


################################################################################
# Serialx activation
Nucleo_144.menu.xserial.generic=Enabled (generic 'Serial')
Expand Down
86 changes: 86 additions & 0 deletions cmake/boards_db.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -97836,6 +97836,92 @@ target_link_libraries(MAPLEMINI_F103CB_hid INTERFACE
)


# MICROMOD_F405
# -----------------------------------------------------------------------------

set(MICROMOD_F405_VARIANT_PATH "${CMAKE_CURRENT_LIST_DIR}/../variants/STM32F4xx/F405RGT_F415RGT")
set(MICROMOD_F405_MAXSIZE 1048576)
set(MICROMOD_F405_MAXDATASIZE 131072)
set(MICROMOD_F405_MCU cortex-m4)
set(MICROMOD_F405_FPCONF "-")
add_library(MICROMOD_F405 INTERFACE)
target_compile_options(MICROMOD_F405 INTERFACE
"SHELL:-DSTM32F405xx "
"SHELL:-DCUSTOM_PERIPHERAL_PINS"
"SHELL:"
"SHELL:-mfpu=fpv4-sp-d16 -mfloat-abi=hard"
-mcpu=${MICROMOD_F405_MCU}
)
target_compile_definitions(MICROMOD_F405 INTERFACE
"STM32F4xx"
"ARDUINO_MICROMOD_F405"
"BOARD_NAME=\"MICROMOD_F405\""
"BOARD_ID=MICROMOD_F405"
"VARIANT_H=\"variant_MICROMOD_F405.h\""
)
target_include_directories(MICROMOD_F405 INTERFACE
${CMAKE_CURRENT_LIST_DIR}/../system/STM32F4xx
${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/STM32F4xx_HAL_Driver/Inc
${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/STM32F4xx_HAL_Driver/Src
${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/CMSIS/Device/ST/STM32F4xx/Include/
${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc/
${MICROMOD_F405_VARIANT_PATH}
)

target_link_options(MICROMOD_F405 INTERFACE
"LINKER:--default-script=${MICROMOD_F405_VARIANT_PATH}/ldscript.ld"
"LINKER:--defsym=LD_FLASH_OFFSET=0"
"LINKER:--defsym=LD_MAX_SIZE=1048576"
"LINKER:--defsym=LD_MAX_DATA_SIZE=131072"
"SHELL:-mfpu=fpv4-sp-d16 -mfloat-abi=hard"
-mcpu=${MICROMOD_F405_MCU}
)
target_link_libraries(MICROMOD_F405 INTERFACE
arm_cortexM4lf_math
)

add_library(MICROMOD_F405_serial_disabled INTERFACE)
target_compile_options(MICROMOD_F405_serial_disabled INTERFACE
"SHELL:"
)
add_library(MICROMOD_F405_serial_generic INTERFACE)
target_compile_options(MICROMOD_F405_serial_generic INTERFACE
"SHELL:-DHAL_UART_MODULE_ENABLED"
)
add_library(MICROMOD_F405_serial_none INTERFACE)
target_compile_options(MICROMOD_F405_serial_none INTERFACE
"SHELL:-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NONE"
)
add_library(MICROMOD_F405_usb_CDC INTERFACE)
target_compile_options(MICROMOD_F405_usb_CDC INTERFACE
"SHELL:-DUSBCON -DUSBD_VID=0 -DUSBD_PID=0 -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC -DDISABLE_GENERIC_SERIALUSB"
)
add_library(MICROMOD_F405_usb_CDCgen INTERFACE)
target_compile_options(MICROMOD_F405_usb_CDCgen INTERFACE
"SHELL:-DUSBCON -DUSBD_VID=0 -DUSBD_PID=0 -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC"
)
add_library(MICROMOD_F405_usb_HID INTERFACE)
target_compile_options(MICROMOD_F405_usb_HID INTERFACE
"SHELL:-DUSBCON -DUSBD_VID=0 -DUSBD_PID=0 -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_HID_COMPOSITE"
)
add_library(MICROMOD_F405_usb_none INTERFACE)
target_compile_options(MICROMOD_F405_usb_none INTERFACE
"SHELL:"
)
add_library(MICROMOD_F405_xusb_FS INTERFACE)
target_compile_options(MICROMOD_F405_xusb_FS INTERFACE
"SHELL:"
)
add_library(MICROMOD_F405_xusb_HS INTERFACE)
target_compile_options(MICROMOD_F405_xusb_HS INTERFACE
"SHELL:-DUSE_USB_HS"
)
add_library(MICROMOD_F405_xusb_HSFS INTERFACE)
target_compile_options(MICROMOD_F405_xusb_HSFS INTERFACE
"SHELL:-DUSE_USB_HS -DUSE_USB_HS_IN_FS"
)


# MKR_SHARKY
# -----------------------------------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions tools/platformio/boards_remap.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"rak811_tracker_32": "RAK811_TRACKERA",
"robotdyn_blackpill_f303cc": "BLACKPILL_F303CC",
"rumba32_f446ve": "RUMBA32",
"sparkfun_micromod_stm32f405": "MICROMOD_F405",
"sparky_v1": "SPARKY_F303CC",
"steval_mksboxv1": "STEVAL_MKSBOX1V1",
"stm32f4stamp": "GENERIC_F405RGTX",
Expand Down
2 changes: 2 additions & 0 deletions variants/STM32F4xx/F405RGT_F415RGT/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ add_library(variant_bin STATIC EXCLUDE_FROM_ALL
generic_clock.c
PeripheralPins.c
PeripheralPins_FEATHER_F405.c
PeripheralPins_MICROMOD_F405.c
variant_FEATHER_F405.cpp
variant_MICROMOD_F405.cpp
variant_generic.cpp
)
target_link_libraries(variant_bin PUBLIC variant_usage)
Expand Down
Loading