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.
With the canned recipe for flashing, flash dependencies should be
added to FLASHDEPS, instead of writing `flash: dependencies`. This
ensures that both flash and flash-only depend on the same prerequisites.
This commit add the connect_assert_srst which requires the SRST to be asserted before trying to connect.
Certain firmwares will cause it to get to a state where flashing fails and the reset button must be pushed at the correct time to recover.
- correct number of timers for atmega328p from 2 to 1
- correct number of timer channels for atmega328p from 3 to 2
- adapt atmega periph timer implementation accordingly
Boards should not set PORT and should not have code conditional on
PORT as that causes PORT to be evaluated and the build to fail even
if this varible is not needed.
Exporting has the same effect.
This fixes the MSBA2 board by declaring PORT_LINUX and PORT_DARWIN
instead.
In commit e90f2b439e the I2C config has been
adapted to the new I2C API. However, the pins of I2C_DEV(0) have been changed
from PB6 and PB7 to PB8 and PB9. While PB8 and PB9 also can be used for I2C1
by remapping I2C1, this is not done. As a result, I2C1 was unusable. This
commit restores the default I2C1 pins for I2C_DEV(0), resulting in I2C_DEV(0)
becoming usable again.
The STM32F103C8 secretly comes with 128KiB flash instead of 64KiB. Still, only
64KiB of it are tested and guaranteed to work. However, most of the times the
whole 128KiB flash works just fine. In the BluePill documentation this fact is
already documented and by using
$ make BOARD=bluepill CPU_MODEL=stm32f103cb
the whole 128 KiB can be used by RIOT. When using this hack routinely, it easier
to use environment variables instead. But allowing to overwrite CPU_MODEL via
environment variables seems to be a bad thing, as it is easy to forget to clear
that environment variable when changing the BOARD variable.
This commit introduces the new STM32F103C8_FLASH_HACK variable, which unlocks
the 128KiB FLASH when set to "1". The BluePill documentation has been updated
accordingly.
This adds a LED_PANIC macro which defines which LED,
or combination of LEDs should notify a panic error.
This is currently used to signal BADISR_vect errors.
Some ESP32 boards (like my SparkFun ESP32 Thing) have a main clock
crystal that runs at 26MHz, not 40MHz. RIOT appears to assume 40MHz.
The mismatch causes the UART to not sync properly, resulting in
garbage written to the terminal instead of log output.
I’ve added:
* A new board configuration constant ESP32_XTAL_FREQ that defaults
to 40, but can be overridden by a board def or at build time to
force a specific value (i.e. 26).
* Some code spliced into system_clk_init() to check this constant and
call rtc_clk_init() to set the correct frequency.
* A copy of the rtf_clk_init() function from the ESP-IDF sources.
Fixes#10272
The file always exist so no need to do '-include'.
Replaced using:
sed -i 's|-\(include $(RIOTCPU)/.*/Makefile.features\)|\1|' \
$(git grep -l '$(RIOTCPU)/.*/Makefile.features' boards)
When flashing multiple times the flasher gets stuck.
Default configuration is used that fixes running mulitple tests.
-c 'reset halt' is needed to support debug after config is changed.
For CI HIL purposes a reset is needed before running the test
target. The remote board didn't assign a RESET variable to perform
a reset, so it wasn't possible to call `make test` correctly.
By calling the flash script without arguments, a reset is performed.
iotlab-m3 boards always ended up not being able to flash after time.
This changes managed to fix and flash boards that where able to be flashed with
the deprecated `ft2232` driver and not with the `ftdi` driver used in RIOT.
It combines configuration from openocd, iot-lab, RIOT config and Alexandre
Abadie feedback
* http://repo.or.cz/openocd.git/blob/HEAD:/tcl/interface/ftdi/iotlab-usb.cfg
* ftdi configuration
* https://github.com/iot-lab/iot-lab-gateway/blob/2.4.1/gateway_code/static/iot-lab-m3.cfg
* `trst_and_srst` config
* Alexandre feedback and http://openocd.org/doc/html/Reset-Configuration.html
* 'connect_assert_srst' reset configuration
* it prevents errors in the output on first flash
* should help on boards with invalid code
* It was taken from what Alexandre found for board 'b-l072z-lrwan1'
* It requires using '-c reset halt' instead of '-c halt' before debug
* RIOT
* Keep the `configure -rtos` auto
- Use RIOT's GPIO interface to access the sensor to increase portability
- Changed API to allow more than one sensor per board
- Added `sht1x_params.h` that specifies how the sensors is connected - each
board can overwrite default settings by #defining SHT1X_PARAM_CLK and
SHT1X_PARAM_DATA
- Changed arithmetic to use integer calculations only instead of floating point
arithmetic
- Added support for checking the CRC sum
- Allow optional skipping of the CRC check to speed up measuring
- Added support for advanced features like reducing the resolution and skipping
calibration to speed up measuring
- Allow specifying the supply voltage of sensor which heavily influences the
temperature result (and use that information to calculate the correct
temperature)
- Reset sensor on initialization to bring it in a well known state
- Support for the obscure heater feature. (Can be useful to check the
temperature sensor?)
- Updated old SHT11 shell commands to the new driver interface, thus allowing
more than one SHT10/11/15 sensor to be used
- Added new shell command to allow full configuration of all attached SHT1x
sensors
- Removed old command for setting the SHT11 temperature offset, as this feature
is implemented in the new configuration command
The sensor family SHT10, SHT11 and SHT15 only differ in their accuracy (as in
calibration, not as in resolution). Thus, the same driver can be used for all.
The new driver name better reflects this fact.
Since wsn430-v1_3b and wsn430-v1_4 do have different radio
configurations we need to separate `board.h` for them, so this moves
their currently common `board.h` to `board_common.h` to be included by
later introduced `board.h`
Changed the configuration of the Remote boards to fit the new
cc2538 format defined in the previous commit. That is, from a
defines based format to a struct based format.
Prevent CPU from using cortexm_init() when softdevice is used for NRF52 devices
as the softdevice already do some obscur inits
Also ensure the softdevice pkg will be used by hacking Makefile due to RIOT's
build system limitations (will be fix later with the new build system)