Initial work to get clang building ARM firmware.
Current state:
- Does not work on Windows; no clang toolchain yet.
- Almost all tests pass.
- FreeListHeap tests that don't zero-initilize the buffer fail in qemu
and crash on STM32F429I-DISC1. (pwbug/315)
Change-Id: I39559511f19571c26930a868406d6ee1b514c412
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/13144
Commit-Queue: Armando Montanez <amontanez@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Reviewed-by: Alexei Frolov <frolv@google.com>
Pigweed-Auto-Submit: Armando Montanez <amontanez@google.com>
This adds a non-blocking version of ReadByte() that enables writing, for
example, a superloop that combines custom processing simultaneously with
byte input handling for the RPC subsystem.
Change-Id: I9cb1e6ae8c944ca7cdff6d4bff101ac52e80b53a
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/23980
Reviewed-by: Armando Montanez <amontanez@google.com>
Commit-Queue: Keir Mierle <keir@google.com>
The "# gn-format disable" comments are no longer necessary. Delete these
comments and reformat with a Vim macro and gn format.
Change-Id: Ia62c40ad73eef91187d0d443d6e3b0fa723e5aa9
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/21380
Reviewed-by: Armando Montanez <amontanez@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
- Update labels so they use consistent naming. Instead of the
copy-and-pasted `chapter` prefix, name labels with a prefix consistent
with what they point to:
- "module-" for module
- "target-" for targets
- "docs-" for general documentation
- Remove the unnecessary highlight and default-domain directives.
Neither is necessary since the Pigweed docs always specify the
language in code snippets and other directives.
Change-Id: I55c34e9ec919f6f4670e5d3d008e0edf5fecf05b
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/19328
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
- Update Status::CODE style to Status::Code() using
pw_status/update_style.py.
- Make minor adjustments to the pw_assert tests to get them passing.
Change-Id: Ie54c3c605178fd1e42c7cedbcff324115f3ed279
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/19165
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Alters the existing targets to use a boot.cc file instead of the
existing early_boot.c.
The name was updated to reflect the fact that it now contains a
pw_boot_PostMain() hook which is after early boot.
C++ was selected over C to give more language flexibility.
Change-Id: I18ca0b8720bf083d4f644f1ca994e8fd7adc89b6
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/16702
Commit-Queue: Ewout van Bekkum <ewout@google.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Updates targets/lm3s6965evb-qemu/* and its sys_io counterpart to
match targets/stm32f429i-disc1/* by moving the early boot and
vector tables out of sys_io.
Change-Id: If1f82d5bd242807d9c4914d207b7f332291de8cf
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/16700
Commit-Queue: Ewout van Bekkum <ewout@google.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
If you make an infinite loop without a break or return, it is infinite.
Probably not intended behavior. :) Present me is disappointed in past me.
Change-Id: I03c7dffaa08f2ca64552433552888916ac7af6a6
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/16000
Reviewed-by: Shane Gomindes <shaneajg@google.com>
Commit-Queue: Armando Montanez <amontanez@google.com>
Replace pw::span with std::span and "pw_span/span.h" with <span>
throughout the codebase.
Change-Id: Ib1fa873168b6093794e861611d750fcad6285d6c
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/12801
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Rob Mohr <mohrr@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Require targets to explicitly import pigweed variable definitions. This
moves out some necessary logic from the BUILDCONFIG.gn file.
Change-Id: If9c9fe5a680cc9d897a0e8a55889873be618ed84
This change replaces the implicit overrides of the default GN target
types in BUILDCONFIG.gn with explicit pw_* versions. This is done to
allow Pigweed to build within larger GN projects without modifying their
BUILDCONFIG files.
Change-Id: I1d1e41d5e9bde8fe076f7031f3c2b98b9630ff70
Adds pw_PreStaticConstructorInit() to allow ARMv7-M targets that use
pw_boot to perform initialization before C++ static constructors are
run. Updates stm32f429i-disc1 to enable FPU before static constructors
so static constructors can safely perform FPU operations if necessary.
Change-Id: I66cfa82096719f59c42c84e4bafd0e1740002e09