[gem5-users] How to create binary file from c test?

2023-01-23 Thread IKRAM via gem5-users
Hi Team, I am working on ARM ISA. I want to know how we create binary files from c test. For example, in *simple.py* config file, we assign *tests/test-progs/hello/bin/arm/linux/hello* binary workload. So when we simulate simple.py "hello world" will be printed. I wanted to write a c test an

[gem5-users] Re: How to create binary file from c test?

2023-01-23 Thread Setu Gupta via gem5-users
Hi Ikram To generate the binary files, you just need to compile your C code using a compiler. Thanks Setu On Mon, Jan 23, 2023, 4:18 PM IKRAM via gem5-users wrote: > > Hi Team, > > I am working on ARM ISA. > > I want to know how we create binary files from c test. > > For example, in *simple.p

[gem5-users] Re: How to create binary file from c test?

2023-01-23 Thread IKRAM via gem5-users
Hi Setu, I have written a c code which has to be converted based on arm isa, so that if I run config .py this c code which is written in perspective of arm will be simulated. If I do >>gcc arm.c then a.out binary file will be created but it is not created in perspective of arm. Regards - Ik

[gem5-users] Re: How to create binary file from c test?

2023-01-23 Thread Setu Gupta via gem5-users
Hi Ikram You need to use a compiler which supports compiling for the ARM ISA. Thanks Setu On Mon, Jan 23, 2023, 4:39 PM IKRAM via gem5-users wrote: > Hi Setu, > > I have written a c code which has to be converted based on arm isa, so > that if I run config .py this c code which is written in p

[gem5-users] Re: How to create binary file from c test?

2023-01-23 Thread Siddharth Sahay via gem5-users
Hi Ikram Get a variant of GCC that outputs ARM binaries by default (aarch64 is probably what you want). Maybe try aarch64-linux-gnu-gcc toolchain https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain or compile it yourself. Add it to PATH for ease. Compile your .c program forcing every

[gem5-users] Re: How to create binary file from c test?

2023-01-23 Thread IKRAM via gem5-users
Hi, Thanks Siddharth, that is working fine. Do we have a cross compiler for ARM in gem5 itself? - Ikram On Mon, Jan 23, 2023 at 10:16 PM Siddharth Sahay wrote: > > Hi Ikram > > Get a variant of GCC that outputs ARM binaries by default (aarch64 is > probably what you want). Maybe try aarch64-l

[gem5-users] Re: How to create binary file from c test?

2023-01-23 Thread Eliot Moss via gem5-users
On 1/24/2023 5:59 PM, IKRAM via gem5-users wrote: Thanks Siddharth, that is working fine. Do we have a cross compiler for ARM in gem5 itself? To my knowledge, gem5 does not include compilers - they're external to it. However, a given disk image that you mount might include a compiler. But do