This is still currently a hack to hardcode it as the value can be deduced
from the `BOARD_MODULE` daughter board name.
But it requires more cleanup and could come in a separate step.
Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
The board is deprecated, no need to ignore this board anymore here.
Having the `arduino` and `periph_pwm` features is now required for all
boards using 'arduino-atmega' (as it was except for that board).
If this should change in the future, it should be defined either in each
arduino board, in another board common, or per CPU_MODEL.
This change is for all boards with a sam0 cpu. This cpu just has one ADC.
It is unnecessary to have defines with ADC_0_ prefix as if multiple ADCs
are possible.
Some defines were not used, such as ADC_0_EN, ADC_0_CHANNELS,
ADC_MAX_CHANNELS, ADC_0_CLK_SOURCE, ADC_0_CHANNELS
Change all ADC_0_ prefixes to ADC_
- periph_conf_common.h contains peripherals configuration common to all mkr boards
- periph_conf.h is specific to a subset of mkr boards (mkr1000 and mkrzero)
- Created new `bluepill-128kib` as 128KiB version of the `bluepill`
- Created new `blackpill-128kib` as 128KiB version of the `blackpill`
- Updated `openocd.cfg` to allow flashing 128KiB of ROM
cpu/$(CPU)/Makefile.features and cpu/$(CPU)/Makefile.dep are
automatically included
Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
cpu/$(CPU)/Makefile.features and cpu/$(CPU)/Makefile.dep are
automatically included
Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
* CPU files should already have 'CPU' defined by the board.
* Do not conditionally define CPU as it is not needed.
This is part of cleanup prior to moving the CPU/CPU_MODEL to
Makefile.features.
When flashing some applications the flasher sometimes gets stuck which
prevents flashing after.
It may be from a specific firmware or operation but do not have one yet.
Connect with reset asserted fix flashing from this state.
- Moved compiler & linker flags from boards/common/msba2 to cpu/arm7_common
- Moved dependency to newlib nano to cpu/arm7_common
- Moved config to link in cpu/startup.o to cpu/arm7_common
Enable the handling of flashing `softdevice.hex` when flashing the firmware
for openocd.
However, for flashing, only the `hexfile` and `binfile` can currently be used.
The `elffile` is generated with local pages aligned to `0x10000` which makes
the program starting at `0x1f000` be flashed from `0x10000` with padding bytes
even if the `.text` section is indeed at `0x1f000`:
readelf --sections bin/nrf52dk/gnrc_networking.elf
...
[ 1] .text PROGBITS 0001f000 00f000 00f698 00 AX 0 0 16
...
readelf --segments bin/nrf52dk/gnrc_networking.elf
...
LOAD 0x000000 0x00010000 0x00010000 0x1e6a0 0x1e6a0 R E 0x10000
...
The padding bytes would go through `verify_image` in `openocd` so be expected
to not be overwritten but are by `softdevice.hex`
Using --nmagic at link time removes the local page alignement but would
need dedicated testing.
Use the new OPENOCD_RESET_USE_CONNECT_ASSERT_SRST to configure
'reset_config connect_assert_srst' when flashing and resetting only.
This removes the need for a special debug configuration and should allow
connecting to a running target again.
The boards are using `pyterm` specific options that do not work on any
other `RIOT_TERMINAL`. It is a shame this is required but at least do
not pass arbitrary arguments to the other RIOT_TERMINAL.
So use the new PYTERMFLAGS for this.
cpu/$(CPU)/Makefile.features and cpu/$(CPU)/Makefile.dep are
automatically included
Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
cpu/$(CPU)/Makefile.features and cpu/$(CPU)/Makefile.dep are
automatically included
Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
softdevice needs the memory at 0x2000 to be initialized to 0xffffffff
according to #5893 and testing. However, the addresses [0x8bc, 0x3000[ are not
set in softdevice.hex.
So use a modified hex file with all the memory set to 0xff as it is the rom
reset value anyway.
This change updates the `.hex` file instead on relying on erasing the
memory.
When running tests using 'nordic_softdevice_ble', the 'softdevice.hex'
file must also be taken into account for the test hashing and be
uploaded to the separated murdock testing boards.
When listed as dependency from `test-input-hash` the file must have a
target, which he has not. The file is implicitly created when compiling
`ELFFILE` so declare it as order only dependency.
In practice `BASELIBS` could be enough or even `pkg-build-softdevice`
but I do not want to be depend that much on internals there.
- Boards using stm32f103xx use the same custom config for xtimer
which relies on the same underlying hardware timers that hang
when sleeping for <20us so spin when approaching that limit.
A new blue pill variant with only 32 KiB of flash (secretly coming with
64 KiB flash) instead of the use 64 KiB flash (secretly coming with 128 KiB)
is not compatible with `make flash`. This commit changes the OpenOCD config
so that both variants can be flashed.
The softdevice is only verified to be working on nrf52832-based
boards. This feature prevents the softdevice from being build for
other, similar targets (e.g. nrf52840-based boards).
Introduce and use a common/remote/Makefile.features.
The boards were already using the common `Makefile.include` and
`Makefile.dep`.
This makes 'include $(RIOTCPU)/cc2538/Makefile.features' be done in
the same module where 'CPU' is defined.
Preparation for moving 'CPU' definition to Makefile.features.
Introduce and use a common/msba2/Makefile.features.
The boards were already using the common `Makefile.include` and
`Makefile.dep`.
This makes 'include $(RIOTCPU)/lpc2387/Makefile.features' be done in
the same module where 'CPU' is defined.
Preparation for moving 'CPU' definition to Makefile.features.
Moved SPI config from boards/common/nrf52xxxdk/include/periph_config.h to
boards/common/nrf52/include/cfg_spi_default.h. This allows all nRF52 based
boards to use this SPI config if applicable and also allows nRF52*-DK boards
to use custom SPI configs, if needed.
PORT_LINUX and PORT_DARWIN are evaluated by
`makefiles/tools/serial.inc.mk` and some boards Makefile.include.
Their value does not need to be exported.
This also globally removes the line saying that the exports are needed
for flash rule.
Keep the compiled '.bin' file to remove the need to compile it when
flashing. This remove the need to have the toolchain when flashing so
allow compiling and flashing with `BUILD_IN_DOCKER=1` without a local
toolchain.
Even if it ends up storing a binary, the file is only 34 bytes.
MSPDEBUGFLAGS is evaluated only in the same file.
Its value does not need to be exported.
This will also prevent evaluating 'PORT' for MSPDEBUGFLAGS when not needed.
DEBUGGER/DEBUGGER_FLAGS/DEBUGSERVER/DEBUGSERVER_FLAGS are evaluated by the
main Makefile.include or by file included by it.
Their value does not need to be exported.
Testing
-------
`git diff --word-diff` only reports `export` being removed.
`git show --stat` reports `55 insertions(+), 55 deletions(-)`
Which is the same amount as lines that where matching
`export[[:blank::]]\+VARIABLE`.
RESET and RESET_FLAGS are evaluated by the main Makefile.include or by file
included by it. Their value does not need to be exported.
This will also prevent evaluating 'PORT' for RESET_FLAGS when not needed.
Testing
-------
`git diff --word-diff` only reports `export` being removed.
`git show --stat` reports `24 insertions(+), 24 deletions(-)`
Which is the same amount as lines that where matching
`export[[:blank::]]\+VARIABLE`.
FLASHER and FFLAGS are evaluated by the main Makefile.include or by file
included by it. Their value does not need to be exported.
This will also prevent evaluating 'PORT' for FFLAGS when not needed.
Testing
-------
`git diff --word-diff` only reports `export` being removed.
`git show --stat` reports `84 insertions(+), 84 deletions(-)`
Which is the same amount as lines that where matching
`export[[:blank::]]\+VARIABLE`.
The currently supported SAM0 MCUs (samd21, saml21, saml1x) share the same
Timer peripheral, yet each of them carries it's own copy of the Timer
driver.
This introduces a new timer driver that is common for all sam0 MCUs and
uses structs for configuration instead of defines.
UART devices are now configured using static array in header files instead of static variables in implementation to be able to define UART_NUMOF using the size of the array instead of a variable.
SPI devices are now configured using static array in header files instead of static variables in implementation to be able to define SPI_NUMOF using the size of the array instead of a variable.
I2C devices are now configured using static array in header files instead of static variables in implementation to be able to define I2C_NUMOF using the size of the array instead of a variable.
DAC pins are now configured using static arrays in header files instead of static variables in implementation to be able to define DAC_NUMOF using the size of these arrays instead of a variable.
ADC pins are now configured using static arrays in header files instead of static variables in implementation to be able to define ADC_NUMOF using the size of these arrays instead of a variable.
Moving atmega_stdio_init() to cpu_init() just before periph_init() guarantees
that stdio is available to allow DEBUG() in periph_init(). This also helps to
unify the boot up process of ATmega boards and de-duplicates the stdio init from
board_init().
Added file with clock settings for STM32-F7 CPUs with a core clock of 216MHz,
an external high speed clock of 8 MHz and external low speed clock (32.768kHz)
enabled.
Add a rule to build `lpc2k_pgm` when flashing.
It is only compiled if it is using the one in `tools`.
If overwritten to `lpc2k_pgm` if it should be taken from the path,
it is not compiled.
The compilation is still done in `boards/common/msba2/tools` as it was
the case before and this commit does not address this.
Add motor_driver driver configuration example.
The most simple motor driver type is used here (MOTOR_DRIVER_1_DIR) which
needs only one pin to work.
This example uses already configured PWM channels and 2 free GPIOS.
Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
A common configuration file is introduced for stm32f4 with core clock
at 168MHz with HSE at 8MHz, 2 configuration files are introduced to²:
distinguish between clock configuration with and without LSE.
- Moved code for periph_conf of all ATmega based boards to boards/common/atmega
- Added possibility to override config from individual board:
- Named file `periph_conf_atmega_common.h` and let this be included from
`board/$BOARD/include/periph_conf.h` to allow modifications
- Guarded individual periph configs by `#ifndef $PERIPH_NUMOF` ... `#endif`
Features must be provided by the board if they're actually
available on board. Other features might be provided by the
CPU.
Some grouping is also removed as it is not necessary.
Leverages common flasher (avrdude) and removes unnecessary exports.
Moreover, a reuse of serial.inc.mk is perfomed from the same
atmega_common/Makefile.include
Currently only tested boards provide the feature riotboot.
Potentially all boards embeding a cortex-m0+/3/4/7 are
able to have riotboot as a feature, but other dependencies
need to be met, e.g. usage of cortexm.ld linker script,
double initialisation of cpu_init(), etc. See doc in
bootloaders/riotboot.
This commit fixes configuration problems when trying to use i2c pins that need to be remapped.
All B8 and B9 pins for STM32F1 need to be remapped, so a check is done if the remappable pins are selected.