STMicroelectronics / STM32CubeF1

STM32Cube MCU Full Package for the STM32F1 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits))
Other
506 stars 170 forks source link

Purpose a fix to STM32F105 startup codes for proper initialization #30

Closed ttimasdf closed 3 years ago

ttimasdf commented 3 years ago

Describe the set-up

Describe the bug The premain() function provided by stm32duino is not properly called for HAL initialization. I've submitted a PR here stm32duino/Arduino_Core_STM32#1310 and been advised to also post the fix here. The only I can see is that it called something generated by the compiler. I refer to the startup code from lines below and submit the aforementioned PR. I'd be happy if anyone explain a little bit about why these lines are necessary for things to work 🙏

https://github.com/STMicroelectronics/STM32CubeF1/blob/003dfc9e6c2e424c19a25df3934afaf7fce660d6/Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/startup_stm32f103xb.s#L92-L98

How To Reproduce

TODO: I'll add more detailed tomorrow

Additional context

The patch is available at ttimasdf/Arduino_Core_STM32@acbd6cd7c6e71a26512fe684f1d01edaa34deb70

ttimasdf commented 3 years ago

Should I also submit an issue or PR here? https://github.com/STMicroelectronics/cmsis_device_f1

ALABSTM commented 3 years ago

Hi @ttimasdf,

Thank you for this contribution. It will be logged into our internal database and a fix will be made available in the frame of a future release.

In case you would like to create a p-r, it would be preferable that you push it to this repository to allow linking it to this issue. If you prefer to push it to the cmsis_device_f1 though, you can. I will transfer this issue there and link your p-r to it.

Regarding your question, I will try to provide you with an answer as soon as possible.

With regards,

ALABSTM commented 3 years ago

ST Internal Reference: 102149

RKOUSTM commented 3 years ago

Hi @ttimasdf,

I hope you are fine.

The issue you reported has been fixed in the frame of version v1.8.4 of the STM32CubeF1 published recently on GitHub.

Thank you again for having reported.

With regards,