hmc5883: shorten test routine

The test routine as-written has a run-time longer than 250ms.
This is above the limit of our watchdog timeout on some boards.
Looks like we've only been getting away with it due to the
imprecise low speed clock in the STM32.
flash partitions: fix errors in coptercontrol partition definintions
Merge pull request #721 from solidgoldbomb/hmc5883-shorter-test

hmc5883: shorten test routine
flash partitions: compute chip extents at compile time rather than runtime

Computing the partition's extents within the chip's address space is
a relatively expensive operation and it was being done on every read
and write operation.

This per read/write cost slowed the initialization of the board
sufficiently that it was causing watchdog expiry leaving boards in
a reboot loop as the cost of traversing the logfs increased due to
an increase in the number of dirty file slots.

This has an unfortunate side-effect of requiring that all boards
express both the sector numbers as well as the byte offsets of the
start and end of each partition.  Since these values must agree,
they are still compared at runtime as a final precaution against
typos.
Merge pull request #717 from solidgoldbomb/minimal-fix-for-flash-slowness

Minimal fix for flash slowness
sim sensors: avoid divide by zero in magOffsetEstimation
gdb: add config config files for missing targets
watchdog: clear wdg backup register during init

Using the PIOS_WDG_REGISTER slot in the backup registers is
a useful debug tool but it is important to ensure that this
state cannot influence the watchdog behaviour on future reboots.

Specifically, if a future boot removes one of the modules that
was previously watched by the watchdog, we don't want that
removal to endlessly trigger a watchdog.

F1 variant was actually clearing the flag, but was actually
doing it *before* caching the value for debug purposes.  F3/F4
variants were carrying state across a reboot which is bad for
the reasons listed above.
Merge pull request #724 from solidgoldbomb/sim-fix-nan-attitude

sim sensors: avoid divide by zero in magOffsetEstimation
sim-posix: align some sim copies of drivers to match real drivers
sim-posix: use real pios drivers whenever possible instead of copying
sim-posix: remove all unnecessary copies of pios drivers
sim-osx: remove all unnecessary copies of pios drivers
sim: align osx and posix sim driver variants wherever possible
sim-posix: misc makefile cleanup
sim-osx: use real pios drivers whenever possible instead of copying
sim makefiles: align makefiles between osx and posix sims
sim: provide missing definition of pios_com_debug_id
sim: provide weakly linked versions of external sim
pios tim: uint32_t -> uintptr_t