File tree Expand file tree Collapse file tree
Documentation/platforms/risc-v/k210/boards/maix-bit Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -687,7 +687,6 @@ Documentation/platforms/risc-v/hpm6750/index.rst raiden00@railab.me
687687Documentation/platforms/risc-v/index.rst matias@protobits.dev
688688Documentation/platforms/risc-v/jh7110/boards/star64/index.rst luppy@appkaki.com
689689Documentation/platforms/risc-v/jh7110/index.rst luppy@appkaki.com
690- Documentation/platforms/risc-v/k210/boards/maix-bit/README-qemu.txt raiden00@railab.me
691690Documentation/platforms/risc-v/k210/boards/maix-bit/README.txt raiden00@railab.me
692691Documentation/platforms/risc-v/k210/boards/maix-bit/index.rst raiden00@railab.me
693692Documentation/platforms/risc-v/k210/index.rst raiden00@railab.me
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ Features
3030
3131.. todo ::
3232
33- If you are intersted in using this board, please consider contributing
33+ If you are interested in using this board, please consider contributing
3434 implementations for the above missing features.
3535
3636Installation
@@ -77,51 +77,6 @@ Write ``nuttx.bin`` to SPI-Flash:
7777
7878 The ``kflash_gui `` is not recommended because it's unstable.
7979
80- QEMU Process
81- ============
82-
83- In order to run this board's version of NuttX on QEMU, make the following
84- adjustments:
85-
86- QEMU Installation
87- -----------------
88-
89- Installing and building QEMU can be done with:
90-
91- .. code :: console
92-
93- $ git clone https://github.com/qemu/qemu
94- $ cd qemu
95- $ ./configure --target-list=riscv64-softmmu
96- $ make
97- $ sudo make install
98-
99- Building NuttX for QEMU
100- -----------------------
101-
102- Building NuttX follows the same process, but you will need to modify your chosen
103- configuration to include the option ``CONFIG_K210_WITH_QEMU=y ``.
104-
105- Running on QEMU
106- ---------------
107-
108- Run the following:
109-
110- .. code :: console
111-
112- $ qemu-system-riscv64 -nographic -machine sifive_u -bios ./nuttx
113-
114-
115- .. note ::
116-
117- To run Nuttx for kostest, ``gdb `` needs to be used to load both
118- ``nuttx_user.elf `` and ``nuttx ``.
119-
120- .. code :: console
121-
122- $ qemu-system-riscv64 -nographic -machine sifive_u -s -S
123- $ riscv64-unknown-elf-gdb -ex 'target extended-remote:1234' -ex 'load nuttx_user.elf' -ex 'load nuttx' -ex 'c'
124-
12580Configurations
12681==============
12782
Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ config ARCH_CHIP_K210
2929 select ARCH_RV_ISA_M
3030 select ARCH_RV_ISA_A
3131 select ARCH_RV_ISA_C
32- select ARCH_HAVE_FPU if !K210_WITH_QEMU
33- select ARCH_HAVE_DPFPU if !K210_WITH_QEMU
32+ select ARCH_HAVE_FPU
33+ select ARCH_HAVE_DPFPU
3434 select ARCH_HAVE_MPU
3535 select ARCH_HAVE_TESTSET
3636 select ARCH_HAVE_MULTICPU
Original file line number Diff line number Diff line change 3333
3434/* Map RISC-V exception code to NuttX IRQ */
3535
36- #ifdef CONFIG_K210_WITH_QEMU
37- #define K210_IRQ_UART0 (RISCV_IRQ_MEXT + 4)
38- #else
3936#define K210_IRQ_WDT0 (RISCV_IRQ_MEXT + 21)
4037#define K210_IRQ_WDT1 (RISCV_IRQ_MEXT + 22)
4138#define K210_IRQ_UART0 (RISCV_IRQ_MEXT + 33)
42- #endif
4339
4440/* Total number of IRQs */
4541
Original file line number Diff line number Diff line change @@ -50,11 +50,3 @@ config K210_CPU_FREQ
5050 Set the K210 CPU target frequency in Hz.
5151 Default is 400000000 (400 MHz).
5252 Valid range: 40000000-600000000 Hz (40-600 MHz).
53-
54- menu "K210 Others"
55-
56- config K210_WITH_QEMU
57- bool "qemu support"
58- default n
59-
60- endmenu
Original file line number Diff line number Diff line change 3232#define K210_CLINT_BASE 0x02000000
3333#define K210_PLIC_BASE 0x0c000000
3434
35- #ifdef CONFIG_K210_WITH_QEMU
36- #define K210_UART0_BASE 0x10010000
37- #else
3835#define K210_UART0_BASE 0x38000000
39- #endif
4036#define K210_GPIOHS_BASE 0x38001000
4137#define K210_FPIOA_BASE 0x502B0000
4238
Original file line number Diff line number Diff line change @@ -66,7 +66,6 @@ uint32_t k210_get_cpuclk(void)
6666 * Name: k210_get_pll0clk
6767 ****************************************************************************/
6868
69- #ifndef CONFIG_K210_WITH_QEMU
7069uint32_t k210_get_pll0clk (void )
7170{
7271 uint32_t pll0 ;
@@ -81,15 +80,13 @@ uint32_t k210_get_pll0clk(void)
8180
8281 return OSC_FREQ / nr * nf / od ;
8382}
84- #endif
8583
8684/****************************************************************************
8785 * Name: k210_clockconfig
8886 ****************************************************************************/
8987
9088void k210_clockconfig (void )
9189{
92- #ifndef CONFIG_K210_WITH_QEMU
9390 uint32_t clksel0 ;
9491 uint32_t div ;
9592
@@ -133,5 +130,4 @@ void k210_clockconfig(void)
133130 /* Workaround for stabilization */
134131
135132 up_udelay (1 );
136- #endif
137133}
Original file line number Diff line number Diff line change 4646 * Pre-processor Definitions
4747 ****************************************************************************/
4848
49- #ifdef CONFIG_K210_WITH_QEMU
50- #define MTIMER_FREQ 1000000
51- #else
5249#define MTIMER_FREQ (k210_get_cpuclk() / 50)
53- #endif
5450
5551/****************************************************************************
5652 * Public Functions
Original file line number Diff line number Diff line change @@ -1116,7 +1116,7 @@ config ARCH_BOARD_LX_CPU
11161116config ARCH_BOARD_MAIX_BIT
11171117 bool "Sipeed Maix Bit board"
11181118 depends on ARCH_CHIP_K210
1119- select ARCH_HAVE_LEDS if !K210_WITH_QEMU
1119+ select ARCH_HAVE_LEDS
11201120 ---help---
11211121 This is the board configuration for the port of NuttX to the
11221122 Sipeed Maix Bit board. This board features the RISC-V K210
You can’t perform that action at this time.
0 commit comments