Author Topic: MIPS Simulator  (Read 1054 times)

0 Members and 1 Guest are viewing this topic.

Offline kfnightTopic starter

  • Regular Contributor
  • *
  • Posts: 71
MIPS Simulator
« on: September 13, 2018, 03:42:39 pm »
I would like to simulate some C code on a Windows MIPS simulator. Sounds simple? Apparently not.
 

Offline kfnightTopic starter

  • Regular Contributor
  • *
  • Posts: 71
Re: MIPS Simulator
« Reply #1 on: September 13, 2018, 03:46:08 pm »
Grrr, hit post too early.

I'd like to use QTSpim, however it does not accept binary (intel hex, srec) files, and only accepts assembly (.s) files. That would be fine except GCC spits the assembly out in a form that QTSpim does not like, mainly absolute addressing. Does anyone know of a MIPS simulator for Windows that accepts binary files, or a way to get GCC to produce position-independent code for MIPS?
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14476
  • Country: fr
Re: MIPS Simulator
« Reply #2 on: September 13, 2018, 04:41:14 pm »
I think you should pass the
Code: [Select]
-fPIC option to GCC to generate position-independent code.
I don't guarantee that it will work with the MIPS backend or with your simulator, but that's what I would try.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf