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

cpu/fe310/gpio: use gpio_irq feature #10007

Merged
merged 1 commit into from
Oct 9, 2018

Conversation

haukepetersen
Copy link
Contributor

See #9992

@miri64 miri64 added Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation Area: drivers Area: Device drivers Platform: RISC-V Platform: This PR/issue effects RISC-V-based platforms labels Sep 27, 2018
@miri64
Copy link
Member

miri64 commented Oct 9, 2018

The binary size doesn't change with this PR, regardless if I compile with or without FEATURES_OPTIONAL += periph_gpio_irq, also the binary is larger than in current master :-/. So I can't use the shortcut for testing I used in other PRs in this family. @kaspar030 if I remember correctly you have a hifive1. Can you have a look?

@miri64 miri64 requested a review from kaspar030 October 9, 2018 09:26
@kaspar030
Copy link
Contributor

@kaspar030 if I remember correctly you have a hifive1. Can you have a look?

The hifive1 is on my desk at FU. I won't be there for a while, maybe you could use that for testing?

@miri64
Copy link
Member

miri64 commented Oct 9, 2018

Actually, this problem was caused because I was building with docker (see #10001 (comment)). I'll retry with setting the variables within the Makefile instead.

Copy link
Member

@miri64 miri64 left a comment

Choose a reason for hiding this comment

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

It still grows for some reason by 8 bytes compared to master without periph_gpio_irq, but I was able to compare the build sizes and diffs like I did in e.g. #10002:

As far as I can tell (and checked with colordiff -u <(git show | grep "^-" | sed 's/^-//g') <(git show | grep "^+" | sed 's/^+//g')) this just moves and ifdefs some code around. After a local rebase to include #9981 I also was able to build this with tests/periph_gpio both with periph_gpio_irq manually added or removed to FEATURES_OPTIONAL. […]

As with #9997, this PR needed another level of diffing, because the move wasn't that obvious, but I checked this as well:

colordiff -u \
    <(diff -u <(git show | grep "^-" | sed 's/^-//g') \
              <(git show | grep "^+" | sed 's/^+//g') | grep "^-" | sed 's/^-//g') \
    <(diff -u <(git show | grep "^-" | sed 's/^-//g') \
              <(git show | grep "^+" | sed 's/^+//g') | grep "^+" | sed 's/^+//g')

@miri64 miri64 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Oct 9, 2018
@gschorcht
Copy link
Contributor

gschorcht commented Oct 9, 2018

When I execute the make command directly within docker, it works as expected and the image size reduces when DISABLE_MODULE=periph_gpio_irq is used at make command line. When I run docker from host with BUILD_IN_DOCKER, I get the same problem.

Is that something I should look at? You said it seems to be specific for esp8266 platform.

@miri64
Copy link
Member

miri64 commented Oct 9, 2018

Is that something I should look at? You said it seems to be specific for esp8266 platform.

I asked @cladmi about it and it is a known, but not easy (or even practicable) to fix problem. Basically, the docker container would need to get every possible variables handed via the environment filtered from irrelevand variables. This sounded to me rather like a nice to have, than something sensible to implement or maintain, so I didn't open an issue for that.

But anyway... this is completely unrelated from this PR

@miri64 miri64 merged commit 4e92c2a into RIOT-OS:master Oct 9, 2018
@miri64 miri64 deleted the fix_gpioirq_fe310 branch October 9, 2018 12:22
@cladmi
Copy link
Contributor

cladmi commented Oct 9, 2018

It's easy to fix on a per variable basic, it means adding it in here:

export DOCKER_ENV_VARS = \

But what I meant it is more a global issue of knowing what should be exported globally than just adding one variable there. A solution to make it flexible could be to use DOCKER_ENV_VARS += so you could do

DOCKER_ENV_VARS=ANY_VARIABLE  ANY_VARIABLE=value make BUILD_IN_DOCKER=1

@miri64
Copy link
Member

miri64 commented Oct 9, 2018

It's easy to fix on a per variable basic, it means adding it in here:

The per variable basis was the thing that sounded to me as "something [that is not] sensible to implement or maintain" ;-).

I'm not sure your proposed solution is really one. You would need to know it the same way you would need to know that some variables are not provided to the docker container's environment.

@cladmi
Copy link
Contributor

cladmi commented Oct 9, 2018

You would need to know indeed, but currently even if you know you can't do it from the command line.

It would just allow setting some non handled variables.
And there are application/board specific variables that will never be globally exported.

And even if you don't know, you could basically always add it to DOCKER_ENV_VARS even if it is already in to be sure :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: RISC-V Platform: This PR/issue effects RISC-V-based platforms Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants