Commit Graph

15 Commits

Author SHA1 Message Date
Wyatt Hepler
f9fb90f299 docs: Make labels consistent; remove boilerplate
- 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>
2020-10-01 21:47:35 +00:00
Ewout van Bekkum
0f82b333c1 targets: move early_boot.c to boot.cc
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>
2020-08-26 03:24:30 +00:00
Ewout van Bekkum
738f42c988 pw_boot_armv7m: add pw_boot_PostMain()
Adds a hook which is invoked after main() returns which is
provided by the user and must never return.

This is immediately used by lm3s6965evb-qemu to remove QEMU
specific details out of pw_boot_armv7m.

Change-Id: If4c68411c7158354ac0d7cd472f959cbcdfcd13b
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/16701
Commit-Queue: Ewout van Bekkum <ewout@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2020-08-26 03:14:40 +00:00
Ewout van Bekkum
712cbfb017 lm3s6965evb-qemu: move early_boot into targets/*
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>
2020-08-25 21:07:13 +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
Wyatt Hepler
01197109b2 pw_presubmit: Don't use setup.py test
Previously, Python tests were executed using setup.py test. There are a
few issues with this. First, with the current setup, tests are executed
twice for some reason. Occasionally other odd errors occur. Also,
setuptools has deprecated the test command for setup.py and states that
it will be removed in a future version.

This change discovers tests by finding the package directories of
affected files and searching for tests with customizable patterns
('*_test.py' by default). This approach is simpler, faster, and no
longer relies on setuptools or unittest.

Since setup.py test is no longer used, this change removes test suite
discovery from Pigweed's setup.py files.

Change-Id: I3de6c5d05ea5e38eea27b0e3aca956fe468035be
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/12662
Reviewed-by: Rob Mohr <mohrr@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
2020-06-22 20:16:43 +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
a761e32bf9 Update docs
First pass at docs to bring them up to date with The Great GN Refactor.
More to follow.

Change-Id: I02dc977fcdc7bf3efa8fc9080282dee9b1455cdd
2020-06-16 10:00:17 -07:00
Armando Montanez
82bbce4aeb Remove legacy_target.gni
Transition to args is done, so this import is no longer needed.

Change-Id: Id42e06ec9fcc16eace2cc7ef51a5dacaf012147a
2020-06-16 09:50:59 -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
Armando Montanez
fb3d3fba79 Don't declare pigweed variables as globals
Require targets to explicitly import pigweed variable definitions. This
moves out some necessary logic from the BUILDCONFIG.gn file.

Change-Id: If9c9fe5a680cc9d897a0e8a55889873be618ed84
2020-06-16 09:50:59 -07:00
Armando Montanez
b061480250 lm3s6965evb-qemu: Fix column limit
Lines exceeded column limit, fix.

Change-Id: I1e75ee7b6e381fd38e64484e0703a5536ad10dd0
2020-06-09 11:27:46 -07:00
Armando Montanez
2eed6d2caa lm3s6965evb-qemu: Don't set pw_cpu_exception backend
Leave the pw_cpu_exception backend unset for two reasons:

 1. pw_cpu_exception is not set up to be in the interrupt vector table,
    so it does nothing anyway.
 2. The pw_cpu_exception_armv7m tests do not pass in QEMU. The tests use
    a divide-by-zero to trigger an exception that can be recovered from,
    but it does not appear to trap in QEMU.

Change-Id: I22613f0e32b2fb8cf00a51b0da60554c27ec0e1a
2020-06-08 22:20:43 +00:00
Chenghan Zhou
c3c240a350 Add automatic tests for lm3s6965evb-qemu target
Change-Id: I75f2d3dbd846951dca003ec45af2c364601f0564
2020-05-08 17:17:03 +00:00
Armando Montanez
096de55209 lm3s6965evb-qemu: Introduce Stellaris QEMU target
Introduces the lm3s6965evb target designed to run inside QEMU. Not all
tests have been verified on this target, but the target builds and
successfully runs some of the tests.

Change-Id: Ic0c309c691096aa18b03bd85457195d6a2b49a0b
2020-03-23 20:49:22 +00:00