This enables OpenOCD for the CC1312 LaunchPad.
All we need is:
- The Texas Instruments version of OpenOCD
(https://git.ti.com/cgit/sdo-emu/openocd)
- Set the `PROGRAMMER` environment variable to `openocd`.
- Connect a cc1312-launchpad and play with the commands.
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
This removes duplication for the jlink case (keeping only any
non-default values in the board makefiles), and opens up STK3700's
OpenOCD programmability for generic boards.
- including `avrdude.mk` and `serial.mk` is no longer needed
- the avrdude flag -F is dropped
- This allows flashing a board having an MCU different to the one
RIOT was compiled for
- It is better to let the user provide this flag manually if she/he really
wants to turn safety off, knows what she/he is doing, and accepts the
risk associated with this
- the avrdude flag -D is dropped
- This disables issuing an erase command during flashing, however this
erase cycle is strictly required to be able to program the flash
- This is only needed in case of the stk500v2 bootloader, which implicitly
does the erase cycle and fails if explicitly asked to do so
- Only for the stk500v2 bootloader this flag is now added
- Include `tools/avrdude.mk` and `tools/serial.mk` at the common place instead
for each ATmega based board individually
- Introduce the makefile variable BOOTLOADER to de-duplicate flash configs:
- Two boards using the same bootloader now just use `BOOTLOADER ?= foo`
and share the individual config
- These settings are not applied when `PROGRAMMER` is set to still allow
users to manually specify how to program their board
Instead of hard-coding the peripheral clocks to CLOCK_CORECLOCK
introduce helper functions to return the frequency of the individual
GCLKs and use those for baud-rate calculations.
This requires the GCLK to be part of the peripheral's config struct.
While this is already the case for most peripherals, this also adds
it for those where it wasn't used before.
As it defaults to 0 (CLOCK_CORECLOCK) no change is to be expected.
To simplify board definitions and for unification between samd2x and
newer models, don't use the GCLK bitmask in board definitions.
Instead use the GCLK index and generate the bitmask when needed.
openocd configuration file for `stm32f7` relies on probing to find out
FLASH_ADDR. On nucleo-f767zi board probing (`flash probe 0`) fails when
`srst` is asserted, but `srst` needs to be asserted to be able to flash
the `BOARD` when sleeping or after a hardfault.
To circumvent this in boards/common/stm32/dist/stm32f7.cfg we define a new
flash bank with the appropriate fash start address and specify that this is
the flash bank to be used as default configuration instead of the
default by setting FLASH_BANK=4
With the new toolchain version required to fix issue #13133, the compilation of `examples/posix_socket` fails due to a C linkage error in `atomic_base.h`. The reason is that including `drivers/include/mtd.h` in `boards/esp32/board_common.h` inside the `extern C` block finally leads to including `atomic_base.h` inside the `extern C` block which in turn to the C linkage error for the template definitions in this file.