number of bootstrap apps can be overridden by def

We default to just 2 apps (mostly you will just want your primary app
and the bootloader). But this patch allows a makefile to override this
if needed.
add bootstrap unit test

the unit test will check to ensure the bootstrap can switch between
applications (app1 and app2 in this case)

some changes were also needed to ensure xplatform support and new linker
scripts for the unit test on each platform
add spis support for stm32f373

This adds untested support for the slave spi on the stm32f373 chip. This
is likely very buggy at this stage and will need work. It is based on
the spis from the stm32f107x (which is not great either), with some
changes to support the new API and some improvements to flush the
buffers (now they are bigger it is much easier to get out of sync!)
simplify spis utest & add stm32f373 support

clean up and simplify the spis unit test so there is only 1 simple test
to pass/fail (atm I use a raspberry pi as the master, see
http://www.100randomtasks.com/simple-spi-on-raspberry-pi)

add stm32f373 to the hw support

ensure hal is built on every make call
make naming cleaner of hw in spis utest
do gpio AF set earlier like the st examples
Merge branch 'stm32f373' into bootstrap_rework
Merge branch 'stm32f373' into spi_stm32f373
remove $(ARCH) from submake

in 67840ca6946a3789cd9926d5200c9c57f0ccd68b we pass the $ARCH variable
via exports so we should not pass this as a target to make anymore
remove spis utest until this is ready
Merge branch 'stm32f373' into spi_stm32f373
re-enable spis utest in this branch (it kinda works here)
Merge branch 'stm32f373' into bootstrap_rework
remove libmos on make clean
Merge branch 'stm32f373' into spi_stm32f373
clean up on spi tx flush reseting

Since st did not provide a way to flush the spi tx buffer, we must reset
the peripheral (we do this via SPI_I2S_DeInit now). But this leaves the
spi registers in their reset state. Previously we re ran the whole
spis_init again, but this was slow and since we might do this often (ie
on select/deselect) I call only what is needed now in spis_init_regs()
which is called from both spis_init and the spi_flush_tx_fifo() routines
so we don't duplicate code.
add dma module for stm32f373

this has a external dma_memcpy for users, and a internal dma_request
function for hal work.

it has been tested for mem to mem operations in the new unit test,
testing for the peripherals will be done as peripheral support is added
add dma_cancel() routine for stm32f373

this stops a dma transfer that is in progress
add support to dma rx and or tx on stm32f373 spis

if the spis_t definition has the rx and or tx dma objects not NULL then
the dma will be used (if the xfer cannot in the hw fifo); if the dma's
are NULL then the normal isr method is used.
fix const issue on bootstrap_main.c

too many const's meant gcc got a little to giddy with optimisations &
hard coded the 0xffffffff in the bootstrap_program_headers into the asm
so that even though the scripts change the bootstrap_program_headers
later the code just uses 0xffffffff as a constant; it is a trivial fix,
just remove one const :)

and while I was there, it was quite hard to tell I was in a while (1){}
when there is nothing in the loop, so I added a sys_nop() just give me a
backtrace and stepping that makes it clear we are bricked.