> First, we should split the initialisation linker section into three > subsections: one for RCC records for activating the peripherals, one for the > "normal" peripheral initialisations, and the last for the "secondary" > peripheral initialisations that are used with some peripherals to actually > activate them. Then, we put these into the linker script in the right order, > and make sure that each record goes to the right section. This should fix > the ordering problem that you've been facing, Ivan. Done. https://github.com/Ell-i/Runtime/commit/64835532781cd19012648bdfb5299a8a5ebfe6e1 Ivan, please note that I didn't touch the USART initialisation, as you are working on that and I dind't want to create unnecessary merge conflicts. However, this now gives you better control in which order to handle the initialisation records, with the RCC records explicitly first. --Pekka