Commit Graph

5 Commits

Author SHA1 Message Date
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