Skip to content

Commit

Permalink
Merge pull request stm32duino#2373 from ELV-Elektronik-AG/main
Browse files Browse the repository at this point in the history
Added Support for ELV-BM-TRX1
  • Loading branch information
fpistm authored May 27, 2024
2 parents 0e9d108 + 49caa99 commit 36fb912
Show file tree
Hide file tree
Showing 8 changed files with 623 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/MarkdwonLinksCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
with:
paths: '*.md ./CI/**/*.md, ./variants/**/*.md, ./libraries/**/*.md'
verbosity: 'INFO'
skip: 'www.st.com'
linksToSkip: 'www.st.com, de.elv.com/lorawan'
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
- [LoRa boards](#lora-boards)
- [Midatronics boards](#midatronics-boards)
- [SparkFun boards](#sparkfun-boards)
- [ELV Boards](#elv-boards)

**Note about Status**:
- :green_heart: board support is available since the specified release version.
Expand Down Expand Up @@ -831,6 +832,12 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
| :green_heart: | STM32F405RG | [SparkFun MicroMod Processor Board - STM32F405](https://www.sparkfun.com/products/21326) | *2.6.0* | |
| :green_heart: | STM32WB5MMG | [SparkFun MicroMod Processor Board - STM32WB5MMG](https://www.sparkfun.com/products/21438) | *2.6.0* | |

### [ELV Boards](https://de.elv.com/lorawan)

| Status | Device(s) | Name | Release | Notes |
| :----: | :-------: | ---- | :-----: | :---- |
| :yellow_heart: | STM32WLE5JB | ELV-BM-TRX1 | **2.8.0** | |

## Next release

See [milestones](https://github.com/stm32duino/Arduino_Core_STM32/milestones) to have an overview of the next release content.
Expand Down
78 changes: 78 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11277,6 +11277,40 @@ SparkFun.menu.upload_method.dfuMethod.upload.protocol=2
SparkFun.menu.upload_method.dfuMethod.upload.options=
SparkFun.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg

################################################################################
# ELV Modular System boards

ELV_Modular_System.name=ELV Modular System boards
ELV_Modular_System.build.core=arduino
ELV_Modular_System.build.board=ELV_Modular_System
ELV_Modular_System.build.variant_h=variant_{build.board}.h
ELV_Modular_System.upload.maximum_size=0
ELV_Modular_System.upload.maximum_data_size=0

# ELV-BM-TRX1 board
ELV_Modular_System.menu.pnum.ELV_BM_TRX1=ELV-LW-Base ELV_BM_TRX1
ELV_Modular_System.menu.pnum.ELV_BM_TRX1.upload.maximum_size=129024
ELV_Modular_System.menu.pnum.ELV_BM_TRX1.upload.maximum_data_size=49152
ELV_Modular_System.menu.pnum.ELV_BM_TRX1.build.mcu=cortex-m4
ELV_Modular_System.menu.pnum.ELV_BM_TRX1.build.board=ELV_BM_TRX1
ELV_Modular_System.menu.pnum.ELV_BM_TRX1.build.series=STM32WLxx
ELV_Modular_System.menu.pnum.ELV_BM_TRX1.build.product_line=STM32WLE5xx
ELV_Modular_System.menu.pnum.ELV_BM_TRX1.build.variant=STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I
ELV_Modular_System.menu.pnum.ELV_BM_TRX1.build.peripheral_pins=-DCUSTOM_PERIPHERAL_PINS
ELV_Modular_System.menu.pnum.ELV_BM_TRX1.build.flash_offset=0x800
ELV_Modular_System.menu.pnum.ELV_BM_TRX1.build.st_extra_flags=-D{build.product_line} -DUSE_CM4_STARTUP_FILE {build.xSerial}

# Upload menu
ELV_Modular_System.menu.upload_method.swdMethod=STM32CubeProgrammer (SWD) with Bootloader
ELV_Modular_System.menu.upload_method.swdMethod.upload.protocol=0
ELV_Modular_System.menu.upload_method.swdMethod.upload.tool=stm32CubeProg


ELV_Modular_System.menu.upload_method.serialMethod=STM32CubeProgrammer (Serial) with Bootloader
ELV_Modular_System.menu.upload_method.serialMethod.upload.protocol=1
ELV_Modular_System.menu.upload_method.serialMethod.upload.options={serial.port.file}
ELV_Modular_System.menu.upload_method.serialMethod.upload.tool=stm32CubeProg

################################################################################
# Serialx activation
Nucleo_144.menu.xserial.generic=Enabled (generic 'Serial')
Expand Down Expand Up @@ -11497,6 +11531,12 @@ SparkFun.menu.xserial.none.build.xSerial=-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NO
SparkFun.menu.xserial.disabled=Disabled (no Serial support)
SparkFun.menu.xserial.disabled.build.xSerial=

ELV_Modular_System.menu.xserial.generic=Enabled (generic 'Serial')
ELV_Modular_System.menu.xserial.none=Enabled (no generic 'Serial')
ELV_Modular_System.menu.xserial.none.build.xSerial=-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NONE
ELV_Modular_System.menu.xserial.disabled=Disabled (no Serial support)
ELV_Modular_System.menu.xserial.disabled.build.xSerial=

# USB connectivity
Nucleo_144.menu.usb.none=None
Nucleo_144.menu.usb.CDCgen=CDC (generic 'Serial' supersede U(S)ART)
Expand Down Expand Up @@ -12547,6 +12587,26 @@ SparkFun.menu.opt.ogstd.build.flags.optimize=-Og
SparkFun.menu.opt.o0std=No Optimization (-O0)
SparkFun.menu.opt.o0std.build.flags.optimize=-O0

ELV_Modular_System.menu.opt.osstd=Smallest (-Os default)
ELV_Modular_System.menu.opt.oslto=Smallest (-Os) with LTO
ELV_Modular_System.menu.opt.oslto.build.flags.optimize=-Os -flto
ELV_Modular_System.menu.opt.o1std=Fast (-O1)
ELV_Modular_System.menu.opt.o1std.build.flags.optimize=-O1
ELV_Modular_System.menu.opt.o1lto=Fast (-O1) with LTO
ELV_Modular_System.menu.opt.o1lto.build.flags.optimize=-O1 -flto
ELV_Modular_System.menu.opt.o2std=Faster (-O2)
ELV_Modular_System.menu.opt.o2std.build.flags.optimize=-O2
ELV_Modular_System.menu.opt.o2lto=Faster (-O2) with LTO
ELV_Modular_System.menu.opt.o2lto.build.flags.optimize=-O2 -flto
ELV_Modular_System.menu.opt.o3std=Fastest (-O3)
ELV_Modular_System.menu.opt.o3std.build.flags.optimize=-O3
ELV_Modular_System.menu.opt.o3lto=Fastest (-O3) with LTO
ELV_Modular_System.menu.opt.o3lto.build.flags.optimize=-O3 -flto
ELV_Modular_System.menu.opt.ogstd=Debug (-Og)
ELV_Modular_System.menu.opt.ogstd.build.flags.optimize=-Og
ELV_Modular_System.menu.opt.o0std=No Optimization (-O0)
ELV_Modular_System.menu.opt.o0std.build.flags.optimize=-O0

# Debug information
Nucleo_144.menu.dbg.none=None
Nucleo_144.menu.dbg.enable_sym=Symbols Enabled (-g)
Expand Down Expand Up @@ -12816,6 +12876,14 @@ SparkFun.menu.dbg.enable_log.build.flags.debug=
SparkFun.menu.dbg.enable_all=Core Logs and Symbols Enabled (-g)
SparkFun.menu.dbg.enable_all.build.flags.debug=-g

ELV_Modular_System.menu.dbg.none=None
ELV_Modular_System.menu.dbg.enable_sym=Symbols Enabled (-g)
ELV_Modular_System.menu.dbg.enable_sym.build.flags.debug=-g -DNDEBUG
ELV_Modular_System.menu.dbg.enable_log=Core logs Enabled
ELV_Modular_System.menu.dbg.enable_log.build.flags.debug=
ELV_Modular_System.menu.dbg.enable_all=Core Logs and Symbols Enabled (-g)
ELV_Modular_System.menu.dbg.enable_all.build.flags.debug=-g

# C Runtime Library
Nucleo_144.menu.rtlib.nano=Newlib Nano (default)
Nucleo_144.menu.rtlib.nanofp=Newlib Nano + Float Printf
Expand Down Expand Up @@ -13166,3 +13234,13 @@ SparkFun.menu.rtlib.nanofps=Newlib Nano + Float Printf/Scanf
SparkFun.menu.rtlib.nanofps.build.flags.ldspecs=--specs=nano.specs -u _printf_float -u _scanf_float
SparkFun.menu.rtlib.full=Newlib Standard
SparkFun.menu.rtlib.full.build.flags.ldspecs=

ELV_Modular_System.menu.rtlib.nano=Newlib Nano (default)
ELV_Modular_System.menu.rtlib.nanofp=Newlib Nano + Float Printf
ELV_Modular_System.menu.rtlib.nanofp.build.flags.ldspecs=--specs=nano.specs -u _printf_float
ELV_Modular_System.menu.rtlib.nanofs=Newlib Nano + Float Scanf
ELV_Modular_System.menu.rtlib.nanofs.build.flags.ldspecs=--specs=nano.specs -u _scanf_float
ELV_Modular_System.menu.rtlib.nanofps=Newlib Nano + Float Printf/Scanf
ELV_Modular_System.menu.rtlib.nanofps.build.flags.ldspecs=--specs=nano.specs -u _printf_float -u _scanf_float
ELV_Modular_System.menu.rtlib.full=Newlib Standard
ELV_Modular_System.menu.rtlib.full.build.flags.ldspecs=
54 changes: 54 additions & 0 deletions cmake/boards_db.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5884,6 +5884,60 @@ target_compile_options(ELEKTOR_F072CB_serial_none INTERFACE
"SHELL:-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NONE"
)

# ELV_BM_TRX1
# -----------------------------------------------------------------------------

set(ELV_BM_TRX1_VARIANT_PATH "${CMAKE_CURRENT_LIST_DIR}/../variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I")
set(ELV_BM_TRX1_MAXSIZE 124927)
set(ELV_BM_TRX1_MAXDATASIZE 16383)
set(ELV_BM_TRX1_MCU cortex-m4)
set(ELV_BM_TRX1_FPCONF "-")
add_library(ELV_BM_TRX1 INTERFACE)
target_compile_options(ELV_BM_TRX1 INTERFACE
"SHELL:-DSTM32WLE5xx -DUSE_CM4_STARTUP_FILE "
"SHELL:"
"SHELL:"
"SHELL: "
-mcpu=${ELV_BM_TRX1_MCU}
)
target_compile_definitions(ELV_BM_TRX1 INTERFACE
"STM32WLxx"
"ARDUINO_ELV_BM_TRX1"
"BOARD_NAME=\"ELV_BM_TRX1\""
"BOARD_ID=ELV_BM_TRX1"
"VARIANT_H=\"variant_ELV_BM_TRX1.h\""
)
target_include_directories(ELV_BM_TRX1 INTERFACE
${CMAKE_CURRENT_LIST_DIR}/../system/STM32WLxx
${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/STM32WLxx_HAL_Driver/Inc
${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/STM32WLxx_HAL_Driver/Src
${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/CMSIS/Device/ST/STM32WLxx/Include/
${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/CMSIS/Device/ST/STM32WLxx/Source/Templates/gcc/
${ELV_BM_TRX1_VARIANT_PATH}
)

target_link_options(ELV_BM_TRX1 INTERFACE
"LINKER:--default-script=${ELV_BM_TRX1_VARIANT_PATH}/ldscript.ld"
"LINKER:--defsym=LD_FLASH_OFFSET=0x0800"
"LINKER:--defsym=LD_MAX_SIZE=124927"
"LINKER:--defsym=LD_MAX_DATA_SIZE=16383"
"SHELL: "
-mcpu=${ELV_BM_TRX1_MCU}
)

add_library(ELV_BM_TRX1_serial_disabled INTERFACE)
target_compile_options(ELV_BM_TRX1_serial_disabled INTERFACE
"SHELL:"
)
add_library(ELV_BM_TRX1_serial_generic INTERFACE)
target_compile_options(ELV_BM_TRX1_serial_generic INTERFACE
"SHELL:-DHAL_UART_MODULE_ENABLED"
)
add_library(ELV_BM_TRX1_serial_none INTERFACE)
target_compile_options(ELV_BM_TRX1_serial_none INTERFACE
"SHELL:-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NONE"
)

# ETHERCAT_DUINO
# -----------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ add_library(variant_bin STATIC EXCLUDE_FROM_ALL
generic_clock.c
PeripheralPins.c
PeripheralPins_LORA_E5_MINI.c
variant_ELV_BM_TRX1.cpp
variant_generic.cpp
variant_LORA_E5_MINI.cpp
variant_NUCLEO_WL55JC1.cpp
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
/*
*******************************************************************************
* Copyright (c) 2024, STMicroelectronics
* All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
*******************************************************************************
*/
/*
* Automatically generated from STM32WL54JCIx.xml, STM32WL55JCIx.xml
* STM32WLE4J8Ix.xml, STM32WLE4JBIx.xml
* STM32WLE4JCIx.xml, STM32WLE5J8Ix.xml
* STM32WLE5JBIx.xml, STM32WLE5JCIx.xml
* CubeMX DB release 6.0.100
*/
#if defined(ARDUINO_ELV_BM_TRX1)
#include "Arduino.h"
#include "PeripheralPins.h"

/* =====
* Notes:
* - The pins mentioned Px_y_ALTz are alternative possibilities which use other
* HW peripheral instances. You can use them the same way as any other "normal"
* pin (i.e. analogWrite(PA7_ALT1, 128);).
*
* - Commented lines are alternative possibilities which are not used per default.
* If you change them, you will have to know what you do
* =====
*/

//*** ADC ***

#ifdef HAL_ADC_MODULE_ENABLED
WEAK const PinMap PinMap_ADC[] = {
{PA_13, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC_IN9
{PA_14, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC_IN10
{PB_14, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1
{NC, NP, 0}
};
#endif

//*** DAC ***

#ifdef HAL_DAC_MODULE_ENABLED
WEAK const PinMap PinMap_DAC[] = {
{PA_10, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1
{NC, NP, 0}
};
#endif

//*** I2C ***

#ifdef HAL_I2C_MODULE_ENABLED
WEAK const PinMap PinMap_I2C_SDA[] = {
{PA_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)},
{PA_15, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)},
{PB_14, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)},
{NC, NP, 0}
};
#endif

#ifdef HAL_I2C_MODULE_ENABLED
WEAK const PinMap PinMap_I2C_SCL[] = {
{PA_7, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)},
{PA_12, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)},
{NC, NP, 0}
};
#endif

//*** No I3C ***

//*** TIM ***

#ifdef HAL_TIM_MODULE_ENABLED
WEAK const PinMap PinMap_TIM[] = {
{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3
{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4
{PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1
{PA_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM16, 1, 0)}, // TIM16_CH1
{PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N
{PA_7_ALT1, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM17, 1, 0)}, // TIM17_CH1
{PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4
{PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2
{PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N
{NC, NP, 0}
};
#endif

//*** UART ***

#ifdef HAL_UART_MODULE_ENABLED
WEAK const PinMap PinMap_UART_TX[] = {
{PA_2, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
{PA_2_ALT1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
{PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
{NC, NP, 0}
};
#endif

#ifdef HAL_UART_MODULE_ENABLED
WEAK const PinMap PinMap_UART_RX[] = {
{PA_3, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
{PA_3_ALT1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
{PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
{NC, NP, 0}
};
#endif

#ifdef HAL_UART_MODULE_ENABLED
WEAK const PinMap PinMap_UART_RTS[] = {
{PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
{PB_3, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
{PB_12, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
{NC, NP, 0}
};
#endif

#ifdef HAL_UART_MODULE_ENABLED
WEAK const PinMap PinMap_UART_CTS[] = {
{PA_6, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
{PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
{NC, NP, 0}
};
#endif

//*** SPI ***

#ifdef HAL_SPI_MODULE_ENABLED
WEAK const PinMap PinMap_SPI_MOSI[] = {
{PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
{PA_7_ALT1, SUBGHZSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF13_DEBUG_SUBGHZSPI)},
{PA_12, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
{NC, NP, 0}
};
#endif

#ifdef HAL_SPI_MODULE_ENABLED
WEAK const PinMap PinMap_SPI_MISO[] = {
{PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
{PA_6_ALT1, SUBGHZSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF13_DEBUG_SUBGHZSPI)},
{PA_11, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
{NC, NP, 0}
};
#endif

#ifdef HAL_SPI_MODULE_ENABLED
WEAK const PinMap PinMap_SPI_SCLK[] = {
{PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
{PA_5_ALT1, SUBGHZSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF13_DEBUG_SUBGHZSPI)},
{NC, NP, 0}
};
#endif

#ifdef HAL_SPI_MODULE_ENABLED
WEAK const PinMap PinMap_SPI_SSEL[] = {
{PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
{PA_4_ALT1, SUBGHZSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF13_DEBUG_SUBGHZSPI)},
{NC, NP, 0}
};
#endif

//*** No CAN ***

//*** No ETHERNET ***

//*** No QUADSPI ***

//*** No USB ***

//*** No SD ***

#endif /* ARDUINO_ELV_BM_TRX1 */
Loading

0 comments on commit 36fb912

Please sign in to comment.