Actions
Toolchain¶
ARMv8 programs compilation¶
To compile ARMv8 assembler programs do the following:
- Download the toolchain either from this page (see below) or from here
- Unpack the gcc-linaro-...tar.xz archive into some "<toolchain>" folder
- Add "<toolchain>/bin" to the PATH environment variable.
- Supposing that you are compiling a
sample.s
ARMv8 assembler program, do the following:
aarch64-linux-gnu-as sample.s -march=armv8.2-a -o sample.o aarch64-linux-gnu-ld --entry 0x0 sample.o -o sample.elf aarch64-linux-gnu-objcopy -O binary sample.elf sample.bin
ARMv8 programs simulation¶
To simulate ARMv8 assembler programs do the following:
- Install the QEMU4V emulator.
- Supposing that you have compiled your sample program into
sample.bin
binary do the following:
qemu-system-aarch64 -M virt -cpu cortex-a57 -bios sample.bin -nographic
For every *.bin
binary file it's own log file will be generated.
You may generate output log file in a Tarmac format by executing the QEMU4V emulator with the following parameters:
qemu-system-aarch64 -M virt -cpu cortex-a57 -bios sample.bin -d unimp,nochain,in_asm -singlestep -nographic -trace-log -D full-name-of-log-file.log
Updated by Alexander Protsenko over 1 year ago · 1 revisions