TockOS /
Hail
Hail Board The Hail Board uses a ATSAM4LC8BA, which has 512K Flash and 64K SRAM.
To get started on the Mac, see https://github.com/cxbrooks/tock/blob/cxbrooks/hail/mac/boards/hail/README.md Be sure to use the note: /opt/local/lib/gcc/arm-none-eabi/5.1.0/../../../../arm-none-eabi/bin/ld: cannot find crt0.o: No such file or directory Be sure to update your path: export PATH=/usr/local/Cellar/arm-none-eabi-gcc/5-2016-q3-update/bin:${PATH} The Hail uses a USB MicroB connector and typically comes provisioned with the
Hail ExamplesThe user programs are in Mac OS X: To compile and upload an example, plug in the board and then run bash-3.2$ ls -ltr /dev/tty* | tail crw-rw-rw- 1 root wheel 4, 4 Jan 7 10:03 /dev/ttyp4 crw-rw-rw- 1 root wheel 4, 3 Jan 7 10:03 /dev/ttyp3 crw-rw-rw- 1 root wheel 4, 2 Jan 7 10:03 /dev/ttyp2 crw-rw-rw- 1 root wheel 4, 1 Jan 7 10:03 /dev/ttyp1 crw-rw-rw- 1 root wheel 4, 0 Jan 7 10:03 /dev/ttyp0 crw-rw-rw- 1 root wheel 18, 0 Jan 7 10:03 /dev/tty.Bluetooth-Incoming-Port crw-rw-rw- 1 root wheel 18, 2 Jan 7 12:35 /dev/tty.usbserial-00001014 crw--w---- 1 cxh tty 16, 1 Jan 7 12:36 /dev/ttys001 crw-rw-rw- 1 root wheel 2, 0 Jan 7 12:37 /dev/tty crw--w---- 1 cxh tty 16, 0 Jan 7 12:37 /dev/ttys000 bash-3.2$
If the port is not visible, reboot or see Mac OS Missing TTY Port To compile TockOS and upload, run: cd tockos/boards/hail make PORT=/dev/tty.usbserial-00001014 TOCK_BOARD=hail program To install the blink program: cd ../../userland/examples/blink make PORT=/dev/tty.usbserial-00001014 TOCK_BOARD=hail program Hail Read from Stdouttock/userland/examples/c_hello prints to stdout. To read from stdout, use bash-3.2$ pwd /Users/cxh/src/hail/tock/userland/examples/c_hello bash-3.2$ cat main.c /* vim: set sw=2 expandtab tw=80: */ #include <string.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <console.h> char hello[] = "Hello World!\r\n"; void nop() {} int main() { putnstr_async(hello, sizeof(hello), nop, NULL); return 0; } bash-3.2$ make PORT=/dev/tty.usbserial-00001014 TOCK_BOARD=hail program DEP main.c CC main.c CC ../../libtock/FXOS8700CQ.c .. CC ../../libtock/tsl2561.c AR ../../libtock/build/cortex-m4/libtock.a LD build/cortex-m4/app.elf BIN build/cortex-m4/app.bin Finished debug [unoptimized + debuginfo] target(s) in 0.0 secs Running `/Users/cxh/src/hail/tock/userland/tools/elf2tbf/target/debug/elf2tbf -n c_hello -o build/cortex-m4/app.bin build/cortex-m4/app.elf` tockloader --port /dev/tty.usbserial-00001014 flash --address 0x30000 build/cortex-m4/app.bin Wrote 1024 bytes in 0.128 seconds CRC check passed. Binaries successfully loaded. bash-3.2$ tockloader --port /dev/tty.usbserial-00001014 listen Hello World! ␀ C-c C-cbash-3.2$ However, note that running two Instead, use Hail Duktape Build
Hail ProblemsHail JTAGThe Hail board has two JTAG ports, one on the top for the ARM chip, one on the bottom for the NRF BLE Chip (Need to verify this)
See Also
|