Skip to content

Commit 6c48415

Browse files
committed
Add lpc55s69 to targets.md
1 parent d365e4a commit 6c48415

1 file changed

Lines changed: 313 additions & 1 deletion

File tree

docs/Targets.md

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

17341734

1735+
## NXP LPC55S69
1736+
1737+
The NXP LPC55S69 is a dual-core Cortex-M33 microcontroller. The support has been
1738+
tested on the LPCXpresso55S69 board (LPC55S69-EVK), with the on-board LINK2 configured in
1739+
the default CMSIS-DAP mode.
1740+
1741+
This requires the NXP MCUXpresso SDK. We tested using
1742+
[mcuxsdk-manifests](https://github.com/nxp-mcuxpresso/mcuxsdk-manifests) and
1743+
[CMSIS_5](https://github.com/nxp-mcuxpresso/CMSIS_5) placed under "../NXP".
1744+
1745+
To set up the MCUXpresso SDK:
1746+
1747+
```
1748+
cd ../NXP
1749+
1750+
# Install west
1751+
python -m venv west-venv
1752+
source west-venv/bin/activate
1753+
pip install west
1754+
1755+
# Set up the repository
1756+
west init -m https://github.com/nxp-mcuxpresso/mcuxsdk-manifests.git mcuxpresso-sdk
1757+
cd mcuxpresso-sdk
1758+
west update_board --set board lpcxpresso55s69
1759+
1760+
deactivate
1761+
```
1762+
1763+
### LPC55S69: Configuring and compiling
1764+
1765+
Copy the example configuration file and build with make:
1766+
1767+
```sh
1768+
cp config/examples/lpc55s69.config .config
1769+
make
1770+
```
1771+
1772+
We also provide a TrustZone configuration at `config/examples/lpc55s69-tz.config`.
1773+
1774+
### LPC55S69: Loading the firmware
1775+
1776+
Download and install the LinkServer tool:
1777+
[@NXP: LinkServer for microcontrollers](https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/linkserver-for-microcontrollers:LINKERSERVER#downloads)
1778+
1779+
NOTE: The LPCXpresso55S69's on-board LINK2 debugger comes loaded with CMSIS-DAP protocol, but it can be
1780+
optionally updated to use JLink protocol instead. See the EVK user manual for how to do this, if desired.
1781+
The below examples were tested with the default CMSIS-DAP protocol. CMSIS-DAP is supported by default in
1782+
the MCUXpresso IDE for debugging purposes.
1783+
1784+
Connect a USB cable from your development PC to P6 on the dev board.
1785+
1786+
Open a terminal to the virtual COM port with putty or similar app, settings 115200-N-8-1.
1787+
1788+
### LPC55S69: Testing firmware factory.bin
1789+
1790+
1) Erase the entire flash:
1791+
1792+
```sh
1793+
LinkServer flash LPC55S69 erase
1794+
```
1795+
1796+
2) Program the factory.bin, which contains both wolfBoot and the test-app version 1:
1797+
1798+
```sh
1799+
LinkServer flash LPC55S69 load factory.bin:0
1800+
```
1801+
1802+
3) The LED will light up blue to indicate version 1 of the firmware is running. You should also see output
1803+
like this in the terminal window:
1804+
1805+
```sh
1806+
lpc55s69 init
1807+
Boot partition: 0xA000 (sz 24016, ver 0x1, type 0x601)
1808+
Partition 1 header magic 0xFFFFFFFF invalid at 0x15000
1809+
Boot partition: 0xA000 (sz 24016, ver 0x1, type 0x601)
1810+
Booting version: 0x1
1811+
lpc55s69 init
1812+
boot: ver=0x1 state=0xFF
1813+
update: ver=0x0 state=0xFF
1814+
Hello from firmware version 1
1815+
Calling wolfBoot_success()
1816+
boot: ver=0x1 state=0x00
1817+
update: ver=0x0 state=0xFF
1818+
```
1819+
1820+
### LPC55S69: Testing firmware update
1821+
1822+
1) Sign the test-app with version 2:
1823+
1824+
```sh
1825+
./tools/keytools/sign --ecc384 --sha384 test-app/image.bin wolfboot_signing_private_key.der 2
1826+
```
1827+
1828+
2) Flash v2 update binary to your `.config`'s `WOLFBOOT_PARTITION_UPDATE_ADDRESS`
1829+
1830+
Example:
1831+
```sh
1832+
LinkServer flash LPC55S69 load test-app/image_v2_signed.bin:0x15000
1833+
```
1834+
1835+
3) You should see output like this in the terminal window:
1836+
1837+
```sh
1838+
lpc55s69 init
1839+
Boot partition: 0xA000 (sz 24016, ver 0x1, type 0x601)
1840+
Update partition: 0x15000 (sz 24016, ver 0x2, type 0x601)
1841+
Boot partition: 0xA000 (sz 24016, ver 0x1, type 0x601)
1842+
Booting version: 0x1
1843+
lpc55s69 init
1844+
boot: ver=0x1 state=0x00
1845+
update: ver=0x2 state=0xFF
1846+
Hello from firmware version 1
1847+
Update detected, version: 0x2
1848+
Triggering update...
1849+
boot: ver=0x1 state=0x00
1850+
update: ver=0x2 state=0x70
1851+
...done. Reboot to apply.
1852+
```
1853+
1854+
4) Press the RESET button to reboot
1855+
1856+
5) The LED will light up green to indicate version 2 of the firmware is running. You should also see output
1857+
like this in the terminal window:
1858+
1859+
```sh
1860+
lpc55s69 init
1861+
Update partition: 0x15000 (sz 24016, ver 0x2, type 0x601)
1862+
Boot partition: 0xA000 (sz 24016, ver 0x1, type 0x601)
1863+
Update partition: 0x15000 (sz 24016, ver 0x2, type 0x601)
1864+
Starting Update (fallback allowed 0)
1865+
Update partition: 0x15000 (sz 24016, ver 0x2, type 0x601)
1866+
Boot partition: 0xA000 (sz 24016, ver 0x1, type 0x601)
1867+
Versions: Current 0x1, Update 0x2
1868+
Copy sector 0 (part 1->2)
1869+
Copy sector 0 (part 0->1)
1870+
Copy sector 0 (part 2->0)
1871+
Boot partition: 0xA000 (sz 24016, ver 0x2, type 0x601)
1872+
Update partition: 0x15000 (sz 24016, ver 0x1, type 0x601)
1873+
Copy sector 1 (part 1->2)
1874+
Copy sector 1 (part 0->1)
1875+
Copy sector 1 (part 2->0)
1876+
Copy sector 2 (part 1->2)
1877+
Copy sector 2 (part 0->1)
1878+
Copy sector 2 (part 2->0)
1879+
Copy sector 3 (part 1->2)
1880+
Copy sector 3 (part 0->1)
1881+
Copy sector 3 (part 2->0)
1882+
Copy sector 4 (part 1->2)
1883+
Copy sector 4 (part 0->1)
1884+
Copy sector 4 (part 2->0)
1885+
Copy sector 5 (part 1->2)
1886+
Copy sector 5 (part 0->1)
1887+
Copy sector 5 (part 2->0)
1888+
Copy sector 6 (part 1->2)
1889+
Copy sector 6 (part 0->1)
1890+
Copy sector 6 (part 2->0)
1891+
Copy sector 7 (part 1->2)
1892+
Copy sector 7 (part 0->1)
1893+
Copy sector 7 (part 2->0)
1894+
Copy sector 8 (part 1->2)
1895+
Copy sector 8 (part 0->1)
1896+
Copy sector 8 (part 2->0)
1897+
Copy sector 9 (part 1->2)
1898+
Copy sector 9 (part 0->1)
1899+
Copy sector 9 (part 2->0)
1900+
Copy sector 10 (part 1->2)
1901+
Copy sector 10 (part 0->1)
1902+
Copy sector 10 (part 2->0)
1903+
Copy sector 11 (part 1->2)
1904+
Copy sector 11 (part 0->1)
1905+
Copy sector 11 (part 2->0)
1906+
Copy sector 12 (part 1->2)
1907+
Copy sector 12 (part 0->1)
1908+
Copy sector 12 (part 2->0)
1909+
Copy sector 13 (part 1->2)
1910+
Copy sector 13 (part 0->1)
1911+
Copy sector 13 (part 2->0)
1912+
Copy sector 14 (part 1->2)
1913+
Copy sector 14 (part 0->1)
1914+
Copy sector 14 (part 2->0)
1915+
Copy sector 15 (part 1->2)
1916+
Copy sector 15 (part 0->1)
1917+
Copy sector 15 (part 2->0)
1918+
Copy sector 16 (part 1->2)
1919+
Copy sector 16 (part 0->1)
1920+
Copy sector 16 (part 2->0)
1921+
Copy sector 17 (part 1->2)
1922+
Copy sector 17 (part 0->1)
1923+
Copy sector 17 (part 2->0)
1924+
Copy sector 18 (part 1->2)
1925+
Copy sector 18 (part 0->1)
1926+
Copy sector 18 (part 2->0)
1927+
Copy sector 19 (part 1->2)
1928+
Copy sector 19 (part 0->1)
1929+
Copy sector 19 (part 2->0)
1930+
Copy sector 20 (part 1->2)
1931+
Copy sector 20 (part 0->1)
1932+
Copy sector 20 (part 2->0)
1933+
Copy sector 21 (part 1->2)
1934+
Copy sector 21 (part 0->1)
1935+
Copy sector 21 (part 2->0)
1936+
Copy sector 22 (part 1->2)
1937+
Copy sector 22 (part 0->1)
1938+
Copy sector 22 (part 2->0)
1939+
Copy sector 23 (part 1->2)
1940+
Copy sector 23 (part 0->1)
1941+
Copy sector 23 (part 2->0)
1942+
Copy sector 24 (part 1->2)
1943+
Copy sector 24 (part 0->1)
1944+
Copy sector 24 (part 2->0)
1945+
Copy sector 25 (part 1->2)
1946+
Copy sector 25 (part 0->1)
1947+
Copy sector 25 (part 2->0)
1948+
Copy sector 26 (part 1->2)
1949+
Copy sector 26 (part 0->1)
1950+
Copy sector 26 (part 2->0)
1951+
Copy sector 27 (part 1->2)
1952+
Copy sector 27 (part 0->1)
1953+
Copy sector 27 (part 2->0)
1954+
Copy sector 28 (part 1->2)
1955+
Copy sector 28 (part 0->1)
1956+
Copy sector 28 (part 2->0)
1957+
Copy sector 29 (part 1->2)
1958+
Copy sector 29 (part 0->1)
1959+
Copy sector 29 (part 2->0)
1960+
Copy sector 30 (part 1->2)
1961+
Copy sector 30 (part 0->1)
1962+
Copy sector 30 (part 2->0)
1963+
Copy sector 31 (part 1->2)
1964+
Copy sector 31 (part 0->1)
1965+
Copy sector 31 (part 2->0)
1966+
Copy sector 32 (part 1->2)
1967+
Copy sector 32 (part 0->1)
1968+
Copy sector 32 (part 2->0)
1969+
Copy sector 33 (part 1->2)
1970+
Copy sector 33 (part 0->1)
1971+
Copy sector 33 (part 2->0)
1972+
Copy sector 34 (part 1->2)
1973+
Copy sector 34 (part 0->1)
1974+
Copy sector 34 (part 2->0)
1975+
Copy sector 35 (part 1->2)
1976+
Copy sector 35 (part 0->1)
1977+
Copy sector 35 (part 2->0)
1978+
Copy sector 36 (part 1->2)
1979+
Copy sector 36 (part 0->1)
1980+
Copy sector 36 (part 2->0)
1981+
Copy sector 37 (part 1->2)
1982+
Copy sector 37 (part 0->1)
1983+
Copy sector 37 (part 2->0)
1984+
Copy sector 38 (part 1->2)
1985+
Copy sector 38 (part 0->1)
1986+
Copy sector 38 (part 2->0)
1987+
Copy sector 39 (part 1->2)
1988+
Copy sector 39 (part 0->1)
1989+
Copy sector 39 (part 2->0)
1990+
Copy sector 40 (part 1->2)
1991+
Copy sector 40 (part 0->1)
1992+
Copy sector 40 (part 2->0)
1993+
Copy sector 41 (part 1->2)
1994+
Copy sector 41 (part 0->1)
1995+
Copy sector 41 (part 2->0)
1996+
Copy sector 42 (part 1->2)
1997+
Copy sector 42 (part 0->1)
1998+
Copy sector 42 (part 2->0)
1999+
Copy sector 43 (part 1->2)
2000+
Copy sector 43 (part 0->1)
2001+
Copy sector 43 (part 2->0)
2002+
Copy sector 44 (part 1->2)
2003+
Copy sector 44 (part 0->1)
2004+
Copy sector 44 (part 2->0)
2005+
Copy sector 45 (part 1->2)
2006+
Copy sector 45 (part 0->1)
2007+
Copy sector 45 (part 2->0)
2008+
Copy sector 46 (part 1->2)
2009+
Copy sector 46 (part 0->1)
2010+
Copy sector 46 (part 2->0)
2011+
Copy sector 47 (part 1->2)
2012+
Copy sector 47 (part 0->1)
2013+
Copy sector 47 (part 2->0)
2014+
Erasing remainder of partition (38 sectors)...
2015+
Boot partition: 0xA000 (sz 24016, ver 0x2, type 0x601)
2016+
Update partition: 0x15000 (sz 24016, ver 0x1, type 0x601)
2017+
Copy sector 85 (part 0->2)
2018+
Copied boot sector to swap
2019+
Boot partition: 0xA000 (sz 24016, ver 0x2, type 0x601)
2020+
Booting version: 0x2
2021+
lpc55s69 init
2022+
boot: ver=0x2 state=0x10
2023+
update: ver=0x1 state=0xFF
2024+
Hello from firmware version 2
2025+
Calling wolfBoot_success()
2026+
boot: ver=0x2 state=0x00
2027+
update: ver=0x1 state=0xFF
2028+
```
2029+
2030+
### LPC55S69: Debugging
2031+
2032+
Debugging with GDB:
2033+
2034+
Note: We include a `.gdbinit` in the wolfBoot root that loads the wolfboot and test-app elf files.
2035+
2036+
In one terminal: `LinkServer gdbserver LPC55S69`
2037+
2038+
In another terminal use `gdb`:
2039+
2040+
```
2041+
b main
2042+
mon reset
2043+
c
2044+
```
2045+
2046+
17352047
## NXP LS1028A
17362048

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

0 commit comments

Comments
 (0)