Skip to content

Commit 5c3e1ba

Browse files
authored
Merge branch 'main' into add-i2c-shell-sample-and-enable-i2c-of-imx943
2 parents ba608f8 + d77b58a commit 5c3e1ba

File tree

1,306 files changed

+44164
-7262
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,306 files changed

+44164
-7262
lines changed

CMakeLists.txt

Lines changed: 83 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -214,24 +214,82 @@ endif()
214214
# 1) Using EXTRA_CFLAGS which is applied regardless of kconfig choice, or
215215
# 2) Rely on override support being implemented by your toolchain_cc_optimize_*()
216216
#
217-
get_property(OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG TARGET compiler PROPERTY no_optimization)
218-
get_property(OPTIMIZE_FOR_DEBUG_FLAG TARGET compiler PROPERTY optimization_debug)
219-
get_property(OPTIMIZE_FOR_SPEED_FLAG TARGET compiler PROPERTY optimization_speed)
220-
get_property(OPTIMIZE_FOR_SIZE_FLAG TARGET compiler PROPERTY optimization_size)
221-
get_property(OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG TARGET compiler PROPERTY optimization_size_aggressive)
217+
get_property(COMPILER_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG TARGET compiler PROPERTY no_optimization)
218+
get_property(COMPILER_OPTIMIZE_FOR_DEBUG_FLAG TARGET compiler PROPERTY optimization_debug)
219+
get_property(COMPILER_OPTIMIZE_FOR_SPEED_FLAG TARGET compiler PROPERTY optimization_speed)
220+
get_property(COMPILER_OPTIMIZE_FOR_SIZE_FLAG TARGET compiler PROPERTY optimization_size)
221+
get_property(COMPILER_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG TARGET compiler PROPERTY optimization_size_aggressive)
222+
223+
get_property(ASM_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG TARGET asm PROPERTY no_optimization)
224+
get_property(ASM_OPTIMIZE_FOR_DEBUG_FLAG TARGET asm PROPERTY optimization_debug)
225+
get_property(ASM_OPTIMIZE_FOR_SPEED_FLAG TARGET asm PROPERTY optimization_speed)
226+
get_property(ASM_OPTIMIZE_FOR_SIZE_FLAG TARGET asm PROPERTY optimization_size)
227+
get_property(ASM_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG TARGET asm PROPERTY optimization_size_aggressive)
228+
229+
get_property(LINKER_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG TARGET linker PROPERTY no_optimization)
230+
get_property(LINKER_OPTIMIZE_FOR_DEBUG_FLAG TARGET linker PROPERTY optimization_debug)
231+
get_property(LINKER_OPTIMIZE_FOR_SPEED_FLAG TARGET linker PROPERTY optimization_speed)
232+
get_property(LINKER_OPTIMIZE_FOR_SIZE_FLAG TARGET linker PROPERTY optimization_size)
233+
get_property(LINKER_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG TARGET linker PROPERTY optimization_size_aggressive)
234+
235+
# Let the assembler inherit the optimization flags of the compiler if it is
236+
# not set explicitly.
237+
if(NOT ASM_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG)
238+
set(ASM_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG ${COMPILER_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG})
239+
endif()
240+
if(NOT ASM_OPTIMIZE_FOR_DEBUG_FLAG)
241+
set(ASM_OPTIMIZE_FOR_DEBUG_FLAG ${COMPILER_OPTIMIZE_FOR_DEBUG_FLAG})
242+
endif()
243+
if(NOT ASM_OPTIMIZE_FOR_SPEED_FLAG)
244+
set(ASM_OPTIMIZE_FOR_SPEED_FLAG ${COMPILER_OPTIMIZE_FOR_SPEED_FLAG})
245+
endif()
246+
if(NOT ASM_OPTIMIZE_FOR_SIZE_FLAG)
247+
set(ASM_OPTIMIZE_FOR_SIZE_FLAG ${COMPILER_OPTIMIZE_FOR_SIZE_FLAG})
248+
endif()
249+
if(NOT ASM_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG)
250+
set(ASM_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG ${COMPILER_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG})
251+
endif()
252+
253+
# Let the linker inherit the optimization flags of the compiler if it is
254+
# not set explicitly.
255+
if(NOT LINKER_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG)
256+
set(LINKER_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG ${COMPILER_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG})
257+
endif()
258+
if(NOT LINKER_OPTIMIZE_FOR_DEBUG_FLAG)
259+
set(LINKER_OPTIMIZE_FOR_DEBUG_FLAG ${COMPILER_OPTIMIZE_FOR_DEBUG_FLAG})
260+
endif()
261+
if(NOT LINKER_OPTIMIZE_FOR_SPEED_FLAG)
262+
set(LINKER_OPTIMIZE_FOR_SPEED_FLAG ${COMPILER_OPTIMIZE_FOR_SPEED_FLAG})
263+
endif()
264+
if(NOT LINKER_OPTIMIZE_FOR_SIZE_FLAG)
265+
set(LINKER_OPTIMIZE_FOR_SIZE_FLAG ${COMPILER_OPTIMIZE_FOR_SIZE_FLAG})
266+
endif()
267+
if(NOT LINKER_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG)
268+
set(LINKER_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG ${COMPILER_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG})
269+
endif()
222270

223271
# From kconfig choice, pick the actual OPTIMIZATION_FLAG to use.
224272
# Kconfig choice ensures only one of these CONFIG_*_OPTIMIZATIONS is set.
225273
if(CONFIG_NO_OPTIMIZATIONS)
226-
set(OPTIMIZATION_FLAG ${OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG})
274+
set(COMPILER_OPTIMIZATION_FLAG ${COMPILER_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG})
275+
set(ASM_OPTIMIZATION_FLAG ${ASM_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG})
276+
set(LINKER_OPTIMIZATION_FLAG ${LINKER_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG})
227277
elseif(CONFIG_DEBUG_OPTIMIZATIONS)
228-
set(OPTIMIZATION_FLAG ${OPTIMIZE_FOR_DEBUG_FLAG})
278+
set(COMPILER_OPTIMIZATION_FLAG ${COMPILER_OPTIMIZE_FOR_DEBUG_FLAG})
279+
set(ASM_OPTIMIZATION_FLAG ${ASM_OPTIMIZE_FOR_DEBUG_FLAG})
280+
set(LINKER_OPTIMIZATION_FLAG ${LINKER_OPTIMIZE_FOR_DEBUG_FLAG})
229281
elseif(CONFIG_SPEED_OPTIMIZATIONS)
230-
set(OPTIMIZATION_FLAG ${OPTIMIZE_FOR_SPEED_FLAG})
282+
set(COMPILER_OPTIMIZATION_FLAG ${COMPILER_OPTIMIZE_FOR_SPEED_FLAG})
283+
set(ASM_OPTIMIZATION_FLAG ${ASM_OPTIMIZE_FOR_SPEED_FLAG})
284+
set(LINKER_OPTIMIZATION_FLAG ${LINKER_OPTIMIZE_FOR_SPEED_FLAG})
231285
elseif(CONFIG_SIZE_OPTIMIZATIONS)
232-
set(OPTIMIZATION_FLAG ${OPTIMIZE_FOR_SIZE_FLAG}) # Default in kconfig
286+
set(COMPILER_OPTIMIZATION_FLAG ${COMPILER_OPTIMIZE_FOR_SIZE_FLAG}) # Default in kconfig
287+
set(ASM_OPTIMIZATION_FLAG ${ASM_OPTIMIZE_FOR_SIZE_FLAG})
288+
set(LINKER_OPTIMIZATION_FLAG ${LINKER_OPTIMIZE_FOR_SIZE_FLAG})
233289
elseif(CONFIG_SIZE_OPTIMIZATIONS_AGGRESSIVE)
234-
set(OPTIMIZATION_FLAG ${OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG})
290+
set(COMPILER_OPTIMIZATION_FLAG ${COMPILER_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG})
291+
set(ASM_OPTIMIZATION_FLAG ${ASM_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG})
292+
set(LINKER_OPTIMIZATION_FLAG ${LINKER_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG})
235293
else()
236294
message(FATAL_ERROR
237295
"Unreachable code. Expected optimization level to have been chosen. See Kconfig.zephyr")
@@ -245,9 +303,12 @@ SOC_* symbol.")
245303
endif()
246304

247305
# Apply the final optimization flag(s)
248-
zephyr_compile_options($<$<COMPILE_LANGUAGE:ASM>:${OPTIMIZATION_FLAG}>)
249-
zephyr_compile_options($<$<COMPILE_LANGUAGE:C>:${OPTIMIZATION_FLAG}>)
250-
zephyr_compile_options($<$<COMPILE_LANGUAGE:CXX>:${OPTIMIZATION_FLAG}>)
306+
zephyr_compile_options($<$<COMPILE_LANGUAGE:ASM>:${ASM_OPTIMIZATION_FLAG}>)
307+
zephyr_compile_options($<$<COMPILE_LANGUAGE:C>:${COMPILER_OPTIMIZATION_FLAG}>)
308+
zephyr_compile_options($<$<COMPILE_LANGUAGE:CXX>:${COMPILER_OPTIMIZATION_FLAG}>)
309+
add_link_options(${LINKER_OPTIMIZATION_FLAG})
310+
compiler_simple_options(simple_options)
311+
toolchain_linker_add_compiler_options(${simple_options})
251312

252313
if(CONFIG_LTO)
253314
zephyr_compile_options($<TARGET_PROPERTY:compiler,optimization_lto>)
@@ -955,12 +1016,12 @@ add_custom_target(${DEVICE_API_LD_TARGET}
9551016

9561017
zephyr_linker_include_generated(CMAKE ${DEVICE_API_LINKER_SECTIONS_CMAKE})
9571018

958-
# Add a pseudo-target that is up-to-date when all generated headers
959-
# are up-to-date. Libraries containing files that include these headers can use
960-
# add_dependencies or target_link_libraries against this target to ensure that
961-
# generated headers are up-to-date before the libraries are built. This ordering
962-
# dependency can be propagated to these libraries' dependenents via the PUBLIC
963-
# or INTERFACE option of target_link_libraries.
1019+
# Create an interface library which collects the dependencies to Zephyr
1020+
# generated headers. Libraries containing files that include these headers can
1021+
# use add_dependencies or target_link_libraries against this target to ensure
1022+
# that generated headers are up-to-date before the libraries are built. This
1023+
# ordering dependency can be propagated to these libraries' dependenents via
1024+
# the PUBLIC or INTERFACE option of target_link_libraries.
9641025

9651026
add_library(zephyr_generated_headers INTERFACE)
9661027
add_dependencies(zephyr_generated_headers
@@ -2342,6 +2403,9 @@ add_subdirectory_ifdef(
23422403
cmake/makefile_exports
23432404
)
23442405

2406+
# Ask the compiler to set the lib_include_dir and rt_library properties
2407+
compiler_set_linker_properties()
2408+
23452409
toolchain_linker_finalize()
23462410

23472411
# export build information

MAINTAINERS.yml

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,8 @@ Bluetooth HCI:
513513
- sjanc
514514
- HoZHel
515515
- cvinayak
516+
- PavelVPV
517+
- HaavardRei
516518
files:
517519
- include/zephyr/drivers/bluetooth/
518520
- include/zephyr/drivers/bluetooth.h
@@ -537,6 +539,8 @@ Bluetooth Host:
537539
- sjanc
538540
- Thalley
539541
- cvinayak
542+
- PavelVPV
543+
- HaavardRei
540544
files:
541545
- doc/connectivity/bluetooth/
542546
- include/zephyr/bluetooth/
@@ -2784,9 +2788,8 @@ ITE Platforms:
27842788
Infineon Platforms:
27852789
status: maintained
27862790
maintainers:
2787-
- ifyall
2788-
collaborators:
27892791
- sreeramIfx
2792+
collaborators:
27902793
- mcatee-infineon
27912794
- talih0
27922795
files:
@@ -3520,6 +3523,7 @@ Networking:
35203523
files-exclude:
35213524
- doc/connectivity/networking/api/gptp.rst
35223525
- doc/connectivity/networking/api/ieee802154.rst
3526+
- doc/connectivity/networking/api/ocpp.rst
35233527
- doc/connectivity/networking/api/ptp.rst
35243528
- doc/connectivity/networking/api/wifi.rst
35253529
- doc/connectivity/networking/api/http*.rst
@@ -3533,6 +3537,7 @@ Networking:
35333537
- samples/net/sockets/coap_*/
35343538
- samples/net/sockets/*http*/
35353539
- samples/net/lwm2m_client/
3540+
- samples/net/ocpp/
35363541
- samples/net/wifi/
35373542
- samples/net/dhcpv4_client/
35383543
- subsys/net/l2/ethernet/gptp/
@@ -3542,11 +3547,13 @@ Networking:
35423547
- subsys/net/lib/config/ieee802154*
35433548
- subsys/net/lib/http/
35443549
- subsys/net/lib/lwm2m/
3550+
- subsys/net/lib/ocpp/
35453551
- subsys/net/lib/ptp/
35463552
- subsys/net/lib/tls_credentials/
35473553
- subsys/net/lib/dhcpv4/
35483554
- tests/net/dhcpv4/
35493555
- tests/net/ieee802154/
3556+
- tests/net/lib/ocpp/
35503557
- tests/net/lib/http*/
35513558
- tests/net/wifi/
35523559
labels:
@@ -3718,6 +3725,17 @@ Networking:
37183725
tests:
37193726
- net.ieee802154
37203727

3728+
"Networking: OCPP":
3729+
status: maintained
3730+
maintainers:
3731+
- ssekar15
3732+
files:
3733+
- samples/net/ocpp/
3734+
- subsys/net/lib/ocpp/
3735+
- tests/net/lib/ocpp/
3736+
labels:
3737+
- "area: OCPP"
3738+
37213739
"Networking: OpenThread":
37223740
status: maintained
37233741
maintainers:
@@ -5216,10 +5234,9 @@ West:
52165234
"West project: hal_cypress":
52175235
status: maintained
52185236
maintainers:
5219-
- ifyall
5237+
- sreeramIfx
52205238
collaborators:
52215239
- nashif
5222-
- sreeramIfx
52235240
- mcatee-infineon
52245241
files:
52255242
- modules/Kconfig.cypress
@@ -5268,11 +5285,10 @@ West:
52685285
"West project: hal_infineon":
52695286
status: maintained
52705287
maintainers:
5271-
- ifyall
5288+
- sreeramIfx
52725289
collaborators:
52735290
- parthitce
52745291
- talih0
5275-
- sreeramIfx
52765292
- mcatee-infineon
52775293
files:
52785294
- modules/Kconfig.infineon
@@ -5552,6 +5568,15 @@ West:
55525568
labels:
55535569
- "area: AMP"
55545570

5571+
"West project: libsbc":
5572+
status: maintained
5573+
maintainers:
5574+
- MarkWangChinese
5575+
files:
5576+
- modules/libsbc/
5577+
labels:
5578+
- "area: Audio"
5579+
55555580
"West project: littlefs":
55565581
status: odd fixes
55575582
files:
@@ -5663,8 +5688,7 @@ West:
56635688
maintainers:
56645689
- aescolar
56655690
collaborators:
5666-
- wopu-ot
5667-
- thoh-ot
5691+
- rugeGerritsen
56685692
files: []
56695693
labels:
56705694
- "area: native port"
@@ -5900,6 +5924,7 @@ Xen Platform:
59005924
- soc/xen/
59015925
- boards/xen/
59025926
- dts/bindings/xen/
5927+
- snippets/xen_dom0/
59035928
labels:
59045929
- "area: Xen Platform"
59055930

arch/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,16 @@ config USERSPACE
316316
privileged mode or handling a system call; to ensure these are always
317317
caught, enable CONFIG_HW_STACK_PROTECTION.
318318

319+
config NOINIT_SNIPPET_FIRST
320+
bool "Place the no-init linker script snippet first"
321+
help
322+
By default the include/zephyr/linker/common-noinit.ld file inserts the
323+
snippets-noinit.ld file at the end of the section. There are times when
324+
the directives in the snippets-noinit.ld file apply to the other directives
325+
in this file. And in that case the include statement for the snippets-noinit.ld
326+
file needs to come at the start of the section. This configuration option
327+
allows that to happen.
328+
319329
config PRIVILEGED_STACK_SIZE
320330
int "Size of privileged stack"
321331
default 2048 if EMUL

arch/arm/core/cortex_m/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,17 @@ config CPU_CORTEX_M33
6363
help
6464
This option signifies the use of a Cortex-M33 CPU
6565

66+
config CPU_CORTEX_M52
67+
bool
68+
select CPU_CORTEX_M
69+
select ARMV8_1_M_MAINLINE
70+
select ARMV8_M_SE if CPU_HAS_TEE
71+
select ARMV7_M_ARMV8_M_FP if CPU_HAS_FPU
72+
select CPU_HAS_DCACHE
73+
select CPU_HAS_ICACHE
74+
help
75+
This option signifies the use of a Cortex-M52 CPU
76+
6677
config CPU_CORTEX_M55
6778
bool
6879
select CPU_CORTEX_M

arch/arm/core/cortex_m/pm_s2ram.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (c) 2022, Carlo Caione <[email protected]>
3+
* Copyright (c) 2025 Nordic Semiconductor ASA
34
*
45
* SPDX-License-Identifier: Apache-2.0
56
*/
@@ -14,7 +15,18 @@
1415
/**
1516
* CPU context for S2RAM
1617
*/
17-
__noinit _cpu_context_t _cpu_context;
18+
19+
#if DT_NODE_EXISTS(DT_NODELABEL(pm_s2ram)) &&\
20+
DT_NODE_HAS_COMPAT(DT_NODELABEL(pm_s2ram), zephyr_memory_region)
21+
22+
/* Linker section name is given by `zephyr,memory-region` property of
23+
* `zephyr,memory-region` compatible DT node with nodelabel `pm_s2ram`.
24+
*/
25+
__attribute__((section(DT_PROP(DT_NODELABEL(pm_s2ram), zephyr_memory_region))))
26+
#else
27+
__noinit
28+
#endif
29+
_cpu_context_t _cpu_context;
1830

1931
#ifndef CONFIG_PM_S2RAM_CUSTOM_MARKING
2032
/**

arch/arm/core/cortex_m/thread.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,9 @@ void arch_switch_to_main_thread(struct k_thread *main_thread, char *stack_ptr,
569569
/* We don’t intend to return, so there is no need to link. */
570570
"bx r4\n"
571571
/* Force a literal pool placement for the addresses referenced above */
572+
#ifndef __IAR_SYSTEMS_ICC__
572573
".ltorg\n"
574+
#endif
573575
:
574576
: "r"(_main), "r"(stack_ptr)
575577
: "r0", "r1", "r2", "r3", "r4", "ip", "lr", "memory");
@@ -637,7 +639,9 @@ FUNC_NORETURN void z_arm_switch_to_main_no_multithreading(k_thread_entry_t main_
637639
"blx r0\n"
638640
"loop: b loop\n\t" /* while (true); */
639641
/* Force a literal pool placement for the addresses referenced above */
642+
#ifndef __IAR_SYSTEMS_ICC__
640643
".ltorg\n"
644+
#endif
641645
:
642646
: [_p1] "r"(p1), [_p2] "r"(p2), [_p3] "r"(p3), [_psp] "r"(psp),
643647
[_main_entry] "r"(main_entry)

arch/arm/core/mpu/arm_mpu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ static uint8_t static_regions_num;
6969
#include "arm_mpu_v7_internal.h"
7070
#elif defined(CONFIG_CPU_CORTEX_M23) || \
7171
defined(CONFIG_CPU_CORTEX_M33) || \
72+
defined(CONFIG_CPU_CORTEX_M52) || \
7273
defined(CONFIG_CPU_CORTEX_M55) || \
7374
defined(CONFIG_CPU_CORTEX_M85) || \
7475
defined(CONFIG_AARCH32_ARMV8_R)

arch/arm/core/mpu/arm_mpu_v8_internal.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ struct dynamic_region_info {
3232
*/
3333
static struct dynamic_region_info dyn_reg_info[MPU_DYNAMIC_REGION_AREAS_NUM];
3434
#if defined(CONFIG_CPU_CORTEX_M23) || defined(CONFIG_CPU_CORTEX_M33) || \
35-
defined(CONFIG_CPU_CORTEX_M55) || defined(CONFIG_CPU_CORTEX_M85)
35+
defined(CONFIG_CPU_CORTEX_M52) || defined(CONFIG_CPU_CORTEX_M55) || \
36+
defined(CONFIG_CPU_CORTEX_M85)
3637
static inline void mpu_set_mair0(uint32_t mair0)
3738
{
3839
MPU->MAIR0 = mair0;

0 commit comments

Comments
 (0)