Hi All,
This question is related to running processor based tests in simulation for an SoC.
Currently, we have a bunch of tests written in assembly. However, we would like to write further tests in C and not in assembly.
The example Makefile we have got only runs assembler on .s file and then eventually creates hex file.
Below is the snapshot of the make commands through dry-run.
echo " [ASM ] ../c_code/tests/aarch64/spi_interrupt_timer/spi_interrupt_timer.s" aarch64-none-linux-gnu-as -march=armv8-a ../c_code/tests/aarch64/spi_interrupt_timer/spi_interrupt_timer.s -o ../c_code/tests/aarch64/spi_interrupt_timer/spi_interrupt_timer.o echo " [ASM ] ../c_code/tests/aarch64/shared/isr_irq.s" aarch64-none-linux-gnu-as -march=armv8-a -I../c_code/tests/common/shared ../c_code/tests/aarch64/shared/isr_irq.s -o ../c_code/tests/aarch64/shared/isr_irq.o echo " [ASM ] ../c_code/tests/aarch64/shared/bootcode.s" aarch64-none-linux-gnu-as -march=armv8-a -I../c_code/tests/common/shared ../c_code/tests/aarch64/shared/bootcode.s -o ../c_code/tests/aarch64/shared/bootcode.o echo " [ASM ] ../c_code/tests/aarch64/shared/stackheap.s" aarch64-none-linux-gnu-as -march=armv8-a -I../c_code/tests/common/shared ../c_code/tests/aarch64/shared/stackheap.s -o ../c_code/tests/aarch64/shared/stackheap.o echo " [ASM ] ../c_code/tests/aarch64/shared/vectors.s" aarch64-none-linux-gnu-as -march=armv8-a -I../c_code/tests/common/shared ../c_code/tests/aarch64/shared/vectors.s -o ../c_code/tests/aarch64/shared/vectors.o echo " [ASM ] ../c_code/tests/aarch64/shared/isr_fiq.s" aarch64-none-linux-gnu-as -march=armv8-a -I../c_code/tests/common/shared ../c_code/tests/aarch64/shared/isr_fiq.s -o ../c_code/tests/aarch64/shared/isr_fiq.o echo " [ASM ] ../c_code/tests/aarch64/shared/pagetables.s" aarch64-none-linux-gnu-as -march=armv8-a -I../c_code/tests/common/shared ../c_code/tests/aarch64/shared/pagetables.s -o ../c_code/tests/aarch64/shared/pagetables.o echo " [ASM ] ../c_code/tests/aarch64/gic_shared/gic_config.s" aarch64-none-linux-gnu-as -march=armv8-a -I../c_code/tests/common/shared ../c_code/tests/aarch64/gic_shared/gic_config.s -o ../c_code/tests/aarch64/gic_shared/gic_config.o echo " [LINK] ../c_code/tests/aarch64/spi_interrupt_timer/spi_interrupt_timer.o" aarch64-none-linux-gnu-ld -T ../c_code/tests/link_asm_aarch64.ld ../c_code/tests/aarch64/spi_interrupt_timer/spi_interrupt_timer.o ../c_code/tests/aarch64/shared/isr_irq.o ../c_code/tests/aarch64/shared/bootcode.o ../c_code/tests/aarch64/shared/stackheap.o ../c_code/tests/aarch64/shared/vectors.o ../c_code/tests/aarch64/shared/isr_fiq.o ../c_code/tests/aarch64/shared/pagetables.o ../c_code/tests/aarch64/gic_shared/gic_config.o -o ../c_code/tests/aarch64/spi_interrupt_timer/spi_interrupt_timer.elfecho " [BIN ] ../c_code/tests/aarch64/spi_interrupt_timer/spi_interrupt_timer.elf"aarch64-none-linux-gnu-objcopy -O binary ../c_code/tests/aarch64/spi_interrupt_timer/spi_interrupt_timer.elf ../c_code/tests/aarch64/spi_interrupt_timer/spi_interrupt_timer.binecho " [HEX ] ../c_code/tests/aarch64/spi_interrupt_timer/spi_interrupt_timer.bin"../c_code/shared/tools/bin/bin2vhx.pl --width=128 ../c_code/tests/aarch64/spi_interrupt_timer/spi_interrupt_timer.bin ../c_code/tests/aarch64/spi_interrupt_timer/spi_interrupt_timer.vhxcp ../c_code/tests/aarch64/spi_interrupt_timer/spi_interrupt_timer.vhx rom.vhx
Can you let me know how to compile C code that I can load to the boot rom and run simulation?
All tools can be invoked from the command line. It is easiest to use the Arm Development Studio command prompt as installed, as that sets up all necessary environment variables.
You can build the supplied examples from the workshop with the make command, or directly using the commands that it invokes. Similarly you can load the build image to the FVP simulation using the -a option.
For example, I copied the gcd_basic.s solution, then built and ran the gcd example without issue:
Is there a link that you can supply with the make file and source used? That would be most helpful.
I was referencing the 'support files' mentioned here:https://developer.arm.com/documentation/102422/0100/Overview
Thank you so much. I would have not found that unless you gave me the link.