Commit Graph

8 Commits

Author SHA1 Message Date
Wyatt Hepler
d49f8fe3f3 BUILD.gn files: Improve import formatting
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>
2020-10-15 18:12:55 +00:00
Michael Spang
6a8459589c pw_toolchain: Allow iOS to use the right -map flag
In general toolchains should set values for the builtin arguments
current_cpu and current_os; this configures both the toolchain itself
and everything it builds. Make it so in Pigweed.

If there's a toolchain with current_os = "ios", use the arguments for
Apple's linker.

Bug: 241
Change-Id: I2ce8c46eb48cbc70c5d14086934bdf59c2fc3f36
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/16006
Reviewed-by: Keir Mierle <keir@google.com>
Reviewed-by: Alexei Frolov <frolv@google.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
Commit-Queue: Michael Spang <spang@google.com>
2020-08-14 19:29:22 +00:00
Chenghan Zhou
ea0f7ad8cd pw_allocator: Add block sanity check
Add functions to check if a pw::allocator::Block object is valid in the
sense that it's aligned, the prev/next pointer matches with each other,
and poison bytes is not corrupted if enabled. Add functions to crash on
seeing an invalid Block.

Add a gn arg to enable heap poison, with sizeof(void*) before and after
the usable space with a fixed pattern.

Change-Id: I68a0194b4522ccadb21ecba96ce47a2265e8bf59
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/14500
Commit-Queue: Chenghan Zhou <chenghanzh@google.com>
Reviewed-by: Alexei Frolov <frolv@google.com>
2020-07-31 14:32:49 +00:00
Chenghan Zhou
d4f44d2c50 pw_allocator: replacing malloc()
Add pw_malloc module to replace libc malloc with self defined methods.

Add pw_malloc_freelist backend to provide wrapper functions for freelist
malloc.

Change-Id: I7b645206655068d6c08063d7a520aca62d955052
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/12601
Commit-Queue: Chenghan Zhou <chenghanzh@google.com>
Reviewed-by: Chenghan Zhou <chenghanzh@google.com>
Reviewed-by: Alexei Frolov <frolv@google.com>
2020-07-17 18:14:27 +00:00
Armando Montanez
356bf9786d pw_cpu_exception: Split facade
The pw_cpu_exception facade is comprised of three parts: the part
implemented by the architecture, and the part implemented by the
application, and some supporting libraries that make it easier to dump
CPU state. Since these are provided independently, the facade has been
split into three facades:

 1. entry
 2. handler
 3. support

Change-Id: I48c92f42b208f79596740f1bec59ed3d29e277a8
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/11646
Commit-Queue: Armando Montanez <amontanez@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
2020-07-16 21:03:29 +00:00
Armando Montanez
71b1fa3d2c pw_toolchain: Make arm float printf optional
Removes floating point printf support from the default ARM toolchain and
makes it into an optional config that isn't added by default (since it
adds ~14KB of flash usage).

Change-Id: I340630fa596ae131b56e75c7acb2536766cd11b8
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/12660
Reviewed-by: Keir Mierle <keir@google.com>
Reviewed-by: Alexei Frolov <frolv@google.com>
Commit-Queue: Armando Montanez <amontanez@google.com>
2020-06-19 19:30:30 +00:00
Armando Montanez
86003203b7 pw_toolchain: Update toolchain options
Updates pigweed to depend directly on is_host_toolchain provided by the
toolchain. Also adds a toolchain option that controls the extension of
final linked binaries.

Change-Id: Ia9499fe5974997a5bbc0bb9cfb89b5569b987189
2020-06-16 18:00:06 -07:00
Armando Montanez
fd5de70b76 Add Pigweed GCC-ARM toolchains
Updates ARM toolchains and gets both the stm32f429i-disc1 and qemu
targets building again.

Change-Id: Ib0607bc498f8a331c3cde763da5ed3812ba595ba
2020-06-16 09:50:59 -07:00