-
Notifications
You must be signed in to change notification settings - Fork 2k
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
boards/nrf52-based: factor out shared code #8102
boards/nrf52-based: factor out shared code #8102
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a quick overview. Otherwise the PR looks good;
I'll run some tests as soon as I can.
boards/common/nrf52/Makefile.include
Outdated
export JLINK_DEVICE := nrf52 | ||
|
||
# special options when using SoftDevice | ||
ifneq (,$(filter nordic_softdevice_ble,$(USEPKG))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why ifneq ? It should be ifeq.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forget this one, I read it too fast...
boards/common/nrf52/Makefile.include
Outdated
# special options when using SoftDevice | ||
ifneq (,$(filter nordic_softdevice_ble,$(USEPKG))) | ||
export JLINK_PRE_FLASH := erase\nloadfile $(BINDIR)/softdevice.hex | ||
export FLASH_ADDR := 0x1f000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to get this value from the ld script instead ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea, but then again, I'd say this is not part of this PR...
boards/common/nrf52/Makefile.dep
Outdated
|
||
ifeq (,$(filter nrfmin,$(USEMODULE))) | ||
ifneq (,$(filter gnrc_netdev_default,$(USEMODULE))) | ||
USEPKG += nordic_softdevice_ble |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently there is an order issue with the USEPKG
here and the ifneq (,$(filter nordic_softdevice_ble,$(USEPKG)))
in Makefile.include
see discussion in #8068
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, so you think we should wait for #8068 before going on with this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not mandatory, we can merge this one "as it", I'll rebase #8068 and try to fix this issue since it is related to the softdevice. But if you already have a potential fix you can add it there.
@dylad thanks for your review! My plan was simply to copy together all the shared files for the two nrf52dk boards, I did not try to improve anything else (scope for other PRs...). But I had one more thought: it seems to me by now, that naming the shared folder something like |
@haukepetersen I am not against but I found the name |
sounds good, will do. |
8c40d75
to
0a982eb
Compare
renamed the common folder to |
Anyone any idea what Murdock's problem is here? Locally the builds run fine on my system... |
If I try to compile one of the failing applications I get
You should really update your system some time ;-) |
Ok, running the buildtest I get the same error now. This PR needs #8058 to work, so added the 'Waiting for Other PR' label |
0a982eb
to
08fc950
Compare
rebased as #8058 was merged. PR is ready for review now. |
c8ffdd7
to
baba39e
Compare
The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@haukepetersen code-wise your changes look fine. I'm sorry that I didn't join the discussion about naming the common folder earlier, but IMO "nrf52xxxdk" might get misleading when introducing #8035. The aconno board is also based on a nrf52832xxaa and might benefit from the common structure but "dk" is not part of the name. What do you think? Maybe nrf52-based?
Will do some tests next
@@ -37,6 +37,7 @@ extern "C" { | |||
#define LED2_PIN GPIO_PIN(0, 19) | |||
#define LED3_PIN GPIO_PIN(0, 20) | |||
|
|||
#define LED_PORT (NRF_P0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that you've defined this, pleas apply below!
Tests succeeded. Now that you touch these files how about addin to the LED/BTN SAUL adaption: |
baba39e
to
cb2ca02
Compare
Makes indeed a lot of sense: done. Regarding the naming: IMHO the name |
Alright then I'll consider renaming that folder once I am at #8035 again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments have been addressed, re-tested, ACK and go
following the structure proposed in #8058
Both Nordic dev-kits share duplicate a bit of configuration, so this PR makes them share it.