Skip to content

Commit 7cd5bb7

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

File tree

159 files changed

+12506
-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.

159 files changed

+12506
-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/fw_bin/LICENSE.txt

Lines changed: 825 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# MCUXpresso SDK : mcuxsdk-components-conn_fwloader-fw_bin
2+
3+
## Overview
4+
This repository is for MCUXpresso SDK components conn_fwloader fw_bin delivery and it contains the components officially provided in NXP MCUXpresso SDK. This repository is part of the MCUXpresso SDK overall delivery which is composed of several sub-repositories/projects. Navigate to the top/parent repository (mcuxsdk-manifests) for the complete delivery of MCUXpresso SDK.
5+
6+
## Documentation
7+
Overall details can be reviewed here: [MCUXpresso SDK Online Documentation](https://mcuxpresso.nxp.com/mcuxsdk/latest/html/introduction/README.html)
8+
9+
## Setup
10+
Instructions on how to install the MCUXpresso SDK provided from GitHub via west manifest [Getting Started with SDK - Detailed Installation Instructions](https://mcuxpresso.nxp.com/mcuxsdk/latest/html/gsd/installation.html#installation)
11+
12+
## Contribution
13+
Contributions are not currently accepted. Guidelines to contribute will be posted in the future.
14+
15+
---------------------------------
16+
## CPU1 and CPU2 firmware binaries for RW61x
17+
18+
1.Examples that support monolithic image download do not need the steps 2-4 to load fw:
19+
Wi-Fi examples: wifi_cli, wifi_wpa_supplicant, wifi_cert, wifi_test_mode
20+
ncp examples: ncp_device
21+
coex examples: coex_wifi_edgefast, coex_zigbee
22+
23+
These examples can load cpu1/2 fw automatically, don't need to load them seperately.
24+
25+
2. FW image names:
26+
Production FW, for users:
27+
rw61x_sb_wifi_a2.bin, for CPU1_wifi of redfinch a2 board
28+
rw61x_sb_ble_a2.bin, for CPU2_ble of redfinch a2 board
29+
rw61x_sb_ble_15d4_combo_a2.bin, for CPU2_ble_15.4_combo of redfinch a2 board
30+
31+
3. where to get FW image:
32+
In the directory: /components/conn_fwloader/fw_bin
33+
34+
4. How to load FW:
35+
Need to write the FW image to flash first, then the loadservice will download FW when power on.
36+
For example, the CMD to write CPU1 image to flash in J-link window:
37+
loadbin C:\xxx\rw61x_sb_wifi_xx.bin,0x08400000
38+
39+
The CMD to write CPU2_ble image to flash in J-link window:
40+
loadbin C:\xxx\rw61x_sb_ble_xx.bin,0x08540000
41+
42+
The CMD to write CPU2_15.4 image to flash in J-link window:
43+
loadbin C:\xxx\rw61x_sb_ble_15d4_combo_xx.bin,0x085e0000

mcux/mcux-sdk-ng/components/conn_fwloader/fw_bin/SBOM.spdx.json

Lines changed: 102 additions & 0 deletions
Large diffs are not rendered by default.

mcux/mcux-sdk-ng/components/conn_fwloader/fw_bin/inc/rw61x_sb_ble_15d4_combo_a2.bin.inc

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

mcux/mcux-sdk-ng/components/conn_fwloader/fw_bin/inc/rw61x_sb_ble_a2.bin.inc

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

mcux/mcux-sdk-ng/components/conn_fwloader/fw_bin/inc/rw61x_sb_wifi_a2.bin.inc

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

mcux/mcux-sdk-ng/components/conn_fwloader/fw_bin/inc/rw61xn_sb_mfg_fw_cpu2_ble_a2.bin.inc

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

mcux/mcux-sdk-ng/components/conn_fwloader/fw_bin/inc/rw61xn_sb_mfg_fw_cpu2_combo_a2.bin.inc

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)