Cppcheck was (correctly) warning here that concat to strings might
result in buffer overflow because the terminating `\0` was not considered.
This is fixed here, making the cppcheck suppression also obsolete.
Extend the cppcheck suppression example to show that each suppression
should have a reason describing the intentional suppression of a
cppcheck warning or error.
Currently version information of commands and tools is only parsed
from STDOUT, however some tools like openocd print version info
to STDERR only. This commits adds parsing of STDERR for version
infos if STDOUT does not contain such info.
Add the rom base address to the flash address when flashing binaries.
This allows flashing binaries with the default openocd configuration.
It is an API change to IMAGE_OFFSET with binary files as it should now
only be an offset to the base address.
Force openocd type to '.bin' in case we want to flash hex/elf objects or
files not automatically recognized as bin.
This allows getting the ROM base address.
It may not be available in the build system directly so better extract it from
openocd. Also openocd is board specific and this address is cpu specific
so would have definition order issue in the build system.
When flashing with an IMAGE_OFFSET, it should also be passed to
verify_image. It is handling the base address in the image too.
This works with both elf files and binaries with the base address added.
Write stdin to <outfile> if it is different from the previous content.
If data provided in stdin is the same as the data that was in <outfile>, it is
not modified so `last modification date` is not changed.
Introduce dist/pythonlibs directory to store RIOT python packages.
This directory is exported via PYTHONPATH by the build system to
make it commonly available.
Create if_lib package containing all the modules and adapt the *.py files
to import each other using the intra-package references.
The idea behind a package is to invoke test.py either by permanently
modifying PYTHONPATH in user profile via adding path to $RIOTBASE/dist/tests
or make temporary PYTHONPATH changes during the invocation:
PYTHONPATH=$PYTHONPATH:$RIOTBASE/dist/tests python3 test.py
Leave periph_i2c_if.py in the same folder as test.py as this file is
just a Python wrapper around periph specific main.c.
Update BPT memory map. Use definitions generated with the latest code
generator. Both routine names and mapping have changed.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Since the `iotlab-term` target uses `tmux` error messages are not really
printed, so it took me a while to find out why at some sites this target
wasn't working for me anymore.
If the IoT-LAB password was changed, just checking if `.iotlabrc`
exists isn't enough, so I use `iotlab-experiment` to check if I'm logged
in properly to prompt the password input in case I'm not.
update to the current lastest version of EDBG to allow user to reflash a bricked board due to sleep mode or wrong clock assignment. this avoid the use of Atmel Studio to erase flash.
The new tool (mkconstfs2) features:
* more robust filename handling: no need for mangling,
and works on Windows.
* Better output generation: nothing is written in case
of failures.
* Allows more control over the files that are included:
- does not traverse directories, filenames must be explicitly
given.
- The "root" can be explicitly given (thus the tool can get
the same result independently of the CWD).
Thanks to MichelRottleuthner for making it work with Windows paths.
Add support to do flash/reset/term on an IoT-LAB node.
It also allow running test using 'testrunner'.
Configuration variables are:
* `IOTLAB_NODE` which should be set to your node url
* The full url including site to use from your computer `m3-1.grenoble.iot-lab.info`
* The short url when used on the IoT-LAB frontend `m3-1`
* `IOTLAB_EXP_ID` for your experiment id for flash and reset.
By default it tries to use your currently running experiment if you have only one
* `IOTLAB_USER`: is read from `${HOME}/.iotlabrc` as saved by `iotlab-auth`
* It is expected to have run `iotlab-auth` beforehand.