If you have pulled the full version of the SDK provided by youyeetoo, the cross-compiler is included in the SDK.
If you don't want to pull the whole SDK, you can also download the official arm compiler separately, the download link is as follows
If you are using the full version of sdk, after downloading and unzipping it, the cross-compiler is in the prebuilts directory in this path. Then execute the following command to configure the environment variables
export PATH=$PATH:${sdk directory path}/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin
export CROSS_COMPILE=aarch64-none-linux-gnu-
export ARCH=aarch64
If you are using a separate sdk, after downloading and unzipping it, run the following command to configure the environment variables
export PATH=$PATH:${解压路径}gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin
export CROSS_COMPILE=aarch64-none-linux-gnu-
export ARCH=aarch64
Static library download link. uart programming chapters to spi programming chapters need to use this static library
libperipheral_api.a
Header files
peripheral_api.h
Test demo
test.c
Compile the demo with the following command
aarch64-none-linux-gnu-gcc test.c libperipheral_api.a -I. -o test
If you want to compile your own program, you can replace test.c with your own source code.