Skip to content

Commit 0926705

Browse files
twcook86danielinux
authored andcommitted
Add lpc55s69 to targets.md
1 parent 9fecc9c commit 0926705

File tree

1 file changed

+313
-1
lines changed

1 file changed

+313
-1
lines changed

docs/Targets.md

Lines changed: 313 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This README describes configuration of supported targets.
2121
* [NXP iMX-RT](#nxp-imx-rt)
2222
* [NXP Kinetis](#nxp-kinetis)
2323
* [NXP LPC54xxx](#nxp-lpc54xxx)
24-
* [NXP LPC55S69](#lpc55s69)
24+
* [NXP LPC55S69](#nxp-lpc55s69)
2525
* [NXP LS1028A](#nxp-ls1028a)
2626
* [NXP MCXA153](#nxp-mcxa153)
2727
* [NXP MCXW716](#nxp-mcxw716)
@@ -1937,6 +1937,318 @@ arm-none-eabi-gdb wolfboot.elf -ex "target remote localhost:3333"
19371937
```
19381938

19391939

1940+
## NXP LPC55S69
1941+
1942+
The NXP LPC55S69 is a dual-core Cortex-M33 microcontroller. The support has been
1943+
tested on the LPCXpresso55S69 board (LPC55S69-EVK), with the on-board LINK2 configured in
1944+
the default CMSIS-DAP mode.
1945+
1946+
This requires the NXP MCUXpresso SDK. We tested using
1947+
[mcuxsdk-manifests](https://github.com/nxp-mcuxpresso/mcuxsdk-manifests) and
1948+
[CMSIS_5](https://github.com/nxp-mcuxpresso/CMSIS_5) placed under "../NXP".
1949+
1950+
To set up the MCUXpresso SDK:
1951+
1952+
```
1953+
cd ../NXP
1954+
1955+
# Install west
1956+
python -m venv west-venv
1957+
source west-venv/bin/activate
1958+
pip install west
1959+
1960+
# Set up the repository
1961+
west init -m https://github.com/nxp-mcuxpresso/mcuxsdk-manifests.git mcuxpresso-sdk
1962+
cd mcuxpresso-sdk
1963+
west update_board --set board lpcxpresso55s69
1964+
1965+
deactivate
1966+
```
1967+
1968+
### LPC55S69: Configuring and compiling
1969+
1970+
Copy the example configuration file and build with make:
1971+
1972+
```sh
1973+
cp config/examples/lpc55s69.config .config
1974+
make
1975+
```
1976+
1977+
We also provide a TrustZone configuration at `config/examples/lpc55s69-tz.config`.
1978+
1979+
### LPC55S69: Loading the firmware
1980+
1981+
Download and install the LinkServer tool:
1982+
[@NXP: LinkServer for microcontrollers](https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/linkserver-for-microcontrollers:LINKERSERVER#downloads)
1983+
1984+
NOTE: The LPCXpresso55S69's on-board LINK2 debugger comes loaded with CMSIS-DAP protocol, but it can be
1985+
optionally updated to use JLink protocol instead. See the EVK user manual for how to do this, if desired.
1986+
The below examples were tested with the default CMSIS-DAP protocol. CMSIS-DAP is supported by default in
1987+
the MCUXpresso IDE for debugging purposes.
1988+
1989+
Connect a USB cable from your development PC to P6 on the dev board.
1990+
1991+
Open a terminal to the virtual COM port with putty or similar app, settings 115200-N-8-1.
1992+
1993+
### LPC55S69: Testing firmware factory.bin
1994+
1995+
1) Erase the entire flash:
1996+
1997+
```sh
1998+
LinkServer flash LPC55S69 erase
1999+
```
2000+
2001+
2) Program the factory.bin, which contains both wolfBoot and the test-app version 1:
2002+
2003+
```sh
2004+
LinkServer flash LPC55S69 load factory.bin:0
2005+
```
2006+
2007+
3) The LED will light up blue to indicate version 1 of the firmware is running. You should also see output
2008+
like this in the terminal window:
2009+
2010+
```sh
2011+
lpc55s69 init
2012+
Boot partition: 0xA000 (sz 24016, ver 0x1, type 0x601)
2013+
Partition 1 header magic 0xFFFFFFFF invalid at 0x15000
2014+
Boot partition: 0xA000 (sz 24016, ver 0x1, type 0x601)
2015+
Booting version: 0x1
2016+
lpc55s69 init
2017+
boot: ver=0x1 state=0xFF
2018+
update: ver=0x0 state=0xFF
2019+
Hello from firmware version 1
2020+
Calling wolfBoot_success()
2021+
boot: ver=0x1 state=0x00
2022+
update: ver=0x0 state=0xFF
2023+
```
2024+
2025+
### LPC55S69: Testing firmware update
2026+
2027+
1) Sign the test-app with version 2:
2028+
2029+
```sh
2030+
./tools/keytools/sign --ecc384 --sha384 test-app/image.bin wolfboot_signing_private_key.der 2
2031+
```
2032+
2033+
2) Flash v2 update binary to your `.config`'s `WOLFBOOT_PARTITION_UPDATE_ADDRESS`
2034+
2035+
Example:
2036+
```sh
2037+
LinkServer flash LPC55S69 load test-app/image_v2_signed.bin:0x15000
2038+
```
2039+
2040+
3) You should see output like this in the terminal window:
2041+
2042+
```sh
2043+
lpc55s69 init
2044+
Boot partition: 0xA000 (sz 24016, ver 0x1, type 0x601)
2045+
Update partition: 0x15000 (sz 24016, ver 0x2, type 0x601)
2046+
Boot partition: 0xA000 (sz 24016, ver 0x1, type 0x601)
2047+
Booting version: 0x1
2048+
lpc55s69 init
2049+
boot: ver=0x1 state=0x00
2050+
update: ver=0x2 state=0xFF
2051+
Hello from firmware version 1
2052+
Update detected, version: 0x2
2053+
Triggering update...
2054+
boot: ver=0x1 state=0x00
2055+
update: ver=0x2 state=0x70
2056+
...done. Reboot to apply.
2057+
```
2058+
2059+
4) Press the RESET button to reboot
2060+
2061+
5) The LED will light up green to indicate version 2 of the firmware is running. You should also see output
2062+
like this in the terminal window:
2063+
2064+
```sh
2065+
lpc55s69 init
2066+
Update partition: 0x15000 (sz 24016, ver 0x2, type 0x601)
2067+
Boot partition: 0xA000 (sz 24016, ver 0x1, type 0x601)
2068+
Update partition: 0x15000 (sz 24016, ver 0x2, type 0x601)
2069+
Starting Update (fallback allowed 0)
2070+
Update partition: 0x15000 (sz 24016, ver 0x2, type 0x601)
2071+
Boot partition: 0xA000 (sz 24016, ver 0x1, type 0x601)
2072+
Versions: Current 0x1, Update 0x2
2073+
Copy sector 0 (part 1->2)
2074+
Copy sector 0 (part 0->1)
2075+
Copy sector 0 (part 2->0)
2076+
Boot partition: 0xA000 (sz 24016, ver 0x2, type 0x601)
2077+
Update partition: 0x15000 (sz 24016, ver 0x1, type 0x601)
2078+
Copy sector 1 (part 1->2)
2079+
Copy sector 1 (part 0->1)
2080+
Copy sector 1 (part 2->0)
2081+
Copy sector 2 (part 1->2)
2082+
Copy sector 2 (part 0->1)
2083+
Copy sector 2 (part 2->0)
2084+
Copy sector 3 (part 1->2)
2085+
Copy sector 3 (part 0->1)
2086+
Copy sector 3 (part 2->0)
2087+
Copy sector 4 (part 1->2)
2088+
Copy sector 4 (part 0->1)
2089+
Copy sector 4 (part 2->0)
2090+
Copy sector 5 (part 1->2)
2091+
Copy sector 5 (part 0->1)
2092+
Copy sector 5 (part 2->0)
2093+
Copy sector 6 (part 1->2)
2094+
Copy sector 6 (part 0->1)
2095+
Copy sector 6 (part 2->0)
2096+
Copy sector 7 (part 1->2)
2097+
Copy sector 7 (part 0->1)
2098+
Copy sector 7 (part 2->0)
2099+
Copy sector 8 (part 1->2)
2100+
Copy sector 8 (part 0->1)
2101+
Copy sector 8 (part 2->0)
2102+
Copy sector 9 (part 1->2)
2103+
Copy sector 9 (part 0->1)
2104+
Copy sector 9 (part 2->0)
2105+
Copy sector 10 (part 1->2)
2106+
Copy sector 10 (part 0->1)
2107+
Copy sector 10 (part 2->0)
2108+
Copy sector 11 (part 1->2)
2109+
Copy sector 11 (part 0->1)
2110+
Copy sector 11 (part 2->0)
2111+
Copy sector 12 (part 1->2)
2112+
Copy sector 12 (part 0->1)
2113+
Copy sector 12 (part 2->0)
2114+
Copy sector 13 (part 1->2)
2115+
Copy sector 13 (part 0->1)
2116+
Copy sector 13 (part 2->0)
2117+
Copy sector 14 (part 1->2)
2118+
Copy sector 14 (part 0->1)
2119+
Copy sector 14 (part 2->0)
2120+
Copy sector 15 (part 1->2)
2121+
Copy sector 15 (part 0->1)
2122+
Copy sector 15 (part 2->0)
2123+
Copy sector 16 (part 1->2)
2124+
Copy sector 16 (part 0->1)
2125+
Copy sector 16 (part 2->0)
2126+
Copy sector 17 (part 1->2)
2127+
Copy sector 17 (part 0->1)
2128+
Copy sector 17 (part 2->0)
2129+
Copy sector 18 (part 1->2)
2130+
Copy sector 18 (part 0->1)
2131+
Copy sector 18 (part 2->0)
2132+
Copy sector 19 (part 1->2)
2133+
Copy sector 19 (part 0->1)
2134+
Copy sector 19 (part 2->0)
2135+
Copy sector 20 (part 1->2)
2136+
Copy sector 20 (part 0->1)
2137+
Copy sector 20 (part 2->0)
2138+
Copy sector 21 (part 1->2)
2139+
Copy sector 21 (part 0->1)
2140+
Copy sector 21 (part 2->0)
2141+
Copy sector 22 (part 1->2)
2142+
Copy sector 22 (part 0->1)
2143+
Copy sector 22 (part 2->0)
2144+
Copy sector 23 (part 1->2)
2145+
Copy sector 23 (part 0->1)
2146+
Copy sector 23 (part 2->0)
2147+
Copy sector 24 (part 1->2)
2148+
Copy sector 24 (part 0->1)
2149+
Copy sector 24 (part 2->0)
2150+
Copy sector 25 (part 1->2)
2151+
Copy sector 25 (part 0->1)
2152+
Copy sector 25 (part 2->0)
2153+
Copy sector 26 (part 1->2)
2154+
Copy sector 26 (part 0->1)
2155+
Copy sector 26 (part 2->0)
2156+
Copy sector 27 (part 1->2)
2157+
Copy sector 27 (part 0->1)
2158+
Copy sector 27 (part 2->0)
2159+
Copy sector 28 (part 1->2)
2160+
Copy sector 28 (part 0->1)
2161+
Copy sector 28 (part 2->0)
2162+
Copy sector 29 (part 1->2)
2163+
Copy sector 29 (part 0->1)
2164+
Copy sector 29 (part 2->0)
2165+
Copy sector 30 (part 1->2)
2166+
Copy sector 30 (part 0->1)
2167+
Copy sector 30 (part 2->0)
2168+
Copy sector 31 (part 1->2)
2169+
Copy sector 31 (part 0->1)
2170+
Copy sector 31 (part 2->0)
2171+
Copy sector 32 (part 1->2)
2172+
Copy sector 32 (part 0->1)
2173+
Copy sector 32 (part 2->0)
2174+
Copy sector 33 (part 1->2)
2175+
Copy sector 33 (part 0->1)
2176+
Copy sector 33 (part 2->0)
2177+
Copy sector 34 (part 1->2)
2178+
Copy sector 34 (part 0->1)
2179+
Copy sector 34 (part 2->0)
2180+
Copy sector 35 (part 1->2)
2181+
Copy sector 35 (part 0->1)
2182+
Copy sector 35 (part 2->0)
2183+
Copy sector 36 (part 1->2)
2184+
Copy sector 36 (part 0->1)
2185+
Copy sector 36 (part 2->0)
2186+
Copy sector 37 (part 1->2)
2187+
Copy sector 37 (part 0->1)
2188+
Copy sector 37 (part 2->0)
2189+
Copy sector 38 (part 1->2)
2190+
Copy sector 38 (part 0->1)
2191+
Copy sector 38 (part 2->0)
2192+
Copy sector 39 (part 1->2)
2193+
Copy sector 39 (part 0->1)
2194+
Copy sector 39 (part 2->0)
2195+
Copy sector 40 (part 1->2)
2196+
Copy sector 40 (part 0->1)
2197+
Copy sector 40 (part 2->0)
2198+
Copy sector 41 (part 1->2)
2199+
Copy sector 41 (part 0->1)
2200+
Copy sector 41 (part 2->0)
2201+
Copy sector 42 (part 1->2)
2202+
Copy sector 42 (part 0->1)
2203+
Copy sector 42 (part 2->0)
2204+
Copy sector 43 (part 1->2)
2205+
Copy sector 43 (part 0->1)
2206+
Copy sector 43 (part 2->0)
2207+
Copy sector 44 (part 1->2)
2208+
Copy sector 44 (part 0->1)
2209+
Copy sector 44 (part 2->0)
2210+
Copy sector 45 (part 1->2)
2211+
Copy sector 45 (part 0->1)
2212+
Copy sector 45 (part 2->0)
2213+
Copy sector 46 (part 1->2)
2214+
Copy sector 46 (part 0->1)
2215+
Copy sector 46 (part 2->0)
2216+
Copy sector 47 (part 1->2)
2217+
Copy sector 47 (part 0->1)
2218+
Copy sector 47 (part 2->0)
2219+
Erasing remainder of partition (38 sectors)...
2220+
Boot partition: 0xA000 (sz 24016, ver 0x2, type 0x601)
2221+
Update partition: 0x15000 (sz 24016, ver 0x1, type 0x601)
2222+
Copy sector 85 (part 0->2)
2223+
Copied boot sector to swap
2224+
Boot partition: 0xA000 (sz 24016, ver 0x2, type 0x601)
2225+
Booting version: 0x2
2226+
lpc55s69 init
2227+
boot: ver=0x2 state=0x10
2228+
update: ver=0x1 state=0xFF
2229+
Hello from firmware version 2
2230+
Calling wolfBoot_success()
2231+
boot: ver=0x2 state=0x00
2232+
update: ver=0x1 state=0xFF
2233+
```
2234+
2235+
### LPC55S69: Debugging
2236+
2237+
Debugging with GDB:
2238+
2239+
Note: We include a `.gdbinit` in the wolfBoot root that loads the wolfboot and test-app elf files.
2240+
2241+
In one terminal: `LinkServer gdbserver LPC55S69`
2242+
2243+
In another terminal use `gdb`:
2244+
2245+
```
2246+
b main
2247+
mon reset
2248+
c
2249+
```
2250+
2251+
19402252
## NXP LS1028A
19412253

19422254
The LS1028A is a AARCH64 armv8-a Cortex-A72 processor. Support has been tested with the NXP LS1028ARDB.

0 commit comments

Comments
 (0)