[Openrisc] Tutorial for running RTEMS on OpenRISC

Cudmore, Alan P. (GSFC-5820) alan.p.cudmore at nasa.gov
Mon Feb 23 22:06:30 UTC 2015


I followed this tutorial and was able to get a few examples up and running
on the or1ksim. Nice work.
A minor suggestion: a few updates to the README in the BSP would let
someone get it running based on just that file:
https://git.rtems.org/rtems/tree/c/src/lib/libbsp/or1k/or1ksim/README .. I
found out that I needed GDB in the loop from your tutorial.

Having a live RTEMS demo on the website would be cool.

Alan


On 2/23/15 9:31 AM, "Gedare Bloom" <gedare at rtems.org> wrote:

>That is interesting! I recommend opening a ticket on Trac so we don't
>lose track of the idea.
>
>Thanks for the tutorial.
>
>Gedare
>
>On Mon, Feb 23, 2015 at 3:40 AM, Hesham Moustafa
><heshamelmatary at gmail.com> wrote:
>> Hi,
>>
>> Found out there is a Javascript online simulator (jor1k) that can run
>> or1ksim binaries (hello, ticker and capture run there perfectly). I am
>> not sure if this simulator can be embedded to RTEMS Project Webpage
>> [1]
>>
>> [1] https://devel.rtems.org/wiki/Projects/GSoC/OpenRISC
>>
>> Regards,
>> Hesham
>> ---------- Forwarded message ----------
>> From: Sebastian Macke <sebastian at macke.de>
>> Date: Sun, Feb 22, 2015 at 8:28 PM
>> Subject: Re: [Openrisc] Tutorial for running RTEMS on OpenRISC
>> To: Hesham Moustafa <heshamelmatary at gmail.com>
>> Cc: "openrisc at lists.opencores.org" <openrisc at lists.opencores.org>
>>
>>
>> Hi,
>>
>> take a look at:
>> https://github.com/s-macke/jor1k
>>
>> I have added the RTEMS website and a simple demo.
>>
>> You are free to link to the github site
>> https://github.com/s-macke/jor1k
>> or directly to the RTEMS demo site
>> http://s-macke.github.io/jor1k/demos/rtems.html
>>
>> You can send me a new website design if you want.
>>
>> Sebastian
>>
>>
>> Am 2/22/2015 um 8:48 PM schrieb Hesham Moustafa:
>>
>>> On Sun, Feb 22, 2015 at 7:43 PM, Sebastian Macke <sebastian at macke.de>
>>>wrote:
>>>>
>>>> My emulator doesn't support timer modes other than continuous. I
>>>>removed the
>>>> check. Seems to work now.
>>>>
>>> Totally working. That's great. Can you create some entry for jor1k
>>> RTEMS there? I'd pass a long the link to RTEMS community and maybe
>>> update the tutorial with jor1k info.
>>>
>>>> Am 2/22/2015 um 7:30 PM schrieb Hesham Moustafa:
>>>>
>>>>> On Sun, Feb 22, 2015 at 6:23 PM, Sebastian Macke <sebastian at macke.de>
>>>>> wrote:
>>>>>>
>>>>>> Hi Mesham,
>>>>>>
>>>>>> I have hacked something together, which works for me for the binary
>>>>>>hello
>>>>>> program
>>>>>> http://jor1k.com/jor1k/demos/simple2.html
>>>>>> Just click on the symbol to upload a binary image. (128 MB images
>>>>>>allowed
>>>>>> for now).
>>>>>>
>>>>> Thanks for providing the link.
>>>>> hello is working but the other two are not, not sure why. Any way to
>>>>> debug?
>>>>>
>>>>>> The other two .exe files are not working for some reason.
>>>>>>
>>>>>> I don't like to use 128MB in the web browser. I get too often out of
>>>>>> memory
>>>>>> errors then. Also it won't work anymore on mobile devices.
>>>>>> 16-31MB should be fine in the end for the examples I hope.
>>>>>>
>>>>>> Sebastian
>>>>>>
>>>>>>
>>>>>> Am 2/22/2015 um 6:35 PM schrieb Hesham Moustafa:
>>>>>>
>>>>>>> Hi Sebastian,
>>>>>>>
>>>>>>> On Sun, Feb 22, 2015 at 5:17 PM, Sebastian Macke
>>>>>>><sebastian at macke.de>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Hi Mesham,
>>>>>>>>
>>>>>>>> it works somehow,
>>>>>>>> I had to generate a binary image via "or1k-linux-musl-objcopy -O
>>>>>>>>binary
>>>>>>>> hello.exe vmlinux.bin"
>>>>>>>> Then I had to increase the memory to 128MB
>>>>>>>>
>>>>>>>> Now I get an output, which you can find here:
>>>>>>>> jor1k.com/jor1k/demos/main.html?cpu=safe
>>>>>>>>
>>>>>>>> "Fatal Error 5.0 halted"
>>>>>>>> Do you know, what this means?
>>>>>>>>
>>>>>>> Yes that's perfectly fine, it means that the program terminates
>>>>>>> normally (on simulators). Great to know it works!
>>>>>>>>
>>>>>>>> Can you provide me an image which uses only <= 31MB (not 32MB) of
>>>>>>>> memory?
>>>>>>>> 16MB would be fine I think.
>>>>>>>>
>>>>>>> I hacked the source and got it for you. Attached are three samples
>>>>>>>you
>>>>>>> can try < 16 MB. I'd appreciate you provide me with some demo
>>>>>>>links.
>>>>>>> Can users upload, run/debug their own or1k samples their there?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 
>>>>>>>https://drive.google.com/folderview?id=0B_dTGAP_ygMvfnFzOHZkZ0w3Q1hr
>>>>>>>NV9SX3ZKS0Vza3U5d2ljbDROSlNQLUprUXFsNUtUelU&usp=sharing
>>>>>>>>
>>>>>>>> Sebastian
>>>>>>>>
>>>>>>>> Am 2/22/2015 um 5:40 PM schrieb Hesham Moustafa:
>>>>>>>>
>>>>>>>>> Hi Sebastian,
>>>>>>>>>
>>>>>>>>> Thanks for you reply.
>>>>>>>>>
>>>>>>>>> If I am understanding correctly, you need a snapshot binary for
>>>>>>>>>RTEMS
>>>>>>>>> app (i.e, hello.exe). [1] It's ELF. Let me know if that works
>>>>>>>>>for you.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> [1]
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 
>>>>>>>>>https://drive.google.com/file/d/0B_dTGAP_ygMvcmZ3U3g1S2k4UTA/view?
>>>>>>>>>usp=sharing
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Hesham
>>>>>>>>>
>>>>>>>>> On Sun, Feb 22, 2015 at 4:32 PM, Sebastian Macke
>>>>>>>>><sebastian at macke.de>
>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>> Hi Heshma,
>>>>>>>>>>
>>>>>>>>>> Great! Do you have a link of a working QEMU image? I can try to
>>>>>>>>>>run
>>>>>>>>>> it
>>>>>>>>>> in
>>>>>>>>>> jor1k.
>>>>>>>>>>
>>>>>>>>>> Sebastian
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Am 2/22/2015 um 4:51 PM schrieb Hesham Moustafa:
>>>>>>>>>>
>>>>>>>>>> Hi all,
>>>>>>>>>>
>>>>>>>>>> In case some of you don't know, I have ported RTEMS to OpenRISC
>>>>>>>>>>last
>>>>>>>>>> year
>>>>>>>>>> during GSoC. All the code is now upstream and works fine. I
>>>>>>>>>>wrote a
>>>>>>>>>> tutorial
>>>>>>>>>> describing how to get RTEMS running on OpenRISC simulators
>>>>>>>>>>(or1ksim
>>>>>>>>>> and
>>>>>>>>>> QEMU) totally from scratch [1].
>>>>>>>>>>
>>>>>>>>>> [1] http://heshamelmatary.blogspot.co.uk/p/howto-rtems.html
>>>>>>>>>>
>>>>>>>>>> Best,
>>>>>>>>>> Hesham
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Openrisc mailing list
>>>>>>>>>> Openrisc at lists.opencores.org
>>>>>>>>>> http://lists.opencores.org/listinfo/openrisc
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Openrisc mailing list
>>>>>>>>>> Openrisc at lists.opencores.org
>>>>>>>>>> http://lists.opencores.org/listinfo/openrisc
>>>>>>>>>>
>> _______________________________________________
>> devel mailing list
>> devel at rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
>_______________________________________________
>devel mailing list
>devel at rtems.org
>http://lists.rtems.org/mailman/listinfo/devel



More information about the devel mailing list