NXT Forth compiler

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

Re: NXT Forth compiler

Post 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.
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: NXT Forth compiler

Post 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
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: NXT Forth compiler

Post 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...?^^
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: NXT Forth compiler

Post 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
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
tcwan
Posts: 186
Joined: 30 Sep 2010, 07:39

Re: NXT Forth compiler

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests