contiki/examples/mbxxx/shell-exec
2014-12-01 20:13:09 +01:00
..
hello-world.c Fixed mbxxx platform 2013-07-11 17:56:17 +02:00
Makefile Cleanup of the Contiki network layer configuration. Now using CONTIKI_WITH_IPV6, CONTIKI_WITH_IPV4, and CONTIKI_WITH_RIME in makefiles, and UIP_CONF_IPV6, UIP_CONF_IPV4, UIP_CONF_RIME in c code. Now only the stacks that are used are compiled (via makefile MODULES). Make IPv6 the default network stack. 2014-12-01 20:13:09 +01:00
README.md Fixed mbxxx platform 2013-07-11 17:56:17 +02:00
shell-exec-test.c Fixed mbxxx platform 2013-07-11 17:56:17 +02:00

ELFloader and shell command 'exec' example for mbxxx (STM32W) platform

Compiles the Contiki hello-world application as a Contiki executable (.ce). The Contiki executable is then uploaded to the mbxxx platform via serial, and is stored in the filesystem. Finally, the executable is loaded via the shell command 'exec'.

NOTE: You may have to reduce the ELF loader memory usage (/platform/sky/contiki-conf.h). Since hello-world uses very little memory: #define ELFLOADER_CONF_DATAMEMORY_SIZE 0x100 #define ELFLOADER_CONF_TEXTMEMORY_SIZE 0x100

  1. Upload Sky shell with 'exec' command and symbols (requires several recompilations to generate correct symbols):

make make CORE=shell-exec-test.mbxxx make shell-exec-test.flash CORE=shell-exec-test.mbxxx PORT=AUTO

  1. Verify access to the shell and the filesystem:

make login DEV=/dev/comX SHELL> echo hello shell SHELL> echo test | write mytest.txt SHELL> ls SHELL> read mytest.txt [CTRL-C] to exit the shell

  1. Upload Contiki executable hello-world.ce:

make upload-executable DEV=/dev/comX [CTRL-C] to exit the shell when the entire file has been uploaded (after ~30 sec)

  1. Verify that hello-world.ce exists in CFS:

make login DEV=/dev/comX SHELL> ls SHELL> read hello-world.ce | size The last command output should equal the size of hello-world.ce in this directory!

  1. Load and start hello world: SHELL> exec hello-world.ce The program should now start: the output 'Hello, World' appears.