Skip to content

Commit 7bf8308

Browse files
committed
Support XuanTie E906 CPU
- Place the E906 implementation in the ports/risc-v32/gnu directory; - Remove code unrelated to the xuantie_smartl_fpga demo;
1 parent 1d796d5 commit 7bf8308

File tree

136 files changed

+39
-29654
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+39
-29654
lines changed

ports/xuantie/e906/gnu/example_build/smartl_fpga/CMakeLists.txt renamed to ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ set(SRCS
1010
${CMAKE_CURRENT_LIST_DIR}/boards/board_riscv_dummy/src/uart/board_uart.c
1111
${CMAKE_CURRENT_LIST_DIR}/boards/board_riscv_dummy/src/board_init.c
1212
${CMAKE_CURRENT_LIST_DIR}/components/csi/csi2/src/csi_misc.c
13-
${CMAKE_CURRENT_LIST_DIR}/components/csi/csi2/src/csi_ringbuf.c
1413
${CMAKE_CURRENT_LIST_DIR}/components/libc_threadx/mini_printf.c
1514
${CMAKE_CURRENT_LIST_DIR}/components/libc_threadx/newlib_stub.c
1615
${CMAKE_CURRENT_LIST_DIR}/components/chip_riscv_dummy/src/arch/e906fdp/startup.S
@@ -31,7 +30,7 @@ set(SRCS
3130
)
3231

3332
include_directories(
34-
${CMAKE_CURRENT_LIST_DIR}/../../../../../../common/inc
33+
${CMAKE_CURRENT_LIST_DIR}/../../../../../common/inc
3534
${CMAKE_CURRENT_LIST_DIR}/../../inc
3635
${CMAKE_CURRENT_LIST_DIR}
3736
${CMAKE_CURRENT_LIST_DIR}/boards/board_riscv_dummy/include
@@ -67,7 +66,7 @@ add_link_options(
6766
-Wl,-Map=${PROJECT_NAME}.map
6867
)
6968

70-
link_directories(${CMAKE_CURRENT_LIST_DIR}/../../../../../../build)
69+
link_directories(${CMAKE_CURRENT_LIST_DIR}/../../../../../build)
7170
add_executable(${PROJECT_NAME} ${SRCS})
7271
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "${PROJECT_NAME}.elf")
7372
target_link_libraries(${PROJECT_NAME} PRIVATE threadx)

ports/xuantie/e906/gnu/example_build/smartl_fpga/boards/board_riscv_dummy/include/board.h renamed to ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/boards/board_riscv_dummy/include/board.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818

1919
/*
20-
This is an example board.h for Board Compment, New Board should flow the macro defines.
20+
This is an example board.h for Board Component, New Board should follow the macro defines.
2121
*/
2222

2323
#ifndef __BOARD_H__
@@ -44,7 +44,7 @@ extern "C" {
4444
· WIFI
4545
· BT
4646
· AUDIO
47-
BOARD_XXX Macro descripted below should be defined if the board support.
47+
BOARD_XXX Macro described below should be defined if the board support.
4848
*/
4949

5050
/****************************************************************************/
@@ -120,8 +120,8 @@ extern "C" {
120120
// UART
121121

122122
/*
123-
The total supported uart numbers on this board, 0 meas No uart support.
124-
the BOARD_UART<x>_XXX, x in rang of (0, BOARD_UART_NUM - 1)
123+
The total supported uart numbers on this board, 0 means No uart support.
124+
the BOARD_UART<x>_XXX, x in range of (0, BOARD_UART_NUM - 1)
125125
*/
126126
#ifndef BOARD_UART_NUM
127127
#define BOARD_UART_NUM (1)
@@ -441,4 +441,4 @@ void board_audio_init(void);
441441
}
442442
#endif
443443

444-
#endif /* __BOARD_H__ */
444+
#endif /* __BOARD_H__ */

ports/xuantie/e906/gnu/example_build/smartl_fpga/boards/board_riscv_dummy/include/csi_config.h renamed to ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/boards/board_riscv_dummy/include/csi_config.h

File renamed without changes.

ports/xuantie/e906/gnu/example_build/smartl_fpga/boards/board_riscv_dummy/src/board_init.c renamed to ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/boards/board_riscv_dummy/src/board_init.c

File renamed without changes.

ports/xuantie/e906/gnu/example_build/smartl_fpga/boards/board_riscv_dummy/src/uart/board_uart.c renamed to ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/boards/board_riscv_dummy/src/uart/board_uart.c

File renamed without changes.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
pushd ../../../../../
4+
rm -rf build
5+
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE=ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/xuantie_e906_gnu.cmake .
6+
cmake --build ./build/
7+
popd

ports/xuantie/e906/gnu/example_build/smartl_fpga/build_threadx_sample.sh renamed to ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/build_threadx_sample.sh

File renamed without changes.

ports/xuantie/e906/gnu/example_build/smartl_fpga/components/chip_riscv_dummy/gcc_flash_smartl.ld renamed to ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/gcc_flash_smartl.ld

File renamed without changes.

ports/xuantie/e906/gnu/example_build/smartl_fpga/components/chip_riscv_dummy/include/asm/riscv_asm_macro.h renamed to ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/asm/riscv_asm_macro.h

File renamed without changes.

ports/xuantie/e906/gnu/example_build/smartl_fpga/components/chip_riscv_dummy/include/asm/riscv_csr.h renamed to ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/asm/riscv_csr.h

File renamed without changes.

0 commit comments

Comments
 (0)