Skip to content

Commit 11ea2a3

Browse files
committed
Add documentation
1 parent f9b5928 commit 11ea2a3

1 file changed

Lines changed: 114 additions & 0 deletions

File tree

docs/Targets.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ This README describes configuration of supported targets.
2323
* [NXP LS1028A](#nxp-ls1028a)
2424
* [NXP MCXA153](#nxp-mcxa153)
2525
* [NXP MCXW716](#nxp-mcxw716)
26+
* [NXP MCXN947](#nxp-mcxn947)
2627
* [NXP S32K1XX](#nxp-s32k1xx)
2728
* [NXP P1021 PPC](#nxp-qoriq-p1021-ppc)
2829
* [NXP T1024 PPC](#nxp-qoriq-t1024-ppc)
@@ -2873,6 +2874,8 @@ cp config/examples/mcxw.config .config`
28732874
make
28742875
```
28752876

2877+
We also provide a TrustZone configuration at `config/examples/mcxw-tz.config`.
2878+
28762879
### MCX W: Loading the firmware
28772880

28782881
The NXP Freedom MCX W board debugger comes loaded with MCU Link, but it can be updated to JLink.
@@ -2947,6 +2950,117 @@ c
29472950
```
29482951

29492952

2953+
## NXP MCXN947
2954+
2955+
The NXP MCXN947 is a dual-core Cortex-M33 microcontroller. The support has been
2956+
tested on the FRDM-MCXN947 board, with the on-board MCU-Link configured in
2957+
JLink mode.
2958+
2959+
This requires the NXP MCUXpresso SDK. We tested using
2960+
[mcuxsdk-manifests](https://github.com/nxp-mcuxpresso/mcuxsdk-manifests) and
2961+
[CMSIS_5](https://github.com/nxp-mcuxpresso/CMSIS_5) placed under "../NXP".
2962+
2963+
To set up the MCUXpresso SDK:
2964+
2965+
```
2966+
cd ../NXP
2967+
2968+
# Install west
2969+
python -m venv west-venv
2970+
west-venv/bin/activate
2971+
pip install west
2972+
2973+
# Set up the repository
2974+
west init -m https://github.com/nxp-mcuxpresso/mcuxsdk-manifests.git mcuxpresso-sdk
2975+
cd mcuxpresso-sdk
2976+
west update_board --set board frdmmcxn947
2977+
2978+
deactivate
2979+
```
2980+
2981+
### MCX N: Configuring and compiling
2982+
2983+
Copy the example configuration file and build with make:
2984+
2985+
```sh
2986+
cp config/examples/mcxn.config .config`
2987+
make
2988+
```
2989+
2990+
We also provide a TrustZone configuration at `config/examples/mcxn-tz.config`.
2991+
2992+
### MCX N: Loading the firmware
2993+
2994+
The NXP Freedom MCX N board debugger comes loaded with MCU Link, but it can be updated to JLink.
2995+
- Download and install the tool to update MCU Link to support jlink:
2996+
[@NXP: LinkServer for microcontrollers](https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/linkserver-for-microcontrollers:LINKERSERVER#downloads)
2997+
2998+
- put the rom bootloader in 'dfu' mode by adding a jumper in J21
2999+
3000+
- run `scripts/program_JLINK` to update the onboard debugger
3001+
3002+
- when the update is complete, remove the jumper in J21
3003+
3004+
Use JLinkExe tool to upload the initial firmware: `JLinkExe -if swd -Device MCXN947_M33_0`
3005+
3006+
At the Jlink prompt, type:
3007+
3008+
```
3009+
loadbin factory.bin 0
3010+
```
3011+
3012+
Reset or power cycle the board.
3013+
3014+
The RGB will light up blue to indicate version 1 of the firmware has been
3015+
staged.
3016+
3017+
### MCX N: Testing firmware update
3018+
3019+
1) Sign the test-app with version 2:
3020+
3021+
```sh
3022+
./tools/keytools/sign --ecc256 test-app/image.bin wolfboot_signing_private_key.der 2
3023+
```
3024+
3025+
2) Create a bin footer with wolfBoot trailer "BOOT" and "p" (ASCII for 0x70 == IMG_STATE_UPDATING):
3026+
3027+
```sh
3028+
echo -n "pBOOT" > trigger_magic.bin
3029+
```
3030+
3031+
3) Assembly new factory update.bin (replace `0xAFFB` with the appropriate
3032+
address, which should be your `.config`'s `WOLFBOOT_PARTITION_SIZE` minus `5`):
3033+
3034+
```sh
3035+
./tools/bin-assemble/bin-assemble \
3036+
update.bin \
3037+
0x0 test-app/image_v2_signed.bin \
3038+
0xAFFB trigger_magic.bin
3039+
```
3040+
3041+
4) Flash update.bin to your `.config`'s `WOLFBOOT_PARTITION_UPDATE_ADDRESS`
3042+
(e.g. `loadbin update.bin 0x15000`).
3043+
3044+
Once wolfBoot has performed validation of the partition and staged a firmware
3045+
with version > 1, the RGB LED will light up green.
3046+
3047+
### MCX N: Debugging
3048+
3049+
Debugging with JLink:
3050+
3051+
Note: We include a `.gdbinit` in the wolfBoot root that loads the wolfboot and test-app elf files.
3052+
3053+
In one terminal: `JLinkGDBServer -if swd -Device MCXN947_M33_0 -port 3333`
3054+
3055+
In another terminal use `gdb`:
3056+
3057+
```
3058+
b main
3059+
mon reset
3060+
c
3061+
```
3062+
3063+
29503064
## NXP S32K1XX
29513065

29523066
The NXP S32K1xx family (S32K142, S32K144, S32K146, S32K148) are automotive-grade

0 commit comments

Comments
 (0)