Hi Michael,

I'm pretty sure embARC was not meant to be run on ARCompact (AKA ISAv1 cores 
like ARC600 & ARC700) instead targets were ARCv2 cores like ARC EM and ARC HS. 
Unfortunately I have no experience with embARC so adding more experienced 
person in the thread (Igor Guryanov) who may shed some light on interrupts in 


On Sat, 2016-09-17 at 21:26 +0300, Michael Rolnik wrote:
H Alexey.


I need some help in getting a small code that exercises interrupts. For several 
years I wrote FW for ARC based platforms (ARC4 & ARC6), but it seems I forgot 
some of the things related to interrupts. I compiled FreeRTOS demo from embARC, 
however I could not find interrupt vectors there, I assume their board has ROM.
So, if you can help me with such a code, it would be great.


On Fri, Sep 16, 2016 at 6:01 PM, Alexey Brodkin 
<alexey.brod...@synopsys.com<mailto:alexey.brod...@synopsys.com>> wrote:
Hi Michael,

On Fri, 2016-09-09 at 01:31 +0300, Michael Rolnik wrote:
> This series of patches adds ARC target to QEMU. It indends to support
>     - ARCtangent-A5 processor
>     - ARC 600 processor
>     - ARC 700 processor
> All instructions except ASLS are implemented. Not fully tested yet.
> However I was able to execute correctly recursive fibonacci calculation.
> Reset vector is assumed to be some hardcoded value which worked for my test.
> I am planning to get FreeRTOS for ARC, once I get it, I will able to verify
> and complete interrupt support.

That's both very unexpected and cool!

I tried your patches on top of current QEMU git master and it:
 a) Builds for ARC
 b) Very simple code really works!

I was able to single-step with GDB through program as simple as:
.global _start
        mov     r0, 1
        mov     r1, 2
        mov     r1, r0

That's what I saw in GDB:
(gdb) disassemble
Dump of assembler code for function _start:
=> 0x00000100 <+0>:     mov     r0,0x1
   0x00000104 <+4>:     mov     r1,0x2
   0x00000108 <+8>:     mov     r1,r0
End of assembler dump.
(gdb) p $r0
$1 = 0
(gdb) stepi
0x00000104 in _start ()
(gdb) p $r0
$2 = 1
(gdb) stepi
0x00000108 in _start ()
(gdb) p $r1
$3 = 2
(gdb) stepi
0x0000010c in ?? ()
(gdb) p $r1
$4 = 1

So again this is very promising even though a lot is essentially missing from
this very first implementation.

Anyways IMHO it would be good to have these patches accepted so people may start
playing with that stuff adding missing things one by one.

Let me know if you need any help from my side.


Best Regards,
Michael Rolnik

Reply via email to