title: Not Able to Run GEM5 with RISC-V: "!seWorkload occurred: Couldn't find appropriate workload object"
body: <p>I am trying to run gem5 with RISC-V. I have the Linux 64-bits cross compiler ready and I have also installed and compiled gem5. I then tried to use the following tutorial to run gem5: <a href="https://canvas.kth.se/courses/24933/pages/tutorial-simulating-a-cpu-with-gem5" rel="nofollow noreferrer">https://canvas.kth.se/courses/24933/pages/tutorial-simulating-a-cpu-with-gem5</a></p>
  <p>I wrote a simple Hello World C program and compiled it using the following command:</p>
  <p><code>riscv64-unknown-linux-gnu-gcc -c hello.c -static -Wall -O0 -o hello</code></p>
  <p>But when I try to run gem5, I get the following error:</p>
  <pre><code>build/RISCV/sim/process.cc:137: fatal: fatal condition !seWorkload occurred: Couldn't find appropriate workload object.
  </code></pre>
  <p>I tried to come over this problem but I could not. I added print statements to the configuration file and realized that the error occurs in the line <code>m5.instantiate()</code> in the configuration file attached below. Does anyone know how to solve this issue? What is an seWorkload and why gem5 considers the object as not appropriate?</p>
  <p>I am using Ubuntu 22.04. For reference, this is the configuration python file I use for gem5:</p>
  <pre><code>import m5
  from m5.objects import *
  import sys
  
  system = System()
  
  system.clk_domain = SrcClockDomain()
  system.clk_domain.clock = '1GHz'
  system.clk_domain.voltage_domain = VoltageDomain()
  
  system.mem_mode = 'timing'
  system.mem_ranges = [AddrRange('512MB')]
  system.cpu = TimingSimpleCPU()
  system.membus = SystemXBar()
  system.cpu.icache_port = system.membus.cpu_side_ports
  system.cpu.dcache_port = system.membus.cpu_side_ports
  system.mem_ctrl = MemCtrl()
  system.mem_ctrl.dram = DDR3_1600_8x8()
  system.mem_ctrl.dram.range = system.mem_ranges[0]
  system.mem_ctrl.port = system.membus.mem_side_ports
  
  # start a process
  process = Process()
  
  # read command line arguments for the path to the executable
  process.cmd = [str(sys.argv[1])]
  
  system.cpu.workload = process
  system.cpu.createThreads()
  root = Root(full_system = False, system = system)
  
  m5.instantiate() # the error occurs from this line
  
  print(&quot;Beginning simulation!&quot;)
  exit_event = m5.simulate()
  print('Exiting @ tick %i because %s' %(m5.curTick(), exit_event.getCause()))
  </code></pre>