Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: add BINFILE to default BUILD_FILES #14159

Merged
merged 1 commit into from
May 28, 2020

Conversation

fjmolinas
Copy link
Contributor

Contribution description

This PR adds BINFILE to default BUILDFILES, I did not do that in CI, because I saw that it increased build time a bit, see testing results.

I did this because iot-lab now uses the BINFILE to flash, and this did not work if I use flash-only on a command previously compiled without any IOTLAB_% environment variable, see testing procedure.

This only happens if iotlabcli>3 is installed since before the elffile was used.

Testing procedure

  1. BOARD=iotlab-m3 make -C examples/hello-world/ all
  2. iotlab-cli 2.6.0 sucess

IOTLAB_NODE=m3-1.saclay.iot-lab.info BOARD=iotlab-m3 make -C examples/hello-world/ flash-only --no-print-directory
iotlab-node --jmespath='keys(@)[0]' --format='int' --list saclay,m3,1 --update /home/francisco/workspace/RIOT/examples/hello-world/bin/iotlab-m3/hello-world.elf | grep 0
0

  1. iotlab-cli 3.0.0 Fails without this PR
IOTLAB_NODE=m3-1.saclay.iot-lab.info BOARD=iotlab-m3 make -C examples/hello-world/ flash-only --no-print-directory
iotlab-node --jmespath='keys(@)[0]' --format='int'  --list saclay,m3,1 --flash /home/francisco/workspace/RIOT/examples/hello-world/bin/iotlab-m3/hello-world.bin | grep 0
usage: iotlab-node [-h] [-u USERNAME] [-p PASSWORD] [-v] [--jmespath JMESPATH]
                   [--format FORMAT] [-i EXPERIMENT_ID]
                   (-sta | -sto | -r | -fl FIRMWARE_PATH | --flash-idle | --debug-start | --debug-stop | --profile PROFILE_NAME | --profile-load PROFILE_PATH | --profile-reset | --update-idle | -up UP_FIRMWARE_PATH)
                   [-e EXCLUDE_NODES_LIST | -l NODES_LIST]
iotlab-node: error: [Errno 2] No such file or directory: '/home/francisco/workspace/RIOT/examples/hello-world/bin/iotlab-m3/hello-world.bin'
/home/francisco/workspace/RIOT/examples/hello-world/../../Makefile.include:706: recipe for target 'flash-only' failed
make: *** [flash-only] Error 1

Build Time

  • master
hyperfine -r 50 -w 1 'RIOT_VERSION= BOARD=iotlab-m3 make -C examples/hello-world/'
Benchmark #1: RIOT_VERSION= BOARD=iotlab-m3 make -C examples/hello-world/
  Time (mean ± σ):     327.8 ms ±   5.9 ms    [User: 269.1 ms, System: 68.7 ms]
  Range (min … max):   315.5 ms … 347.2 ms    50 runs
  • adding BINFILE
hyperfine -r 50 -w 1 'RIOT_VERSION= BOARD=iotlab-m3 make -C examples/hello-world/'
Benchmark #1: RIOT_VERSION= BOARD=iotlab-m3 make -C examples/hello-world/
  Time (mean ± σ):     334.6 ms ±   6.2 ms    [User: 271.3 ms, System: 73.1 ms]
  Range (min … max):   321.7 ms … 349.6 ms    50 runs

@fjmolinas fjmolinas added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: build system Area: Build system labels May 28, 2020
@fjmolinas fjmolinas requested review from aabadie and kaspar030 May 28, 2020 08:34
Makefile.include Outdated Show resolved Hide resolved
Makefile.include Outdated Show resolved Hide resolved
Makefile.include Outdated Show resolved Hide resolved
@fjmolinas fjmolinas added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label May 28, 2020
Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes proposed by this make sense to me. It's also an improvement when flashing several boards on iot-lab by using directly iotlab-node --flash because the .bin is generated, this command is faster when the .bin is used.

I tested locally that the .elf and the .bin are generated. When adding RIOT_CI_BUILD=1 to the command line, only the elf is generated.

ACK!

@aabadie aabadie merged commit 86e319a into RIOT-OS:master May 28, 2020
@fjmolinas
Copy link
Contributor Author

Thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants