Page 1 of 1

Compilation problem with 2.9.0 core (and 2.8.0)

Posted: Thu Jan 02, 2025 7:31 pm
by luca_stm32
Hi everybody and happy new year.

In this days, I tried to recompile an old sketch with 2.9.0 core but it fails and Output console show so many errors that I can't see the first one and I don't know how to redirect Output console messages to file.
Here are some:
/home/luca/.arduino15/packages/STMicroelectronics/hardware/stm32/2.9.0/system/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:299:1: error: unknown type name 'HAL_StatusTypeDef'; did you mean 'PCD_StateTypeDef'?
299 | HAL_StatusTypeDef HAL_SetTickFreq(HAL_TickFreqTypeDef Freq);
| ^~~~~~~~~~~~~~~~~
| PCD_StateTypeDef
/home/luca/.arduino15/packages/STMicroelectronics/hardware/stm32/2.9.0/system/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_usb.h:582:1: error: unknown type name 'HAL_StatusTypeDef'; did you mean 'HAL_SD_StateTypeDef'?
582 | HAL_StatusTypeDef USB_FlushRxFifo(USB_TypeDef const *USBx);
| ^~~~~~~~~~~~~~~~~
| HAL_SD_StateTypeDef
/home/luca/.arduino15/packages/STMicroelectronics/hardware/stm32/2.9.0/system/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2s.h:405:1: error: unknown type name 'HAL_StatusTypeDef'; did you mean 'HAL_I2S_StateTypeDef'?
405 | HAL_StatusTypeDef HAL_I2S_Init(I2S_HandleTypeDef *hi2s);
| ^~~~~~~~~~~~~~~~~
| HAL_I2S_StateTypeDef

So I have installed 2.8.0 core and I gave the same errors.
I downgraded to 2.7.0 core and errors disappeared...
My sketch use SPI, I2C, RTC and USB.

Board is a Generic F103RETX.

My question is: is there someting changed from 2.8.0 core about HAL usage? Do I need to make some changes in my sketch (for example, add the build_opt.h file with some directives) for make the sketch compilation work again?
Is there someone that knows how to redirect Output console to file in order to see all errors?

Thanks again for your fantastic work.

Best regrard.
Luca

Re: Compilation problem with 2.9.0 core (and 2.8.0)

Posted: Fri Jan 03, 2025 8:56 am
by luca_stm32
Upgrade.
Today I started arduino-ide with the following settings:
./arduino-ide --no-sandbox >/tmp/logfile.txt 2>/tmp/errfile.txt

In errfile.txt I noticed following warnings:
2025-01-03T08:49:29.425Z root WARN URI <file:///home/luca/.arduino15/packages/STMicroelectronics/hardware/stm32/2.9.0/system/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h> is not contained in sketch: NAME OF SKETCH

2025-01-03T08:49:29.432Z root WARN URI <file:///home/luca/.arduino15/packages/STMicroelectronics/hardware/stm32/2.9.0/system/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h> is not contained in sketch: NAME OF SKETCH

and other warning lines concerning STM32F1xx_HAL_Drivers .h not included in sketch files.

Have I missed something?

Luca

Re: Compilation problem with 2.9.0 core (and 2.8.0)

Posted: Fri Jan 03, 2025 8:59 am
by fpiSTM
Could you be more precise on your setup, board option,... any define added,...

Re: Compilation problem with 2.9.0 core (and 2.8.0)

Posted: Fri Jan 03, 2025 9:23 am
by luca_stm32
Goodmornng fpiSTM.
My board is a custom board using a STM32F103RE micro.

My Arduino IDE Tool configuration is:
Board Part Number: Generic F103RETX
C Runtime Library: NewLib Nano (default)
USB Support: CDC
U(S)ART Support: Enabled
USB Speed: Low/Full Speed

My perplexity is that the same schetck with the same libraries, with 2.7.X STM32 core, compiles.

Luca

Re: Compilation problem with 2.9.0 core (and 2.8.0)

Posted: Fri Jan 03, 2025 9:45 am
by fpiSTM
As I thought, no issue to build with those options moreover CI made several builds and report no error. 2.8.1 version was downloaded more than 40k and I guess if such kind of issue exists it would be already reported.
So you probably have an issue with your env or sketch, hard to help.
Could you share your sketch?

Re: Compilation problem with 2.9.0 core (and 2.8.0)

Posted: Fri Jan 03, 2025 9:53 am
by luca_stm32
If it is possible, I prefer to send it to you in private.
Is there a way to send you the files?

Re: Compilation problem with 2.9.0 core (and 2.8.0)

Posted: Fri Jan 03, 2025 10:26 am
by fpiSTM
You can send me a PM with a link where to download it.

Re: Compilation problem with 2.9.0 core (and 2.8.0)

Posted: Mon Jan 06, 2025 8:36 am
by fpiSTM
Issue identified and comes from ArduinoOTA library.
PR available here: https://github.com/JAndrassy/ArduinoOTA/pull/264