1

I'm looking for CPU architecture, which is supported by GCC (and is still maintained) for which is easiest to implement software simulator.

It should be something simple, with flat memory model, 16bit+ address space, 16-32 bit ALU and good code dencity is prefered as for it will be running programs with program memory limitations.

Just few words about origin of those requirements. I need virtual CPU for running 'sandboxed' programs. That will be running on microcontrollers with ~5 KBytes RAM, ARM CPU ~20 MHz clock speed.

Performance is non an issue at all, what I really need is writing C/C++ programs and then running them in sandbox without stdlib. For writing programs GCC can help, just need implement vcpu for one of target architectures.

I've got acquainted with ARMv7-m, avr32 references and found them pretty accaptable but some more powerfull then I need. The less/simpler code I need to write for vcpu implementation, the sooner I will have what I need and less bugs will be there.

UPDATE: Seems like I found what I need. Is was already answered here: What is the smallest, simplest CPU that gcc can compile for?

Thank you all.

Community
  • 1
  • 1
  • 1
    Why don't you use an existing emulator? – Mat May 24 '14 at 07:37
  • I don't know any suitable existing emulators. Do you know some? – Lyubomyr Semkiv May 24 '14 at 07:38
  • 3
    qemu ( http://wiki.qemu.org/Main_Page ) is an emulator for a bozillion of different machines and architectures. you can probably use and old videorecorder, or router, or modem or smartphone to play with this stuff if you want a real piece of hardware – user2485710 May 24 '14 at 07:45
  • 1
    I may be wrong, but I think QEMU is too huge and was not designed for running on such devices. 20 MHZ, 5 KB ram, ~50-100 kb flash size. – Lyubomyr Semkiv May 24 '14 at 08:03
  • Just reviewed QUEMU source tree and found cpu's implementations, it may be helpful, thanks. – Lyubomyr Semkiv May 24 '14 at 08:18

0 Answers0