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:
raiden00pl 2024-10-24 09:54:18 +02:00 committed by Xiang Xiao
parent c3a0155374
commit 77303f389f
7 changed files with 154 additions and 173 deletions

View file

@ -1,33 +1,24 @@
=================
================
MPS2 AN500 Board
=================
================
This board configuration will use QEMU to emulate generic ARM v7-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
- ARM Generic Timer
- CMSDK UART controller
Getting Started
===============
1. Configuring and running
1. Configuring NuttX and compile::
Configuring NuttX and compile:
$ ./tools/configure.sh -l mps2-an500:nsh
$ 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
===================
@ -35,14 +26,14 @@ 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.
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
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

View file

@ -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

View file

@ -1,8 +1,9 @@
=================
================
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
- CMSDK UART controller
@ -10,76 +11,59 @@ The MPS3 AN547 board configuration uses QEMU to emulate a generic ARM v8-M serie
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
$ ./tools/configure.sh -l mps3-an547:nsh
$ make
```
2. Running with QEMU::
2. **Running with QEMU:**
$ qemu-system-arm -M mps3-an547 -nographic -kernel nuttx.bin
```bash
$ qemu-system-arm -M mps3-an547 -nographic -kernel nuttx.bin
```
3. Pic ostest::
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
$ ./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::
4. **Pic bootloader boot to ap, and run ostest:**
```bash
$ ./tools/configure.sh mps3-an547:ap
$ make -j20
$ mkdir -p pic
$ arm-none-eabi-strip --remove-section=.rel.text --remove-section=.comment --strip-unneeded nuttx -o pic/boot
$ genromfs -a -f 128 ../romfs.img -d pic
$ make distclean -j20
$ ./tools/configure.sh mps3-an547:bl
$ make -j20
$ qemu-system-arm -M mps3-an547 -m 2G -nographic \
-kernel nuttx.bin -gdb tcp::1127 \
-device loader,file=../romfs.img,addr=0x60000000
$ bl> boot /pic/boot
$ ap> ostest
```
./tools/configure.sh mps3-an547:ap
make -j20
mkdir -p pic
arm-none-eabi-strip --remove-section=.rel.text --remove-section=.comment --strip-unneeded nuttx -o pic/boot
genromfs -a -f 128 ../romfs.img -d pic
make distclean -j20
./tools/configure.sh mps3-an547:bl
make -j20
qemu-system-arm -M mps3-an547 -m 2G -nographic \
-kernel nuttx.bin -gdb tcp::1127 \
-device loader,file=../romfs.img,addr=0x60000000
bl> boot /pic/boot
ap> ostest
Debugging with 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
+CONFIG_DEBUG_SYMBOLS=y
```
2. Run QEMU::
2. **Run QEMU:**
qemu-system-arm -M mps3-an547 -nographic -kernel nuttx.bin -S -s
```bash
$ qemu-system-arm -M mps3-an547 -nographic -kernel nuttx.bin -S -s
```
3. Run GDB with TUI::
3. **Run GDB with TUI:**
```bash
$ arm-none-eabi-gdb -tui --eval-command='target remote localhost:1234' nuttx
```
arm-none-eabi-gdb -tui --eval-command='target remote localhost:1234' nuttx

View file

@ -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

View file

@ -0,0 +1,12 @@
===============
Hpmicro HPM6000
===============
Supported Boards
================
.. toctree::
:glob:
:maxdepth: 1
boards/*/*

View file

@ -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

View file

@ -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