mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 03:45:50 +08:00
Documentation: migrate README.txt from boards and fixes for mps boards
migrate some README.txt form boards/ and fixes for mps boards rst
This commit is contained in:
@@ -1,33 +1,24 @@
|
|||||||
=================
|
================
|
||||||
MPS2 AN500 Board
|
MPS2 AN500 Board
|
||||||
=================
|
================
|
||||||
|
|
||||||
This board configuration will use QEMU to emulate generic ARM v7-M series
|
This board configuration will use QEMU to emulate generic ARM v7-M series
|
||||||
hardware platform and provides support for these devices:
|
hardware platform and provides support for these devices:
|
||||||
|
|
||||||
- ARM Generic Timer
|
- ARM Generic Timer
|
||||||
- CMSDK UART controller
|
- CMSDK UART controller
|
||||||
|
|
||||||
Contents
|
|
||||||
========
|
|
||||||
- Getting Started
|
|
||||||
- Status
|
|
||||||
- Platform Features
|
|
||||||
- Debugging with QEMU
|
|
||||||
- FPU Support and Performance
|
|
||||||
- SMP Support
|
|
||||||
- References
|
|
||||||
|
|
||||||
Getting Started
|
Getting Started
|
||||||
===============
|
===============
|
||||||
|
|
||||||
1. Configuring and running
|
1. Configuring NuttX and compile::
|
||||||
|
|
||||||
Configuring NuttX and compile:
|
|
||||||
$ ./tools/configure.sh -l mps2-an500:nsh
|
$ ./tools/configure.sh -l mps2-an500:nsh
|
||||||
$ make
|
$ make
|
||||||
Running with qemu
|
|
||||||
$ qemu-system-arm -M mps2-an500 -nographic -kernel nuttx.bin
|
Running with qemu::
|
||||||
|
|
||||||
|
$ qemu-system-arm -M mps2-an500 -nographic -kernel nuttx.bin
|
||||||
|
|
||||||
Debugging with QEMU
|
Debugging with QEMU
|
||||||
===================
|
===================
|
||||||
@@ -35,14 +26,14 @@ Debugging with QEMU
|
|||||||
The nuttx ELF image can be debugged with QEMU.
|
The nuttx ELF image can be debugged with QEMU.
|
||||||
|
|
||||||
1. To debug the nuttx (ELF) with symbols, make sure the following change have
|
1. To debug the nuttx (ELF) with symbols, make sure the following change have
|
||||||
applied to defconfig.
|
applied to defconfig::
|
||||||
|
|
||||||
+CONFIG_DEBUG_SYMBOLS=y
|
+CONFIG_DEBUG_SYMBOLS=y
|
||||||
|
|
||||||
2. Run QEMU(at shell terminal 1)
|
2. Run QEMU(at shell terminal 1)::
|
||||||
|
|
||||||
$ qemu-system-arm -M mps2-an500 -nographic -kernel nuttx.bin -S -s
|
$ qemu-system-arm -M mps2-an500 -nographic -kernel nuttx.bin -S -s
|
||||||
|
|
||||||
3. Run gdb with TUI, connect to QEMU, load nuttx and continue (at shell terminal 2)
|
3. Run gdb with TUI, connect to QEMU, load nuttx and continue (at shell terminal 2)::
|
||||||
|
|
||||||
$ arm-none-eabi-gdb -tui --eval-command='target remote localhost:1234' nuttx
|
$ arm-none-eabi-gdb -tui --eval-command='target remote localhost:1234' nuttx
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
================
|
||||||
|
MPS2 AN521 Board
|
||||||
|
================
|
||||||
|
|
||||||
|
This board configuration will use QEMU to emulate generic ARM v8-M series
|
||||||
|
hardware platform and provides support for these devices:
|
||||||
|
|
||||||
|
- ARM Generic Timer
|
||||||
|
- CMSDK UART controller
|
||||||
|
|
||||||
|
Getting Started
|
||||||
|
===============
|
||||||
|
|
||||||
|
1. Configuring NuttX and compile (Single Core)::
|
||||||
|
|
||||||
|
$ ./tools/configure.sh -l mps2-an521:nsh
|
||||||
|
$ make
|
||||||
|
|
||||||
|
Running with qemu::
|
||||||
|
|
||||||
|
$ qemu-system-arm -M mps2-an521 -nographic -chardev stdio,id=con,mux=on \
|
||||||
|
-serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx
|
||||||
|
|
||||||
|
Debugging with QEMU
|
||||||
|
===================
|
||||||
|
|
||||||
|
The nuttx ELF image can be debugged with QEMU.
|
||||||
|
|
||||||
|
1. To debug the nuttx (ELF) with symbols, make sure the following change have
|
||||||
|
applied to defconfig::
|
||||||
|
|
||||||
|
CONFIG_DEBUG_SYMBOLS=y
|
||||||
|
|
||||||
|
2. Run QEMU (at shell terminal 1)::
|
||||||
|
|
||||||
|
qemu-system-arm -M mps2-an521 -nographic -chardev stdio,id=con,mux=on \
|
||||||
|
-serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx -S -s
|
||||||
|
|
||||||
|
3. Run gdb with TUI, connect to QEMU, load nuttx and continue (at shell terminal 2)::
|
||||||
|
|
||||||
|
$ arm-none-eabi-gdb -tui --eval-command='target remote localhost:1234' nuttx
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
=================
|
================
|
||||||
MPS3 AN547 Board
|
MPS3 AN547 Board
|
||||||
=================
|
================
|
||||||
|
|
||||||
The MPS3 AN547 board configuration uses QEMU to emulate a generic ARM v8-M series hardware platform and provides support for the following devices:
|
The MPS3 AN547 board configuration uses QEMU to emulate a generic ARM v8-M
|
||||||
|
series hardware platform and provides support for the following devices:
|
||||||
|
|
||||||
- ARM Generic Timer
|
- ARM Generic Timer
|
||||||
- CMSDK UART controller
|
- CMSDK UART controller
|
||||||
@@ -10,76 +11,59 @@ The MPS3 AN547 board configuration uses QEMU to emulate a generic ARM v8-M serie
|
|||||||
Getting Started
|
Getting Started
|
||||||
===============
|
===============
|
||||||
|
|
||||||
Configuring and Running
|
Configuring and Running (Single Core)
|
||||||
-----------------------
|
-------------------------------------
|
||||||
|
|
||||||
### Single Core
|
1. Configuring NuttX and Compiling::
|
||||||
|
|
||||||
1. **Configuring NuttX and Compiling:**
|
./tools/configure.sh -l mps3-an547:nsh
|
||||||
|
make
|
||||||
|
|
||||||
```bash
|
2. Running with QEMU::
|
||||||
$ ./tools/configure.sh -l mps3-an547:nsh
|
|
||||||
$ make
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Running with QEMU:**
|
$ qemu-system-arm -M mps3-an547 -nographic -kernel nuttx.bin
|
||||||
|
|
||||||
```bash
|
3. Pic ostest::
|
||||||
$ qemu-system-arm -M mps3-an547 -nographic -kernel nuttx.bin
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **Pic ostest:**
|
./tools/configure.sh mps3-an547:picostest
|
||||||
|
make -j20
|
||||||
|
genromfs -f romfs.img -d ../apps/bin/
|
||||||
|
qemu-system-arm -M mps3-an547 -m 2G -nographic \
|
||||||
|
-kernel nuttx.bin -gdb tcp::1127 \
|
||||||
|
-device loader,file=romfs.img,addr=0x60000000
|
||||||
|
nsh> /pic/hello
|
||||||
|
nsh> /pic/ostest
|
||||||
|
|
||||||
```bash
|
4. Pic bootloader boot to ap, and run ostest::
|
||||||
$ ./tools/configure.sh mps3-an547:picostest
|
|
||||||
$ make -j20
|
|
||||||
$ genromfs -f romfs.img -d ../apps/bin/
|
|
||||||
$ qemu-system-arm -M mps3-an547 -m 2G -nographic \
|
|
||||||
-kernel nuttx.bin -gdb tcp::1127 \
|
|
||||||
-device loader,file=romfs.img,addr=0x60000000
|
|
||||||
$ nsh> /pic/hello
|
|
||||||
$ nsh> /pic/ostest
|
|
||||||
```
|
|
||||||
|
|
||||||
4. **Pic bootloader boot to ap, and run ostest:**
|
./tools/configure.sh mps3-an547:ap
|
||||||
|
make -j20
|
||||||
```bash
|
mkdir -p pic
|
||||||
$ ./tools/configure.sh mps3-an547:ap
|
arm-none-eabi-strip --remove-section=.rel.text --remove-section=.comment --strip-unneeded nuttx -o pic/boot
|
||||||
$ make -j20
|
genromfs -a -f 128 ../romfs.img -d pic
|
||||||
$ mkdir -p pic
|
make distclean -j20
|
||||||
$ arm-none-eabi-strip --remove-section=.rel.text --remove-section=.comment --strip-unneeded nuttx -o pic/boot
|
./tools/configure.sh mps3-an547:bl
|
||||||
$ genromfs -a -f 128 ../romfs.img -d pic
|
make -j20
|
||||||
$ make distclean -j20
|
qemu-system-arm -M mps3-an547 -m 2G -nographic \
|
||||||
$ ./tools/configure.sh mps3-an547:bl
|
-kernel nuttx.bin -gdb tcp::1127 \
|
||||||
$ make -j20
|
-device loader,file=../romfs.img,addr=0x60000000
|
||||||
$ qemu-system-arm -M mps3-an547 -m 2G -nographic \
|
bl> boot /pic/boot
|
||||||
-kernel nuttx.bin -gdb tcp::1127 \
|
ap> ostest
|
||||||
-device loader,file=../romfs.img,addr=0x60000000
|
|
||||||
$ bl> boot /pic/boot
|
|
||||||
$ ap> ostest
|
|
||||||
```
|
|
||||||
|
|
||||||
Debugging with QEMU
|
Debugging with QEMU
|
||||||
===================
|
===================
|
||||||
|
|
||||||
The NuttX ELF image can be debugged using QEMU.
|
The NuttX ELF image can be debugged using QEMU.
|
||||||
|
|
||||||
1. **Enable Debug Symbols:**
|
1. Enable Debug Symbols.
|
||||||
|
Ensure the following change is applied to ``defconfig``::
|
||||||
|
|
||||||
Ensure the following change is applied to `defconfig`:
|
CONFIG_DEBUG_SYMBOLS=y
|
||||||
|
|
||||||
```bash
|
2. Run QEMU::
|
||||||
+CONFIG_DEBUG_SYMBOLS=y
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Run QEMU:**
|
qemu-system-arm -M mps3-an547 -nographic -kernel nuttx.bin -S -s
|
||||||
|
|
||||||
```bash
|
3. Run GDB with TUI::
|
||||||
$ qemu-system-arm -M mps3-an547 -nographic -kernel nuttx.bin -S -s
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **Run GDB with TUI:**
|
arm-none-eabi-gdb -tui --eval-command='target remote localhost:1234' nuttx
|
||||||
|
|
||||||
```bash
|
|
||||||
$ arm-none-eabi-gdb -tui --eval-command='target remote localhost:1234' nuttx
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
==========
|
||||||
|
hpm6360evk
|
||||||
|
==========
|
||||||
|
|
||||||
|
1. Download and install toolchain::
|
||||||
|
|
||||||
|
curl https://github.com/hpmicro/riscv-gnu-toolchain/releases/tag/2022.05.15
|
||||||
|
|
||||||
|
2. Download and install openocd.
|
||||||
|
|
||||||
|
Download hpmicro sdk_env, openocd in the path: sdk_env/tools/openocd
|
||||||
|
|
||||||
|
3. Configure and build NuttX::
|
||||||
|
|
||||||
|
mkdir ./nuttxspace
|
||||||
|
cd ./nuttxspace
|
||||||
|
git clone https://github.com/apache/nuttx.git nuttx
|
||||||
|
git clone https://github.com/apache/nuttx-apps.git apps
|
||||||
|
cd nuttx
|
||||||
|
make distclean
|
||||||
|
./tools/configure.sh hpm6750evk2:nsh
|
||||||
|
make menuconfig
|
||||||
|
make V=1
|
||||||
|
|
||||||
|
Note: make menuconfig to config toolchain
|
||||||
|
|
||||||
|
To switch GNU riscv64 toolchain to GNU riscv32 toolchain, the following option must be selected::
|
||||||
|
|
||||||
|
System Type --->
|
||||||
|
Toolchain Selection --->
|
||||||
|
[ ] Generic GNU RV64 toolchain
|
||||||
|
[x] Generic GNU RV32 toolchain
|
||||||
|
|
||||||
|
Make sure HPMicro GNU riscv32 toolchain have been installed and be found in PATH.
|
||||||
|
|
||||||
|
4. Debug the nuttx with openocd and run::
|
||||||
|
|
||||||
|
picocom -b 115200 /dev/ttyACM0
|
||||||
|
|
||||||
|
When using fireDAP, command as follows. Those cfg files in the path: ``sdk_env/hpm_sdk/boards/openocd``::
|
||||||
|
|
||||||
|
$ openocd -f probes/cmsis_dap.cfg -f soc/hpm6750-single-core.cfg -f boards/hpm6750evk2.cfg
|
||||||
|
|
||||||
|
$ riscv32-unknown-elf-gdb ./nuttx
|
||||||
|
(gdb) target extended-remote [ip_addr]:3333
|
||||||
|
(gdb) load
|
||||||
|
(gdb) c
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
===============
|
||||||
|
Hpmicro HPM6000
|
||||||
|
===============
|
||||||
|
|
||||||
|
Supported Boards
|
||||||
|
================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:glob:
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
boards/*/*
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
README.txt
|
|
||||||
==========
|
|
||||||
|
|
||||||
This board configuration will use QEMU to emulate generic ARM v8-M series
|
|
||||||
hardware platform and provides support for these devices:
|
|
||||||
|
|
||||||
- ARM Generic Timer
|
|
||||||
- CMSDK UART controller
|
|
||||||
|
|
||||||
Contents
|
|
||||||
========
|
|
||||||
- Getting Started
|
|
||||||
- Status
|
|
||||||
- Platform Features
|
|
||||||
- Debugging with QEMU
|
|
||||||
- FPU Support and Performance
|
|
||||||
- SMP Support
|
|
||||||
- References
|
|
||||||
|
|
||||||
Getting Started
|
|
||||||
===============
|
|
||||||
|
|
||||||
1. Configuring and running
|
|
||||||
1.1 Single Core
|
|
||||||
Configuring NuttX and compile:
|
|
||||||
$ ./tools/configure.sh -l mps2-an521:nsh
|
|
||||||
$ make
|
|
||||||
Running with qemu
|
|
||||||
$ qemu-system-arm -M mps2-an521 -nographic -chardev stdio,id=con,mux=on \
|
|
||||||
-serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx
|
|
||||||
|
|
||||||
2.2 Kernel protected mode
|
|
||||||
TODO
|
|
||||||
|
|
||||||
Debugging with QEMU
|
|
||||||
===================
|
|
||||||
|
|
||||||
The nuttx ELF image can be debugged with QEMU.
|
|
||||||
|
|
||||||
1. To debug the nuttx (ELF) with symbols, make sure the following change have
|
|
||||||
applied to defconfig.
|
|
||||||
|
|
||||||
+CONFIG_DEBUG_SYMBOLS=y
|
|
||||||
|
|
||||||
2. Run QEMU(at shell terminal 1)
|
|
||||||
|
|
||||||
$ qemu-system-arm -M mps2-an521 -nographic -chardev stdio,id=con,mux=on \
|
|
||||||
-serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx -S -s
|
|
||||||
|
|
||||||
3. Run gdb with TUI, connect to QEMU, load nuttx and continue (at shell terminal 2)
|
|
||||||
|
|
||||||
$ arm-none-eabi-gdb -tui --eval-command='target remote localhost:1234' nuttx
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
1. Download and install toolchain
|
|
||||||
|
|
||||||
$ curl https://github.com/hpmicro/riscv-gnu-toolchain/releases/tag/2022.05.15
|
|
||||||
|
|
||||||
2. Download and install openocd
|
|
||||||
|
|
||||||
Download hpmicro sdk_env, openocd in the path: sdk_env/tools/openocd
|
|
||||||
|
|
||||||
3. Configure and build NuttX
|
|
||||||
|
|
||||||
$ mkdir ./nuttxspace
|
|
||||||
$ cd ./nuttxspace
|
|
||||||
$ git clone https://github.com/apache/nuttx.git nuttx
|
|
||||||
$ git clone https://github.com/apache/nuttx-apps.git apps
|
|
||||||
$ cd nuttx
|
|
||||||
$ make distclean
|
|
||||||
$ ./tools/configure.sh hpm6750evk2:nsh
|
|
||||||
$ make menuconfig
|
|
||||||
$ make V=1
|
|
||||||
|
|
||||||
Note: make menuconfig to config toolchain
|
|
||||||
==================
|
|
||||||
To switch GNU riscv64 toolchain to GNU riscv32 toolchain, the following option must be selected:
|
|
||||||
|
|
||||||
System Type --->
|
|
||||||
Toolchain Selection --->
|
|
||||||
[ ] Generic GNU RV64 toolchain
|
|
||||||
[x] Generic GNU RV32 toolchain
|
|
||||||
|
|
||||||
Make sure HPMicro GNU riscv32 toolchain have been installed and be found in PATH.
|
|
||||||
|
|
||||||
4. Debug the nuttx with openocd and run
|
|
||||||
|
|
||||||
$ picocom -b 115200 /dev/ttyACM0
|
|
||||||
|
|
||||||
When using fireDAP, command as follows. Those cfg files in the path: sdk_env/hpm_sdk/boards/openocd.
|
|
||||||
$ openocd -f probes/cmsis_dap.cfg -f soc/hpm6750-single-core.cfg -f boards/hpm6750evk2.cfg
|
|
||||||
|
|
||||||
$ riscv32-unknown-elf-gdb ./nuttx
|
|
||||||
(gdb) target extended-remote [ip_addr]:3333
|
|
||||||
(gdb) load
|
|
||||||
(gdb) c
|
|
||||||
Reference in New Issue
Block a user