Pigweed Live Notes: 2023-08-28

12 views
Skip to first unread message

chadn...@google.com

unread,
Aug 28, 2023, 9:30:51 PM8/28/23
to
2023-08-28
Landed recently highlights (full changelog)
  • pw_tokenizer
  • pw_toolchain: Major progress on Bazel toolchains
  • pw_unit_test: Now returns structured data about the test run
  • pw_web: Advanced filtering, performances fixes, and “jump-to-bottom” button to log viewer
  • pw_presubmit: TypeScript linting and formatting
  • pw_ide: --install-editable option for Python packages
  • Docs: Parallel Sphinx builds
  • Targets: Added Ambiq Apollo4, which uses the Ambiq Suite SDK and FreeRTOS
Coming soon
  • Better Windows host support:
    • Fixing bitrot, and making it much easier to set up Windows prerequisites
    • Getting pw_system working on Windows
  • Faster and easier on-boarding via IDE support
    • Clone -> open in VS code -> start work!
    • Focus is on VS Code now, but this will be easily accessible to other editors too
  • pw_log support for Rust
Agenda
SEED-0109 review: Communication Buffers -
  • Rendered SEED Doc - CL
  • Proposal: a standard buffer type for network-style communications
  • If you have needs or expertise re: buffers, DMA, etc., check out the SEED and reach out
SEED-0108 review: Emulators Frontend
  • Rendered SEED Doc - CL
  • Working with emulators in Pigweed isn’t easy right now, especially if you want to support multiple targets, platforms, projects, etc. You have to manage a bunch of stuff yourself!
  • The SEED proposes an interface for specifying emulator configuration to take care of the above
  • There are still some differences between host OSes and emulators, e.g., Windows doesn’t support PTYs, qemu and Renode have different device path specifiers – in other words, the emulator definition interface isn’t totally generic, it exposes some direct emulator configuration options where needed
  • Easy to get into gdb! Next step: VS Code debugger integration
SEED-0105 review: Nested Tokens and Tokenized Log Arguments -
  • Rendered SEED Doc - CL
  • Runtime arguments to log statements aren’t currently tokenized – tokenizing these too can further reduce on-device log storage space
  • Strings can be wrapped in PRI-style macros to ensure they’re tokenized
  • This can be extended to enums too – wrap the enum definition in a macro to handle tokenization of the values
    • Does this take up more space? 32-bit token for a < 32-bit enum value? No, the proposal is that the enum value is the token, so it doesn’t use the full 32 bits
    • It’s about the same amount of data over the wire as transmitting the integer value, but is much more readable
  • The SEED focuses on pw_log_tokenized, how does using the tokenization macros affect pw_log_basic (if at all)? Will address this in the SEED
  • This contains the start of a Rust-like derive macro that could wrap strings and define printf-style encodings/formattings at compile time – super cool!
  • Syntax considerations
    • Developer syntax
      • This is the main touchpoint for developers, so it should be easy and sensible – but it is changeable over time
      • Wrapping enums can be tricky – and it’s awkward to have to specify the enum type at each log callsite. But this is still just a proposed syntax and there’s room for change
    • Encoding/formatting syntax
      • We’re committing to this! It will be embedded in token databases and implemented in multiple languages, so whatever we choose here, we will have to live with
Sent from document [PUBLIC] Pigweed Live Notes
Reply all
Reply to author
Forward
0 new messages