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?
When I look at the example above. ARM development Studio is invoked to run the executable. I have not read anything will allow the simulation of a c project from command line. To be clear, when I used the gcc tools from command line and I have native code, I can run complied code from command line. Something along the lines of $gcc -Wall -ggdb hello.c - hello.exe . After I complie/link I can then run $hello.exe from command line and see output. I did not have to invoke a project manager to run the program. I have not seen that example. Can you please provide an example or point to which commands I can run from dos or windows command line to compile, link and then run a program using simulator to get a program to run? Getting a program to run without using a project manager/ARM development Stuido, helps in testing programs in a complex build environemnt. I can run the executable right after a build. As far as I can tell ARM development Stuido does not allow simulator to be run from a command line prompt after compile/link.
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.