Page 2 of 2

Re: Generic_F030RCT missing?

Posted: Thu Apr 04, 2024 11:25 am
by Mangy_Dog
fpiSTM wrote: Thu Apr 04, 2024 9:10 am You can optimize several things as explained in the wiki.
About code, I talk about the variant and the update you made else can't help on the clock issue. Some hardware info can help also. Like HSE? LSE?....
Well main clock issue will fixed on the next board revision, 8 or 16mhz...
The current config was pulled from cubeide, after going through several multipliers and dividers to get 25mhz to 45mhz.
The config should be pulling from HSE.
But i wondered even though cubeide resolved it, could the config still be bad for the chip, and it default to internal 8mhz?

Re: Generic_F030RCT missing?

Posted: Thu Apr 04, 2024 1:53 pm
by fpiSTM
In fact you simply can change the HSE_VALUE to the one you have, then the clock config will be inline.
You can define it to the variant_*.h or adding a hal_conf_extra.h file with the correct definition.
Even in Cube IDE you can change this value thanks cubeMX.
Default HSE_VALUE is simply a recommendation but several boards provide another value.

Re: Generic_F030RCT missing?

Posted: Thu Apr 11, 2024 2:43 pm
by ag123
Mangy_Dog wrote: Wed Apr 03, 2024 1:49 pm Binary size difference appears to be Newlib Standard vs Newlib nano setting... Not entirely sure what newlib is... :D
Clock situation still appears to be happening.
I once tried things like

Code: Select all

-nostdlib
-nostartfiles
-nodefaultlibs
https://gcc.gnu.org/onlinedocs/gcc-4.4. ... tions.html

and the build fails, it is there and then that you figure out if you have a dependency on stdlibs i.e. the usual c std libs.
things like printf(fmt, ... ) and most of thost c std libs is in there.

the notion is that for extreme leanness it'd take not linking the bulk of stdlibs, but that's difficult as it implies reinventing the wheel.
but that normally during linking there are options passed so that only functions that are actually dependent are linked.
And I'd guess there are limits to how the compiler, linker can do that.