NXT Mindstorms 2.0 Program Size limit

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: NXT Mindstorms 2.0 Program Size limit

Post by HaWe »

Yes, programs are stored on the flash and are loaded to RAM for execution, that's what I said.
I actually doubt that only 30kByte of RAM are available to the user (as you wrote), because already my astar variable memory takes about 30 kByte and the astar (byte)code is about 9000 on the flash.

e.g., my chess program has a (byte)code size of 61680 on the flash. It still fits into the RAM when loaded.
Last edited by HaWe on 05 Oct 2012, 14:40, edited 1 time in total.
spillerrec
Posts: 358
Joined: 01 Oct 2010, 06:37
Location: Denmark
Contact:

Re: NXT Mindstorms 2.0 Program Size limit

Post by spillerrec »

doc-helmut wrote:Yes, programs are stored on the flash and are loaded to RAM for execution, that's what I said.
That is indeed what you said, but it is still wrong. In this VM, the program is not loaded into RAM, it stays on the flash. The Firmware reserves 32kB of the RAM for its own use and the remaining 32kB is used for storing program variables.
It is true that most systems do load the program code into RAM, but that is not the case with this VM.

I don't remember the specification saying anything about a maximal size of the program code, but there might be some practical issues that I'm not aware of.
My blog: http://spillerrec.dk/category/lego/
RICcreator, an alternative to nxtRICeditV2: http://riccreator.sourceforge.net/
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: NXT Mindstorms 2.0 Program Size limit

Post by HaWe »

It is true that most systems do load the program code into RAM, but that is not the case with this VM
ok, that is really new to me - I stand corrected.
inxt-generation
Posts: 290
Joined: 03 Oct 2011, 00:06
Location: Gallifrey
Contact:

Re: NXT Mindstorms 2.0 Program Size limit

Post by inxt-generation »

It seems I did not really think about it when I posted my answer... Ignore me!
A.K.A. NeXT-Generation.
"A kingdom of heaven for RobotC now has recursion!"
hassenplug
Posts: 346
Joined: 27 Sep 2010, 03:05
Contact:

Re: NXT Mindstorms 2.0 Program Size limit

Post by hassenplug »

spillerrec wrote:I don't remember the specification saying anything about a maximal size of the program code, but there might be some practical issues that I'm not aware of.
Again, I don't recall the exact details, but (as stated before) there's a limit to the size of a program that can be stored in flash, and that limit is not the same as the amount of space available. I think it has to do with how the VM access memory, and it may not be a limitation in the Enhanced firmware.

Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest