Fwd: [Openrisc] Tutorial for running RTEMS on OpenRISC

2015-02-23 Thread Hesham Moustafa
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 
Date: Sun, Feb 22, 2015 at 8:28 PM
Subject: Re: [Openrisc] Tutorial for running RTEMS on OpenRISC
To: Hesham Moustafa 
Cc: "openr...@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  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 
>>> 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 
> 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_ygMvfnFzOHZkZ0w3Q1hrNV9SX3ZKS0Vza3U5d2ljbDROSlNQLUprUXFsNUtUelU&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 
>>> 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
 openr...@lists.opencores.org
 http://lists.opencores.org/listinfo/openrisc



 ___
 Openrisc mailing list
 openr...@lists.opencores.org
 http://lists.opencores.org/listinfo/openrisc

___

Re: [Openrisc] Tutorial for running RTEMS on OpenRISC

2015-02-23 Thread Gedare Bloom
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
 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 
> Date: Sun, Feb 22, 2015 at 8:28 PM
> Subject: Re: [Openrisc] Tutorial for running RTEMS on OpenRISC
> To: Hesham Moustafa 
> Cc: "openr...@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  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 
 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 
>> 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_ygMvfnFzOHZkZ0w3Q1hrNV9SX3ZKS0Vza3U5d2ljbDROSlNQLUprUXFsNUtUelU&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 
 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
>
>
> _

Re: [Openrisc] Tutorial for running RTEMS on OpenRISC

2015-02-23 Thread Hesham Moustafa
On Mon, Feb 23, 2015 at 2:31 PM, Gedare Bloom  wrote:
> That is interesting! I recommend opening a ticket on Trac so we don't
> lose track of the idea.
>
That's it https://devel.rtems.org/ticket/2276#ticket

> Thanks for the tutorial.
>
> Gedare
>
> On Mon, Feb 23, 2015 at 3:40 AM, Hesham Moustafa
>  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 
>> Date: Sun, Feb 22, 2015 at 8:28 PM
>> Subject: Re: [Openrisc] Tutorial for running RTEMS on OpenRISC
>> To: Hesham Moustafa 
>> Cc: "openr...@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  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 
> 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 
>>> 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_ygMvfnFzOHZkZ0w3Q1hrNV9SX3ZKS0Vza3U5d2ljbDROSlNQLUprUXFsNUtUelU&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 
> 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 runni

Re: [rtems commit] Use counted strnlen in bin2c. Closes #2238.

2015-02-23 Thread Sebastian Huber

On 23/02/15 16:38, Gedare Bloom wrote:

Module:rtems
Branch:master
Commit:1281c34a235fd031352dd43f437d84cf2c8421a7
Changeset: 
http://git.rtems.org/rtems/commit/?id=1281c34a235fd031352dd43f437d84cf2c8421a7

Author:Gedare Bloom 
Date:  Mon Feb 23 10:38:37 2015 -0500

Use counted strnlen in bin2c. Closes #2238.

---

  tools/build/rtems-bin2c.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/build/rtems-bin2c.c b/tools/build/rtems-bin2c.c
index 391c259..7674389 100644
--- a/tools/build/rtems-bin2c.c
+++ b/tools/build/rtems-bin2c.c
@@ -72,7 +72,7 @@ void process(const char *ifname, const char *ofname)
}

strncpy( obasename, ofname, PATH_MAX );
-  len = strlen( obasename );
+  len = strnlen( obasename, PATH_MAX );


Its hard to believe, but changes like this break the Windows build. I 
adjusted the Makefile.am with a potential fix.


--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [Openrisc] Tutorial for running RTEMS on OpenRISC

2015-02-23 Thread Cudmore, Alan P. (GSFC-5820)
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"  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
> 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 
>> Date: Sun, Feb 22, 2015 at 8:28 PM
>> Subject: Re: [Openrisc] Tutorial for running RTEMS on OpenRISC
>> To: Hesham Moustafa 
>> Cc: "openr...@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 
>>>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 
> 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
>>>
>>> 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
>
> wrote:
>>
>> Hi Heshma,
>>
>> Great! Do you have a link of a working QEMU image? I can try to
>>