rename board name 'rv32m1_vega' as 'rv32m1-vega'

This commit is contained in:
Wang_Weigen 2022-06-22 16:42:52 +08:00
parent 42cf1290d1
commit 29a205e467
104 changed files with 109 additions and 109 deletions

View File

@ -5,7 +5,7 @@ MAKEFLAGS += --no-print-directory
.PHONY:COMPILE_APP COMPILE_KERNEL
support :=kd233 stm32f407-st-discovery maix-go stm32f407zgt6 aiit-riscv64-board aiit-arm32-board hifive1-rev-B hifive1-emulator k210-emulator cortex-m3-emulator cortex-m4-emulator ok1052-c gapuino stm32f103-nano gd32vf103_rvstar cortex-m0-emulator rv32m1_vega nuvoton-m2354
support :=kd233 stm32f407-st-discovery maix-go stm32f407zgt6 aiit-riscv64-board aiit-arm32-board hifive1-rev-B hifive1-emulator k210-emulator cortex-m3-emulator cortex-m4-emulator ok1052-c gapuino stm32f103-nano gd32vf103_rvstar cortex-m0-emulator rv32m1-vega nuvoton-m2354
support += xidatong-arm32
SRC_DIR :=
@ -75,7 +75,7 @@ COMPILE_ALL:
$(MAKE) -C $$dir; \
done
@cp link.mk build/Makefile
@$(MAKE) -C build TARGET=XiZi_$(BOARD).elf LINK_FLAGS=LFLAGS
@$(MAKE) -C build TARGET=XiZi-$(BOARD).elf LINK_FLAGS=LFLAGS
@rm build/Makefile build/make.obj

View File

@ -29,7 +29,7 @@ ARM架构系列的开发板有
RISC-V架构系列的开发板有
aiit-riscv64-board gapuino gd32vf103_rvstar hifive1-rev-B kd233 maix-go rv32m1_vega
aiit-riscv64-board gapuino gd32vf103_rvstar hifive1-rev-B kd233 maix-go rv32m1-vega
## 开发环境

View File

@ -25,7 +25,7 @@ SRC_DIR +=gd32vf103_rvstar
endif
ifeq ($(CONFIG_BOARD_RV32M1_VEGA),y)
SRC_DIR +=rv32m1_vega
SRC_DIR +=rv32m1-vega
endif
include $(KERNEL_ROOT)/compiler.mk

View File

@ -1,6 +1,6 @@
/**
* @file arch_interrupt.h
* @brief support rv32m1_vega interrupt
* @brief support rv32m1-vega interrupt
* @version 1.0
* @author AIIT XUOS Lab
* @date 2022-02-16

View File

@ -42,9 +42,9 @@ make BOARD=aiit-arm32-board menuconfig
```
make BOARD=aiit-arm32-board
```
>5.如果编译正确无误会产生XiZi_aiit-arm32-board.elf、XiZi_aiit-arm32-board.bin文件。其中XiZi_aiit-arm32-board.bin需要烧写到设备中进行运行。
>5.如果编译正确无误会产生XiZi-aiit-arm32-board.elf、XiZi-aiit-arm32-board.bin文件。其中XiZi-aiit-arm32-board.bin需要烧写到设备中进行运行。
```
sudo write build/XiZi_aiit-arm32-board.bin 0x8000000
sudo write build/XiZi-aiit-arm32-board.bin 0x8000000
```
>6.最后可以执行以下命令,清除配置文件和编译生成的文件
```
@ -73,7 +73,7 @@ aiit-arm32-board下载连接示意图如下
代码根目录下执行st-flash工具烧录
```
sudo st-flash write build/XiZi_aiit-arm32-board.bin 0x8000000
sudo st-flash write build/XiZi-aiit-arm32-board.bin 0x8000000
```
### 3.1 运行结果

View File

@ -5,7 +5,7 @@ export AFLAGS := -c -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -
export LFLAGS := -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
export CXXFLAGS := -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -Dgcc -O0 -gdwarf-2 -g
export APPLFLAGS := -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi_app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export APPLFLAGS := -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export DEFINES := -DHAVE_CCONFIG_H -DSTM32F407xx -DUSE_HAL_DRIVER -DHAVE_SIGINFO

View File

@ -36,7 +36,7 @@ make BOARD=aiit-riscv64-board menuconfig
```
make BOARD=aiit-riscv64-board
```
>5.如果编译正确无误会产生XiZi_aiit-riscv64-board.elf、XiZi_aiit-riscv64-board.bin文件。其中XiZi_aiit-riscv64-board.bin需要烧写到设备中进行运行。
>5.如果编译正确无误会产生XiZi-aiit-riscv64-board.elf、XiZi-aiit-riscv64-board.bin文件。其中XiZi-aiit-riscv64-board.bin需要烧写到设备中进行运行。
>注:最后可以执行以下命令,清除配置文件和编译生成的文件
```
make BOARD=aiit-riscv64-board distclean
@ -64,7 +64,7 @@ sudo pip2 install kflash
```
代码根目录下执行K-Flash工具烧录-p为USB端口号视实际情况而定
```
kflash -t build/XiZi_aiit-riscv64-board.bin -p /dev/ttyUSB0
kflash -t build/XiZi-aiit-riscv64-board.bin -p /dev/ttyUSB0
```
### 3.1 运行结果

View File

@ -2,7 +2,7 @@ export CFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffun
export AFLAGS := -c -mcmodel=medany -march=rv64imafdc -mabi=lp64d -x assembler-with-cpp -ggdb
export LFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds
export APPLFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi_app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export APPLFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export CXXFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -Werror

View File

@ -153,7 +153,7 @@ make BOARD=cortex-m0-emulator menuconfig
make BOARD=cortex-m0-emulator
```
4.如果编译正确无误会产生XiZi_cortex-m0-emulator.elf、XiZi_cortex-m0-emulator.bin文件。
4.如果编译正确无误会产生XiZi-cortex-m0-emulator.elf、XiZi-cortex-m0-emulator.bin文件。
## 3. 运行
@ -168,7 +168,7 @@ sudo apt install qemu-system-arm
通过以下命令启动QEMU并加载XiUOS ELF文件
```
qemu-system-arm -machine microbit -nographic -kernel build/XiZi_cortex-m0-emulator.elf
qemu-system-arm -machine microbit -nographic -kernel build/XiZi-cortex-m0-emulator.elf
```
QEMU运行起来后将会在终端上看到信息打印输出
@ -185,11 +185,11 @@ sudo apt install gdb-multiarch
并通过以下命令启动QEMU
```
qemu-system-arm -machine microbit -nographic -kernel build/XiZi_cortex-m0-emulator.elf -s -S
qemu-system-arm -machine microbit -nographic -kernel build/XiZi-cortex-m0-emulator.elf -s -S
```
然后要重新开启另一个linux系统终端一个终端执行命令
```
gdb-multiarch build/XiZi_cortex-m0-emulator.elf -ex "target remote localhost:1234"
gdb-multiarch build/XiZi-cortex-m0-emulator.elf -ex "target remote localhost:1234"
```

View File

@ -2,10 +2,10 @@ export CROSS_COMPILE ?=/usr/bin/arm-none-eabi-
export CFLAGS := -mcpu=cortex-m0 -mthumb -ffunction-sections -fdata-sections -Dgcc -O0 -gdwarf-2 -g -fgnu89-inline -Wa,-mimplicit-it=thumb
export AFLAGS := -c -mcpu=cortex-m0 -mthumb -ffunction-sections -fdata-sections -x assembler-with-cpp -Wa,-mimplicit-it=thumb -gdwarf-2
export LFLAGS := -mcpu=cortex-m0 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi_cortex-m0-emulator.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
export LFLAGS := -mcpu=cortex-m0 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi-cortex-m0-emulator.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
export CXXFLAGS := -mcpu=cortex-m0 -mthumb -ffunction-sections -fdata-sections -Dgcc -O0 -gdwarf-2 -g
export APPLFLAGS := -mcpu=cortex-m0 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi_app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export APPLFLAGS := -mcpu=cortex-m0 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export DEFINES := -DHAVE_CCONFIG_H -g

View File

@ -153,7 +153,7 @@ make BOARD=cortex-m3-emulator menuconfig
make BOARD=cortex-m3-emulator
```
4.如果编译正确无误会产生XiZi_cortex-m3-emulator.elf、XiZi_cortex-m3-emulator.bin文件。
4.如果编译正确无误会产生XiZi-cortex-m3-emulator.elf、XiZi-cortex-m3-emulator.bin文件。
## 3. 运行
@ -168,7 +168,7 @@ sudo apt install qemu-system-arm
通过以下命令启动QEMU并加载XiUOS ELF文件
```
qemu-system-arm -machine lm3s6965evb -nographic -kernel build/XiZi_cortex-m3-emulator.elf
qemu-system-arm -machine lm3s6965evb -nographic -kernel build/XiZi-cortex-m3-emulator.elf
```
QEMU运行起来后将会在终端上看到信息打印输出
@ -185,11 +185,11 @@ sudo apt install gdb-multiarch
并通过以下命令启动QEMU
```
qemu-system-arm -machine lm3s6965evb -nographic -kernel build/XiZi_cortex-m3-emulator.elf -s -S
qemu-system-arm -machine lm3s6965evb -nographic -kernel build/XiZi-cortex-m3-emulator.elf -s -S
```
然后要重新开启另一个linux系统终端一个终端执行`riscv-none-embed-gdb`命令
```
gdb-multiarch build/XiZi_cortex-m3-emulator.elf -ex "target remote localhost:1234"
gdb-multiarch build/XiZi-cortex-m3-emulator.elf -ex "target remote localhost:1234"
```

View File

@ -2,10 +2,10 @@ export CROSS_COMPILE ?=/usr/bin/arm-none-eabi-
export CFLAGS := -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -Dgcc -O0 -gdwarf-2 -g -fgnu89-inline -Wa,-mimplicit-it=thumb
export AFLAGS := -c -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -x assembler-with-cpp -Wa,-mimplicit-it=thumb -gdwarf-2
export LFLAGS := -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi_cortex-m3-emulator.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
export LFLAGS := -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi-cortex-m3-emulator.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
export CXXFLAGS := -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -Dgcc -O0 -gdwarf-2 -g
export APPLFLAGS := -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi_app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export APPLFLAGS := -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export DEFINES := -DHAVE_CCONFIG_H

View File

@ -161,7 +161,7 @@ make BOARD=cortex-m4-emulator menuconfig
make BOARD=cortex-m4-emulator
```
4.如果编译正确无误会产生XiZi_cortex-m4-emulator.elf、XiZi_cortex-m4-emulator.bin文件。
4.如果编译正确无误会产生XiZi-cortex-m4-emulator.elf、XiZi-cortex-m4-emulator.bin文件。
@ -178,7 +178,7 @@ sudo apt install qemu-system-arm
通过以下命令启动QEMU并加载XiUOS ELF文件
```
qemu-system-arm -machine netduinoplus2 -nographic -kernel build/XiZi_cortex-m4-emulator.elf
qemu-system-arm -machine netduinoplus2 -nographic -kernel build/XiZi-cortex-m4-emulator.elf
```
QEMU运行起来后将会在终端上看到信息打印输出
@ -198,11 +198,11 @@ sudo apt install gdb-multiarch
并通过以下命令启动QEMU
```
qemu-system-arm -machine netduinoplus2 -nographic -kernel build/XiZi_cortex-m4-emulator.elf -s -S
qemu-system-arm -machine netduinoplus2 -nographic -kernel build/XiZi-cortex-m4-emulator.elf -s -S
```
然后要重新开启另一个linux系统终端一个终端执行`riscv-none-embed-gdb`命令
```
gdb-multiarch build/XiZi_cortex-m4-emulator.elf -ex "target remote localhost:1234"
gdb-multiarch build/XiZi-cortex-m4-emulator.elf -ex "target remote localhost:1234"
```

View File

@ -2,10 +2,10 @@ export CROSS_COMPILE ?=/usr/bin/arm-none-eabi-
export CFLAGS := -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -Dgcc -O0 -gdwarf-2 -g -fgnu89-inline -Wa,-mimplicit-it=thumb -Werror
export AFLAGS := -c -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -x assembler-with-cpp -Wa,-mimplicit-it=thumb -gdwarf-2
export LFLAGS := -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi_cortex-m4-emulator.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
export LFLAGS := -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi-cortex-m4-emulator.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
export CXXFLAGS := -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -Dgcc -O0 -gdwarf-2 -g -Werror
export APPLFLAGS := -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi_app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export APPLFLAGS := -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export DEFINES := -DHAVE_CCONFIG_H -DSTM32F407xx -DUSE_HAL_DRIVER -DHAVE_SIGINFO

View File

@ -170,7 +170,7 @@ make BOARD=cortex-m4-emulator menuconfig
make BOARD=cortex-m4-emulator
```
4.如果编译正确无误会产生XiZi_cortex-m4-emulator.elf、XiZi_cortex-m4-emulator.bin文件。
4.如果编译正确无误会产生XiZi-cortex-m4-emulator.elf、XiZi-cortex-m4-emulator.bin文件。
@ -203,7 +203,7 @@ sudo apt install qemu-system-arm
通过以下命令启动QEMU并加载XiUOS ELF文件
```
qemu-system-arm -machine netduinoplus2 -nographic -kernel build/XiZi_cortex-m4-emulator.elf
qemu-system-arm -machine netduinoplus2 -nographic -kernel build/XiZi-cortex-m4-emulator.elf
```
QEMU运行起来后将会在终端上看到信息打印输出
@ -224,13 +224,13 @@ sudo apt install gdb-multiarch
并通过以下命令启动QEMU
```
qemu-system-arm -machine netduinoplus2 -nographic -kernel build/XiZi_cortex-m4-emulator.elf -s -S
qemu-system-arm -machine netduinoplus2 -nographic -kernel build/XiZi-cortex-m4-emulator.elf -s -S
```
然后要重新开启另一个linux系统终端一个终端执行`riscv-none-embed-gdb`命令
```
gdb-multiarch build/XiZi_cortex-m4-emulator.elf -ex "target remote localhost:1234"
gdb-multiarch build/XiZi-cortex-m4-emulator.elf -ex "target remote localhost:1234"
```

View File

@ -129,7 +129,7 @@ make BOARD=gapuino menuconfig
make BOARD=gapuino
```
4.如果编译正确无误build文件夹下会产生XiZi_gapuino.elf、XiZi_gapuino.bin文件。
4.如果编译正确无误build文件夹下会产生XiZi-gapuino.elf、XiZi-gapuino.bin文件。
>注:最后可以执行以下命令,清除配置文件和编译生成的文件
@ -172,7 +172,7 @@ screen /dev/ttyUSB0 115200
5、打开一个新的终端进入编译生成的elf路径,输入例如:
```
riscv32-unknown-elf-gdb build/XiZi_gapuino.elf -ex "target remote localhost:3333"
riscv32-unknown-elf-gdb build/XiZi-gapuino.elf -ex "target remote localhost:3333"
```
结果如下图所示:
![gdb](./img/gdb_load.png)

View File

@ -22,9 +22,9 @@
export CFLAGS := -mcmodel=medany -march=rv32imac -mabi=ilp32 -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -fgnu89-inline -Werror
export AFLAGS := -c -mcmodel=medany -march=rv32imac -mabi=ilp32 -x assembler-with-cpp -ggdb
export LFLAGS := -mcmodel=medany -march=rv32imac -mabi=ilp32 -nostartfiles -Wl,--gc-sections,-Map=XiZi_gap8.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds
export LFLAGS := -mcmodel=medany -march=rv32imac -mabi=ilp32 -nostartfiles -Wl,--gc-sections,-Map=XiZi-gap8.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds
export APPLFLAGS := -mcmodel=medany -march=rv32imac -mabi=ilp32 -nostartfiles -Wl,--gc-sections,-Map=XiZi_app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export APPLFLAGS := -mcmodel=medany -march=rv32imac -mabi=ilp32 -nostartfiles -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export CXXFLAGS := -mcmodel=medany -march=rv32imac -mabi=ilp32 -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -Werror

View File

@ -130,7 +130,7 @@ make BOARD=gd32vf103_rvstar menuconfig
make BOARD=gd32vf103_rvstar
```
4.如果编译正确无误build文件夹下会产生XiZi_gd32vf103_rvstar.elf、XiZi_gd32vf103_rvstar.bin文件。
4.如果编译正确无误build文件夹下会产生XiZi-gd32vf103_rvstar.elf、XiZi-gd32vf103_rvstar.bin文件。
>注:最后可以执行以下命令,清除配置文件和编译生成的文件
@ -177,7 +177,7 @@ screen /dev/ttyUSB0 115200
5、打开一个新的终端进入编译生成的elf路径,输入例如:
```
riscv-nuclei-elf-gdb build/XiZi_gd32vf103_rvstar.elf -ex "target remote localhost:3333"
riscv-nuclei-elf-gdb build/XiZi-gd32vf103_rvstar.elf -ex "target remote localhost:3333"
```
结果如下图所示:
![gdb](./img/gdb_load.png)

View File

@ -1,9 +1,9 @@
export CFLAGS := -march=rv32imac -mabi=ilp32 -fno-common -ffunction-sections -fdata-sections -O0 -ggdb -fgnu89-inline -Werror
export AFLAGS := -march=rv32imac -mabi=ilp32 -x assembler-with-cpp -ggdb
export LFLAGS := -march=rv32imac -mabi=ilp32 -nostartfiles -Wl,--gc-sections,-Map=XiZi_gd32vf103.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds
export LFLAGS := -march=rv32imac -mabi=ilp32 -nostartfiles -Wl,--gc-sections,-Map=XiZi-gd32vf103.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds
export APPLFLAGS := -nostartfiles -Wl,--gc-sections,-Map=XiZi_app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export APPLFLAGS := -nostartfiles -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export CXXFLAGS := -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -Werror

View File

@ -130,7 +130,7 @@ make BOARD=hifive1-emulator menuconfig
make BOARD=hifive1-emulator
```
4.如果编译正确无误会在build目录下产生XiZi_hifive1-emulator.elf、XiZi_hifive1-emulator.bin文件。
4.如果编译正确无误会在build目录下产生XiZi-hifive1-emulator.elf、XiZi-hifive1-emulator.bin文件。
## 3. 运行
@ -153,7 +153,7 @@ sudo make install
通过以下命令启动QEMU并加载XiUOS ELF文件
```
qemu-system-riscv32 -nographic -machine sifive_e -kernel build/XiZi_hifive1-emulator.elf
qemu-system-riscv32 -nographic -machine sifive_e -kernel build/XiZi-hifive1-emulator.elf
```
QEMU运行起来后将会在终端上看到信息打印输出
@ -165,11 +165,11 @@ QEMU运行起来后将会在终端上看到信息打印输出
利用QEMU可以方便的对XiUOS进行调试首先通过以下命令启动QEMU
```
qemu-system-riscv32 -nographic -machine sifive_e -kernel build/XiZi_hifive1-emulator.elf -s -S
qemu-system-riscv32 -nographic -machine sifive_e -kernel build/XiZi-hifive1-emulator.elf -s -S
```
然后要重新开启另一个linux系统终端一个终端执行`riscv-none-embed-gdb`命令
```
riscv-none-embed-gdb build/XiZi_hifive1-emulator.elf -ex "target remote localhost:1234"
riscv-none-embed-gdb build/XiZi-hifive1-emulator.elf -ex "target remote localhost:1234"
```

View File

@ -2,7 +2,7 @@ export CFLAGS := -mcmodel=medany -march=rv32imac -mabi=ilp32 -fno-common -ffunct
export AFLAGS := -c -mcmodel=medany -march=rv32imac -mabi=ilp32 -x assembler-with-cpp -ggdb
export LFLAGS := -mcmodel=medany -march=rv32imac -mabi=ilp32 -nostartfiles -Wl,--gc-sections,-Map=XiZi.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds
export APPLFLAGS := -mcmodel=medany -march=rv32imac -mabi=ilp32 -nostartfiles -Wl,--gc-sections,-Map=XiZi_app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export APPLFLAGS := -mcmodel=medany -march=rv32imac -mabi=ilp32 -nostartfiles -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export CXXFLAGS := -mcmodel=medany -march=rv32imac -mabi=ilp32 -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -Werror

View File

@ -133,7 +133,7 @@ make BOARD=hifive1-rev-B menuconfig
make BOARD=hifive1-rev-B
```
4.如果编译正确无误build文件夹下会产生XiZi_hifive1-rev-B.elf、XiZi_hifive1-rev-B.bin文件。其中XiZi_hifive1-rev-B.bin需要烧写到设备中进行运行。
4.如果编译正确无误build文件夹下会产生XiZi-hifive1-rev-B.elf、XiZi-hifive1-rev-B.bin文件。其中XiZi-hifive1-rev-B.bin需要烧写到设备中进行运行。
>注:最后可以执行以下命令,清除配置文件和编译生成的文件

View File

@ -2,7 +2,7 @@ export CFLAGS := -mcmodel=medany -march=rv32imac -mabi=ilp32 -fno-common -ffunct
export AFLAGS := -c -mcmodel=medany -march=rv32imac -mabi=ilp32 -x assembler-with-cpp -ggdb
export LFLAGS := -mcmodel=medany -march=rv32imac -mabi=ilp32 -nostartfiles -Wl,--gc-sections,-Map=XiZi.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds
export APPLFLAGS := -mcmodel=medany -march=rv32imac -mabi=ilp32 -nostartfiles -Wl,--gc-sections,-Map=XiZi_app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export APPLFLAGS := -mcmodel=medany -march=rv32imac -mabi=ilp32 -nostartfiles -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export CXXFLAGS := -mcmodel=medany -march=rv32imac -mabi=ilp32 -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -Werror

View File

@ -128,7 +128,7 @@ make BOARD=k210-emulator menuconfig
make BOARD=k210-emulator
```
4.如果编译正确无误会在build目录下产生XiZi_k210-emulator.elf、XiZi_k210-emulator.bin文件。
4.如果编译正确无误会在build目录下产生XiZi-k210-emulator.elf、XiZi-k210-emulator.bin文件。
## 3. 运行
@ -150,7 +150,7 @@ sudo make install
通过以下命令启动QEMU并加载XiUOS ELF文件
```
qemu-system-riscv64 -nographic -machine sifive_u -bios build/XiZi_k210-emulator.elf
qemu-system-riscv64 -nographic -machine sifive_u -bios build/XiZi-k210-emulator.elf
```
QEMU运行起来后将会在终端上看到信息打印输出
@ -162,11 +162,11 @@ QEMU运行起来后将会在终端上看到信息打印输出
利用QEMU可以方便的对XiUOS进行调试首先通过以下命令启动QEMU
```
qemu-system-riscv64 -nographic -machine sifive_u -bios build/XiZi_k210-emulator.elf -s -S
qemu-system-riscv64 -nographic -machine sifive_u -bios build/XiZi-k210-emulator.elf -s -S
```
然后要重新开启另一个linux系统终端一个终端执行`riscv-none-embed-gdb`命令
```
riscv-none-embed-gdb build/XiZi_k210-emulator.elf -ex "target remote localhost:1234"
riscv-none-embed-gdb build/XiZi-k210-emulator.elf -ex "target remote localhost:1234"
```

View File

@ -1,8 +1,8 @@
export CFLAGS := -mcmodel=medany -march=rv64imac -mabi=lp64 -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -Wa,-g -ggdb -fgnu89-inline -Werror
export AFLAGS := -c -mcmodel=medany -march=rv64imac -mabi=lp64 -Wa,-g -ggdb
export LFLAGS := -mcmodel=medany -march=rv64imac -mabi=lp64 -nostartfiles -Wl,--gc-sections,-Map=XiZi_kd233.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds
export LFLAGS := -mcmodel=medany -march=rv64imac -mabi=lp64 -nostartfiles -Wl,--gc-sections,-Map=XiZi-kd233.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds
export APPLFLAGS := -mcmodel=medany -march=rv64imac -mabi=lp64 -nostartfiles -Wl,--gc-sections,-Map=XiZi_app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export APPLFLAGS := -mcmodel=medany -march=rv64imac -mabi=lp64 -nostartfiles -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export CXXFLAGS := -mcmodel=medany -march=rv64imac -mabi=lp64 -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -Wa,-g -ggdb -Werror

View File

@ -143,7 +143,7 @@ make BOARD=kd233 menuconfig
make BOARD=kd233
```
4.如果编译正确无误会在build文件夹下生成XiZi_kd233.elf、XiZi_kd233.bin文件。其中XiZi_kd233.bin需要烧写到设备中进行运行。
4.如果编译正确无误会在build文件夹下生成XiZi-kd233.elf、XiZi-kd233.bin文件。其中XiZi-kd233.bin需要烧写到设备中进行运行。
>注:最后可以执行以下命令,清除配置文件和编译生成的文件
@ -178,7 +178,7 @@ sudo pip2 install kflash
代码根目录下执行K-Flash工具烧录-p为USB端口号视实际情况而定
```
sudo kflash -t build/XiZi_kd233.bin -p /dev/ttyUSB0
sudo kflash -t build/XiZi-kd233.bin -p /dev/ttyUSB0
```
### 3.1 运行结果

View File

@ -1,8 +1,8 @@
export CFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -fgnu89-inline -Werror
export AFLAGS := -c -mcmodel=medany -march=rv64imafdc -mabi=lp64d -x assembler-with-cpp -ggdb
export LFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi_kd233.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds
export LFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi-kd233.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds
export APPLFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi_app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export APPLFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export CXXFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -Werror

View File

@ -36,7 +36,7 @@ make BOARD=maix-go menuconfig
```
make BOARD=maix-go
```
>5.如果编译正确无误会产生XiZi_maix-go.elf、XiZi_maix-go.bin文件。其中XiZi_maix-go.bin需要烧写到设备中进行运行。
>5.如果编译正确无误会产生XiZi-maix-go.elf、XiZi-maix-go.bin文件。其中XiZi-maix-go.bin需要烧写到设备中进行运行。
>注:最后可以执行以下命令,清除配置文件和编译生成的文件
```
make BOARD=maix-go distclean
@ -64,7 +64,7 @@ sudo pip2 install kflash
```
代码根目录下执行K-Flash工具烧录此时ls /dev/ttyUSB*会发现新增2个USB端口烧录时选择后一个例如此时新增的是/dev/ttyUSB0和/dev/ttyUSB1选择/dev/ttyUSB1
```
kflash -t build/XiZi_kd233.bin -p /dev/ttyUSB1
kflash -t build/XiZi-kd233.bin -p /dev/ttyUSB1
```
### 3.1 运行结果

View File

@ -2,7 +2,7 @@ export CFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffun
export AFLAGS := -c -mcmodel=medany -march=rv64imafdc -mabi=lp64d -x assembler-with-cpp -ggdb
export LFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds
export APPLFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi_app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export APPLFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export CXXFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -Werror

View File

@ -152,7 +152,7 @@ make BOARD=nuvoton-m2354 menuconfig
make BOARD=nuvoton-m2354
```
4.如果编译正确无误会产生XiZi_nuvoton-m2354.elf、XiZi_nuvoton-m2354.bin文件。
4.如果编译正确无误会产生XiZi-nuvoton-m2354.elf、XiZi-nuvoton-m2354.bin文件。
## 3. 烧写及运行

View File

@ -2,7 +2,7 @@ export CROSS_COMPILE ?= /opt/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eab
export CFLAGS := -mcpu=cortex-m23 -mthumb -ffunction-sections -fdata-sections -Dgcc -O0 -gdwarf-2 -g -fgnu89-inline -Wa,-mimplicit-it=thumb
export AFLAGS := -c -mcpu=cortex-m23 -mthumb -ffunction-sections -fdata-sections -x assembler-with-cpp -Wa,-mimplicit-it=thumb -gdwarf-2
export LFLAGS := -mcpu=cortex-m23 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi_nuvoton_m2354.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
export LFLAGS := -mcpu=cortex-m23 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi-nuvoton_m2354.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
export CXXFLAGS := -mcpu=cortex-m23 -mthumb -ffunction-sections -fdata-sections -Dgcc -O0 -gdwarf-2 -g
export DEFINES := -DHAVE_CCONFIG_H

View File

@ -151,7 +151,7 @@ make BOARD=ok1052-c menuconfig
make BOARD=ok1052-c
```
4.如果编译正确无误会产生XiZi_ok1052-c.elf、XiZi_ok1052-c.bin文件。
4.如果编译正确无误会产生XiZi-ok1052-c.elf、XiZi-ok1052-c.bin文件。
## 3. 烧写及运行
@ -164,7 +164,7 @@ make BOARD=ok1052-c
3、同时需要匹配ok1052-c开发板所使用的Flash型号点击Boot Device Configuration在Use Typical Device中选择Winbond_W25QxxxJV然后点击ok。如下图所示
![flashconfig](./img/flashconfig.png)
4、选择编译生成的XiZi_ok1052-c.elf或bin文件路径按照图示步骤将文件烧写至Flash中link.lds中已构造Flash Bootable image如有修改Flash相关配置需求可修改/xip目录内相关文件无需NXPBootUtility再次构造若烧写无误则下列绿色进度条会执行到底。如下图所示
4、选择编译生成的XiZi-ok1052-c.elf或bin文件路径按照图示步骤将文件烧写至Flash中link.lds中已构造Flash Bootable image如有修改Flash相关配置需求可修改/xip目录内相关文件无需NXPBootUtility再次构造若烧写无误则下列绿色进度条会执行到底。如下图所示
![NXPBootUtility_2](./img/NXPBootUtility_2.png)
### 3.2 运行结果

View File

@ -6,14 +6,14 @@ export AFLAGS := -c -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections
### if use USB function, use special lds file because USB uses ITCM
ifeq ($(CONFIG_BSP_USING_USB),y)
export LFLAGS := -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi_ok1052-c.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link-usb.lds
export LFLAGS := -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi-ok1052-c.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link-usb.lds
else
export LFLAGS := -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi_ok1052-c.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
export LFLAGS := -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi-ok1052-c.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
endif
export CXXFLAGS := -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -Dgcc -O0 -gdwarf-2 -g
export APPLFLAGS := -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi_app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export APPLFLAGS := -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export DEFINES := -DHAVE_CCONFIG_H -DCPU_MIMXRT1052CVL5B -DSKIP_SYSCLK_INIT -DEVK_MCIMXRM -DFSL_SDK_ENABLE_DRIVER_CACHE_CONTROL=1 -DXIP_EXTERNAL_FLASH=1 -D__STARTUP_INITIALIZE_NONCACHEDATA -D__STARTUP_CLEAR_BSS

View File

@ -17,7 +17,7 @@ config BOARD_RV32M1_VEGA
source "$KERNEL_DIR/arch/Kconfig"
menu "rv32m1_vega feature"
menu "rv32m1-vega feature"
source "$BSP_DIR/third_party_driver/Kconfig"
endmenu

View File

@ -1,4 +1,4 @@
# 从零开始构建矽璓工业物联操作系统使用risc-v架构的rv32m1_vega 开发板
# 从零开始构建矽璓工业物联操作系统使用risc-v架构的rv32m1-vega 开发板
[XiUOS](http://xuos.io/) (X Industrial Ubiquitous Operating System) 矽璓工业物联操作系统是一款面向工业物联场景的泛在操作系统,来自泛在操作系统研究计划。所谓泛在操作系统(UOS: Ubiquitous Operating Systems)是支持互联网时代人机物融合泛在计算应用模式的新型操作系统是传统操作系统概念的泛化与延伸。在泛在操作系统技术体系中不同的泛在计算设备和泛在应用场景需要符合各自特性的不同UOSXiUOS即是面向工业物联场景的一种UOS主要由一个极简的微型实时操作系统(RTOS)内核和其上的智能工业物联框架构成,支持工业物联网(IIoT: Industrial Internet of Things)应用。
@ -73,7 +73,7 @@ RISC-V: riscv-none-embed-默认安装到Ubuntu的/opt/,下载并解压。[
将上述解压的编译工具链的路径添加到board/rv32m1_vega/config.mk文件当中例如
将上述解压的编译工具链的路径添加到board/rv32m1-vega/config.mk文件当中例如
```
export CROSS_COMPILE ?=/opt/gnu-mcu-eclipse/riscv-none-gcc/8.2.0-2.1-20190425-1021/bin/riscv-none-embed-
@ -81,9 +81,9 @@ export CROSS_COMPILE ?=/opt/gnu-mcu-eclipse/riscv-none-gcc/8.2.0-2.1-20190425-10
若已存在`export CROSS_COMPILE ?=xxxx` 应该将原有的语句注释,再写入上面的语句。
# 在rv32m1_vega board 上创建第一个应用
# rv32m1-vega board 上创建第一个应用
## 1.rv32m1_vega board 简介
## 1.rv32m1-vega board 简介
| 硬件 | 描述 |
| -- | -- |
@ -125,19 +125,19 @@ make BOARD=rm32v1_vega menuconfig
3.继续执行以下命令,进行编译
```
make BOARD=rv32m1_vega
make BOARD=rv32m1-vega
```
4.如果编译正确无误build文件夹下会产生XiZi_rv32m1_vega.elf、XiZi_rv32m1_vega.bin文件。
4.如果编译正确无误build文件夹下会产生XiZi-rv32m1-vega.elf、XiZi-rv32m1-vega.bin文件。
>注:最后可以执行以下命令,清除配置文件和编译生成的文件
```
make BOARD=rv32m1_vega distclean
make BOARD=rv32m1-vega distclean
```
## 3. 烧写及调试执行
rv32m1_vega开发板启动模式说明:参考文档[RV32M1_VEGA_Quick_Start_Guide.pdf](./doc/RV32M1_VEGA_Board_User_Guide.pdf)
rv32m1-vega开发板启动模式说明:参考文档[RV32M1_VEGA_Quick_Start_Guide.pdf](./doc/RV32M1_VEGA_Board_User_Guide.pdf)
![openocd](./img/multicore.jpg)
@ -145,7 +145,7 @@ rv32m1_vega开发板启动模式说明:参考文档[RV32M1_VEGA_Quick_Start_Guid
请使用JLink接入到RV32M1_VEGA开发板的RISC-V核的JTAG接口上同时把JLink在PC上的驱动更改为WinUSB模式。JTAG接口位于RV32M1芯片和天线座子旁边小的20pin JTAG接口。
参考文档:[RV32M1_VEGA_Quick_Start_Guide.pdf](./doc/RV32M1_VEGA_Quick_Start_Guide.pdf)
rv32m1_vega支持openocd可以通过openocd和gdb进行调试。
rv32m1-vega支持openocd可以通过openocd和gdb进行调试。
调试需要下载openocd和sdk,下载配置方法参见以下文档:
https://github.com/open-isa-org/open-isa.org/blob/master/RV32M1_Vega_Develop_Environment_Setup.pdf
@ -163,7 +163,7 @@ cd ~/xiuos/Ubiquitous/XiZi
```
cd /vega_rv32/sdk
Openocd -f <install_dir>\boards\rv32m1_vega\vega_ri5cy.cfg
Openocd -f <install_dir>\boards\rv32m1-vega\vega_ri5cy.cfg
```
在当前终端连接openocd连接如下图所示
![openocd](./img/openocd.png)
@ -176,7 +176,7 @@ screen /dev/ttyUSB0 115200
5、打开一个新的终端进入编译生成的elf路径,输入例如:
```
riscv-none-embed-gdb build/XiZi_rv32m1_vega.elf -ex "target remote localhost:3333"
riscv-none-embed-gdb build/XiZi-rv32m1-vega.elf -ex "target remote localhost:3333"
```
结果如下图所示:
![gdb](./img/gdb_load.png)

View File

@ -1,7 +1,7 @@
export CFLAGS := -march=rv32imac -mabi=ilp32 -fno-builtin -fno-exceptions -ffunction-sections -O0 -ggdb -Werror
export AFLAGS := -c -march=rv32imac -mabi=ilp32 -x assembler-with-cpp -ggdb
export LFLAGS := -march=rv32imac -mabi=ilp32 -nostartfiles -Wl,--gc-sections,-Map=XiZi_rv32m1_vega.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
export LFLAGS := -march=rv32imac -mabi=ilp32 -nostartfiles -Wl,--gc-sections,-Map=XiZi-rv32m1-vega.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
export CXXFLAGS := -march=rv32imac -mabi=ilp32 -fno-builtin -fno-exceptions -ffunction-sections -O0 -ggdb -Werror

View File

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

View File

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View File

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 56 KiB

View File

@ -191,7 +191,7 @@ make BOARD=stm32f103-nano menuconfig
make BOARD=stm32f103-nano
```
5.如果编译正确无误会产生XiZi_stm32f103-nano.elf、XiZi_stm32f103-nano.bin文件。其中XiZi_stm32f103-nano.bin需要烧写到设备中进行运行。
5.如果编译正确无误会产生XiZi-stm32f103-nano.elf、XiZi-stm32f103-nano.bin文件。其中XiZi-stm32f103-nano.bin需要烧写到设备中进行运行。
## 3. 烧写及执行
@ -219,7 +219,7 @@ cd build/Release && make install DESTDIR=_install
代码根目录下执行st-flash工具烧录
```
sudo st-flash write build/XiZi_stm32f103-nano.bin 0x8000000
sudo st-flash write build/XiZi-stm32f103-nano.bin 0x8000000
```
### 3.1 运行结果

View File

@ -2,10 +2,10 @@ export CROSS_COMPILE ?=/usr/bin/arm-none-eabi-
export CFLAGS := -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -Dgcc -O0 -gdwarf-2 -g -fgnu89-inline -Wa,-mimplicit-it=thumb
export AFLAGS := -c -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -x assembler-with-cpp -Wa,-mimplicit-it=thumb -gdwarf-2
export LFLAGS := -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi_stm32f103-nano.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
export LFLAGS := -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi-stm32f103-nano.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
export CXXFLAGS := -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -Dgcc -O0 -gdwarf-2 -g
export APPLFLAGS := -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi_app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export APPLFLAGS := -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export DEFINES := -DHAVE_CCONFIG_H

View File

@ -159,7 +159,7 @@ make BOARD=stm32f407-st-discovery menuconfig
make BOARD=stm32f407-st-discovery
```
4.如果编译正确无误会产生XiZi_stm32f407-st-discovery.elf、XiZi_stm32f407-st-discovery.bin文件。其中XiZi_stm32f407-st-discovery.bin需要烧写到设备中进行运行。
4.如果编译正确无误会产生XiZi-stm32f407-st-discovery.elf、XiZi-stm32f407-st-discovery.bin文件。其中XiZi-stm32f407-st-discovery.bin需要烧写到设备中进行运行。
## 3. 烧写及执行
@ -189,7 +189,7 @@ cd build/Release && make install DESTDIR=_install
代码根目录下执行st-flash工具烧录
```
sudo st-flash write build/XiZi_stm32f407-st-discovery.bin 0x8000000
sudo st-flash write build/XiZi-stm32f407-st-discovery.bin 0x8000000
```
此外推荐用户使用putty作为终端工具安装命令如下

View File

@ -2,10 +2,10 @@ export CROSS_COMPILE ?=/usr/bin/arm-none-eabi-
export CFLAGS := -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -Dgcc -O0 -gdwarf-2 -g -fgnu89-inline -Wa,-mimplicit-it=thumb -Werror
export AFLAGS := -c -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -x assembler-with-cpp -Wa,-mimplicit-it=thumb -gdwarf-2
export LFLAGS := -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi_stm32f407-st-discovery.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
export LFLAGS := -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi-stm32f407-st-discovery.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
export CXXFLAGS := -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -Dgcc -O0 -gdwarf-2 -g -Werror
export APPLFLAGS := -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi_app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export APPLFLAGS := -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export DEFINES := -DHAVE_CCONFIG_H -DSTM32F407xx -DUSE_HAL_DRIVER -DHAVE_SIGINFO

View File

@ -41,9 +41,9 @@ make BOARD=stm32f407zgt6 menuconfig
```
make BOARD=stm32f407zgt6
```
>5.如果编译正确无误会产生XiZi_stm32f407zgt6.elf、XiZi_stm32f407zgt6.bin文件。其中XiZi_stm32f407zgt6.bin需要烧写到设备中进行运行。
>5.如果编译正确无误会产生XiZi-stm32f407zgt6.elf、XiZi-stm32f407zgt6.bin文件。其中XiZi-stm32f407zgt6.bin需要烧写到设备中进行运行。
```
sudo write build/XiZi_stm32f407zgt6.bin 0x8000000
sudo write build/XiZi-stm32f407zgt6.bin 0x8000000
```
>6.最后可以执行以下命令,清除配置文件和编译生成的文件
```
@ -71,7 +71,7 @@ git clone https://github.com/texane/stlink.git
在代码根目录下执行st-flash工具烧录
```
sudo st-flash write build/XiZi_stm32f407zgt6.bin 0x8000000
sudo st-flash write build/XiZi-stm32f407zgt6.bin 0x8000000
```
### 3.1 运行结果

View File

@ -5,7 +5,7 @@ export AFLAGS := -c -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -
export LFLAGS := -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
export CXXFLAGS := -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -Dgcc -O0 -gdwarf-2 -g -Werror
export APPLFLAGS := -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi_app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export APPLFLAGS := -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export DEFINES := -DHAVE_CCONFIG_H -DSTM32F407xx -DUSE_HAL_DRIVER -DHAVE_SIGINFO

View File

@ -151,20 +151,20 @@ make BOARD=xidatong-arm32 menuconfig
make BOARD=xidatong-arm32
```
4.如果编译正确无误会产生XiZi_xidatong.elf、XiZi_xidatong.bin文件。
4.如果编译正确无误会产生XiZi-xidatong-arm32.elf、XiZi-xidatong-arm32.bin文件。
## 3. 烧写及运行
### 3.1 烧写
1、烧写工具NXP MCU Boot Utility可参考[https://github.com/JayHeng/NXP-MCUBootUtility](https://github.com/JayHeng/NXP-MCUBootUtility)
2、xidatong开发板支持UART串口烧写程序打开NXP MCU Boot Utility后选择好芯片类型为i.MXRT105x开发板上电使用串口转USB线将开发板和PC连接拨码开关设置为1 on 2 on 3 off 4 off重新上电选择对应的COM口和波特率需关闭串口终端连接确保该COM口空闲否则会导致Utility工具连接失败连接成功后点击reconnect等待NXP MCU Boot Utility中红色显示变成蓝色显示则表示已正确识别并连接到了开发板。如下图所示
2、xidatong-arm32开发板支持UART串口烧写程序打开NXP MCU Boot Utility后选择好芯片类型为i.MXRT105x开发板上电使用串口转USB线将开发板和PC连接拨码开关设置为1 on 2 on 3 off 4 off重新上电选择对应的COM口和波特率需关闭串口终端连接确保该COM口空闲否则会导致Utility工具连接失败连接成功后点击reconnect等待NXP MCU Boot Utility中红色显示变成蓝色显示则表示已正确识别并连接到了开发板。如下图所示
![NXPBootUtility_1](./img/NXPBootUtility_1.png)
3、同时需要匹配xidatong开发板所使用的Flash型号点击Boot Device Configuration在Use Typical Device中选择Winbond_W25QxxxJV然后点击ok。如下图所示
3、同时需要匹配xidatong-arm32开发板所使用的Flash型号点击Boot Device Configuration在Use Typical Device中选择Winbond_W25QxxxJV然后点击ok。如下图所示
![flashconfig](./img/flashconfig.png)
4、选择编译生成的XiZi_xidatong.elf或bin文件路径按照图示步骤将文件烧写至Flash中link.lds中已构造Flash Bootable image如有修改Flash相关配置需求可修改/xip目录内相关文件无需NXPBootUtility再次构造若烧写无误则下列绿色进度条会执行到底。如下图所示
4、选择编译生成的XiZi-xidatong-arm32.elf或bin文件路径按照图示步骤将文件烧写至Flash中link.lds中已构造Flash Bootable image如有修改Flash相关配置需求可修改/xip目录内相关文件无需NXPBootUtility再次构造若烧写无误则下列绿色进度条会执行到底。如下图所示
![NXPBootUtility_2](./img/NXPBootUtility_2.png)
### 3.2 运行结果

View File

@ -6,14 +6,14 @@ export AFLAGS := -c -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections
### if use USB function, use special lds file because USB uses ITCM
ifeq ($(CONFIG_BSP_USING_USB),y)
export LFLAGS := -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi_xidatong.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link-usb.lds
export LFLAGS := -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi-xidatong-arm32.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link-usb.lds
else
export LFLAGS := -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi_xidatong.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
export LFLAGS := -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi-xidatong-arm32.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
endif
export CXXFLAGS := -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -Dgcc -O0 -gdwarf-2 -g
export APPLFLAGS := -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi_app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export APPLFLAGS := -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export DEFINES := -DHAVE_CCONFIG_H -DCPU_MIMXRT1052CVL5B -DSKIP_SYSCLK_INIT -DEVK_MCIMXRM -DFSL_SDK_ENABLE_DRIVER_CACHE_CONTROL=1 -DXIP_EXTERNAL_FLASH=1 -D__STARTUP_INITIALIZE_NONCACHEDATA -D__STARTUP_CLEAR_BSS

Some files were not shown because too many files have changed in this diff Show More