Hi OpenRISC gurus:

newlib uses Special Purpose Register NPC, which is discouraged in the spec:

  These and the GPR registers mapped into SPR space should only
  be used for debugging purposes by an external debugger.
  Applications should use the l.jal instruction
  to obtain the current program counter and arithmethic
  instructions to obtain GPR register values.

I noticed because my OR10 CPU didn't implement such SPRs at the beginning, as they are not needed for most of the test cases. It may still be worth leaving them out sometimes to save FPGA resources.

I also realised that newlib wants to program the Tick Timer on start-up by writing to TTMR, even if the CPU has been configured without this unit. I'm not sure whether a timer is a must for newlib, but my simple newlib test case runs fine without one (provided that the CPU ignores any writes to TTMR).

I'm using Peter Gavin's version of newlib, but I guess the problem also exists in the original one.

I don't have time at the moment to fix these issues myself, but I still thought it was worth pointing them out in this mailing list.

Regards,
  rdiez
_______________________________________________
OpenRISC mailing list
[email protected]
http://lists.openrisc.net/listinfo/openrisc

Reply via email to