PlatformIO Community

Compiling CubeMX project without "framework"

My root issue is that the “stm32f1xx_hal_conf.h” thats included with pio’s stm32cube framework defines tick_int_priority as 0x0FU which is incorrect and causes various issues, it should be 0, and that is the case with the file that is generated by CubeMX.

Additionally, using a framework in this case when the necessary, up to date and clean files are there to begin with seems stupid / redundant, however no matter what I try I am unable to make my project work properly without it.

Just removing the framework and adding the Drivers folder generated by CubeMX folder to the prebuild_include will indeed make the project compile, however I am greeted by the error

warning: cannot find entry symbol _start; defaulting to 00008000

If I then however go ahead and add a _start method which executes main() in the main.c everything breaks down for whatever reason (Actual size should be something like 40%, which it is when using the framework)

Error: The program size (89044 bytes) is greater than maximum allowed (65536 bytes)
RAM:   [==        ]  23.6% (used 4824 bytes from 20480 bytes)
*** [checkprogsize] Explicit exit, status 1
Flash: [==========]  135.9% (used 89044 bytes from 65536 bytes)

I have checked out the other threads however cannot come to a solution, any help would be appreciated.