diff --git a/aux/build.sh b/aux/build.sh new file mode 100755 index 00000000..6eb02b96 --- /dev/null +++ b/aux/build.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +LEGO=$HOME/src/lego/lms2012 +F=`pwd`/pxt +set -xe +cd $LEGO/lmssrc/adk/lmsasm +java -jar assembler.jar $F diff --git a/aux/pxt.lms b/aux/pxt.lms new file mode 100644 index 00000000..a4334a2f --- /dev/null +++ b/aux/pxt.lms @@ -0,0 +1,22 @@ +define appv 'RunAndWaitForEsc V0.00' +vmthread MAIN +{ + DATA8 State + DATA32 Status + //DATA32 Timer + + UI_WRITE(LED,LED_RED) + UI_DRAW(TEXT,FG_COLOR,48,62,'Starting...') + UI_DRAW(UPDATE) + SYSTEM('../prjs/BrkProg_SAVE/binary.elf', Status) +Loop: + UI_BUTTON(WAIT_FOR_PRESS) + UI_BUTTON(SHORTPRESS,BACK_BUTTON,State) + JR_FALSE(State,Loop) + //UI_WRITE(LED,LED_RED) + //TIMER_WAIT(1000, Timer) + //TIMER_READY(Timer) + UI_DRAW(TEXT,FG_COLOR,48,62,'Bye!') + UI_DRAW(UPDATE) +} + diff --git a/aux/pxt.rbf b/aux/pxt.rbf new file mode 100644 index 00000000..1e4c6c00 Binary files /dev/null and b/aux/pxt.rbf differ diff --git a/libs/core/linux.cpp b/libs/core/linux.cpp index 0fcb36d0..0ae94ecf 100644 --- a/libs/core/linux.cpp +++ b/libs/core/linux.cpp @@ -263,6 +263,7 @@ void dumpDmesg() { } void initRuntime() { + daemon(1, 1); startTime = currTime(); DMESG("runtime starting..."); pthread_t disp;