summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hansen2010-11-29 13:26:57 +0100
committerNicolas Schodet2010-11-29 13:38:10 +0100
commita71fd1b78f6e2ead46f374ca19f0f8eaf7de99d2 (patch)
tree62e547c13c6df7b901fe1d077a08b5483e3952eb
parent3b2647cd33fe16f372f1c3c99d16282ea0b74bbd (diff)
add support for native executableARMDEBUG_BASELINE
Enable the use of native compiled program from standard firmware interface. See http://www.tau.ac.il/~stoledo/lego/nxt-native/ for more details. Imported from NXT Enhanced Firmware.
-rw-r--r--AT91SAM7S256/Source/c_cmd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/AT91SAM7S256/Source/c_cmd.c b/AT91SAM7S256/Source/c_cmd.c
index 4ce9829..7483846 100644
--- a/AT91SAM7S256/Source/c_cmd.c
+++ b/AT91SAM7S256/Source/c_cmd.c
@@ -1425,6 +1425,16 @@ NXT_STATUS cCmdReadFileHeader(UBYTE* pData, ULONG DataSize,
NXT_ASSERT(pData != NULL);
+ 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);
+ }
//Assign pCursor to point to version word inside file header
pCursor = (pData + VM_FORMAT_STRING_SIZE - 2);