Remove a completed FIXME comment.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Provide wirish::priv::series_init() on F1.

This lets us remove the weak definition in boards.cpp.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
wirish: Weaken boards_private.h definitions.

This lets users override them conveniently if our decisions don't
suit.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
HardwareSerial.cpp: Fix "#warn" -> "#warning".

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
stm32.h: Soften "missing MCU" errors into warnings.

It's not important whether the MCU is specified. What's important is
that <libmaple/stm32.h> gets everything it needs -- which it now
ensures that it does. Requiring people to do things on a per-MCU basis
hurts hackability and is just asking for trouble.

On the other hand, it's nice to provide a clue as to why
<libmaple/stm32.h> might be giving #errors, so do leave the
warnings. People can always hack the header to shut them up if they
want.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Makefile: move the fake VID/PID, to hide our shame.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
STM32F2: Allow boards to override PLL configuration.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
wirish/boards.h: Optionally derive SYSTICK_RELOAD_VAL.

It's stupid to make everyone keep this around.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
<wirish/boards.h>: Add BOARD_BUTTON_PRESSED_LEVEL.

This allows boards to override the logic level of a pressed
button. All Maple boards have a pressed button read HIGH, but if the
opposite convention is used, isButtonPressed() will infinite loop.

Make isButtonPressed() respect this setting.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
isButtonPressed(): Take a pin and pressedLevel argument.

This allows dealing with push-buttons on pins other than
BOARD_BUTTON_PIN.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
maple/board.cpp: Add more explanatory comments.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
board_private.h: Add PMAP_ROW() convenience macro.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
maple/board.cpp: Use PMAP_ROW().

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
maple/board.cpp: Demo weakness of boardInit().

This shows people what to do to write boardInit(), but also how to
save work if they don't need it.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Makefile: add list-boards target.

As the number of boards increases, it's less practical to keep a list
of them in the help target output (notice also that some have been
forgotten). This target can't get out of date unless we change how the
board-includes/ directory works.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Makefile: make help target more helpful.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Move OpenOCD stuff into contrib/.

This has gone unmaintained for long enough.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Rework linker scripts.

Having separate linker scripts for all the boards is a bad idea. Most
boards really only need to specify MEMORY and the appropriate
REGION_ALIASES() so that support/ld/common.inc can do its work. Not
having infrastructure for this leads to duplication -- viz. the Maple
Mini linker scripts are identical to the Maple's, and the
olimex_stm32_h103 linker directory is just a symlink to
Maple's. Clearly, the current structure is wrong.

To fix it, instead of having per-board subdirectories of support/ld/,
add per-MEMORY subdirectories of (new) support/ld/stm32/mem/. The
per-board .mk files under support/mk/board-includes/ now reference
these directly, and target-config.mk and the Makefile handle this
appropriately. We move some other stuff around in target-config.mk to
make this all more convenient, and even allow more overriding of the
libmaple defaults on a per-board basis. Custom board hacks will be
easier now.

Unfortunately, lots of duplication under support/ld/stm32/mem/ is
necessary, as the LENGTH attribute in a MEMORY region specification
doesn't support arithmetic expressions, and ld doesn't seem to have
any way to specify MEMORY at the command line (why?!). If we find a
better way than this, we should do it.

If a board (e.g. Maple Native) _does_ really need special
memory-related configuration, you can always put a per-board
subdirectory of support/ld/stm32/mem. We do this here to configure the
heap.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>