If you have downloaded the full version of SDK provided by Hot Wheels, the SDK includes this cross compiler
If you don't want to download the entire SDK, you can also download the compiler provided by arm officially separately. The download link is as follows
If you use the full version of SDK, after downloading and decompressing, the cross compiler is in the prebuilts directory of 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 use a separate SDK, download and unzip it, and then execute the following command to configure the environment variables
export PATH=$PATH:${unzip 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. This static library is needed for the content from uart programming chapter to spi programming chapter
libperipheral_api.a
Header file
peripheral_api.h
Test demo
test.c
Execute the following command to compile demo
aarch64-none-linux-gnu-gcc test.c libperipheral_api.a -I. -o test
If you need to compile your own program, you can replace test.c with your own source code