From 7f3c2aaf1b7b7a7c5755e340e8afec1a10aedb8b Mon Sep 17 00:00:00 2001 From: Jaroslav Burian Date: Sat, 4 Jan 2025 23:09:12 +0100 Subject: [PATCH 1/2] change: Add target logging to Zephyr example --- examples/zephyr_example/src/main.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/examples/zephyr_example/src/main.c b/examples/zephyr_example/src/main.c index f515411..ed5db27 100644 --- a/examples/zephyr_example/src/main.c +++ b/examples/zephyr_example/src/main.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -77,5 +78,19 @@ int main(void) esp_loader_reset_target(); + if (loader_port_change_transmission_rate(DEFAULT_BAUDRATE) == ESP_LOADER_SUCCESS) { + // Delay for skipping the boot message of the targets + k_msleep(500); + + printk("********************************************\n"); + printk("*** Logs below are print from slave .... ***\n"); + printk("********************************************\n"); + while (1) { + uint8_t c; + if (uart_poll_in(esp_uart_dev, &c) == 0) { + printk("%c", c); + } + } + } return 0; } From 7abd989b7ed7049fa0cbf10f938e2f77beaf0226 Mon Sep 17 00:00:00 2001 From: Jaroslav Burian Date: Sun, 5 Jan 2025 00:26:16 +0100 Subject: [PATCH 2/2] docs: Update log output for Zephyr example This commit updates the log output for the Zephyr example with logging from target. It also removes the verison of Zephyr from the README.md which does not need to be updated manually. --- examples/zephyr_example/README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/examples/zephyr_example/README.md b/examples/zephyr_example/README.md index 0d04cda..f502a9d 100644 --- a/examples/zephyr_example/README.md +++ b/examples/zephyr_example/README.md @@ -66,21 +66,27 @@ Binaries to be flashed are placed in a separate folder (binaries.c) for each pos Here is the example's console output: -``` -*** Booting Zephyr OS build zephyr-v3.2.0-3548-ga1bb9c9d1736 *** +``` text Running ESP Flasher from Zephyr Connected to target -Baudrate changed +Transmission rate changed. Erasing flash (this may take a while)... Start programming Progress: 100 % Finished programming +Flash verified Erasing flash (this may take a while)... Start programming Progress: 100 % Finished programming +Flash verified Erasing flash (this may take a while)... Start programming Progress: 100 % Finished programming +Flash verified +******************************************** +*** Logs below are print from slave .... *** +******************************************** +Hello world! ```