zephyr/kernel
Inaky Perez-Gonzalez c51f73f77f boot: add CONFIG_BOOT_DELAY option
Introduce a configurable boot delay option (defaulting to none) that
happens right after printing a boot delay banner, #before calling
main() in kernel/init.c:_main(), before taking timestamps for _main()
and once all the infrastructure is in place. Move also the boot banner
to happen after this delay.

The rationale for this is some boards will boot really fast and print
out some test case output in the serial port before the system that is
monitoring the serial port is able to read from the serial port.

This happens in MCUs whose serial port is embedded in a USB connection
which also is used to power the MCU board. When powering it on by
powering the USB port, there is a time it takes the host system to
detect the USB connection, enumerate the serial port, configure it and
load, start and read from the serial port. At this time, it might have
printed the output of the serial port.

While manually it is possible to press a reset button, on automation
setups this adds a lot of overhead and cabling or modifications to the
MCU that are easier (and cheaper) to overcome with this delay. Other
options (like using a separate serial line) might not be possible or
add a lot of cabling and cost, plus it'd also add extra build
configuration.

Change-Id: I2f4d1ba356de6cefa19b4ef5c9f19f87885d4dfd
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2017-07-18 08:31:45 +03:00
..
configs kernel: add LEGACY_KERNEL option 2017-01-09 19:42:13 +00:00
include stack_sentinel: change cooperative check 2017-06-08 13:49:36 -05:00
alert.c kernel: make K_.*_INITIALIZER private to kernel 2017-07-10 11:44:56 -07:00
atomic_c.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
compiler_stack_protect.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
device.c Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
errno.c kernel: errno: Use per-thread accessor function compatible with Newlib 2017-05-10 20:54:56 -04:00
idle.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
init.c boot: add CONFIG_BOOT_DELAY option 2017-07-18 08:31:45 +03:00
int_latency_bench.c Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
Kconfig boot: add CONFIG_BOOT_DELAY option 2017-07-18 08:31:45 +03:00
Kconfig.event_logger kernel: Add thread events to kernel event logger 2017-04-25 02:16:36 +00:00
Kconfig.power_mgmt doc: spelling fixes in Kconfig files 2017-06-12 19:40:51 -04:00
mailbox.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
Makefile k_mem_pool: Complete rework 2017-05-13 14:39:41 -04:00
mem_slab.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
mempool.c k_mem_pool: Complete rework 2017-05-13 14:39:41 -04:00
msg_q.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
mutex.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
pipes.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
poll.c Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
queue.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
sched.c kernel: fix short time-slice reset 2017-06-02 14:47:01 -04:00
sem.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
stack.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
sys_clock.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
system_work_q.c kernel: introduce stack definition macros 2017-06-09 18:53:28 -04:00
thread_abort.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
thread.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
timer.c kernel: make sure that CONFIG_OBJECT_TRACING structs are properly ifdef'ed 2017-05-18 12:41:56 -05:00
version.c Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
work_q.c kernel: add k_thread_create() API 2017-05-11 20:24:22 -04:00