-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Changes required for SDK 0.18 for testing using SDK 0.17 #93042
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes required for SDK 0.18 for testing using SDK 0.17 #93042
Conversation
The following west manifest projects have changed revision in this Pull Request: ⛔ DNM label due to: 3 projects with PR revision Note: This message is automatically posted and updated by the Manifest GitHub Action. |
2db5239
to
0ee55f3
Compare
763b2da
to
d64055d
Compare
4be3f0b
to
324628b
Compare
324628b
to
9afbb6e
Compare
Disable the default startup file with -nostartfiles. Signed-off-by: Keith Packard <[email protected]>
When the target has only a single CPU, this function cannot ever succeed. Skip all of the drama and just return -EINVAL. This makes GCC 14 happy as it doesn't get confused about possible out of bounds access of the soc_cpus_active array. Signed-off-by: Keith Packard <[email protected]>
The stm32u3x header files defines LL_ADC_SINGLE_ENDED but not LL_ADC_DIFFERENTIAL as the device doesn't support differential mode. The driver only checked for LL_ADC_SINGLE_ENDED and assumed that when that was defined, LL_ADC_DIFFERENTIAL would also be defined. Check for both when figuring out which calibration type will be required. Signed-off-by: Keith Packard <[email protected]>
Zephyr replaces the toolchain version of stdint.h to define uint32_t and int32_t as int rather than long. This breaks the ARM MVE intrinics which require uint32_t to be defined as unsigned long. Define 'ZEPHYR_USE_TOOLCHAIN_STDINT_H_' as that causes zephyr_stdint.h to be skipped, ensuring that the normal stdint.h types are used instead. Signed-off-by: Keith Packard <[email protected]>
psa-arch-tests includes device drivers that failed to mark registers with 'volatile'. GCC 14.3 cleverly optimized sequential register accesses using strd/ldrd instructions which caused the drivers to fail. Signed-off-by: Keith Packard <[email protected]>
9afbb6e
to
f9e31b3
Compare
de99443
to
9613ea5
Compare
GCC 14.3 will happily delete any code that appears before __builtin_unreachable that isn't separated with an obvious branch. That includes __asm__ statements, even those which generate traps. The failure case that I debugged was on x86 in z_check_stack_sentinel. There is a store to restore the sentinel to the correct value just before the ARCH_EXCEPT, and that macro emits 'int $32' followed by CODE_UNREACHABLE. Because the compiler didn't understand that ARCH_EXCEPT was changing execution flow, it decided that the sentinel restoring store 'couldn't' be reached and elided it. I added the compiler barrier to CODE_UNREACHABLE as that construct is required for this problem to occur, but a more surgical fix might be to add :"memory" to the relevant __asm__ statements. Finding and fixing all of those now and forever seems like it would be too burdensome to be worth any possible code improvement. Signed-off-by: Keith Packard <[email protected]>
Move the manifest rev to make this module compatible with either cmsis-5 or cmsis-6 by adapting to the CMSIS version when accessing NVIC and SCB registers. Signed-off-by: Keith Packard <[email protected]>
This patch (submitted upstream) avoids an incorrect warning generated by gcc 14.3 about array bounds. It should not change the generated code at all. Signed-off-by: Keith Packard <[email protected]> Signed-off-by: Anas Nashif <[email protected]>
GCC version 14.3 does more extensive checking for potentially uninitialized values and warns about a couple of arrays. Initialize them to zero to make the compiler happy. Signed-off-by: Keith Packard <[email protected]>
This PR changes some explicit negative right shifts into positive left shifts as required by GCC 14. Signed-off-by: Keith Packard <[email protected]>
4750711
to
e830f6d
Compare
On arm64, GCC feels free to use floating point registers for essentially anything unless we build with -mgeneral-regs-only. After the FPU gets used in an interrupt handler, interrupts are disabled as there's no place to save the registers during a nested exception. As the C library may be built separately without this flag, we cannot use any of its functions or risk having nested exceptions fail. Switch printk usage to k_str_out and stick to (mostly) Zephyr internal functions to ensure nested interrupts work correctly. Signed-off-by: Keith Packard <[email protected]>
GCC 14 takes a look these functions which are just 'return true' and inlines them even though they has the noinline attribute set. This happens because the compiler computes the possible range of values from the function call, and as that is a single value (true), it replaces the call with that value. So it's not strictly inlining the function? Insist a bit harder by adding a compiler_barrier to the functions which seems to solve the issue. Signed-off-by: Keith Packard <[email protected]>
…stems RX consistently fails this test by a tiny amount. Loosen the tolerance to let it work. Signed-off-by: Keith Packard <[email protected]>
The compiler may want to know the desired optimization level during linking, as when the compiler multilib configuration includes -Os as a selector. Do this by adding a new (optional) linker function, toolchain_linker_add_compiler_options, which maps compiler options to equivalent linker options, discarding any that aren't applicable. Linker configurations which use the compiler driver (ld, lld, and xt-ld) apply all provided compiler options. Linkers which don't provide this function fall back to an implementation which simply discards all options. Signed-off-by: Keith Packard <[email protected]>
With inclusion of the optimization flag into the multilib selection process, we cannot compute the compiler library path when the compiler's target.cmake is processed as OPTIMIZATION_FLAG is not computed until much later. Instead, add a function (compiler_file_path) which can be used to locate the appropriate crtbegin.o and crtend.o files. Delay computation of lib_include_dir and rt_library until after all compiler flags have been computed by adding compiler_set_linker_properties and calling that just before toolchain_linker_finalize is invoked. Place default implementations of both of these functions in a new file, cmake/compiler/target_template.cmake, where we assume the compiler works like gcc or clang and handlers the --print-file-name and --print-libgcc-file-name options. Compilers needing alternate implementations can override these functions in their target.cmake files. These implementations require that no generator expressions are necessary for the compiler to compute the right library paths. This mechanism is also used to take any additional compiler options and pass them to the linker using toolchain_linker_add_compiler_options. Signed-off-by: Keith Packard <[email protected]>
e830f6d
to
5efc652
Compare
|
I've split this into a bunch of separate PRs so that the individual module updates can be reviewed and merged separately. |
This is the collab-sdk-dev series rebased to a recent main revision and then adapted so that it "should" build using SDK 0.17.