Commit d3fe676
committed
layout: Improve development workflow
Right now, if layout.ld or target.json is changed, the firmware will
not automatically relink when running "cargo xbuild". This can make
working on layout.ld quite tedious, as you have to manually change the
Rust code to get the firmware to rebuild.
We solve this by adding a tiny build script which simply rebuilds the
program if either layout.ld or target.json changes.
We also stop using "-s" (aka "--strip-all") in the target options.
Instead, we add a second /DISCARD/ section in the linker script. This
puts all of our logic about sections in a single place. It also makes
it easier for a developer to get the symbols (if they want them).
Signed-off-by: Joe Richey <joerichey@google.com>1 parent e602ead commit d3fe676
3 files changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
54 | 59 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 19 | + | |
23 | 20 | | |
24 | 21 | | |
0 commit comments