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

pkg/nordic-softdevice: remove deprecated package #15326

Merged
merged 6 commits into from
Oct 29, 2020

Conversation

aabadie
Copy link
Contributor

@aabadie aabadie commented Oct 28, 2020

Contribution description

This PR removes the nordic-softdevice package and all related code from the code base. The package is marked as deprecated and its removal is planned for after 2020.10 release, so at any time now that we are in feature freeze.

* @deprecated Will be removed after the 2020.10 release. Use nimble for BLE
* support instead.

Testing procedure

  • A green Murdock
  • Ensure no more mentions to the package are present (except in the release notes):
$ git grep -i -n softdevice | grep -v release-notes
boards/nrf52840dongle/Makefile.include:11:  # the end, leaving 892k for the application. This overwrites any SoftDevice,

I kept the mention to softdevice in boards/nrf52840dongle/Makefile.include because I think this is not related to RIOT: the softdevice could have been put there by a previously installed firmware.

Issues/PRs references

Was marked as deprecated in #14092

@aabadie aabadie added Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Oct 28, 2020
@miri64
Copy link
Member

miri64 commented Oct 28, 2020

I still found some mentions of the softdevice:

$ git log -1 --oneline
03f7904bda (HEAD) tests/l2util: remove mention to nordic-softdevice-ble
$ ls r*    # checking if release-notes.txt is the only thing starting with r
release-notes.txt
$ git grep -i softdevice -- [^r]*   # check all except paths starting with r
boards/common/nrf52/Kconfig:    select HAS_RIOTBOOT if !USEPKG_NORDIC_SOFTDEVICE_BLE
boards/nrf52840dongle/Makefile.include:  # the end, leaving 892k for the application. This overwrites any SoftDevice,
cpu/nrf52/Kconfig:    select HAS_BLE_NORDIC_SOFTDEVICE
cpu/nrf5x_common/Kconfig:config HAS_BLE_NORDIC_SOFTDEVICE
cpu/nrf5x_common/Kconfig:        Indicates that Nordic SoftDevice support in RIOT has been verified on the
cpu/nrf5x_common/periph/hwrng.c:#ifndef MODULE_NORDIC_SOFTDEVICE_BLE
cpu/nrf5x_common/periph/hwrng.c: * The hardware peripheral is used by the SoftDevice. When the SoftDevice is
cpu/nrf5x_common/periph/hwrng.c: * enabled, it shall only be accessed through the SoftDevice API
cpu/nrf5x_common/periph/hwrng.c:#ifndef MODULE_NORDIC_SOFTDEVICE_BLE
cpu/nrf5x_common/periph/hwrng.c:#endif /* MODULE_NORDIC_SOFTDEVICE_BLE */
sys/net/gnrc/netif/gnrc_netif_device_type.c:    defined(MODULE_NORDIC_SOFTDEVICE_BLE) || defined(MODULE_NIMBLE_NETIF)
sys/net/gnrc/netif/gnrc_netif_device_type.c:#if defined(MODULE_NORDIC_SOFTDEVICE_BLE) || defined(MODULE_NIMBLE_NETIF)
sys/net/gnrc/netif/init_devs/init.c:    if (IS_USED(MODULE_NORDIC_SOFTDEVICE_BLE)) {
sys/net/link_layer/l2util/l2util.c:    defined(MODULE_NORDIC_SOFTDEVICE_BLE) || defined(MODULE_NIMBLE_NETIF)
sys/net/link_layer/l2util/l2util.c:           defined(MODULE_NORDIC_SOFTDEVICE_BLE) || defined(MODULE_NIMBLE_NETIF) */
sys/net/link_layer/l2util/l2util.c:#if defined(MODULE_NORDIC_SOFTDEVICE_BLE) || defined(MODULE_NIMBLE_NETIF)
sys/net/link_layer/l2util/l2util.c:#endif  /* defined(MODULE_NORDIC_SOFTDEVICE_BLE) || defined(MODULE_NIMBLE_NETIF) */
sys/net/link_layer/l2util/l2util.c:#if defined(MODULE_NORDIC_SOFTDEVICE_BLE) || defined(MODULE_NIMBLE_NETIF)
sys/net/link_layer/l2util/l2util.c:#endif  /* defined(MODULE_NORDIC_SOFTDEVICE_BLE) || defined(MODULE_NIMBLE_NETIF) */
sys/net/link_layer/l2util/l2util.c:    defined(MODULE_NORDIC_SOFTDEVICE_BLE) || defined(MODULE_NIMBLE_NETIF)
sys/net/link_layer/l2util/l2util.c:           defined(MODULE_NORDIC_SOFTDEVICE_BLE) || defined(MODULE_NIMBLE_NETIF) */

@dylad
Copy link
Member

dylad commented Oct 28, 2020

Shouldn't we add an entry to LOSTANDFOUND.md for this ?

@aabadie
Copy link
Contributor Author

aabadie commented Oct 28, 2020

I still found some mentions of the softdevice

Indeed, I adapted the testing procedure. Will remove the remaining mentions.

Shouldn't we add an entry to LOSTANDFOUND.md for this ?

That's in the plan but should in a follow-up PR since this one contains several removal commits and I prefer to reference a single merge commit in LOSTANDFOUND.md.

@aabadie
Copy link
Contributor Author

aabadie commented Oct 28, 2020

Should be good now. Let's see what Murdock thinks of it.

@miri64
Copy link
Member

miri64 commented Oct 28, 2020

What about this one?

# Using nrfutil implies using the Nordic bootloader described at
# <https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial>.
#
# It has a static MBR at the first 4k, and an ample 128k Open USB Bootloader at
# the end, leaving 892k for the application. This overwrites any SoftDevice,
# but that's what the minimal working example for the dongle does as well.

Not sure though, if @chrysn maybe meant other softdevices.

@aabadie
Copy link
Contributor Author

aabadie commented Oct 28, 2020

What about this one?

I'm not sure either (I edited the OP about that) but it would good if @chrysn could confirm.

@miri64
Copy link
Member

miri64 commented Oct 28, 2020

(I edited the OP about that)

The problem with edits 😅 ...

@aabadie
Copy link
Contributor Author

aabadie commented Oct 28, 2020

The problem with edits

I should have mentioned that in #15326 (comment) ;)

@chrysn
Copy link
Member

chrysn commented Oct 29, 2020

What I meant by the line is "overwrites the SoftDevice if it is present", though thinking back to that PR I think I even adapted it later to just leave the SoftDevice in place. At any rate, I'm only aware of one thing called the SoftDevice, and the nrfutil flashing procedure does not depend on RIOT having any support for it (other than possibly excluding that area from the usable space, which it may or may not do right now but is immaterial to the removal of the nordic-softdevice package).

@miri64 miri64 added the Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation label Oct 29, 2020
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.

In that case I give the current state my ACK. @aabadie please squash.

@aabadie aabadie force-pushed the pr/pkg/softdevice_remove branch from 32cf12d to 68d3f2e Compare October 29, 2020 08:02
@aabadie aabadie merged commit 35b6cce into RIOT-OS:master Oct 29, 2020
@aabadie aabadie deleted the pr/pkg/softdevice_remove branch October 29, 2020 09:58
@aabadie
Copy link
Contributor Author

aabadie commented Oct 29, 2020

Let's merge. I'll open another PR to list softdevice removal in LOSTANDFOUND.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR 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.

4 participants