Closed Ho-Ro closed 3 weeks ago
Most of warnings not critical and related to ChibiOS
I use gcc v9.3.1 for compile, this version provide more compact code: text data bss dec hex filename 86668 648 40728 128044 1f42c build/H4.elf
If use v12.2.1 result: text data bss dec hex filename 87216 648 40728 128592 1f650 build/H4.elf
PS I use Eclipse xPack, this allow easy select compiler version PSS upload firmware builded by v12.2.1 on my H4 device, and it works well.
Remove warnings in tis commit https://github.com/DiSlord/NanoVNA-D/commit/ff96b9cc595f43e61d0d73acd0f1844fe3947024
Thx, I will try, but until tinySA is fixed I'll stay at the debian oldstable version 8.
I installed v8..v12 in parallel and can select one of these versions for my builds. Starting with version 9 these "ChibiOS" warnings appear, would an update of ChibiOS be required for the newer compiler versions?
To fix the ChibiOS warnings change this line
__ASM volatile ("MSR psp, %0\n" : : "r" (topOfProcStack) : "sp");
to
__ASM volatile ("MSR psp, %0\n" : : "r" (topOfProcStack) :);
and this line
__ASM volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) : "sp");
to
__ASM volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) :);
Reason Starting from gcc v9 it is deprecated that the SP is part of the clobber list, even if the SP is changed after the ASM code is called (because that is the purpose of the command "set SP"). Newer ChibiOS versions just omit the clobber list in both commands.
Compiling the tinySA source code with debian stable
gcc version 12.2.1 20221205 (15:12.2.rel1-1)
gives a buggy firmware - latest tinySA version as well as older versions.Compiling the NanoVNA-H firmware gives comparable warnings caused by ChibiOS. (I did not download this version to my NanoVNA-H because I assume that it also leads to a faulty device).
After downgrade to the debian oldstable version
gcc version 8.3.1 20190703 (release) [gcc-8-branch revision 273027] (15:8-2019-q3-1+b1)
it compiles fine.Warnings when compiling with GCC-ARM version 12: