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

make: test SERIAL for sam0 boards only if required #10840

Closed
wants to merge 1 commit into from

Conversation

smlng
Copy link
Member

@smlng smlng commented Jan 22, 2019

Contribution description

If SERIAL is given as environment variable to the build/make system only
test/check the SERIAL if needed for certain make goals, i.e., flash,
flash-only, debug and debug-server. Otherwise ignore it and simply build.

Testing procedure

as described in #10367 run following command on master and with this PR

make -C examples/hello-world BOARD=samr21-xpro SERIAL=ATML211234567

on master this will not build but fail, with this PR it builds as expected as SERIAL is not required and can be safely ignored.

Issues/PRs references

fixes #10367

If SERIAL is given as environment variable to the build/make system only
test/check the SERIAL if needed for certain make goals, i.e., flash,
flash-only, debug and debug-server. Otherwise ignore it and simply build.

fixes RIOT-OS#10367
@smlng smlng added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation 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 labels Jan 22, 2019
@smlng smlng requested review from cladmi and jnohlgard January 22, 2019 08:49
Copy link
Contributor

@cladmi cladmi left a comment

Choose a reason for hiding this comment

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

This is not the way it should be handled. It is evaluated because PORT or FFLAGS is evaluated even when not needed and this should be removed.
When using deferred variables only, and not immediate variables, make will only evaluate the expressions when needed so when flash/debug/term will be used.
This means removing all immediate usages and export the value as it is not needed.

An effort has been started in this direction in #10440 as a split from #10342

@cladmi
Copy link
Contributor

cladmi commented Jan 23, 2019

I added a tracking PR for removing useless exports and immediate evaluation.

#10850

@smlng
Copy link
Member Author

smlng commented Feb 1, 2019

closing as per @cladmi commented

@smlng smlng closed this Feb 1, 2019
@smlng smlng deleted the pr/make/sam0_serial branch June 25, 2019 08:43
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.

sam0.inc.mk: Did not find a device with serial ATML21xxxxxxxx
2 participants