Spark Logic

CRC Error Downloading STM32 Board Files in Arduino IDE

tcontrada Mon Jul 09, 2018 2:28 pm

I noticed this problem last week and I am unable to work on my STM32 Blue Pill. When trying to download the latest or even past board files I get the following error message, see attached image. Anyone else having the same issue?

Image

Replies

fpiSTM Wed Jul 11, 2018 6:27 pm

So there is no issue…
Read the Release note:
https://github.com/stm32duino/Arduino_C … /tag/1.3.0

Review Serial menu, 3 options:

Enabled with generic Serial: default, define HAL_UART_MODULE_ENABLED
and instantiate Serial using SERIAL_UART_INSTANCE and PIN_SERIAL_RX/PIN_SERIAL_Tx
Enabled without generic Serial: define HAL_UART_MODULE_ENABLED
Disabled (No Serial): HAL_UART_MODULE_ENABLED not defined
Allow to build without HAL_UART_MODULE_ENABLED (save memory)
Now, HAL_UART_MODULE_ENABLED should not be defined in stm32yyxx_hal_conf.h

As I said in my previous post up to you to declare the instance.

[fpiSTM – Wed Jul 11, 2018 3:17 pm] –
So up to you to define other instance you want to use…
HardwareSerial Serial2(rx, tx);

tcontrada Wed Jul 11, 2018 8:34 pm

I didn’t actually read the release notes for 1.3.0, but what I can say is that with 1.2.0 I can just declare Serial1, Serial2, Serial3, etc. without the other initialization. When I already had all my code written in 1.2.0 and then upgraded to 1.3.0, then my previous code no longer worked, i.e. 1.3.0 not actually backward compatible.

Honestly, I like 1.2.0 better for this reason. MHO…

-Tony

fpiSTM Wed Jul 11, 2018 8:40 pm

No worries. Just tell you this is not a bug.
The way it was one before was to set by the menu a switch to enable several Serial.
Only the generic, the first 3 serial or all possible Serial.
This was not convenient to enable only wanted Serialx. Example if user wants Serial3 and Serial7, he do not need Serial2, Serial4/5/6/8/9/10 for STM32 which have those Serial.

To use your previous code. Add a build_opt.h file to your sketch then define the Serial you want, for example to have Serial2 and Serial3:
-DENABLE_HWSERIAL2 -DENABLE_HWSERIAL3

Sign in to reply