zephyr/samples
Fabrice Olivero b551a447b0 samples/task_profiler: fix crash when starting profiler
When profiler is started from shell, platform information is
transmitted over uart by calling uart_poll_out(uart_dev)
directly in the shell fiber context which is executed when
the command is entered ('prof start')

Problem is that 'uart_dev' global variable is set to the UART
console device when prof_flush() first call is done.

Depending on when this call happens (application dependent,
especially in nano-apps which have to call prof_flush in
their main loop), 'prof start' may happen before 'uart_dev'
variable is actually set, which drives to shell fiber crash.

This patches moves sending platform information from shell
fiber to prof_flush function to avoid using non initialized
'uart_dev' variable.

Change-Id: Ie64f4418a745affa3fbd731db6bf9bb998b7c2f9
Signed-off-by: Fabrice Olivero <fabrice.olivero@intel.com>
2016-06-22 05:30:26 +00:00
..
bluetooth Bluetooth: samples: Unify config for QEMU and Arduino101 targets 2016-06-15 12:17:06 +00:00
cpp_synchronization testcases: sanity check TCs get more language for real HW 2016-06-14 23:49:56 +00:00
drivers sys_log: replace old debug macro on ADC driver sample. 2016-06-20 20:40:31 +00:00
environmental_sensing samples: environmental sensing: fix BMP280 kconfig options 2016-06-03 12:00:20 +03:00
hello_world
ipm
kernel_event_logger testcases: sanity check TCs get more language for real HW 2016-06-14 23:49:56 +00:00
net samples/net/zperf: add task profiler support 2016-06-16 18:10:29 +00:00
nfc/nfc_hello sanitycheck: allow for more expressive filtering in testcase.ini 2016-05-04 22:57:39 +00:00
philosophers testcases: sanity check TCs get more language for real HW 2016-06-14 23:49:56 +00:00
power rtc: unify kconfig variable names 2016-05-12 10:57:24 +00:00
sensor sensor: remove CONFIG_SENSOR_DEBUG 2016-05-21 21:20:13 +00:00
shell console: shell: Add return to command callback 2016-05-23 11:00:21 +03:00
synchronization testcases: sanity check TCs get more language for real HW 2016-06-14 23:49:56 +00:00
task_profiler samples/task_profiler: fix crash when starting profiler 2016-06-22 05:30:26 +00:00