Skip to content

Commit

Permalink
1.1.0
Browse files Browse the repository at this point in the history
- added support for STM32G0 series
- added SIMPLE option to test build script
- simplified platform specific EXTI handling
- fixed STM32F0 interrupt handling
- removed use of unaccacessible RCC_GetSystemClockFreq() function

Signed-off-by: Daniel Starke <daniel-email@gmx.net>
  • Loading branch information
daniel-starke committed Apr 3, 2022
1 parent c10d882 commit 32669d7
Show file tree
Hide file tree
Showing 12 changed files with 993 additions and 554 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/compatibility-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ jobs:
- series: "f7"
arch: "cortex-m7"
mcu: "stm32f730r8t6"
- series: "g0"
arch: "cortex-m0plus"
mcu: "stm32g030c8t6"
- series: "g4"
arch: "cortex-m4"
mcu: "stm32g473cbt6"
Expand All @@ -50,7 +53,6 @@ jobs:
mcu: "stm32l552cct6"

# Once support was added:
# SERIES="g0" ARCH="cortex-m0plus" MCU="stm32g030c8t6"
# SERIES="mp1" ARCH="cortex-m4" MCU="stm32mp151aab3"
# SERIES="u5" ARCH="cortex-m33" MCU="stm32u575rit6"
# SERIES="wb" ARCH="cortex-m4" MCU="stm32wb55cgu6"
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ Done
- [x] keywords.txt
- [x] Example Board
- [x] disabling macros
- [ ] add support for STM32G0 (new pull request to make `RCC_GetSystemClockFreq()` public)
- [ ] add support for STM32MP1 (needs [PlatformIO support](https://github.com/platformio/platform-ststm32/issues/439))
- [ ] add support for STM32U5 (needs [PlatformIO support](https://github.com/platformio/platform-ststm32/issues/439))
- [ ] add support for STM32WL (needs [PlatformIO support](https://github.com/platformio/platform-ststm32/issues/439))
Expand Down Expand Up @@ -194,7 +193,7 @@ Issues
======

- periphery locking is not implemented for STM32MP1
- handling of analog control register ASC0 is missing in pinModeEx()
- handling of analog control register ASC0 is missing in `pinModeEx()`
- `__HAL_LOCK()` is basically [broken](https://community.st.com/s/question/0D50X00009XkeOGSAZ/questions-surrounding-hallock) but [may be fixed](https://community.st.com/s/question/0D50X0000C5Tns8SQC/bug-stm32-hal-driver-lock-mechanism-is-not-interrupt-safe) in your version.
- PWM output setup creates spikes (maybe due to `TIM_CCxChannelCmd(htim->Instance, Channel, TIM_CCx_ENABLE); /* Enable the Capture compare channel */`)

Expand Down
247 changes: 102 additions & 145 deletions etc/awkScripts/_irqGenerate.awk

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions etc/manual-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/sh
# @file manual-test.sh
# @author Daniel Starke
# @copyright Copyright 2022 Daniel Starke
# @date 2022-03-29
# @version 2022-03-29
#
# Run from within STM32CubeDuino directory.

Error() {
echo "Error: $@"
exit 1
}

rm -rf test || Error "Failed to remove temporary files."
while read SERIES ARCH MCU
do
export SERIES ARCH MCU
cp -pr etc/test . || Error "Failed to copy test template directory."
chmod ugo+x test/build.sh || Error "Failed to set test script permissions."
test/build.sh || Error "Test failed for SERIES=${SERIES} ARCH=${ARCH} MCU=${MCU}."
rm -rf test || Error "Failed to remove temporary files."
done <<_LIST
f0 cortex-m0 stm32f072vbt6
f1 cortex-m3 stm32f103c8t6
f2 cortex-m3 stm32f207zet6
f3 cortex-m4 stm32f303cct6
f4 cortex-m4 stm32f401ccu6
f7 cortex-m7 stm32f730r8t6
g0 cortex-m0plus stm32g030c8t6
g4 cortex-m4 stm32g473cbt6
h7 cortex-m7 stm32h743vit6
l0 cortex-m0plus stm32l053r8t6
l1 cortex-m3 stm32l152rbt6
l4 cortex-m4 stm32l432kcu6
l5 cortex-m33 stm32l552cct6
_LIST
10 changes: 9 additions & 1 deletion etc/test/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
# @author Daniel Starke
# @copyright Copyright 2022 Daniel Starke
# @date 2022-03-20
# @version 2022-03-20
# @version 2022-03-29
#
# Running from within the library root directory.
# The following environment variables are used:
# SERIES - MCU series (e.g. l4)
# ARCH - MCU architecture (e.g. cortex-m4)
# MCU - MCU name (e.g. stm32l432kcu6)
#
# Optionally, set SIMPLE=1 to build only the trivial case.

Error() {
echo "Error: $@"
Expand All @@ -28,6 +30,12 @@ python BuildScript.py "${ARCH}" "${MCU}" "test_board" > test/boards/test_board.j

cd test || Error "Failed to change directory to \"test\"."

# Build only trivial case.
if [ "x1" = "x${SIMPLE}" ]; then
pio run || Error "Failed to build blinky for ${MCU} (${ARCH})."
exit 0
fi

# Build with different settings.
while read DEF
do
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stm32cubeduino",
"version": "1.0.0",
"version": "1.1.0",
"description": "Port of the Arduino API for the STM32 Cube framework.",
"keywords": "arduino, stm32, stm32cube, stm32cubeduino",
"platforms": "ststm32",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=STM32CubeDuino
version=1.0.0
version=1.1.0
author=Daniel Starke
maintainer=Daniel Starke
sentence=Port of the Arduino API for the STM32 Cube framework.
Expand Down
6 changes: 3 additions & 3 deletions src/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author Daniel Starke
* @copyright Copyright 2020-2022 Daniel Starke
* @date 2020-06-07
* @version 2022-03-21
* @version 2022-04-03
*
* Inspired from Linux Kernel. Usage example:
* @code .cpp
Expand All @@ -19,9 +19,9 @@
/** Derived from `ARDUINO` which is defined in `BuildScript.py` */
#define ARDUINO_API_VERSION ARDUINO

#define STM32CUBEDUINO "1.0.0"
#define STM32CUBEDUINO "1.1.0"
#define STM32CUBEDUINO_MAJOR 1
#define STM32CUBEDUINO_MINOR 0
#define STM32CUBEDUINO_MINOR 1
#define STM32CUBEDUINO_PATCH 0

#define STM32CUBEDUINO_VERSION(x, y, z) ((x << 16) + (y << 8) + z)
Expand Down
Loading

0 comments on commit 32669d7

Please sign in to comment.