Page 2 of 2

Re: NXT Forth compiler

Posted: 11 Jan 2012, 18:31
by HaWe
it's based on a different fw, but the fw bootloader is based on the std-fw .
it first loads the nxtOSEK-fw automatically into the RAM, and then the nxtOSEK program files.

Later you may first load the nxtOSEK fw automatically, then you have more programming features.

Re: NXT Forth compiler

Posted: 11 Jan 2012, 20:45
by afanofosc
What the enhanced NBC/NXC firmware supports is a convention that was established between myself and a fellow whose name is escaping me at the moment. An RXE file that you attempt to run on the enhanced firmware can actually be a NxOS or nxtOSEK executable (renamed) with a different header than the one that a normal RXE file contains.

Here's the magic code from cCmdReadFileHeader:

Code: Select all

  if (strncmp((PSZ)pData, "NXTBINARY", VM_FORMAT_STRING_SIZE) == 0)
  {
    ULONG NativeOffset;
    pCursor = (pData + 12);
    NativeOffset = (ULONG)(*pCursor);
    void (*native)(ULONG, ULONG) = (void (*)())(pData + NativeOffset);
    (*native)((ULONG)pData, DataSize);
    NXT_BREAK;
    return (ERR_VER);
  }
John Hansen

Re: NXT Forth compiler

Posted: 11 Jan 2012, 21:56
by HaWe
is this a subtle joke?
a convention that was established between myself and a fellow whose name is escaping me at the moment
Is there a story we should know...?^^

Re: NXT Forth compiler

Posted: 12 Jan 2012, 03:28
by afanofosc
Sorry about that. I just couldn't remember Sivan Toledo's name earlier today. He came up with the scheme for running a native code executable from memory and I implemented support for the scheme.

http://www.tau.ac.il/~stoledo/lego/nxt-native/

John Hansen

Re: NXT Forth compiler

Posted: 12 Jan 2012, 03:32
by tcwan
afanofosc wrote:Sorry about that. I just couldn't remember Sivan Toledo's name earlier today. He came up with the scheme for running a native code executable from memory and I implemented support for the scheme.

http://www.tau.ac.il/~stoledo/lego/nxt-native/

John Hansen
Yes, and NxOS (aholler branch, and subsequently my branch nxos-armdebug) has incorporated that mechanism.