Commit Graph

8 Commits

Author SHA1 Message Date
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
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
Andrew Chen
2314635cf0 Makefile.include: don't override DEFS
Allow examples (such as usart-semihosting) to set DEFS for their own use,
and _then_ add the target definitions.
2015-12-10 15:51:57 +00:00
Frantisek Burian
ffe9376c55 [BUILD] Allow to override FP_FLAGS in make as specified in libopencm3 README 2014-01-09 07:33:11 +01:00
Frantisek Burian
9934e40fe9 [BUILD] Add generic Makefile.rules 2014-01-06 22:25:40 +01:00
Onno Kortmann
3efd9f8675 Make the STM32 Makefile.includes usable from outside the examples tree
The Makefile.includes contain a hardcoded ../../../../../libopencm3
path for the TOOLCHAIN_DIR variable. They also contained another copy
of this hardcoded path, that is now generated from $TOOLCHAIN_DIR.

This allows to have a symbolic link to a Makefile.include in an
out-of-tree project and reuse the Makefile infrastructure.
2014-01-03 00:08:01 +01:00
Federico Ruiz Ugalde
6474ed3cf0 Flashing now using openocd. GDB Debugging possible and tested :). 2013-07-07 21:41:11 -07:00
Federico Ruiz Ugalde
757d044c23 stm32f3discovery examples added.
- miniblink
- button
- fancyblink
- adc
- Non tested yet! But they compile.
2013-07-07 21:40:06 -07:00