User Tools

Site Tools


Sidebar

**The OOBD Book** Download as [[epub|eBook]] \\ Download as [[https://drive.google.com/folderview?id=0B795A63vSunRbk1jc3U5VFFJbkU&usp=sharing|PDF / Mobi]] * [[start|Documentation]] * Installation * [[startup_javame|OOBD-ME (Mobile Phones)]] * [[startup_android|OOBD-Android]] * [[startup_windows|Windows OOBDesk]] * [[startup_embedded|Raspi & Co]] * [[startup_usage|Start the programs]] * [[startup_oobdscript|First Success: Run the OOBD script]] * [[lua_start|Lua in OOBD]] * [[tools_quickscript|Click your Script: Quick Script]] * [[lua_make-your-own-scripts|Make your own OOBD Scripts]] * [[lua_tutorial|The OOBD Lua Tutorial]] * [[lua_make|Lua Build Enviroment]] * Web UI * [[:de:doc:webui_tutorial|Web User Interface Tutorial(German)]] * [[webui_guide|Web UI Package structure]] * [[:de:doc:webui_simulator|UI Emulator for development(German)]] * [[hw_start|The OOBD Hardware]] * [[hw_quickstart|OOBD Cup Quick Start]] * [[hw_assembly-cupv5|Build your own Dongle]] * [[hw_busswitch|Add a second Bus to DXM]] * [[hw_bootloader|Flash the Bootloader]] * [[hw_firmware|Flash the Firmware]] * [[hw_flash-from-usb-stick|Flash the Firmware from USB-Stick]] * [[hw_commands|The Firmware Commands]] * [[tools_start|The OOBD Utilities]] * [[tools_kadaver|Kadaver]] * [[tools_quickscript|Quick Script]] * [[tools_cortex-crc32|Cortex-CRC32]] * [[tools_filelist|Filelist]] * [[tools_olp|OLP]] * [[tools_oobdcopyshop|OOBDCopyShop]] * [[tools_oobdtemple|oobdtemple]] * [[tools_oodbcreate|OODBCreate]] * [[tools_opendiagx|OpenDiagX]] * [[tools_oobdcmd|OOBDcmd]] * [[tools_oobdflash|OOBDFlash]] * PGP * [[pgp_setup|Install PGP Keys]] * [[dev_start|Development]] * [[dev_googlesetup|Join the News]] * Setup your Developer Environment * [[dev_cygwininstall|CygWin Environment]] * [[dev_setupswing|Java Swing]] * [[dev_setupme|Java ME]] * [[dev_setupandroid|Android]] * [[dev_androidlivecd|The Android Debug Live CD]] * [[dev_setupfirmware|Firmware]] * [[dev_clientdesignguide|User Interface Design Guide]] * [[dev_systemspec|The OOBD System Spec]] * [[dev_readotherformats|Import XML files]] * [[dev_links|Link Collection]] * [[dev_roadmap|Road Map]] * [[rfc_start|Specifications (RFC)]] * [[rfc_firmware_syntax|OOBD Firmware: General Command Syntax]] * [[rfc_canuds-mode|OOBD Firmware: Protocol : UDS (P 6 ..)]] * [[rfc_canraw-mode|OOBD Firmware: Protocol : CANraw (P 6 ..)]] * [[rfc_rtd-real-time-data-protocol-for-the-oobd-firmware|OOBD Firmware: Protocol : Real Time Data (RTD) (P 6 ..)]] * [[rfc_pgp-encrypting-sensible-data-with-pgp|PGP Principle]] * [[rfc_onion|The ONION Message Format]] * [[faq|Frequently Asked Questions]]

doc:dev_blockly

How to set up Blockly

This is more a installation scrapbook from the OOBD team themself as anything the normal developer need to be worried about, so just forget this page :-)

Install emscripten

The package under Ubuntu 14.04 is too old (1.10), but we'll need 1.12.1 to have the fastcomp compiler active. The older version generates a 'undefined setjmp()' error

So download the actual SDK and build it locally.

Compile Luac as javascript binary

Download the actual lua archive (http://www.lua.org/ftp/). Keep in mind that OOBD (actual) still uses the older lua 5.1 system. Unpack the archive and do some modifications in the make files:

in main Makefile, add a new target (emcc):

# Convenience platforms targets.
PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris emcc

In scr/Makefile

replace the gcc compiler against emcc

CC= emcc

make a note of the compiler flags, which are used (e.g. -O2 -Wall), as they are used again later.

Make sure not to use the -DLUA_USE_POSIX directive, because it makes the compiler to use _setjmp/_longjmp instead a “normal” setjmp/longjmp, which fails later when you run the .js result….

comment the LIBS directive, as it seems not to be used and creates a warning

# LIBS= -lm $(MYLIBS)

creates a new target with only luac, but without lua itself

ALL_C= $(LUA_A) $(LUAC_T)
comp:   $(ALL_C)

Add the new defined target as emcc build target

      
emcc:
      $(MAKE) comp MYCFLAGS=

Start the build process

emmake make emcc

change into the source dir

cd src/

build luac.js

emcc -O2 -Wall  -o luac.js  luac.o print.o liblua.a

test it

nodejs luac.js

build html wrapper

emcc -o luac.html  luac.o print.o liblua.a

and load it via local webserver (php -S localhost:8000) into browser for testing

Create own blockly Content

cp blockly_compressed.js blockly_uncompressed.js lua_compressed.js ../web/blockly/
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information
doc/dev_blockly.txt · Last modified: 2015/01/04 15:09 by admin