Rename STM32L073 references to actually used STM32L072

This commit is contained in:
Martin Jäger
2020-05-06 12:53:26 +02:00
parent 8380b928df
commit 9787397708
17 changed files with 28 additions and 30 deletions
+4 -4
View File
@@ -10,7 +10,7 @@ Coding style is described [here](https://github.com/LibreSolar/coding-style).
## Supported devices
The software is configurable to support different charge controller PCBs with STM32F072, low-power STM32L072/3 or most recent STM32G431 MCUs:
The software is configurable to support different charge controller PCBs with STM32F072, low-power STM32L072 or most recent STM32G431 MCUs:
- [Libre Solar MPPT 12/24V 20A with CAN](https://github.com/LibreSolar/MPPT-2420-LC)
- [Libre Solar MPPT 12V 10A with USB](https://github.com/LibreSolar/MPPT-1210-HUS)
@@ -26,7 +26,7 @@ git clone --recursive https://github.com/LibreSolar/charge-controller-firmware
Unfortunately, the green GitHub "Clone or download" button does not include submodules. If you cloned the repository already and want to pull the submodules, run `git submodule update --init --recursive`.
### PlatfrormIO
### PlatformIO
It is suggested to use Visual Studio Code and PlatformIO for firmware development, as it simplifies compiling and uploading the code a lot:
@@ -97,9 +97,9 @@ st-flash 1.5.1
check the connection between the programmer (for example the ST-Link of the Nucleo board) and the charge controller.
## Bootloader Support (STM32L07x only)
## Bootloader Support (STM32L072 only)
The custom linker script file STM32L073XZ.ld.link_script.ld needs to be updated before generating the application firmware binary. For each application, the flash start address and the maximum code size need to be updated in this file. Currently, the locations 0x08001000 and 0x08018000 are used for applications 1 & 2 respectively.
The custom linker script file STM32L072XZ.ld.link_script.ld needs to be updated before generating the application firmware binary. For each application, the flash start address and the maximum code size need to be updated in this file. Currently, the locations 0x08001000 and 0x08018000 are used for applications 1 & 2 respectively.
## API documentation
+1 -1
View File
@@ -3,4 +3,4 @@
config BOARD_MPPT_1210_HUS
bool "Libre Solar MPPT 1210 HUS"
depends on SOC_STM32L073XX
depends on SOC_STM32L072XX
+1 -1
View File
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
board_runner_args(jlink "--device=STM32L073RZ" "--speed=4000")
board_runner_args(jlink "--device=STM32L072RZ" "--speed=4000")
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
+2 -2
View File
@@ -5,11 +5,11 @@
*/
/dts-v1/;
#include <st/l0/stm32l073Xz.dtsi>
#include <st/l0/stm32l072Xz.dtsi>
/ {
model = "Libre Solar MPPT 1210 HUS";
compatible = "st,stm32l073";
compatible = "st,stm32l072";
pcb {
compatible = "charge-controller";
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_SOC_SERIES_STM32L0X=y
CONFIG_SOC_STM32L073XX=y
CONFIG_SOC_STM32L072XX=y
# General Kernel Options
CONFIG_CORTEX_M_SYSTICK=y
+1 -1
View File
@@ -3,4 +3,4 @@
config BOARD_PWM_2420_LUS
bool "Libre Solar PWM 2420 LUS"
depends on SOC_STM32L073XX
depends on SOC_STM32L072XX
+1 -1
View File
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
board_runner_args(jlink "--device=STM32L073RZ" "--speed=4000")
board_runner_args(jlink "--device=STM32L072RZ" "--speed=4000")
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
-1
View File
@@ -12,7 +12,6 @@
#include <pinmux/stm32/pinmux_stm32.h>
/* pin assignments for NUCLEO-L073RZ board */
static const struct pin_config pinconf[] = {
#ifdef CONFIG_UART_1
{STM32_PIN_PA9, STM32L0_PINMUX_FUNC_PA9_USART1_TX},
+2 -2
View File
@@ -5,11 +5,11 @@
*/
/dts-v1/;
#include <st/l0/stm32l073Xz.dtsi>
#include <st/l0/stm32l072Xz.dtsi>
/ {
model = "Libre Solar PWM 2420 LUS";
compatible = "st,stm32l073";
compatible = "st,stm32l072";
pcb {
compatible = "charge-controller";
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_SOC_SERIES_STM32L0X=y
CONFIG_SOC_STM32L073XX=y
CONFIG_SOC_STM32L072XX=y
# General Kernel Options
CONFIG_CORTEX_M_SYSTICK=y
+1 -2
View File
@@ -1,5 +1,4 @@
# This is an ST NUCLEO-L073RZ board with single STM32L073RZ chip.
# http://www.st.com/en/evaluation-tools/nucleo-l073rz.html
source [find interface/stlink.cfg]
transport select hla_swd
+3 -3
View File
@@ -1,19 +1,19 @@
{
"build": {
"cpu": "cortex-m0plus",
"extra_flags": "-DSTM32L073xx",
"extra_flags": "-DSTM32L072xx",
"f_cpu": "32000000L",
"framework_extra_flags": {
"arduino": "-D__CORTEX_SC=0"
},
"mcu": "stm32l073rz",
"mcu": "stm32l072rz",
"variant": "MPPT-1210-HUS"
},
"debug": {
"default_tools": [
"stlink"
],
"jlink_device": "STM32L073RZ",
"jlink_device": "STM32L072RZ",
"onboard_tools": [
"stlink"
],
+3 -3
View File
@@ -1,19 +1,19 @@
{
"build": {
"cpu": "cortex-m0plus",
"extra_flags": "-DSTM32L073xx",
"extra_flags": "-DSTM32L072xx",
"f_cpu": "32000000L",
"framework_extra_flags": {
"arduino": "-D__CORTEX_SC=0"
},
"mcu": "stm32l073rz",
"mcu": "stm32l072rz",
"variant": "PWM-2420-LUS"
},
"debug": {
"default_tools": [
"stlink"
],
"jlink_device": "STM32L073RZ",
"jlink_device": "STM32L072RZ",
"onboard_tools": [
"stlink"
],
+1 -1
View File
@@ -78,7 +78,7 @@ board = pwm_2420_lus
board = pwm_2420_lus
build_flags = ${env.build_flags}
-D BOOTLOADER_ENABLED
-Wl,-T'"$PROJECT_DIR/boards/STM32L073XZ.ld.link_script.ld"',-v
-Wl,-T'"$PROJECT_DIR/boards/STM32L072XZ.ld.link_script.ld"',-v
[env:unit_test]
platform = native
+4 -4
View File
@@ -9,9 +9,9 @@
// mbed defines STM32Fxx variables automatically, so we define them also for Zephyr
#ifdef CONFIG_SOC_STM32L073XX
#ifdef CONFIG_SOC_STM32L072XX
#define STM32L0
#define STM32L073
#define STM32L072
#endif
#ifdef CONFIG_SOC_STM32F072XB
@@ -24,8 +24,8 @@
#define STM32G431
#endif
#ifdef STM32L073
#include "stm32l073xx.h"
#ifdef STM32L072
#include "stm32l072xx.h"
#endif
#ifdef STM32F072
+2 -2
View File
@@ -18,8 +18,8 @@
#include "debug.h"
#include "helper.h"
#ifdef CONFIG_SOC_STM32L073XX
#include "stm32l073xx.h"
#ifdef CONFIG_SOC_STM32L072XX
#include "stm32l072xx.h"
#endif
#ifdef CONFIG_SOC_STM32G431XX