IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Compile to file and not to brick?
Tobias Andersson
post Nov 27 2006, 03:57 AM
Post #1


Newbie
*

Group: Members
Posts: 4
Joined: 23-November 06
Member No.: 530



Hi,

I am interested in being able to invoke the compiler with the original NXT software to produce compiled files that can be downloaded later to a NXT. Is that possible? I have not found anything in the short manual or on the net. The reason for doing this is that we are thinking of using NXT in the education here at Växjö University, but we would like to distribute compiled files which the students can download and test and after that try to do the same thing themselves.

There seems to be a gcompile.dll file in the software, but I don't know of any way of invoking it without downloading it to a NXT at the same time.

Any help would be great!

Sincerely,

Tobias
Go to the top of the page
 
+Quote Post
Brian Davis
post Nov 27 2006, 07:19 AM
Post #2


Advanced Member
***

Group: Moderators
Posts: 2,179
Joined: 8-July 06
Member No.: 37



QUOTE(Tobias Andersson @ Nov 27 2006, 03:57 AM) *
I don't know of any way of invoking it without downloading it to a NXT at the same time.

I don't either. But if it's just to get a working copy of the compiled program, you have that: on the NXT brick. Once you've downloaded and tested the program, connect the the NXT and upload the program off the brick and onto the computer for distribution. It can be downloaded to other bricks the same way (via the NXT window in the software, uploading it individually and bypassing compile).

Or, for more fun, have the students do it themselves, by using the BT "mail" option to transfer the program from NXT to NXT around the classroom. This is very handy, but little used yet (I expet a lot of future file-sharing, particularly for sound and image files, to occur this way in the future, when more folks have NXTs at events like BrickFest).

--
Brian Davis
Go to the top of the page
 
+Quote Post
Tobias Andersson
post Nov 29 2006, 04:22 AM
Post #3


Newbie
*

Group: Members
Posts: 4
Joined: 23-November 06
Member No.: 530



Great!

I almost feel ashamed that I did not think of this myself... Almost :-)

I am still interested, though, in any way of compiling the original Mindstorms programs to file and not to brick since as it is right now I only have access to Unix or Linux computers at work and am forced to do all my programming at home. I am able to run the software under qemu (by running Windows in the emulator) but I can't access the NXT-block from the emulator.

Any suggestions would be nice!

Thanks for the help I already have gotten!

Sincerely,

Tobias
Go to the top of the page
 
+Quote Post
John Hansen
post Nov 29 2006, 11:30 AM
Post #4


Advanced Member
***

Group: Members
Posts: 1,879
Joined: 25-October 06
From: Nashville
Member No.: 395



QUOTE(Tobias Andersson @ Nov 29 2006, 03:22 AM) *

I am still interested, though, in any way of compiling the original Mindstorms programs to file and not to brick since as it is right now I only have access to Unix or Linux computers at work and am forced to do all my programming at home. I am able to run the software under qemu (by running Windows in the emulator) but I can't access the NXT-block from the emulator.


Once upon a time I had a modified version of one of the virtual instruments (.vi) in the NXT software which saved the compiled executable to a file. I'll see if I can throw one together again.

John Hansen
Go to the top of the page
 
+Quote Post
jasonking
post Nov 29 2006, 05:52 PM
Post #5


Advanced Member
***

Group: Members
Posts: 202
Joined: 21-July 06
Member No.: 51



I'm working on a tool for this that can just be dropped in your Mindstorms folder and be accessed from the menu bar. Hopefully I'll have it done by tomorrow. I'll post it here when I have it.

J

Go to the top of the page
 
+Quote Post
Tobias Andersson
post Nov 30 2006, 08:34 AM
Post #6


Newbie
*

Group: Members
Posts: 4
Joined: 23-November 06
Member No.: 530



QUOTE(jasonking @ Nov 29 2006, 11:52 PM) *

I'm working on a tool for this that can just be dropped in your Mindstorms folder and be accessed from the menu bar. Hopefully I'll have it done by tomorrow. I'll post it here when I have it.

J


That would be great!

/Tobias
Go to the top of the page
 
+Quote Post
jasonking
post Nov 30 2006, 12:01 PM
Post #7


Advanced Member
***

Group: Members
Posts: 202
Joined: 21-July 06
Member No.: 51



The file is attached. I have tested it on mac (PPC) and Windows, but only in the retail version of the software. I think it will work with the educational version, but if someone can test it out that'd be great.

In the directory with the NXT software, make sure you have a directory called "project" under "engine". If it's not there, create it. Then copy this fille (DownloadToFile.llb) into that folder and restart the software. You will now have a menu item called "Download to File..." in the Tools menu.

It should be obvious from the UI that I'm an engineer and not a graphic designer. Hopefully it's useable enough. I didn't put a bunch of time into error handling so let me know if there are any major issues.

J
Attached File(s)
Attached File  DownloadToFile.llb ( 470.12k ) Number of downloads: 493
 
Go to the top of the page
 
+Quote Post
Pete
post Nov 30 2006, 06:45 PM
Post #8


Member
**

Group: Members
Posts: 21
Joined: 22-November 06
From: Germany, Lake of Constance
Member No.: 524



QUOTE(jasonking @ Nov 30 2006, 06:01 PM) *

In the directory with the NXT software, make sure you have a directory called "project" under "engine". If it's not there, create it. Then copy this fille (DownloadToFile.llb) into that folder and restart the software. You will now have a menu item called "Download to File..." in the Tools menu.

Hello Jason,

I've done as You described but I have not "Download to File ..." in the tools menu.
And it does not matter, if I am on the main screen of NXT-G or I start a new program.
I use the english retail version with all up to present updates.

My "Tools" menu looks like this:
- Calibrate Sensors
- Update NXT Firmware...
- Block Import and Export Wizard...

And my "C:\Programme\LEGO Software\LEGO MINDSTORMS NXT\engine\project\" directory contains the following two files:
- BlockImportExportWizard.llb
- DownloadToFile.llb

Any other settings I should do?

I am not deep into the Labview software from National Instruments, so please don't mind if I ask this questions:
What are the differences between a .llb- and a .vi-file? And where are the (dis)advantages of John Hansen's and Jason's version?
Thank You in advance.

Best regards
Pete
Go to the top of the page
 
+Quote Post
jasonking
post Nov 30 2006, 09:31 PM
Post #9


Advanced Member
***

Group: Members
Posts: 202
Joined: 21-July 06
Member No.: 51



Pete: did you restart Mindstorms after copying the .llb to the project directory? It should work just like the RemoveBadWires tool. You do need to restart the program as we populate the Tools menu by looking at the project folder when we start up the software.

A .llb is simply a single file containing a collection of .vi files. It is slightly compressed.

J
Go to the top of the page
 
+Quote Post
Ian
post Nov 30 2006, 10:56 PM
Post #10


Advanced Member
***

Group: Members
Posts: 142
Joined: 26-July 06
From: Here
Member No.: 60



QUOTE(jasonking @ Nov 30 2006, 10:01 AM) *

The file is attached.

When I tried to download it, I just got index.php. This might be why Pete is having trouble.
Go to the top of the page
 
+Quote Post
jasonking
post Nov 30 2006, 11:40 PM
Post #11


Advanced Member
***

Group: Members
Posts: 202
Joined: 21-July 06
Member No.: 51



QUOTE(Ian @ Nov 30 2006, 11:56 PM) *

When I tried to download it, I just got index.php. This might be why Pete is having trouble.


I believe this was encountered before. Some kind of problem with Internet Explorer. Try it with Firefox??
Go to the top of the page
 
+Quote Post
Pete
post Dec 1 2006, 03:57 AM
Post #12


Member
**

Group: Members
Posts: 21
Joined: 22-November 06
From: Germany, Lake of Constance
Member No.: 524



Jason,
of course I was restarting, even several times.
My OS is Win XP Prof. SP2 german, with up to date patches, IE7, Firefox 2.0.

"Remove Bad Wires Tool"? Where do I find this? In the tools menu I do not have.

Concerning "DownloadToFile.llb" I will give another try today on my office computer (same OS config as above). I'll post the results later.

Ian,
In IE7 I was downloading index.php. Renamed it to "DownloadToFile.llb". Took a look at this file with an editor, it starts with "RSRC...LVARLBVW...". So it seemed to be the correct file.

In Mozilla I was downloading a file called "162" (as the id of Jason's post), renamed it to "DownloadToFile.llb". Had same file size and file structure as the file downloaded with IE7.

Jason,
Maybe attaching future files as ZIP would be better.


Best regards
Pete
Go to the top of the page
 
+Quote Post
Tobias Andersson
post Dec 1 2006, 06:18 AM
Post #13


Newbie
*

Group: Members
Posts: 4
Joined: 23-November 06
Member No.: 530



QUOTE(jasonking @ Nov 30 2006, 06:01 PM) *

The file is attached. I have tested it on mac (PPC) and Windows, but only in the retail version of the software. I think it will work with the educational version, but if someone can test it out that'd be great.

J


GREAT! YES! IT WORKS!

This was exactly what I wanted - and it works like a charm! I am eternally grateful! Thanks a million! Now I can concentrate on getting the course planned in detailed.

Sincerely,

Tobias
Go to the top of the page
 
+Quote Post
Pete
post Dec 1 2006, 06:36 AM
Post #14


Member
**

Group: Members
Posts: 21
Joined: 22-November 06
From: Germany, Lake of Constance
Member No.: 524



Jason,

now it works (on my office computer)! Thank You for Your effort.

I compared the two files which I was downloading yesterday and today, and I've noticed that the file contents are different but the file size does not vary.
So probably the downloads last night were not working correctly on my computer at home.

By the way, today I downloaded directly from front page of http://nxtasy.org with correct file name "DownloadToFile.llb".

Best regards
Pete
Go to the top of the page
 
+Quote Post
jasonking
post Dec 1 2006, 11:24 AM
Post #15


Advanced Member
***

Group: Members
Posts: 202
Joined: 21-July 06
Member No.: 51



Glad to hear it works for everyone. Again, sorry the UI is a bit ugly...

Pete: the RemoveBadWires tool is in another post here in this forum. It's something else I built that gets installed the same way as the DownloadToFile tool.

J
Go to the top of the page
 
+Quote Post
SvenMindstorm
post Aug 23 2007, 05:59 AM
Post #16


Newbie
*

Group: Members
Posts: 2
Joined: 22-August 07
Member No.: 3,809



Hello, what did you use for compiling the file? cause I want to make something similar but then in labview for using it with the labview toolkit. But I have no idea how to compile the vi. I found a gcompiler folder in the labview toolkit, but I dont know how to work with it.
Is it possible to send me the password? happy.gif , cause the block diagram is password protected

thanks
Go to the top of the page
 
+Quote Post
SvenMindstorm
post Aug 23 2007, 08:38 AM
Post #17


Newbie
*

Group: Members
Posts: 2
Joined: 22-August 07
Member No.: 3,809



I found the vi NXT.Compiler.Core.vi and if I insert an vi reference from an example for the toolkit, I get no errors. And I get the opcode metrics en the clumps and also rcx3 activation record. So what vi can I use to to make an rxe file with this information

thanks
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

 



Lo-Fi Version Time is now: 1st August 2010 - 04:30 AM