Skip to content

Commit c11c15f

Browse files
committed
hal_nxp: Sync 25.06 components to hal_nxp
Signed-off-by: Zhaoxiang Jin <[email protected]>
1 parent b789da4 commit c11c15f

File tree

142 files changed

+11349
-231
lines changed

Some content is hidden

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

142 files changed

+11349
-231
lines changed

mcux/mcux-sdk-ng/components/conn_fwloader/CMakeLists.txt

Lines changed: 46 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,55 @@
11
# Copyright 2024 NXP
22
# SPDX-License-Identifier: BSD-3-Clause
33

4-
if(NOT CONFIG_BUILD_WITH_TFM)
5-
if (CONFIG_MCUX_COMPONENT_driver.conn_fwloader)
6-
mcux_add_source(
7-
SOURCES fsl_loader.c
8-
fsl_loader_utils.c
9-
nboot_hal.c
10-
life_cycle.c
11-
)
12-
mcux_add_include(
13-
INCLUDES include
14-
)
15-
endif()
4+
if (CONFIG_MCUX_COMPONENT_driver.conn_fwloader)
5+
mcux_add_source(
6+
SOURCES include/api_tree_root.h
7+
include/fsl_loader.h
8+
include/fsl_loader_utils.h
9+
include/fusemap.h
10+
include/life_cycle.h
11+
include/nboot_rom_api_table.h
12+
fsl_loader.c
13+
fsl_loader_utils.c
14+
nboot_hal.c
15+
life_cycle.c
16+
readme.txt
17+
script/fw_bin2c_conv.py
18+
fw_bin/rw61x_sb_wifi_a2.bin
19+
fw_bin/rw61x_sb_ble_a2.bin
20+
fw_bin/rw61x_sb_ble_15d4_combo_a2.bin
21+
fw_bin/script/wlan_gen_fw_incs.py
22+
fw_bin/inc/*.inc
23+
fw_bin/rw61x/rw61x_cpu1.c
24+
fw_bin/rw61x/rw61x_cpu2.c
25+
)
26+
mcux_add_include(
27+
INCLUDES include
28+
fw_bin
29+
fw_bin/inc
30+
fw_bin/rw61x
31+
fw_bin/script
32+
)
1633
endif()
1734

18-
if(CONFIG_BUILD_WITH_TFM)
19-
add_compile_definitions(TFM_PARTITION_LOADER_SERVICE)
35+
if (CONFIG_MCUX_COMPONENT_driver.conn_fwloader_ns)
36+
mcux_add_source(
37+
SOURCES include/fsl_loader.h
38+
)
39+
mcux_add_include(
40+
INCLUDES include
41+
)
2042
endif()
2143

22-
if(CONFIG_USE_component_osa_free_rtos_RW612)
23-
include(component_osa_free_rtos_RW612)
24-
endif()
44+
if (CONFIG_MCUX_COMPONENT_driver.conn_fwloader.monolithic)
45+
mcux_add_macro(
46+
CC "-DgPlatformMonolithicApp_d=1"
47+
CX "-DgPlatformMonolithicApp_d=1"
48+
)
2549

26-
if(CONFIG_USE_component_osa_bm)
27-
include(component_osa_bm)
50+
mcux_add_source(
51+
BASE_PATH ${SdkRootDirPath}/examples/_boards/${board}
52+
PREINCLUDE TRUE
53+
SOURCES monolithic_config.h
54+
)
2855
endif()
29-

mcux/mcux-sdk-ng/components/conn_fwloader/fsl_loader_utils.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,18 +1106,18 @@ status_t loader_process_sb_file(uint32_t readOffset)
11061106
static status_t loader_process_raw_file(uint32_t readOffset)
11071107
{
11081108
status_t status = kStatus_Fail;
1109-
uint32_t *src_addr;
1110-
uint32_t *dst_addr;
1109+
uint8_t *src_addr;
1110+
uint8_t *dst_addr;
11111111
uint32_t code_size;
1112-
uint32_t *data_ptr = (uint32_t *)readOffset;
1112+
uint8_t *data_ptr = (uint8_t *)readOffset;
11131113
uint32_t total_raw_size = 0;
11141114

11151115
#ifdef CONFIG_FW_VDLLV2
1116-
if ((*data_ptr == LOADER_RAW_BINARY_FORMAT) && (*(data_ptr + 1) == LOADER_VDLL_RAW_BINARY_FORMAT))
1116+
if ((*((uint32_t*)data_ptr) == LOADER_RAW_BINARY_FORMAT) && (*((uint32_t*)(data_ptr + 4)) == LOADER_VDLL_RAW_BINARY_FORMAT))
11171117
{
1118-
src_addr = data_ptr + 4;
1119-
dst_addr = (uint32_t *)*(data_ptr + 2);
1120-
code_size = *(data_ptr + 3);
1118+
src_addr = data_ptr + 16;
1119+
dst_addr = (uint8_t *)(*((uint32_t*)(data_ptr + 8)));
1120+
code_size = *((uint32_t*)(data_ptr + 12));
11211121
(void)memcpy(dst_addr, src_addr, code_size);
11221122
status = kStatus_Success;
11231123
}
@@ -1126,16 +1126,16 @@ static status_t loader_process_raw_file(uint32_t readOffset)
11261126
{
11271127
do
11281128
{
1129-
if (*data_ptr != LOADER_RAW_BINARY_FORMAT)
1130-
{
1129+
if(*((uint32_t*)data_ptr) != LOADER_RAW_BINARY_FORMAT)
1130+
{
11311131
break;
1132-
}
1132+
}
11331133

1134-
src_addr = data_ptr + 4;
1135-
dst_addr = (uint32_t *)*(data_ptr + 2);
1136-
code_size = *(data_ptr + 3);
1134+
src_addr = data_ptr + 16;
1135+
dst_addr = (uint8_t *)(*((uint32_t*)(data_ptr + 8)));
1136+
code_size = *((uint32_t*)(data_ptr + 12));
11371137
// Check for raw ending segment
1138-
if (((uint32_t)src_addr == 0xffffffffU) || ((uint32_t)dst_addr == 0xffffffffU))
1138+
if ((uint32_t)src_addr == 0xffffffffU || (uint32_t)dst_addr == 0xffffffffU)
11391139
{
11401140
if (code_size == total_raw_size)
11411141
{
@@ -1148,7 +1148,7 @@ static status_t loader_process_raw_file(uint32_t readOffset)
11481148
}
11491149

11501150
(void)memcpy(dst_addr, src_addr, code_size);
1151-
data_ptr += 4U + (code_size >> 2U);
1151+
data_ptr += 16 + code_size;
11521152
total_raw_size += code_size;
11531153
} while (true);
11541154
}

mcux/mcux-sdk-ng/components/conn_fwloader/include/fsl_loader_utils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,10 +370,10 @@ typedef union fsl_StandardVersion
370370
uint32_t version; //!< combined version numbers
371371

372372
#if defined(__cplusplus)
373-
StandardVersion() : version(0)
373+
fsl_StandardVersion() : version(0)
374374
{
375375
}
376-
StandardVersion(uint32_t version) : version(version)
376+
fsl_StandardVersion(uint32_t version) : version(version)
377377
{
378378
}
379379
#endif

mcux/mcux-sdk-ng/components/conn_fwloader/readme.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
1.Examples that support monolithic image download do not need the steps 2-6 to load fw:
2-
Wi-Fi examples: wifi_cli, wifi_wpa_supplicant, wifi_cli_static, wifi_cert, wifi_cli_fw_dump, wifi_cli_prov, wifi_test_mode
2+
Wi-Fi examples: wifi_cli, wifi_wpa_supplicant, wifi_cert, wifi_cli_fw_dump, wifi_test_mode
33
ncp examples: ncp_device
44
coex examples: coex_cli, coex_supplicant_cli
55

@@ -35,4 +35,4 @@
3535
Whenever the remap feature is active, the flash should not be accessed in direct mode.
3636
As a consequence, no structure cast should be done on flash direct addresses. Likewise memcpy operations
3737
should be avoided. Instead all flash accesses must be done via staging buffers in RAM, that
38-
get loaded using the mflash driver.
38+
get loaded using the mflash driver.
Binary file not shown.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"fw_elf": "./nbu_15_4.out",
3+
"image_version": 2,
4+
"image_type_raw": true,
5+
"image_partition_a": true,
6+
"target_cpu1": false,
7+
"target_ble": false,
8+
"target_ble_audio": false,
9+
"target_ble_15_4_combo": false,
10+
"sb3_config": "./image_tool/elftosb/rw610_cpu2_15d4_sb.json"
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"fw_elf": "./rw610n_le_audio.axf",
3+
"image_version": 2,
4+
"image_type_raw": true,
5+
"image_partition_a": true,
6+
"target_cpu1": false,
7+
"target_ble": false,
8+
"target_ble_audio": true,
9+
"target_ble_15_4_combo": false,
10+
"sb3_config": "./image_tool/elftosb/rw610_cpu2_ble_sb.json"
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"fw_elf": "./rw610n.axf",
3+
"image_version": 2,
4+
"image_type_raw": true,
5+
"image_partition_a": true,
6+
"target_cpu1": false,
7+
"target_ble": true,
8+
"target_ble_audio": false,
9+
"target_ble_15_4_combo": false,
10+
"sb3_config": "./image_tool/elftosb/rw610_cpu2_ble_sb.json"
11+
}

0 commit comments

Comments
 (0)