pw_ide: activate.py

Provides a Python script that can be run independently of the Pigweed
environment, and execute a given shell command *within* an activated
Pigweed environment.

Why do we need this? Editors aren't aware of the Pigweed environment,
and neither are any subprocesses they spawn (unless you launch the
editor *from* an activated environment, which you might do with vim but
probably wouldn't do from VS Code). We wrap tasks that need access to
the Pigweed environment in this script.

Note that this script replicates much of the functionality already
present in the pw_env_setup module. The difference is that this script
can be run outside of the Pigweed environment and has no dependencies.
In the long run, we should find a way to merge the two in a way that
works for both use cases.

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