IPB

Welcome Guest ( Log In | Register )

3 Pages V  < 1 2 3 >  
Reply to this topicStart new topic
> Requests on LEJOS OSEK
takashic
post Feb 22 2008, 06:35 PM
Post #21


Advanced Member
***

Group: Members
Posts: 136
Joined: 7-October 07
Member No.: 4,012



QUOTE(idestiny @ Feb 23 2008, 04:26 AM) *
hi...

im very new to this NXT.. I have recently found out about this Lejos osek..

Actually im supposed to programme in Esterel programming language for my NXT, whihc in turns will churn out C.code (embedded c). I understadn that Lejos Osek can be used for embedded programming on NXT. I was wondering. are there any steps for me to follow??

I tried to install the applications with help from the website.. but i think i might hav miss out a step or 2... I'm kinda lost somewhere.. Actually what does the SAM-BA do?
Thanks for your time for reading this...
Sorry being sooo noob.. smile.gif


I am not sure about Esterel programming language and I found it by google
Esterel for LEGO Mindstorms. Is this what you meant?
If you had an ANSI C generator from Esterel, technically
it is possible to run your C program on NXT by using LEJOS OSEK. LEJOS OSEK uses GCC, it should be
no problem on any C program...
I assume you already succeeded to build an executable from your Esterel generated C, it it right?

SAM-BA is a program upload tool which is provided from ATMEL and it is used to upload a LEJOS OSEK
program into the NXT.

BTW, the next LEJOS OSEK V1.09 to be released soon and it will use LEGO MINDSTORMS NXT Driver instead of SAM-BA (it means that you can use NXT-G and LEJOS OSEK in a PC!), so if you don't mind,
please wait for the new release.

takashic


Go to the top of the page
 
+Quote Post
idestiny
post Feb 22 2008, 10:39 PM
Post #22


Newbie
*

Group: Members
Posts: 8
Joined: 22-February 08
Member No.: 4,785



QUOTE(takashic @ Feb 23 2008, 07:35 AM) *
I am not sure about Esterel programming language and I found it by google
Esterel for LEGO Mindstorms. Is this what you meant?
If you had an ANSI C generator from Esterel, technically
it is possible to run your C program on NXT by using LEJOS OSEK. LEJOS OSEK uses GCC, it should be
no problem on any C program...
I assume you already succeeded to build an executable from your Esterel generated C, it it right?

SAM-BA is a program upload tool which is provided from ATMEL and it is used to upload a LEJOS OSEK
program into the NXT.

BTW, the next LEJOS OSEK V1.09 to be released soon and it will use LEGO MINDSTORMS NXT Driver instead of SAM-BA (it means that you can use NXT-G and LEJOS OSEK in a PC!), so if you don't mind,
please wait for the new release.

takashic


Arh. May I ask about Sam-ba tool? Samba tool is just to upload the programme that I have compiled using the Cygwin (in bin file) ?

Then I'm supposed to do is to let NXT go into firmware update mode, then switch on SAM-BA V2.6 to flash the ram.bin in?

Err.. I'm supposed to finsih this project within 2 weeks time..hence i guess i have to make do with SAM-BA.. sad.gif

THanks for your help!!!
Go to the top of the page
 
+Quote Post
takashic
post Feb 24 2008, 12:24 AM
Post #23


Advanced Member
***

Group: Members
Posts: 136
Joined: 7-October 07
Member No.: 4,012



QUOTE(idestiny @ Feb 23 2008, 12:39 PM) *
Arh. May I ask about Sam-ba tool? Samba tool is just to upload the programme that I have compiled using the Cygwin (in bin file) ?

Then I'm supposed to do is to let NXT go into firmware update mode, then switch on SAM-BA V2.6 to flash the ram.bin in?

Err.. I'm supposed to finsih this project within 2 weeks time..hence i guess i have to make do with SAM-BA.. sad.gif

THanks for your help!!!

Yes. SAM-BA is a program upload tool and you can upload a compiled C/C++ program with LEJOS OSEK to SRAM(not Flash) on the NXT. In the LEJOS OSEK distribution, there are many samples to help
you to understand how to write a program and upload it.

Takashic
Go to the top of the page
 
+Quote Post
idestiny
post Feb 24 2008, 04:54 AM
Post #24


Newbie
*

Group: Members
Posts: 8
Joined: 22-February 08
Member No.: 4,785



QUOTE(takashic @ Feb 24 2008, 01:24 PM) *
Yes. SAM-BA is a program upload tool and you can upload a compiled C/C++ program with LEJOS OSEK to SRAM(not Flash) on the NXT. In the LEJOS OSEK distribution, there are many samples to help
you to understand how to write a program and upload it.

Takashic


Oic!

Thanks for your help on clarifying this.. I was puzzled with the usage of SAM-BA as i thought it is used to flash the firmware..

I will give it a try.. and update you with regards to this.

Once again, thanks for your help!!

Many good years ahead.
Go to the top of the page
 
+Quote Post
idestiny
post Feb 24 2008, 01:46 PM
Post #25


Newbie
*

Group: Members
Posts: 8
Joined: 22-February 08
Member No.: 4,785



QUOTE(idestiny @ Feb 24 2008, 05:54 PM) *
Oic!

Thanks for your help on clarifying this.. I was puzzled with the usage of SAM-BA as i thought it is used to flash the firmware..

I will give it a try.. and update you with regards to this.

Once again, thanks for your help!!

Many good years ahead.


Hi..

Need some help again..

I have just tried to upload the sample helloworld application .. It works. But i have a question. What does it mean for Lock Region(s) to lock? Does that mean that once i lock it ,i will not be able to reset it?

Btw, one more last question. Does it mean that as long as I do not exit from the program, I will not be required to upload it again?

Thanks so much. It is a relief to see that by using that NXT can be used with LEJOS OSEK (as well as our initial Esterel programming language).


Many good years ahead! rolleyes.gif

Go to the top of the page
 
+Quote Post
takashic
post Feb 24 2008, 06:40 PM
Post #26


Advanced Member
***

Group: Members
Posts: 136
Joined: 7-October 07
Member No.: 4,012



QUOTE(idestiny @ Feb 25 2008, 03:46 AM) *
Hi..

Need some help again..

I have just tried to upload the sample helloworld application .. It works. But i have a question. What does it mean for Lock Region(s) to lock? Does that mean that once i lock it ,i will not be able to reset it?

Btw, one more last question. Does it mean that as long as I do not exit from the program, I will not be required to upload it again?

Thanks so much. It is a relief to see that by using that NXT can be used with LEJOS OSEK (as well as our initial Esterel programming language).
Many good years ahead! rolleyes.gif

Sounds nice!. Concerning your question about Flash Lock regions, AT91SAM7S256 in the NXT has some lock swith to keep the program in the Flash and you need to take care of the life cycle of the Flash. So in case of LEJOS OSEK, the program is uploaded into SRAM (not Flash) intentionally. As long as you upload a program into SRAM, you don't need to worry about it.
In hello world sample, the program is uploaded by the following tcl script:
send_file {SRAM} "C:/cygwin/lejos_osek/samples/HelloWorld/helloworld_samba_ram.bin" 0x202000 0
go 0x202000
- 0x202000 address is in SRAM (not Flash).

Concerning the second question. If you wanted to re-start the program, push STOP button and your program is re-booted. So you don't need
to upload the program as long as you don't push EXIT button to make the NXT sleep.

P.S. you mentioned that you have a project to create a NXTway like robot. Under samples directory, there is NXTway-GS example.
the C code in NXTway-GS is also not human written code, but it is generated by Simulink.

takashic
Go to the top of the page
 
+Quote Post
idestiny
post Feb 24 2008, 10:29 PM
Post #27


Newbie
*

Group: Members
Posts: 8
Joined: 22-February 08
Member No.: 4,785



QUOTE(takashic @ Feb 25 2008, 07:40 AM) *
Sounds nice!. Concerning your question about Flash Lock regions, AT91SAM7S256 in the NXT has some lock swith to keep the program in the Flash and you need to take care of the life cycle of the Flash. So in case of LEJOS OSEK, the program is uploaded into SRAM (not Flash) intentionally. As long as you upload a program into SRAM, you don't need to worry about it.
In hello world sample, the program is uploaded by the following tcl script:
send_file {SRAM} "C:/cygwin/lejos_osek/samples/HelloWorld/helloworld_samba_ram.bin" 0x202000 0
go 0x202000
- 0x202000 address is in SRAM (not Flash).

Concerning the second question. If you wanted to re-start the program, push STOP button and your program is re-booted. So you don't need
to upload the program as long as you don't push EXIT button to make the NXT sleep.

P.S. you mentioned that you have a project to create a NXTway like robot. Under samples directory, there is NXTway-GS example.
the C code in NXTway-GS is also not human written code, but it is generated by Simulink.

takashic


Heh smile.gif

So the option for me to Lock Region(s) is not necessary right? Hokays! Also, once I exit the NXT, i will have to upload the program again right? But how it is possible that the program stays inside NXT for so long unless I keep it with the battery/electricity?

Thanks takashic, especially for your patience!


Cheers.
Go to the top of the page
 
+Quote Post
takashic
post Feb 24 2008, 11:57 PM
Post #28


Advanced Member
***

Group: Members
Posts: 136
Joined: 7-October 07
Member No.: 4,012



QUOTE(idestiny @ Feb 25 2008, 12:29 PM) *
Heh smile.gif

So the option for me to Lock Region(s) is not necessary right? Hokays! Also, once I exit the NXT, i will have to upload the program again right? But how it is possible that the program stays inside NXT for so long unless I keep it with the battery/electricity?

Thanks takashic, especially for your patience!
Cheers.

You are right. Unfortunately, there is no way to keep the program in SRAM if you removed the battery so you need to re-upload the program to the NXT.

takashic
Go to the top of the page
 
+Quote Post
takashic
post Feb 26 2008, 08:05 PM
Post #29


Advanced Member
***

Group: Members
Posts: 136
Joined: 7-October 07
Member No.: 4,012



Hi,

LEJOS OSEK V1.09 is released now.
What's new is this release is:
- Use libNXT(libUSB) and LEGO MINDSTORMS NXT Driver instead of ATMEL SAM-BA to upload a program.
This change makes user can use NXT-G, leJOS NXJ and LEJOS OSEK in a PC laugh.gif . So it is easier to try LEJOS OSEK.
- Refactored LEJOS OSEK base code

LEJOS OSEK Website is also updated with detailed descriptions.

Enjoy!
takashic
Go to the top of the page
 
+Quote Post
Johnny 5
post Mar 5 2008, 01:27 PM
Post #30


Newbie
*

Group: Members
Posts: 9
Joined: 29-February 08
Member No.: 4,835



Hello everyone!

I'm new here in this forum... I'm new in embedded systems development and in Lego Mindstorms, after all... smile.gif

For my university stage & thesis I'm going to work with NXT, and now I'm studying how Lejos OSEK works. Since I'm a GNU/Linux user I'm doing the best efforts in order to get the system work under this platform.

First thing:

QUOTE(takashic @ Feb 27 2008, 02:05 AM) *
- Use libNXT(libUSB) and LEGO MINDSTORMS NXT Driver instead of ATMEL SAM-BA to upload a program.
This change makes user can use NXT-G, leJOS NXJ and LEJOS OSEK in a PC laugh.gif . So it is easier to try LEJOS OSEK.


I'd like to let you know that the program has been originally written for posix systems, so it works under GNU/Linux too. The source code can be retrieved by downloading the Lejos tarball, and requires scons + libusb.

Second thing:

The Lejos OSEK kernel is (as the name suggests) OSEK compliant. The OIL implementation file is parsed by SG.EXE, that works well under GNU/Linux too (by using wine), but it's a mere binary file. I'd like to know if the source code of this program is distributed as free software, or if there's a free software implementation of it.

Thanks in advance.
Giovanni Simoni
Go to the top of the page
 
+Quote Post
Johnny 5
post Mar 6 2008, 02:18 AM
Post #31


Newbie
*

Group: Members
Posts: 9
Joined: 29-February 08
Member No.: 4,835



QUOTE(Johnny 5 @ Mar 5 2008, 07:27 PM) *
First thing:
I'd like to let you know that the program has been originally written for posix systems, so it works under GNU/Linux too. The source code can be retrieved by downloading the Lejos tarball, and requires scons + libusb.


Ooops... I've noticed that the source code of libnxt is also included in Lejos OSEK tarball! smile.gif My fault!! smile.gif
Go to the top of the page
 
+Quote Post
takashic
post Mar 8 2008, 12:15 PM
Post #32


Advanced Member
***

Group: Members
Posts: 136
Joined: 7-October 07
Member No.: 4,012



QUOTE(Johnny 5 @ Mar 6 2008, 03:27 AM) *
Hello everyone!

I'm new here in this forum... I'm new in embedded systems development and in Lego Mindstorms, after all... smile.gif

For my university stage & thesis I'm going to work with NXT, and now I'm studying how Lejos OSEK works. Since I'm a GNU/Linux user I'm doing the best efforts in order to get the system work under this platform.

First thing:
I'd like to let you know that the program has been originally written for posix systems, so it works under GNU/Linux too. The source code can be retrieved by downloading the Lejos tarball, and requires scons + libusb.

Second thing:

The Lejos OSEK kernel is (as the name suggests) OSEK compliant. The OIL implementation file is parsed by SG.EXE, that works well under GNU/Linux too (by using wine), but it's a mere binary file. I'd like to know if the source code of this program is distributed as free software, or if there's a free software implementation of it.

Thanks in advance.
Giovanni Simoni


Hi Jonny5,

Thank you for your great work on LEJOS OSEK!
Unfortunately, I dont't have Linux machine, so no way to test it. However, definitely a good thing
to make people have more choices of environments to play with LEJOS OSEK.
Concerning TOPPERS OSEK SG.exe, As you pointed, so far no source code is available.
I also am not sure why?, however TOPPERS said (in Japanese), their OSEK is still on going, so
they hesitated to release the code which may be changed.

If you were OK, I would like to set a link to Lejos tarball.

Thanks,
Takashi
Go to the top of the page
 
+Quote Post
Johnny 5
post Mar 8 2008, 12:58 PM
Post #33


Newbie
*

Group: Members
Posts: 9
Joined: 29-February 08
Member No.: 4,835



QUOTE(takashic @ Mar 8 2008, 06:15 PM) *
Thank you for your great work on LEJOS OSEK!


Genuinely I haven't done any tangible work at all! I'm just studying code and running some tests smile.gif

QUOTE(takashic @ Mar 8 2008, 06:15 PM) *
...
Concerning TOPPERS OSEK SG.exe, As you pointed, so far no source code is available.
I also am not sure why?, however TOPPERS said (in Japanese), their OSEK is still on going, so
they hesitated to release the code which may be changed.


Ok... this make thing harder... but thanks for the information.

QUOTE(takashic @ Mar 8 2008, 06:15 PM) *
If you were OK, I would like to set a link to Lejos tarball.


Actually I think I'm not the right guy to be asked for this. I'm not yet an active developer: I'm still in larval stage!! tongue.gif
Surely the relationship between Lejos and Lejos OSEK makes this another good point of star for everyone that wants to hack into Lejos OSEK... so, why not?

Regards
Giovanni
Go to the top of the page
 
+Quote Post
Johnny 5
post Mar 12 2008, 01:39 PM
Post #34


Newbie
*

Group: Members
Posts: 9
Joined: 29-February 08
Member No.: 4,835



QUOTE(takashic @ Mar 8 2008, 06:15 PM) *
Hi Jonny5,

Thank you for your great work on LEJOS OSEK!
Concerning TOPPERS OSEK SG.exe, As you pointed, so far no source code is available.
I also am not sure why?, however TOPPERS said (in Japanese), their OSEK is still on going, so
they hesitated to release the code which may be changed.


Last news about SG.exe: my new objective is replacing SG.exe with a free-software OIL parser.

Now the facts:

On the OSEK specification papers I've found OIL grammar: it should be regulated in order to get an equivalent but smarter one. No Problema!
I've tacked on a simple lexer and a parser structure written in C (i've used bison as parser generator).

Within next week I'll publish some details on my blog.

Everyone who wants to cooperate with me is welcome.

Giovanni
Go to the top of the page
 
+Quote Post
takashic
post Mar 12 2008, 06:30 PM
Post #35


Advanced Member
***

Group: Members
Posts: 136
Joined: 7-October 07
Member No.: 4,012



QUOTE(Johnny 5 @ Mar 13 2008, 03:39 AM) *
Last news about SG.exe: my new objective is replacing SG.exe with a free-software OIL parser.

Now the facts:

On the OSEK specification papers I've found OIL grammar: it should be regulated in order to get an equivalent but smarter one. No Problema!
I've tacked on a simple lexer and a parser structure written in C (i've used bison as parser generator).

Within next week I'll publish some details on my blog.

Everyone who wants to cooperate with me is welcome.

Giovanni


It is always exciting to see the things are getting better through open source project.
On my side, I have been trying to implement flash loader on LEJOS OSEK. It means that application program will be
uploaded into Flash in safe way such as LEGO/leJOS NXJ does. So more than 200kbytes Flash and 50-60 kbytes SRAM will be available for
user program! It will not be released soon because I need to check a lot of things (I just confirmed it works), so please be patient.

Takashi
Go to the top of the page
 
+Quote Post
Tubyhes
post Apr 9 2008, 09:34 AM
Post #36


Newbie
*

Group: Members
Posts: 4
Joined: 9-April 08
From: Netherlands
Member No.: 5,059



I am trying to make a wireless sensor network using the NXT and Lejos Osek. For that I need all my bricks to be able to communicate with each other (using Bluetooth) but as far as I can figure out, one brick can only have a Bluetooth connection with one other brick at a time. If I understand correctly it should be able to create a new Bluetooth connection at runtime, though I still have to figure out how, but I was wondering why multiple connections are not supported. Are there any plans to implement that?

I am currently using Lejos Osek v1.09, but if I'm correct the latest versions didn't bring any Bluetooth changes.

Greets, Tubyhes
Go to the top of the page
 
+Quote Post
takashic
post Apr 9 2008, 07:04 PM
Post #37


Advanced Member
***

Group: Members
Posts: 136
Joined: 7-October 07
Member No.: 4,012



QUOTE(Tubyhes @ Apr 9 2008, 11:34 PM) *
I am trying to make a wireless sensor network using the NXT and Lejos Osek. For that I need all my bricks to be able to communicate with each other (using Bluetooth) but as far as I can figure out, one brick can only have a Bluetooth connection with one other brick at a time. If I understand correctly it should be able to create a new Bluetooth connection at runtime, though I still have to figure out how, but I was wondering why multiple connections are not supported. Are there any plans to implement that?

I am currently using Lejos Osek v1.09, but if I'm correct the latest versions didn't bring any Bluetooth changes.

Greets, Tubyhes


Your understanding is correct. Currently, LEJOS OSEK supports only one NXT to one NXT Bluetooth communication.
I know NXT supports multiple NXT communications via Bluetooth (max 3 NXT?), however I haven't implemented
this feature yet. Thanks, I could find a To Do, I will try it!

Takashic
Go to the top of the page
 
+Quote Post
Sivan Toledo
post May 1 2008, 06:31 PM
Post #38


Advanced Member
***

Group: Members
Posts: 140
Joined: 3-October 06
Member No.: 303



This must be a silly question, but still...

I compiled helloworld of version 2.00, and tried to download helloworld_app_rom.bin to the NXT. I changed the file name from .bin to .rfw and used the NXT-G upload firmware command to upload it. It reported that the download is complete, but the brick just keeps clicking, even after I took the battery out and put it back in.

Is there a different way to upload binaries using NXT-G?

(Some explanation: I also tried a couple of days ago the method that explained on the web site, but SAM-BA does not seem to work on Vista, and libusb registered itself as a driver to all my devices, including the WiFi card, so I really prefer to avoid it).

Thanks, Sivan
Go to the top of the page
 
+Quote Post
takashic
post May 1 2008, 07:47 PM
Post #39


Advanced Member
***

Group: Members
Posts: 136
Joined: 7-October 07
Member No.: 4,012



QUOTE(Sivan Toledo @ May 2 2008, 08:31 AM) *
This must be a silly question, but still...

I compiled helloworld of version 2.00, and tried to download helloworld_app_rom.bin to the NXT. I changed the file name from .bin to .rfw and used the NXT-G upload firmware command to upload it. It reported that the download is complete, but the brick just keeps clicking, even after I took the battery out and put it back in.

Is there a different way to upload binaries using NXT-G?

(Some explanation: I also tried a couple of days ago the method that explained on the web site, but SAM-BA does not seem to work on Vista, and libusb registered itself as a driver to all my devices, including the WiFi card, so I really prefer to avoid it).

Thanks, Sivan


As you said, unfortunately, it does not work. nxtOSEK (ex. LEJOS OSEK) application upload is assumed to be done by appflash.exe with NXT BIOS.

Concerning Vista issue with libUsb for win32, I have never tested it. However, leJOS NXJ users also have encountered the same issue and
I found several forums at leJOS forum:
http://lejos.sourceforge.net/forum/viewtopic.php?t=541
http://lejos.sourceforge.net/forum/viewtopic.php?t=872

Some peple seem to find a solution to make libUsb run on Vista, but there seems to be a lot of troubles...

Takashic
Go to the top of the page
 
+Quote Post
Sivan Toledo
post May 1 2008, 07:50 PM
Post #40


Advanced Member
***

Group: Members
Posts: 140
Joined: 3-October 06
Member No.: 303



QUOTE(takashic @ May 2 2008, 03:47 AM) *
As you said, unfortunately, it does not work. nxtOSEK (ex. LEJOS OSEK) application upload is assumed to be done by appflash.exe with NXT BIOS.

Concerning Vista issue with libUsb for win32, I have never tested it. However, leJOS NXJ users also have encountered the same issue and
I found several forums at leJOS forum:
http://lejos.sourceforge.net/forum/viewtopic.php?t=541
http://lejos.sourceforge.net/forum/viewtopic.php?t=872

Some peple seem to find a solution to make libUsb run on Vista, but there seems to be a lot of troubles...

Takashic


Thanks a lot. Do you know why NXT-G cannot upload an AT91 binary program? Doesn't it simply upload a binary image to the beginning of the flash? In other words, what is special about the Lego .rfw files?
Go to the top of the page
 
+Quote Post

3 Pages V  < 1 2 3 >
Reply to this topicStart new topic

 



Lo-Fi Version Time is now: 9th February 2010 - 04:45 PM