Shell: start automatically whenver the module is included

This commit is contained in:
Simon Duquennoy 2017-10-12 09:15:39 +02:00
parent b838fc2ebb
commit a1f74d6568
10 changed files with 71 additions and 1 deletions

View File

@ -68,6 +68,9 @@
#include "reg.h"
#include "ieee-addr.h"
#include "lpm.h"
#if BUILD_WITH_SHELL
#include "serial-shell.h"
#endif /* BUILD_WITH_SHELL */
#include <stdint.h>
#include <string.h>
@ -224,6 +227,10 @@ main(void)
energest_init();
ENERGEST_ON(ENERGEST_TYPE_CPU);
#if BUILD_WITH_SHELL
serial_shell_init();
#endif /* BUILD_WITH_SHELL */
autostart_start(autostart_processes);
watchdog_start();

View File

@ -61,7 +61,9 @@
#include "dev/vib-sensor.h"
#include "sys/node-id.h"
#if BUILD_WITH_SHELL
#include "serial-shell.h"
#endif /* BUILD_WITH_SHELL */
/* JNI-defined functions, depends on the environment variable CLASSNAME */
#ifndef CLASSNAME
@ -258,6 +260,10 @@ contiki_init()
/* Start serial process */
serial_line_init();
#if BUILD_WITH_SHELL
serial_shell_init();
#endif /* BUILD_WITH_SHELL */
/* Start autostart processes (defined in Contiki application) */
print_processes(autostart_processes);
autostart_start(autostart_processes);

View File

@ -96,6 +96,10 @@ extern uint32_t heap_location;
#include "experiment-setup.h"
#endif
#if BUILD_WITH_SHELL
#include "serial-shell.h"
#endif /* BUILD_WITH_SHELL */
/* _EXTRA_LPM is the sleep mode, _LPM is the doze mode */
#define ENERGEST_TYPE_EXTRA_LPM ENERGEST_TYPE_LPM
@ -346,6 +350,10 @@ main(void)
auto-start processes */
(void)u32AHI_Init();
#if BUILD_WITH_SHELL
serial_shell_init();
#endif /* BUILD_WITH_SHELL */
start_autostart_processes();
leds_off(LEDS_ALL);

View File

@ -69,6 +69,10 @@
#include "net/ipv6/uip-ds6.h"
#endif /* NETSTACK_CONF_WITH_IPV6 */
#if BUILD_WITH_SHELL
#include "serial-shell.h"
#endif /* BUILD_WITH_SHELL */
#ifdef SELECT_CONF_MAX
#define SELECT_MAX SELECT_CONF_MAX
#else
@ -274,6 +278,10 @@ main(int argc, char **argv)
serial_line_init();
#if BUILD_WITH_SHELL
serial_shell_init();
#endif /* BUILD_WITH_SHELL */
autostart_start(autostart_processes);
/* Make standard output unbuffered. */

View File

@ -69,6 +69,10 @@
#endif
#endif
#if BUILD_WITH_SHELL
#include "serial-shell.h"
#endif /* BUILD_WITH_SHELL */
#if defined(SOFTDEVICE_PRESENT) && PLATFORM_INDICATE_BLE_STATE
PROCESS(ble_iface_observer, "BLE interface observer");
@ -178,6 +182,11 @@ main(void)
#endif /* SOFTDEVICE_PRESENT */
process_start(&sensors_process, NULL);
#if BUILD_WITH_SHELL
serial_shell_init();
#endif /* BUILD_WITH_SHELL */
autostart_start(autostart_processes);
watchdog_start();

View File

@ -72,6 +72,10 @@
#include "ieee-addr.h"
#include "lpm.h"
#if BUILD_WITH_SHELL
#include "serial-shell.h"
#endif /* BUILD_WITH_SHELL */
#include <stdint.h>
#include <string.h>
#include <stdio.h>
@ -220,6 +224,10 @@ main(void)
energest_init();
ENERGEST_ON(ENERGEST_TYPE_CPU);
#if BUILD_WITH_SHELL
serial_shell_init();
#endif /* BUILD_WITH_SHELL */
autostart_start(autostart_processes);
watchdog_start();

View File

@ -53,6 +53,10 @@
#include "cfs/cfs-coffee.h"
#include "sys/autostart.h"
#if BUILD_WITH_SHELL
#include "serial-shell.h"
#endif /* BUILD_WITH_SHELL */
#if DCOSYNCH_CONF_ENABLED
static struct timer mgt_timer;
#endif
@ -306,6 +310,10 @@ main(int argc, char **argv)
watchdog_start();
#if BUILD_WITH_SHELL
serial_shell_init();
#endif /* BUILD_WITH_SHELL */
#if !PROCESS_CONF_NO_PROCESS_NAMES
print_processes(autostart_processes);
#endif /* !PROCESS_CONF_NO_PROCESS_NAMES */

View File

@ -71,6 +71,10 @@
#include "driverlib/driverlib_release.h"
#if BUILD_WITH_SHELL
#include "serial-shell.h"
#endif /* BUILD_WITH_SHELL */
#include <stdio.h>
/*---------------------------------------------------------------------------*/
unsigned short node_id = 0;
@ -226,6 +230,10 @@ main(void)
process_start(&sensors_process, NULL);
#if BUILD_WITH_SHELL
serial_shell_init();
#endif /* BUILD_WITH_SHELL */
autostart_start(autostart_processes);
watchdog_start();

View File

@ -71,6 +71,9 @@
#include "ieee-addr.h"
#include "lpm.h"
#include "sys/autostart.h"
#if BUILD_WITH_SHELL
#include "serial-shell.h"
#endif /* BUILD_WITH_SHELL */
#include <stdint.h>
#include <string.h>
@ -286,6 +289,10 @@ main(void)
energest_init();
ENERGEST_ON(ENERGEST_TYPE_CPU);
#if BUILD_WITH_SHELL
serial_shell_init();
#endif /* BUILD_WITH_SHELL */
autostart_start(autostart_processes);
watchdog_start();

View File

@ -0,0 +1 @@
CFLAGS += -DBUILD_WITH_SHELL=1