add aarch64 support.

This commit is contained in:
zhangzheng
2024-03-31 16:06:11 +00:00
parent 5791e49460
commit c57d9cbb82
166 changed files with 7423 additions and 117 deletions

View File

@@ -2,9 +2,12 @@
# export TOOLCHAIN=/home/zhangzheng/mkrtos-tools/gcc/gcc-arm-none-eabi-5_4-2016q3/bin/
# export TOOLCHAIN_LIB=/home/zhangzheng/mkrtos-tools/gcc/gcc-arm-none-eabi-5_4-2016q3/lib/gcc/arm-none-eabi/5.4.1/armv7-m/
export TOOLCHAIN=/Users/zhangzheng/gcc-arm-none-eabi-10.3-2021.10/bin/
export TOOLCHAIN_LIB=/Users/zhangzheng/gcc-arm-none-eabi-10.3-2021.10/lib/gcc/arm-none-eabi/10.3.1/thumb/v7-m/nofp
# export TOOLCHAIN=/Users/zhangzheng/gcc-arm-none-eabi-10.3-2021.10/bin/
# export TOOLCHAIN_LIB=/Users/zhangzheng/gcc-arm-none-eabi-10.3-2021.10/lib/gcc/arm-none-eabi/10.3.1/thumb/v7-m/nofp
export TOOLCHAIN=/home/zhangzheng/gcc-arm/gcc-arm-none-eabi-10.3-2021.10/bin/
export TOOLCHAIN_LIB=/home/zhangzheng/gcc-arm/gcc-arm-none-eabi-10.3-2021.10/lib/gcc/arm-none-eabi/10.3.1/thumb/v7-m/nofp
export BOARD=STM32F205
export CROSS_COMPILER=arm-none-eabi-
set -e
cmake -G Ninja -B build/$KNL .

View File

@@ -0,0 +1,10 @@
#!/bin/bash
export TOOLCHAIN=/home/zhangzheng/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf/bin/
export TOOLCHAIN_LIB=/home/zhangzheng/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf/lib/gcc/aarch64-none-elf/10.3.1
export BOARD=aarch64_qemu
export CROSS_COMPILER=aarch64-none-elf-
set -e
cmake -G Ninja -B build/$KNL .
cd build/$KNL && ninja

View File

@@ -0,0 +1,16 @@
#!/bin/bash
if [ -z "$1" ]; then
echo "usage: ./debug.sh [tcp port]"
exit
fi
# -machine virt,virtualization=on,gic-version=2,highmem=off,secure=off,dumpdtb=virt.dtb
qemu-system-aarch64 \
-machine virt,virtualization=on,gic-version=2,highmem=off,secure=off\
-cpu cortex-a53 \
-nographic \
-m size=2048 \
-smp 4\
-kernel $PWD/build/output/bootstrap.elf \
-S -gdb tcp::$1