Skip to content

Makefile.include: introduce FLASHFILE#11084

Merged
MrKevinWeiss merged 1 commit intoRIOT-OS:masterfrom
cladmi:pr/make/introduce_flashfile
Mar 1, 2019
Merged

Makefile.include: introduce FLASHFILE#11084
MrKevinWeiss merged 1 commit intoRIOT-OS:masterfrom
cladmi:pr/make/introduce_flashfile

Conversation

@cladmi
Copy link
Copy Markdown
Contributor

@cladmi cladmi commented Feb 28, 2019

Contribution description

Introduce FLASHFILE variable to start migrating boards to use it.

This is the file that will be used for flashing.
Boards do not currently use it but will migrated in upcoming PRs.

I do not think it needs to be exported to scan-build or docker but as currently all the other firmware files are exported too, I just keep the same pattern (I think they do not need to be at all).

Review procedure

Review if you find the documentation enough or not.
The goal of this PR is to be minimal and start the migration in independent pull requests.

So declare the concept and start applying it after.

Testing procedure

Currently not really any testing procedure as it only introduces the variable.
You can see that it is not defined but still reported in info-build

FLASHFILE:

make -C examples/hello-world/ info-build
make: Entering directory '/home/harter/work/git/RIOT/examples/hello-world'
APPLICATION: hello-world
APPDIR:      /home/harter/work/git/RIOT/examples/hello-world

supported boards:
acd52832 airfy-beacon arduino-due arduino-duemilanove arduino-mega2560 arduino-mkr1000 arduino-mkrfox1200 arduino-mkrzero arduino-uno arduino-zero avsextrem b-l072z-lrwan1 b-l475e-iot01a blackpill bluepill calliope-mini cc2538dk cc2650-launchpad cc2650stk chronos ek-lm4f120xl esp32
-mh-et-live-minikit esp32-olimex-evb esp32-wemos-lolin-d32-pro esp32-wroom-32 esp32-wrover-kit esp8266-esp-12x esp8266-olimex-mod esp8266-sparkfun-thing f4vi1 feather-m0 firefly fox frdm-k22f frdm-k64f frdm-kw41z hifive1 ikea-tradfri iotlab-a8-m3 iotlab-m3 jiminy-mega256rfr2 limifr
og-v1 lobaro-lorabox maple-mini mbed_lpc1768 mega-xplained microbit mips-malta msb-430 msb-430h msba2 msbiot mulle native nrf51dk nrf51dongle nrf52840-mdk nrf52840dk nrf52dk nrf6310 nucleo-f030r8 nucleo-f031k6 nucleo-f042k6 nucleo-f070rb nucleo-f072rb nucleo-f091rc nucleo-f103rb nu
cleo-f207zg nucleo-f302r8 nucleo-f303k8 nucleo-f303re nucleo-f303ze nucleo-f334r8 nucleo-f401re nucleo-f410rb nucleo-f411re nucleo-f412zg nucleo-f413zh nucleo-f429zi nucleo-f446re nucleo-f446ze nucleo-f722ze nucleo-f746zg nucleo-f767zi nucleo-l031k6 nucleo-l053r8 nucleo-l073rz nucl
eo-l152re nucleo-l432kc nucleo-l433rc nucleo-l452re nucleo-l476rg nucleo-l496zg nz32-sc151 opencm904 openmote-b openmote-cc2538 pba-d-01-kw2x phynode-kw41z pic32-clicker pic32-wifire remote-pa remote-reva remote-revb ruuvitag samd21-xpro saml10-xpro saml11-xpro saml21-xpro samr21-x
pro samr30-xpro seeeduino_arch-pro sensebox_samd21 slstk3401a slstk3402a sltb001a slwstk6000b slwstk6220a sodaq-autonomo sodaq-explorer sodaq-one sodaq-sara-aff spark-core stk3600 stk3700 stm32f0discovery stm32f3discovery stm32f429i-disc1 stm32f4discovery stm32f769i-disco stm32l476
g-disco teensy31 telosb thingy52 ublox-c030-u201 udoo usb-kw41z waspmote-pro wsn430-v1_3b wsn430-v1_4 yunjia-nrf51822 z1

BOARD:   native
CPU:     native
MCU:     native

RIOTBASE:  /home/harter/work/git/RIOT
RIOTBOARD: /home/harter/work/git/RIOT/boards
RIOTCPU:   /home/harter/work/git/RIOT/cpu
RIOTPKG:   /home/harter/work/git/RIOT/pkg

DEFAULT_MODULE: auto_init board core core_msg cpu sys
DISABLE_MODULE:
USEMODULE:      native-drivers periph periph_common periph_gpio periph_pm periph_uart

ELFFILE: /home/harter/work/git/RIOT/examples/hello-world/bin/native/hello-world.elf
HEXFILE: /home/harter/work/git/RIOT/examples/hello-world/bin/native/hello-world.hex
FLASHFILE:

...

Issues/PRs references

This is a split of #8838 to simplify introducing it.

Introduce FLASHFILE variable to start migrating boards to use it.

This is the file that will be used for flashing.
Boards do not currently use it but will migrated in upcoming PRs.
@cladmi cladmi added Area: build system Area: Build system Type: new feature The issue requests / The PR implemements a new feature for RIOT CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Feb 28, 2019
@cladmi cladmi added this to the Release 2019.04 milestone Feb 28, 2019
Copy link
Copy Markdown
Contributor

@jcarrano jcarrano left a comment

Choose a reason for hiding this comment

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

I think it is OK. Nothing to test, as this is just introducing a variable.

One thing we could do is placing some comments in a place where future board authors can see it and use the new FLASHFILE instead of using hacks like "ELFFILE=HEXFILE".

export PORT # The port to connect the TERMPROG to.
export ELFFILE # The unstripped result of the compilation.
export HEXFILE # The stripped result of the compilation.
# FLASHFILE # The output file used for flashing (transition phase: only if defined)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Feel free to write as many lines here as you see necessary. Eventually this should end up in the docs.

@MrKevinWeiss
Copy link
Copy Markdown
Contributor

I am happy with it.
If @jcarrano doesn't press the big green button by the end of the day I will!

@cladmi
Copy link
Copy Markdown
Contributor Author

cladmi commented Mar 1, 2019

When finally migrated, I plan to make it mandatory to have it defined.
Also maybe checking that HEXFILE is a .hex and BINFILE is a .bin.
So it would prevent issues later.

The documentation will be better upgraded later, when we will be ready to have some flash.% target or seen the actual constrains for each flasher.

@MrKevinWeiss MrKevinWeiss merged commit e3e2b6d into RIOT-OS:master Mar 1, 2019
@kaspar030
Copy link
Copy Markdown
Contributor

If @jcarrano doesn't press the big green button by the end of the day I will!

wow your day ends early! ;)

@MrKevinWeiss
Copy link
Copy Markdown
Contributor

and starts late 😆

@cladmi
Copy link
Copy Markdown
Contributor Author

cladmi commented Mar 1, 2019

Thank you for the review, now I need to work :)

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: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants