Commit Graph

14 Commits

Author SHA1 Message Date
Karl Palsson
5a828ffb82 Update library
Use the now standard $(PREFIX)gcc form instead of with the -.
more consistent with other projects.
2019-06-07 21:31:44 +00:00
Karl Palsson
dc2142b729 rules: attempt rebuild of library of not found
Based on https://github.com/libopencm3/libopencm3-examples/pull/90
2018-08-29 11:54:43 +00:00
Karl Palsson
fe6a2b5f13 make clean: avoid bashisms in favour of posixy forms.
Got a little too clever.
2018-06-08 09:53:09 +00:00
Karl Palsson
21ce202a07 properly clean .d files
And also, _only_ clean our own files, not both a hard list of all files,
just the ones we built ourselves
2018-06-07 11:42:44 +00:00
Paul Fertser
f4e129cd4a rules.mk: Add cross-reference to the map file
This adds a section to the bottom of the .map file containing the
symbol->object file mapping.  (the logical inverse of the existing
section at the start of the .map file that lists objects, and the
symbols that pulled them in)

Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2017-12-18 12:28:52 +00:00
Paul Fertser
6dbc067b3e Add maximum debugging info to ELF; doesn't affect binary size 2017-12-18 12:17:50 +00:00
Jelmer Tiete
2107faf5ee rules: drop broken stlink util support
There was an attempt at providing support for the texane/stlink utility.
It has been broken for a long time, referring to missing scripts.
Remove it as clearly unused.
2017-08-25 14:58:41 +00:00
Jelmer Tiete
1f322c1cef rules: flash target helpers had broken script paths 2017-08-25 14:58:20 +00:00
Chuck McManis
766f89c724 Better Debugging in make
This commit does two things, it removes the "Quiet" flag
from the flash target so you can see what it is trying to
do when it trys to flash your code, and it adds a make
target print-% which can be used to print the resolved
value of make variables (also helpful in figuring out
what it is trying to do).
2016-12-29 15:38:50 +00:00
Karl Palsson
4dfa31f9f8 rules.mk: flash: send full path for existing openocd
When using netcat to send commands to an already existing openocd
session, you must path full paths to the file to flash.  There's no
guarantee that it is running from the same directory as the present
example
2016-10-04 20:25:49 +00:00
Chuck McManis
da679c1775 [Makefile]: add objects to clean target
Some demos will use object files from a different directory and
those files would not be cleaned by the simple CLEAN rule. This
small change insures that those objects and their dependency files
are also cleaned.
2016-08-18 22:51:55 +00:00
Karl Palsson
bcd7d57c11 make flash: overhaul openocd configuration
Instead of OOCD_SERIAL triggering an attempt to use a specific ftdi based
adapter, introduce common target/interface pairs, OOCD_INTERFACE and
OOCD_TARGET, and an override via OOCD_FILE allowing full control.

Further, attempt to connect to a running openocd instance to flash if possible.
This _will not_ work well if you have multiple openocd instances open at once,
but that's a rare use case.

Examples:
OOCD_INTERFACE=stlink-v2
OOCD_TARGET=stm32f0x
 --> openocd ... -f interface/stlink-v2.cfg -f target/stm32f0x.cfg)

OOCD_FILE=board/ek-lm4f120xl.cfg
 --> openocd ... -f $(OOCD_FILE)  (ie, the variable is passed untouched)

As part of implementing this, correct variables that were always wrong, and
update the openocd flashing commands to use current commands.
2016-08-18 22:41:23 +00:00
Karl Palsson
b227e1609c rules: provide default C and C++ standards
Default CSTD to c99, no default for CXXSTD, but if provided it will be used.

Add required gnu99 flags to projects using gnu styles.
2016-08-18 22:41:23 +00:00
Karl Palsson
30667fe62c rules: rename file only.
Trivial rename, allow vim to properly detect the file as a makefile.
2016-08-18 22:41:23 +00:00