Size limit on firmware?

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: roger, 99jonathan, imaqine

Size limit on firmware?

Postby spivey » Tue May 01, 2012 10:00 am

I'm beginning with a couple of my students to look at supporting a different VM on the NXT brick. We're planning to use as much code as we can from leJOS -- particularly the device drivers, but to replace the Java bytecode interpreter with one of our own, a version of the Keiko virtual machine that we use for compiler teaching in Oxford. I hope people won't mind if I ask a few questions here about system details that I haven't been able to discover from documents or by reading the code. In return, I'll post a few howto's about what we discover along the way.

My first question is this: Is there a limit on the size of the firmware? I see in NXJFlashUpdate.java that there's a constant MAX_FIRMWARE_PAGES that's set to 408 (in units of 256 bytes), but that constant varies from one version of leJOS to the next, so I'm guessing it just defines how much space is reserved, therefore where the filesystem starts in the flash. I see the native part of the firmware is coming in about 55K, so I wonder whether there's perhaps a 64K limit that matters? If not, then we will create our initial attempts by adding the bytecode interpreter for Keiko and keeping the JVM interpreter too, so that we can continue to use the Java-based menu system until we make one of our own. That will push us over 64K for a while!

Thanks in advance for any replies,

-- Mike Spivey
spivey
New User
 
Posts: 2
Joined: Mon Apr 30, 2012 9:47 pm

Re: Size limit on firmware?

Postby gloomyandy » Tue May 01, 2012 11:16 am

Hi,
I don't think there is a 64Kb limit for code, there certainly is for the current leJOS garbage collector (but this is due to design decisions in the software rather than any hardware issues). You are correct in that the sizes set in the firmware basically just tell it how much space has been used by the firmware and the menu system and hence how much space is available for the file system.

Good luck with the project, let us know how you get on....

Oh and are there any papers etc. that describe Keiko? A quick search turned up...
http://spivey.oriel.ox.ac.uk/corner/Des ... ts_for_OBC (I assume the corner is yours!) and
http://peterdn.com/files/A_JIT_Translat ... Oberon.pdf

Is there anything else?

It's a long time since I looked at Oberon and Niklaus Wirth. It took me back a bit. I spent a lot of time playing/working with Pascal-S and the Pascal P compiler along with Solo and the original version of Modula in my undergraduate years, interesting to see how things have developed...

All the best
Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3003
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Size limit on firmware?

Postby spivey » Tue May 01, 2012 2:42 pm

Andy,

Thanks for your reply. There are other pages on my wiki about Keiko that are more up to date, especially the ones associated with my lecture course on Compilers that you can find from the left panel. We'll have to modify the machine a bit to remove the relocation phase that follows program loading and make it possible to run programs unmodified from flash memory.

As always with embedded stuff, we will keep ourselves sane by moving very slowly and changing one thing at a time, perhaps deliberately inflating the firmware beyond 64k before relying on that to work.

Forgive my mentioning it, but the GC's limitation to 64K can't pose a problem because the brick only has 64K of RAM all told. Was the GC your work? It's very nice; I don't know if we can do as nice a GC for Oberon, because the problem is quite a bit harder. (Wirth's implementations never included a general GC.)

I'll keep you posted, no doubt.

-- Mike
spivey
New User
 
Posts: 2
Joined: Mon Apr 30, 2012 9:47 pm


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 4 guests

cron
more stuff