pw_watch: Single log window fullscreen UI

Full screen pw_watch user interface that provides a single log window
with pw_watch messages and ninja output. Build status, Ninja build
steps, and error counts are shown in a 1 line toolbar at the top.

Tab and Shift-Tab are bound to jump to the next and previous Ninja
build failure. Additionally, output will stop on the first failure.

Bug fixes:

- pw_log.install FileHandler was not setting utf-8 encoding.

- pw_watch build directories were not added to the exclude_list.
  This caused out directories with names other than `out` to not
  rebuild.

- pw_watch --no-restart option wasn't functioning. Added a check
  plus additional log message saying if a build will be triggered
  whenever files change.

Other Changes:

- pw_cli.branding.banner() changed to color each line individually
  instead of only at the beginning of the banner text. Before this
  change an extra line was invisibly being added to the end of the
  banner due to appending the clear color ansi escape sequence. To
  preserve the line spacing presentation an extra_text arg was added
  defaulting to `\n`.

- Default ansi color theme for console and pw_watch --fullscreen. This
  will use ansi color codes only for themeing.

- Rename --watch-app flag to --fullscreen

- Remove **vars(args) calls in watch.py. This was making debugging
  harder as it is less obvious what gets passed to watch_setup().

- New flag --no-banners to hide large Pass/Fail ASCII art.

Change-Id: I9167e5f69e270ff2b717f812651c7ac416ad74b8
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/81983
Reviewed-by: Rob Mohr <mohrr@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Anthony DiGirolamo <tonymd@google.com>
14 files changed
tree: 16c57317a7ca6156e675ec79fe1c04f7a4449466
  1. build_overrides/
  2. docker/
  3. docs/
  4. pw_allocator/
  5. pw_analog/
  6. pw_android_toolchain/
  7. pw_arduino_build/
  8. pw_assert/
  9. pw_assert_basic/
  10. pw_assert_log/
  11. pw_assert_tokenized/
  12. pw_assert_zephyr/
  13. pw_base64/
  14. pw_bloat/
  15. pw_blob_store/
  16. pw_bluetooth_hci/
  17. pw_boot/
  18. pw_boot_cortex_m/
  19. pw_build/
  20. pw_build_info/
  21. pw_build_mcuxpresso/
  22. pw_bytes/
  23. pw_checksum/
  24. pw_chrono/
  25. pw_chrono_embos/
  26. pw_chrono_freertos/
  27. pw_chrono_stl/
  28. pw_chrono_threadx/
  29. pw_chrono_zephyr/
  30. pw_cli/
  31. pw_console/
  32. pw_containers/
  33. pw_cpu_exception/
  34. pw_cpu_exception_cortex_m/
  35. pw_crypto/
  36. pw_docgen/
  37. pw_doctor/
  38. pw_env_setup/
  39. pw_file/
  40. pw_function/
  41. pw_fuzzer/
  42. pw_hdlc/
  43. pw_hex_dump/
  44. pw_i2c/
  45. pw_interrupt/
  46. pw_interrupt_cortex_m/
  47. pw_interrupt_zephyr/
  48. pw_kvs/
  49. pw_libc/
  50. pw_log/
  51. pw_log_basic/
  52. pw_log_null/
  53. pw_log_rpc/
  54. pw_log_string/
  55. pw_log_tokenized/
  56. pw_log_zephyr/
  57. pw_malloc/
  58. pw_malloc_freelist/
  59. pw_metric/
  60. pw_minimal_cpp_stdlib/
  61. pw_module/
  62. pw_multisink/
  63. pw_package/
  64. pw_persistent_ram/
  65. pw_polyfill/
  66. pw_preprocessor/
  67. pw_presubmit/
  68. pw_protobuf/
  69. pw_protobuf_compiler/
  70. pw_random/
  71. pw_result/
  72. pw_ring_buffer/
  73. pw_router/
  74. pw_rpc/
  75. pw_snapshot/
  76. pw_software_update/
  77. pw_span/
  78. pw_spi/
  79. pw_status/
  80. pw_stm32cube_build/
  81. pw_stream/
  82. pw_string/
  83. pw_symbolizer/
  84. pw_sync/
  85. pw_sync_baremetal/
  86. pw_sync_embos/
  87. pw_sync_freertos/
  88. pw_sync_stl/
  89. pw_sync_threadx/
  90. pw_sync_zephyr/
  91. pw_sys_io/
  92. pw_sys_io_arduino/
  93. pw_sys_io_baremetal_lm3s6965evb/
  94. pw_sys_io_baremetal_stm32f429/
  95. pw_sys_io_mcuxpresso/
  96. pw_sys_io_stdio/
  97. pw_sys_io_stm32cube/
  98. pw_sys_io_zephyr/
  99. pw_system/
  100. pw_target_runner/
  101. pw_thread/
  102. pw_thread_embos/
  103. pw_thread_freertos/
  104. pw_thread_stl/
  105. pw_thread_threadx/
  106. pw_tls_client/
  107. pw_tls_client_boringssl/
  108. pw_tls_client_mbedtls/
  109. pw_tokenizer/
  110. pw_tool/
  111. pw_toolchain/
  112. pw_trace/
  113. pw_trace_tokenized/
  114. pw_transfer/
  115. pw_unit_test/
  116. pw_varint/
  117. pw_watch/
  118. pw_web_ui/
  119. pw_work_queue/
  120. targets/
  121. third_party/
  122. zephyr/
  123. .bazelignore
  124. .bazelrc
  125. .clang-format
  126. .clang-tidy
  127. .eslintrc.json
  128. .gitattributes
  129. .gitignore
  130. .gn
  131. .prettierrc.js
  132. .pylintrc
  133. activate.bat
  134. Android.bp
  135. AUTHORS
  136. bootstrap.bat
  137. bootstrap.sh
  138. BUILD.bazel
  139. BUILD.gn
  140. BUILDCONFIG.gn
  141. CMakeLists.txt
  142. Kconfig.zephyr
  143. LICENSE
  144. modules.gni
  145. OWNERS
  146. package.json
  147. PW_PLUGINS
  148. README.md
  149. tsconfig.json
  150. WORKSPACE
  151. yarn.lock
README.md

Pigweed

Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.

For more information please see our website: https://pigweed.dev/

Links