Page 2 of 2

Re: NXT Mindstorms 2.0 Program Size limit

Posted: 05 Oct 2012, 14:12
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.

Re: NXT Mindstorms 2.0 Program Size limit

Posted: 05 Oct 2012, 14:40
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.

Re: NXT Mindstorms 2.0 Program Size limit

Posted: 05 Oct 2012, 14:42
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.

Re: NXT Mindstorms 2.0 Program Size limit

Posted: 05 Oct 2012, 14:51
by inxt-generation
It seems I did not really think about it when I posted my answer... Ignore me!

Re: NXT Mindstorms 2.0 Program Size limit

Posted: 08 Oct 2012, 17:04
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