Skip to content

Update 23 diciembre 2020 #5

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 64 commits into from
Dec 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
588452e
Implement requestFrom(uint8_t address, size_t quantity, bool sendStop)
aaron-neal Sep 22, 2020
e5ac1a4
[L1] Update STM32L1xx HAL Drivers to v1.4.2
fpistm Oct 11, 2020
893062d
adding missing i2c2 SCL pinmap for DISCO_F407G
owennewo Oct 11, 2020
2d652e2
Update HardwareTimer.cpp
patricklaf Oct 19, 2020
642e6a2
Merge pull request #1184 from porkyneal/master
ABOSTM Oct 20, 2020
4aae4ed
[SPI] Fix CS pin check
fpistm Oct 25, 2020
6f9e4cb
Moved from CMSIS 5.5.1 to 5.6.0
fpistm Oct 28, 2020
45f9a30
[CI] Add CMSIS DSP to example
fpistm Oct 28, 2020
8b3405d
[CI] Launch build when examples are modified
fpistm Oct 28, 2020
7afd37c
Moved from CMSIS 5.6.0 to 5.7.0
fpistm Oct 29, 2020
e50affb
[CMSIS DSP] Update include path and source files
fpistm Oct 29, 2020
169f42d
[Wire] modifying to be able to do multiple .write() calls in i2cReque…
Oct 29, 2020
65335d8
[Wire] fix onReceiveEvent() not being triggered when a repeated start…
Oct 29, 2020
e975967
[F1] Update STM32F1xx HAL Drivers to v1.1.7
fpistm Oct 30, 2020
062e1b4
[F2] Update STM32F2xx HAL Drivers to v1.2.6
fpistm Oct 30, 2020
554a0a8
Merge pull request #1221 from DanielLiebler/i2cSlaveFix
fpistm Oct 30, 2020
12ded37
Merge pull request #1224 from fpistm/updateCube
fpistm Oct 30, 2020
dfbe264
[F4] Update STM32F4xx HAL Drivers to v1.7.10
fpistm Oct 30, 2020
fc133df
[F4] Fix HAL_RCC_USART3 definition for STM32F412Cx
fpistm Mar 6, 2020
748f532
[F4] Fix IS_ADC_CHANNEL()
TheCodeSharman Sep 4, 2020
7e0ea23
[L1] Update STM32L1xx HAL Drivers to v1.4.3
fpistm Oct 30, 2020
1faf0a0
Merge pull request #1225 from fpistm/UpdateCubeF4L1
fpistm Oct 30, 2020
035bfa3
UART - Remove repetitive NVIC SetPriority calls
AbsoluteCatalyst Nov 2, 2020
6f731e5
[MP1] Update STM32MP1xx HAL Drivers to v1.3.0
fpistm Nov 3, 2020
ecb78ed
[MP1] Update STM32MP1xx CMSIS Drivers to v1.3.0
fpistm Nov 3, 2020
2918359
[MP1] Update wrapped files
fpistm Nov 3, 2020
8ebb30b
[MP1] Review HAL default configuration
kbumsik Oct 12, 2019
1a555c9
Update stm32wrapper.py script for stm32mp1 startup files
fpistm Nov 3, 2020
66a532b
[MP1] Update wrapped files
fpistm Nov 3, 2020
2375e8c
[MP1] Update HAL default configuration
fpistm Nov 3, 2020
b1aeb25
Merge pull request #1230 from fpistm/updateMP1
fpistm Nov 4, 2020
bee8561
Allow users to tweak the I2C timeout (#1233)
pi-r-p Nov 6, 2020
caa8a28
[CI] Use --additional-urls for board details
fpistm Aug 26, 2020
6df682d
[PNUCLEO_WB55RG] BLE support configuration
FRASTM Nov 9, 2020
a4e0ff1
[HardwareTimer]Fix typo
fpistm Dec 1, 2020
5f95b95
Fix assert_param in I2C HAL.
ghent360 Nov 29, 2020
d856484
Update script to add new STM32Cube serie to the core
FRASTM Dec 1, 2020
8888918
HardwareTimer: Fix assert failed when using TIMER_OUTPUT_COMPARE
ABOSTM Dec 1, 2020
d69a2f8
[F3] Update STM32F3xx HAL Drivers to v1.5.5
fpistm Dec 2, 2020
5f97d14
[F3] Update STM32F3xx CMSIS Drivers to v2.3.5
fpistm Dec 2, 2020
64b3db0
Fix stm32update.py script
fpistm Dec 3, 2020
7f7bf8a
Fix stm32_def_build.h generation order
fpistm Dec 3, 2020
c8d9a2f
[F3] Update CMSIS Cortex-Mx Device Peripheral Access Layer System Sou…
fpistm Dec 2, 2020
ec83ff7
[L0] Update STM32L0xx HAL Drivers to v1.10.4
fpistm Dec 2, 2020
8c68bf9
[L0] Update STM32L0xx CMSIS Drivers to v1.9.1
fpistm Dec 2, 2020
100d972
[L0] Update wrapped files
fpistm Dec 2, 2020
4686383
[L0] Update HAL default configuration
fpistm Dec 2, 2020
b7c1346
[L0] Update CMSIS Cortex-Mx Device Peripheral Access Layer System Sou…
fpistm Dec 2, 2020
9b8a633
Merge pull request #1250 from fpistm/UpdateF3
fpistm Dec 3, 2020
02bf93b
[F0] Update STM32F0xx HAL Drivers to v1.7.5
fpistm Dec 3, 2020
4548a98
[F0] Update STM32F0xx CMSIS Drivers to v2.3.5
fpistm Dec 3, 2020
3cb57f6
[L0] Update CMSIS Cortex-Mx Device Peripheral Access Layer System Sou…
fpistm Dec 3, 2020
1d6d327
Merge pull request #1251 from fpistm/UpdateL0
fpistm Dec 3, 2020
750710a
Merge pull request #1252 from fpistm/updateF0
fpistm Dec 3, 2020
98dd715
[U(S)ART] Add USART10 support
fpistm Dec 1, 2020
55fa0df
[U(S)ART] Update SERIAL_UART_INSTANCE for LPUART1
fpistm Dec 1, 2020
2c99b52
[Serial] Declare extern only if available
fpistm Dec 2, 2020
b963d89
Merge pull request #1255 from fpistm/Fix_UART
fpistm Dec 4, 2020
b2dc5be
Add I2S and SAI support in the HAL conf
cparata Dec 4, 2020
5d301ad
[WB] Update STM32WBxx HAL Drivers to v1.7.0
fpistm Dec 9, 2020
becad8c
[WB] Update STM32WBxx CMSIS Drivers to v1.7.0
fpistm Dec 9, 2020
5937131
[MKR_SHARKY] LSI is no longer a source for RF WUP
fpistm Dec 9, 2020
aa563b0
Merge pull request #1261 from fpistm/UpdateWB
fpistm Dec 9, 2020
b626ed2
dtostrf should not print fractional part if prec is 0
fpistm Dec 21, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/workflows/Continuous-Integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- CI/**
- '!CI/build/arduino-cli.py'
- '!CI/build/platformio-builder.py'
- '!CI/build/examples/**'
- tools/**
- '!tools/platformio-build.py'
pull_request:
Expand All @@ -20,6 +21,7 @@ on:
- CI/**
- '!CI/build/arduino-cli.py'
- '!CI/build/platformio-builder.py'
- '!CI/build/examples/**'
- tools/**
- '!tools/platformio-build.py'
jobs:
Expand Down
2 changes: 1 addition & 1 deletion CI/build/arduino-cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ def find_board():
for fqbn in fqbn_list_tmp:
try:
output = subprocess.check_output(
[arduino_cli, "board", "details", "--format", "json", fqbn],
[arduino_cli, "board", "details", "--additional-urls", stm32_url, "--format", "json", fqbn],
stderr=subprocess.STDOUT,
).decode("utf-8")
except subprocess.CalledProcessError as e:
Expand Down
54 changes: 53 additions & 1 deletion CI/build/examples/BareMinimum/BareMinimum.ino
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,36 @@
#include <SoftwareSerial.h>
#include <Wire.h>

#include <CMSIS_DSP.h>
/* ----------------------------------------------------------------------
Defines each of the tests performed
------------------------------------------------------------------- */
#define MAX_BLOCKSIZE 2
#define DELTA (0.0001f)
/* ----------------------------------------------------------------------
Test input data for Floating point sin_cos example for 32-blockSize
Generated by the MATLAB randn() function
------------------------------------------------------------------- */
const float32_t testInput_f32[MAX_BLOCKSIZE] =
{
-1.244916875853235400, -4.793533929171324800
};
const float32_t testRefOutput_f32 = 1.000000000;
/* ----------------------------------------------------------------------
Declare Global variables
------------------------------------------------------------------- */
uint32_t blockSize = 2;
float32_t testOutput;
float32_t cosOutput;
float32_t sinOutput;
float32_t cosSquareOutput;
float32_t sinSquareOutput;
/* ----------------------------------------------------------------------
Max magnitude FFT Bin test
------------------------------------------------------------------- */
arm_status status;
/* CMSIS_DSP */

#ifndef USER_BTN
#define USER_BTN 2
#endif
Expand Down Expand Up @@ -103,6 +133,28 @@ void setup() {
Wire.endTransmission();
Wire.requestFrom(2, 1);
Wire.end();

// CMSIS DSP
float32_t diff;
for (uint32_t i = 0; i < blockSize; i++) {
cosOutput = arm_cos_f32(testInput_f32[i]);
sinOutput = arm_sin_f32(testInput_f32[i]);
arm_mult_f32(&cosOutput, &cosOutput, &cosSquareOutput, 1);
arm_mult_f32(&sinOutput, &sinOutput, &sinSquareOutput, 1);
arm_add_f32(&cosSquareOutput, &sinSquareOutput, &testOutput, 1);
/* absolute value of difference between ref and test */
diff = fabsf(testRefOutput_f32 - testOutput);
/* Comparison of sin_cos value with reference */
status = (diff > DELTA) ? ARM_MATH_TEST_FAILURE : ARM_MATH_SUCCESS;
if ( status == ARM_MATH_TEST_FAILURE) {
break;
}
}
if (status != ARM_MATH_SUCCESS) {
Serial.printf("FAILURE\n");
} else {
Serial.printf("SUCCESS\n");
}
}

void loop() {
Expand All @@ -120,4 +172,4 @@ void receiveEvent(int) {
// this function is registered as an event, see setup()
void requestEvent() {
Wire.write("x");
}
}
89 changes: 66 additions & 23 deletions CI/utils/stm32update.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,16 @@ def checkVersion(serie, repo_path):
"stm32{}xx_hal.c".format(lserie),
)
cube_HAL_versions[serie] = parseVersion(HAL_file)
HAL_file = os.path.join(
hal_dest_path,
"STM32{}xx_HAL_Driver".format(userie),
"Src",
"stm32{}xx_hal.c".format(lserie),
)
core_HAL_versions[serie] = parseVersion(HAL_file)
if upargs.add:
core_HAL_versions[serie] = "0.0.0"
else:
HAL_file = os.path.join(
hal_dest_path,
"STM32{}xx_HAL_Driver".format(userie),
"Src",
"stm32{}xx_hal.c".format(lserie),
)
core_HAL_versions[serie] = parseVersion(HAL_file)

CMSIS_file = os.path.join(
repo_path,
Expand All @@ -248,13 +251,16 @@ def checkVersion(serie, repo_path):
"stm32{}xx.h".format(lserie),
)
cube_CMSIS_versions[serie] = parseVersion(CMSIS_file)
CMSIS_file = os.path.join(
cmsis_dest_path,
"STM32{}xx".format(userie),
"Include",
"stm32{}xx.h".format(lserie),
)
core_CMSIS_versions[serie] = parseVersion(CMSIS_file)
if upargs.add:
core_CMSIS_versions[serie] = "0.0.0"
else:
CMSIS_file = os.path.join(
cmsis_dest_path,
"STM32{}xx".format(userie),
"Include",
"stm32{}xx.h".format(lserie),
)
core_CMSIS_versions[serie] = parseVersion(CMSIS_file)

# print("STM32Cube" + serie + " HAL version: " + cube_HAL_versions[serie])
# print("STM32Core " + serie + " HAL version: " + core_HAL_versions[serie])
Expand Down Expand Up @@ -417,7 +423,9 @@ def updateCore():
core_CMSIS_version = core_CMSIS_versions[serie]
cube_CMSIS_version = cube_CMSIS_versions[serie]
cube_version = cube_versions[serie]
regexmd = re.compile(rf"(STM32{serie}:\s+)\d+.\d+.\d+")
regexmd_up = re.compile(rf"(STM32{serie}:\s+)\d+.\d+.\d+")
regexmd_serie = re.compile(r"STM32(\w+):\s+\d+.\d+.\d+")
regexmd_add = re.compile(r"(STM32)\w+(:\s+)\d+.\d+.\d+")
HAL_updated = False
CMSIS_updated = False
hal_commit_msg = """[{0}] Update STM32{0}xx HAL Drivers to v{1}
Expand Down Expand Up @@ -453,9 +461,22 @@ def updateCore():
)
copyFolder(HAL_serie_cube_path, HAL_serie_core_path, {"*.chm"})
# Update MD file
for line in fileinput.input(md_HAL_path, inplace=True):
line = regexmd.sub(rf"\g<1>{cube_HAL_version}", line)
print(line, end="")
if upargs.add: # Add the new STM32YY entry
added = False
for line in fileinput.input(md_HAL_path, inplace=True):
m = regexmd_serie.search(line)
if not added and m and m.group(1) > serie.upper():
print(
regexmd_add.sub(
rf"\g<1>{serie}\g<2>{cube_HAL_version}", line
),
end="",
)
added = True
print(line, end="")
else: # Update the version
for line in fileinput.input(md_HAL_path, inplace=True):
print(regexmd_up.sub(rf"\g<1>{cube_HAL_version}", line), end="")
# Commit all HAL files
commitFiles(core_path, hal_commit_msg)
HAL_updated = True
Expand All @@ -480,9 +501,22 @@ def updateCore():
)
copyFolder(CMSIS_serie_cube_path, CMSIS_serie_dest_path, {"iar", "arm"})
# Update MD file
for line in fileinput.input(md_CMSIS_path, inplace=True):
line = regexmd.sub(rf"\g<1>{cube_CMSIS_version}", line)
print(line, end="")
if upargs.add: # Add the new STM32YY entry
added = False
for line in fileinput.input(md_CMSIS_path, inplace=True):
m = regexmd_serie.search(line)
if not added and m and m.group(1) > serie.upper():
print(
regexmd_add.sub(
rf"\g<1>{serie}\g<2>{cube_CMSIS_version}", line
),
end="",
)
added = True
print(line, end="")
else: # Update the version
for line in fileinput.input(md_CMSIS_path, inplace=True):
print(regexmd_up.sub(rf"\g<1>{cube_CMSIS_version}", line), end="")
# Commit all CMSIS files
commitFiles(core_path, cmsis_commit_msg)
CMSIS_updated = True
Expand All @@ -506,9 +540,13 @@ def updateCore():
upparser.add_argument(
"-c", "--check", help="Check versions. Default all.", action="store_true"
)
upparser.add_argument(
group = upparser.add_mutually_exclusive_group()
group.add_argument(
"-s", "--serie", metavar="pattern", help="Pattern of the STM32 serie(s) to update"
)
group.add_argument(
"-a", "--add", metavar="name", help="STM32 serie name to add. Ex: 'F1'"
)

upargs = upparser.parse_args()

Expand All @@ -519,8 +557,13 @@ def main():
checkConfig()
updateCoreRepo()
stm32_list = genSTM32List(hal_dest_path, upargs.serie)
if upargs.add:
if upargs.add.upper() not in stm32_list:
stm32_list = [upargs.add.upper()]
else:
print(upargs.add + " can't be added as it already exists!")
exit(1)
updateSTRepo()

if upargs.check:
printVersion()
else:
Expand Down
19 changes: 13 additions & 6 deletions CI/utils/stm32wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,16 @@ def print_LL_header(open_file, name):


def printCMSISStartup(log):
filelist = glob.glob(
os.path.join(
CMSIS_Device_ST_path, "STM32*", "Source", "Templates", "gcc", "startup_*.s",
filelist = sorted(
glob.glob(
os.path.join(
CMSIS_Device_ST_path,
"STM32*",
"Source",
"Templates",
"gcc",
"startup_*.s",
)
)
)
if len(filelist):
Expand Down Expand Up @@ -131,9 +138,9 @@ def printCMSISStartup(log):
# File name
fn = os.path.basename(fp)
valueline = re.split("_|\\.", fn)
upper = (
valueline[1].upper().replace("X", "x").replace("MP15xx", "MP1xx")
)
if "stm32mp15" in valueline[1] and not valueline[1].endswith("xx"):
valueline[1] += "xx"
upper = valueline[1].upper().replace("X", "x")
out_file.write(
""" #elif defined({})
#define CMSIS_STARTUP_FILE \"{}\"
Expand Down
18 changes: 14 additions & 4 deletions cores/arduino/HardwareSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@
#endif

#if defined(HAVE_HWSERIAL10)
HardwareSerial Serial10(UART10);
#if defined(USART10)
HardwareSerial Serial10(USART10);
#else
HardwareSerial Serial10(UART10);
#endif
void serialEvent10() __attribute__((weak));
#endif

Expand Down Expand Up @@ -218,16 +222,22 @@ HardwareSerial::HardwareSerial(void *peripheral, HalfDuplexMode_t halfDuplex)
setTx(PIN_SERIAL8_TX);
} else
#endif
#if defined(PIN_SERIAL9_TX) && defined(UART9)
#if defined(PIN_SERIAL9_TX) && defined(UART9_BASE)
if (peripheral == UART9) {
#if defined(PIN_SERIAL9_RX)
setRx(PIN_SERIAL9_RX);
#endif
setTx(PIN_SERIAL9_TX);
} else
#endif
#if defined(PIN_SERIAL10_TX) && defined(UART10)
if (peripheral == UART10) {
#if defined(PIN_SERIAL10_TX) &&\
(defined(USART10_BASE) || defined(UART10_BASE))
#if defined(USART10_BASE)
if (peripheral == USART10)
#elif defined(UART10_BASE)
if (peripheral == UART10)
#endif
{
#if defined(PIN_SERIAL10_RX)
setRx(PIN_SERIAL10_RX);
#endif
Expand Down
44 changes: 33 additions & 11 deletions cores/arduino/HardwareSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,38 @@ class HardwareSerial : public Stream {
void configForLowPower(void);
};

extern HardwareSerial Serial1;
extern HardwareSerial Serial2;
extern HardwareSerial Serial3;
extern HardwareSerial Serial4;
extern HardwareSerial Serial5;
extern HardwareSerial Serial6;
extern HardwareSerial Serial7;
extern HardwareSerial Serial8;
extern HardwareSerial Serial9;
extern HardwareSerial Serial10;
extern HardwareSerial SerialLP1;
#if defined(USART1)
extern HardwareSerial Serial1;
#endif
#if defined(USART2)
extern HardwareSerial Serial2;
#endif
#if defined(USART3)
extern HardwareSerial Serial3;
#endif
#if defined(UART4) || defined(USART4)
extern HardwareSerial Serial4;
#endif
#if defined(UART5) || defined(USART5)
extern HardwareSerial Serial5;
#endif
#if defined(USART6)
extern HardwareSerial Serial6;
#endif
#if defined(UART7) || defined(USART7)
extern HardwareSerial Serial7;
#endif
#if defined(UART8) || defined(USART8)
extern HardwareSerial Serial8;
#endif
#if defined(UART9)
extern HardwareSerial Serial9;
#endif
#if defined(UART10) || defined(USART10)
extern HardwareSerial Serial10;
#endif
#if defined(LPUART1)
extern HardwareSerial SerialLP1;
#endif

#endif
Loading