Skip to content

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

Closed
@ttimasdf

Description

@ttimasdf

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 🙏

/* Call the clock system intitialization function.*/
bl SystemInit
/* Call static constructors */
bl __libc_init_array
/* Call the application's entry point.*/
bl main
bx lr

How To Reproduce

TODO: I'll add more detailed tomorrow

Additional context

The patch is available at ttimasdf/Arduino_Core_STM32@acbd6cd

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcmsisCMSIS-related issue or pull-request.internal bug trackerIssue confirmed and logged into the internal bug tracking systemquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions