Now running ELF in background to enable HID comms

This commit is contained in:
Michal Moskal 2017-07-06 12:24:21 +01:00
parent 3e9a94d35f
commit afc5e643d5
4 changed files with 30 additions and 0 deletions

7
aux/build.sh Executable file
View File

@ -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

22
aux/pxt.lms Normal file
View File

@ -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)
}

BIN
aux/pxt.rbf Normal file

Binary file not shown.

View File

@ -263,6 +263,7 @@ void dumpDmesg() {
} }
void initRuntime() { void initRuntime() {
daemon(1, 1);
startTime = currTime(); startTime = currTime();
DMESG("runtime starting..."); DMESG("runtime starting...");
pthread_t disp; pthread_t disp;