Skip to content

pkg: Port NASA/bplib Package - #22091

Merged
crasbe merged 3 commits into
RIOT-OS:masterfrom
RainbowSimon:bplib-port
Apr 21, 2026
Merged

pkg: Port NASA/bplib Package#22091
crasbe merged 3 commits into
RIOT-OS:masterfrom
RainbowSimon:bplib-port

Conversation

@RainbowSimon

@RainbowSimon RainbowSimon commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

DTN is a protocol architecture to make communication delay / disruption tolerant. Originating from space communication, NASAs bplib implements the BPv7 bundle protocol.

Usually it sits on top of the trasport layer (CLAs for TCP and UDP are most common), but it does not have to. Convergence Layer Adapters can be anything, as long as they are defined on both sides.

In this current draft the UDP convergence layer for testing on native board is implemented.

Contribution description

Port into pkg/bplib. Also bump pkg/qcbor as required by bplib.

The changes (in the patches) are relatively small.

  • Storage (which natively used sqlite) was disabled and the functions are now extern, expected to be provided by a porting module.
  • Synchronization primitives are now RIOT mutexes, semas and not pthread ones
  • Builds using a Makefile, not with CMake
  • Bplibs Time module writes to vfs

It is still a draft. The following is a likely incomplete list of what still needs to be done:

  • Doxygen Documentation
  • Static Tests probably wont pass
  • The important tables (channel and contacts) are globals currently. Accessor functions to set certain things (like the contact CLA IP address) would likely be better
  • Most dynamic memory allocation is gone (there was not much in the first place) but in bplibs QM there are still callocs which I would like to remove.
  • An automated test or two would be nice
  • Storage is currently not maintaned (expired bundles are not kicked out). It is now but has to be called manually.
  • Storage is searched every time. Now it is only searched in the beginning, until all bundles that channel can use are egressed. This works since new bundles will never enter the storage but go to the channel directly once it is active.
  • Right now the entire (applicable by the destination EID ranges) storage directory is searched for bundles, fed into the cache, to egress the ones with smalles remaining time to live first. An alternative storage backend has been implemented.
  • Default more of the currently CFLAGS in the examples Makefile. Will not do, but now the documentation explains all configuration options.
  • I have a local ble_cla using nimble which also works in principle, get that one ready
  • Make a storage which just uses the RAM, which should be okay for leaf-nodes, which have just one next hop. Will not do, but now there is the void storage, which does not store anything.

Testing procedure

The example under examples/networking/dtn/bplib/cla_udp can be run on native (or any board with gnrc + UDP).

Issues/PRs references

@github-actions github-actions Bot added Area: doc Area: Documentation Area: pkg Area: External package ports Area: examples Area: Example Applications labels Feb 19, 2026
@crasbe crasbe added 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 19, 2026
@RainbowSimon RainbowSimon changed the title Bplib port Port NASA/bplib package Feb 19, 2026
@riot-ci

riot-ci commented Feb 20, 2026

Copy link
Copy Markdown

Murdock results

✔️ PASSED

71391c1 dist/whitespacecheck: Ignore git *.patch files

Success Failures Total Runtime
11061 0 11062 32m:57s

Artifacts

@crasbe crasbe left a comment

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.

Hello Simon,

thank you for submitting the PR early. I have some general remarks that can also be applied to the other files, I did not want to mark every occurance in every file.
Also the static test has some remarks that have to be addressed.

One thing I do not understand yet is why you include some files of the bplib repository directly? If you do not want to fetch the full repository in the package, you can use so called "Sparse Paths". An example of how this works can be found here: https://github.com/RIOT-OS/RIOT/pull/22040/changes#diff-1a9efff322ab2483b57b549e33422bcb923a3d6fcfb62c61a65f95e9b9ad5874

Unfortunately our documentation about that is a bit slim at the moment I think.

Comment thread examples/networking/dtn/bplib_cla_udp/main.c
Comment thread pkg/bplib/cla/udp/include/bplib_cla_udp.h Outdated
Comment thread pkg/bplib/init/bplib_init.c Outdated
Comment thread pkg/bplib/Makefile.dep Outdated
@crasbe crasbe added the CI: no fast fail don't abort PR build after first error label Feb 20, 2026
@RainbowSimon

Copy link
Copy Markdown
Contributor Author

Thanks for your comments. Yes I am aware I need to integrate the RIOT coding conventions and fix the static tests.

Could you elaborate on your first comment? Of the https://github.com/nasa/bplib repo, the folders aa, bpa, ci, cla, inc (and version) are needed for the build. bpa/stor/src is not compiled, so that the implementation can be added from outside of bplib, to support different storage backends.

@crasbe

crasbe commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

Could you elaborate on your first comment? Of the https://github.com/nasa/bplib repo, the folders aa, bpa, ci, cla, inc (and version) are needed for the build. bpa/stor/src is not compiled, so that the implementation can be added from outside of bplib, to support different storage backends.

You have files that are Copyright NASA, I assumed that you didn't write them, so they probably came from the bplib repository 😅

What is the reason for adding them to the RIOT source tree instead of fetching and patching them from the official repo?

@RainbowSimon

Copy link
Copy Markdown
Contributor Author

For documentation purposes:

What is the reason for adding them to the RIOT source tree instead of fetching and patching them from the official repo?

I did not look into the copyright headers yet. These should be added everywhere now, except for the vfs storage.

Certain files, like NC "Node Config" and FWP "Framework Proxy" include OS specific callbacks or configuration tables. These are not part of the bplib core, but rather something that has to be implemented on the using environment. They come from the reference POSIX example in [bplib]/app.

@RainbowSimon

RainbowSimon commented Mar 9, 2026

Copy link
Copy Markdown
Contributor Author

Apart from the typos and whitespace issues which I happened to introduce again this should now follow the coding conventions and have addressed the issued I mentioned in the original post @crasbe .

The following was added feature-wise.

  • The BLE CLA has been added
  • Another likely better suited storage / egress strategy
  • Storage is now only searched as long as there are bundles relevant to the channel / contact.
  • Also the void storage to not store anything
  • Doxygen documentation
  • Access functions for the NC
  • Storage maintenence functions which kick out old bundles, but these have to be called by the user

@crasbe crasbe left a comment

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.

This is the first part of a review up until and including pkg/bplib/cla/doc.md.

Comment thread examples/networking/dtn/bplib_cla_ble/main.c Outdated
Comment thread examples/networking/dtn/bplib_cla_ble/main.c Outdated
Comment thread examples/networking/dtn/bplib_cla_ble/main.c Outdated
Comment thread examples/networking/dtn/bplib_cla_ble/main.c Outdated
Comment thread examples/networking/dtn/bplib_cla_ble/main.c Outdated
Comment thread pkg/bplib/cla/udp/bplib_cla_udp.c
Comment thread pkg/bplib/cla/udp/bplib_cla_udp.c
Comment thread pkg/bplib/cla/udp/bplib_cla_udp.c Outdated
Comment thread pkg/bplib/cla/udp/bplib_cla_udp.c Outdated
Comment thread pkg/bplib/fwp/include/bplib_riot_fwp.h Outdated

@crasbe crasbe left a comment

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.

This is the secondpart of a review up to and including pkg/bplib/storage/vfs/ordered/Makefile.

Comment thread pkg/bplib/fwp/bplib_riot_fwp.c Outdated
Comment thread pkg/bplib/fwp/bplib_riot_fwp.c Outdated
Comment on lines +95 to +216
static BPLib_Status_t BPA_TABLEP_TableUpdate(uint8_t TableType, void** TblPtr)
{
(void) TableType;
(void) TblPtr;
return BPLIB_SUCCESS;
}

static BPLib_Status_t BPA_EVP_Init(void)
{
return BPLIB_SUCCESS;
}

static BPLib_Status_t BPA_EVP_SendEvent(uint16_t EventID,
BPLib_EM_EventType_t EventType, char const* Spec)
{
DEBUG("Event Type: %d, Event ID: %d, Event Text: %s\n", EventID, EventType, Spec);
return BPLIB_SUCCESS;
}

static BPLib_Status_t BPA_TLMP_SendNodeMibConfigPkt(
BPLib_NodeMibConfigHkTlm_Payload_t* NodeMIBConfigTlmPayload)
{
(void) NodeMIBConfigTlmPayload;
return BPLIB_SUCCESS;
}

static BPLib_Status_t BPA_TLMP_SendPerSourceMibConfigPkt(
BPLib_SourceMibConfigHkTlm_Payload_t* SrcMIBConfigTlmPayload)
{
(void) SrcMIBConfigTlmPayload;
return BPLIB_SUCCESS;
}

static BPLib_Status_t BPA_TLMP_SendNodeMibReportsPkt(
BPLib_NodeMibReportsHkTlm_Payload_t* NodeMIBReportsTlmPayload)
{
(void) NodeMIBReportsTlmPayload;
return BPLIB_SUCCESS;
}

static BPLib_Status_t BPA_TLMP_SendNodeMibCounterPkt(
BPLib_NodeMibCountersHkTlm_Payload_t* NodeMIBCounterTlmPayload)
{
(void) NodeMIBCounterTlmPayload;
return BPLIB_SUCCESS;
}

static BPLib_Status_t BPA_TLMP_SendPerSourceMibCounterPkt(
BPLib_SourceMibCountersHkTlm_Payload_t* SrcMIBCounterTlmPayload)
{
(void) SrcMIBCounterTlmPayload;
return BPLIB_SUCCESS;
}

static BPLib_Status_t BPA_TLMP_SendChannelContactPkt(
BPLib_ChannelContactStatHkTlm_Payload_t* ChannelContactTlmPayload)
{
(void) ChannelContactTlmPayload;
return BPLIB_SUCCESS;
}

static BPLib_Status_t BPA_TLMP_SendStoragePkt(
BPLib_StorageHkTlm_Payload_t* StorTlmPayload)
{
(void) StorTlmPayload;
return BPLIB_SUCCESS;
}

static BPLib_Status_t BPA_ADUP_AddApplication(uint32_t ChanId)
{
(void) ChanId;
return BPLIB_SUCCESS;
}

static BPLib_Status_t BPA_ADUP_StartApplication(uint32_t ChanId)
{
#if defined(MODULE_BPLIB_STOR_VFS_ORDERED) || defined(MODULE_BPLIB_STOR_VFS_UNORDERED)
bplib_stor_vfs_channel_changed(ChanId);
#endif
(void) ChanId;
return BPLIB_SUCCESS;
}

static BPLib_Status_t BPA_ADUP_StopApplication(uint32_t ChanId)
{
(void) ChanId;
return BPLIB_SUCCESS;
}

static BPLib_Status_t BPA_ADUP_RemoveApplication(uint32_t ChanId)
{
(void) ChanId;
return BPLIB_SUCCESS;
}

static BPLib_Status_t BPA_CLAP_ContactSetup(uint32_t ContactId, BPLib_CLA_ContactsSet_t ContactInfo)
{
(void) ContactId;
(void) ContactInfo;
return BPLIB_SUCCESS;
}

static BPLib_Status_t BPA_CLAP_ContactStart(uint32_t ContactId)
{
#if defined(MODULE_BPLIB_STOR_VFS_ORDERED) || defined(MODULE_BPLIB_STOR_VFS_UNORDERED)
bplib_stor_vfs_contact_changed(ContactId);
#endif
(void) ContactId;
return BPLIB_SUCCESS;
}

static BPLib_Status_t BPA_CLAP_ContactStop(uint32_t ContactId)
{
(void) ContactId;
return BPLIB_SUCCESS;
}

static void BPA_CLAP_ContactTeardown(uint32_t ContactId)
{
(void) ContactId;
return;
}

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.

I wonder if it makes sense to send a SUCCESS return message if the functions aren't actually implemented?

@RainbowSimon RainbowSimon Mar 17, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have not thought about that but I it seems necessary, since the real action this callback was called from might not be executed otherwise see bplib PI.

Comment thread pkg/bplib/init/include/bplib_init.h Outdated
Comment thread pkg/bplib/init/include/bplib_init.h Outdated
Comment thread pkg/bplib/storage/vfs/ordered/cache.h Outdated
Comment thread pkg/bplib/storage/vfs/ordered/cache.h Outdated
Comment thread pkg/bplib/storage/vfs/ordered/cache.h Outdated
Comment thread pkg/bplib/storage/vfs/ordered/cache.h Outdated
Comment thread pkg/bplib/storage/vfs/ordered/cache.h Outdated
@crasbe crasbe changed the title Port NASA/bplib package pkg: Port NASA/bplib Package Mar 12, 2026
@crasbe
crasbe marked this pull request as ready for review March 24, 2026 14:23
@crasbe
crasbe requested a review from jia200x as a code owner March 24, 2026 14:23

@crasbe crasbe left a comment

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.

Last part of the review.

Comment thread pkg/bplib/storage/vfs/ordered/storage.c Outdated
Comment thread pkg/bplib/storage/vfs/ordered/storage.c
Comment thread pkg/bplib/storage/vfs/ordered/storage.c Outdated
Comment thread pkg/bplib/storage/vfs/ordered/storage.c Outdated
Comment thread pkg/bplib/storage/vfs/ordered/storage.c Outdated
Comment thread pkg/bplib/doc.md Outdated
Comment thread pkg/bplib/doc.md Outdated
Comment thread pkg/bplib/doc.md Outdated
Comment thread pkg/bplib/doc.md Outdated
Comment thread pkg/bplib/doc.md Outdated
@crasbe

crasbe commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

I ran make generate-Makefile.ci for your two example applications locally to check which boards would be supported by the application. There are some compilation errors for ESP based boards that I'm currently investigating, but here is the examples/networking/dtn/bplib_cla_ble/Makefile.ci file:

BOARD_INSUFFICIENT_MEMORY := \
    airfy-beacon \
    calliope-mini \
    e104-bt5010a-tb \
    e104-bt5011a-tb \
    microbit \
    nrf51dk \
    nrf51dongle \
    yunjia-nrf51822 \
    #

@crasbe

crasbe commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

The build succeeds for the ESPs now, but there is some kind of race condition for the stk3600 and slstk3401a that I can only reproduce when running make generate-Makefile.ci. Running the command individually succeeds, so I'm reasonably sure that this is a quirk in our build system and has nothing to do with your code. I'll investigate more tomorrow.

Build log:
stk3600                                 build failed
make[1]: Entering directory '/home/buechse/RIOTstuff/riot-vanilla/RIOT/examples/networking/dtn/bplib_cla_udp'
Makefile:33: REMOTE IPv6 address not set, defaulting to [::1]
Makefile:38: REMOTE_EID_NODE destination node number not set, defaulting to 100
Makefile:44: LOCAL_EID_NODE destination node number not set, defaulting to 100
rm -rf /home/buechse/RIOTstuff/riot-vanilla/RIOT/examples/networking/dtn/bplib_cla_udp/bin/native64/pkg-build/bplib
rm -rf /home/buechse/RIOTstuff/riot-vanilla/RIOT/examples/networking/dtn/bplib_cla_udp/bin/native64/pkg-build/cmsis
rm -rf /home/buechse/RIOTstuff/riot-vanilla/RIOT/examples/networking/dtn/bplib_cla_udp/bin/native64/pkg-build/gecko_sdk
rm -rf /home/buechse/RIOTstuff/riot-vanilla/RIOT/examples/networking/dtn/bplib_cla_udp/bin/native64/pkg-build/mpaland-printf
rm -rf /home/buechse/RIOTstuff/riot-vanilla/RIOT/examples/networking/dtn/bplib_cla_udp/bin/native64/pkg-build/qcbor
Launching build container using image "docker.io/riot/riotbuild@sha256:08fa7da2c702ac4db7cf57c23fc46c1971f3bffc4a6eff129793f853ec808736".
docker run --rm --tty --user $(id -u) --platform linux/amd64 -v '/home/buechse/RIOTstuff/riot-vanilla/RIOT:/data/riotbuild/riotbase:delegated' -v '/home/buechse/.cargo/registry:/data/riotbuild/.cargo/registry:delegated' -v '/home/buechse/.cargo/git:/data/riotbuild/.cargo/git:delegated' -e 'TZ=Europe/Berlin' -e 'RIOTBASE=/data/riotbuild/riotbase' -e 'CCACHE_BASEDIR=/data/riotbuild/riotbase' -e 'BUILD_DIR=/data/riotbuild/riotbase/build' -e 'BUILD_IN_DOCKER=0' -e 'RIOTPROJECT=/data/riotbuild/riotbase' -e 'RIOTCPU=/data/riotbuild/riotbase/cpu' -e 'RIOTBOARD=/data/riotbuild/riotbase/boards' -e 'RIOTMAKE=/data/riotbuild/riotbase/makefiles'      -e 'BOARD=stk3600' -e 'RIOT_CI_BUILD=1' -e 'BOARD=stk3600' -e 'RIOT_CI_BUILD=1' -e 'DISABLE_MODULE=' -e 'DEFAULT_MODULE=' -e 'FEATURES_REQUIRED=' -e 'FEATURES_BLACKLIST=' -e 'FEATURES_OPTIONAL=' -e 'USEMODULE=auto_init_gnrc_netif bplib_cla_udp bplib_stor_vfs_ordered gnrc_ipv6_default gnrc_sock_udp netdev_default shell shell_cmd_gnrc_netif shell_cmd_ps vfs_default' -e 'USEPKG=bplib' -e 'DISABLE_MODULE=' -e 'DEFAULT_MODULE=' -e 'FEATURES_REQUIRED=' -e 'FEATURES_BLACKLIST=' -e 'FEATURES_OPTIONAL=' -e 'USEMODULE=auto_init_gnrc_netif bplib_cla_udp bplib_stor_vfs_ordered gnrc_ipv6_default gnrc_sock_udp netdev_default shell shell_cmd_gnrc_netif shell_cmd_ps vfs_default' -e 'USEPKG=bplib'  -w '/data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/' 'docker.io/riot/riotbuild@sha256:08fa7da2c702ac4db7cf57c23fc46c1971f3bffc4a6eff129793f853ec808736' make 'BOARD=stk3600' 'BOARD=stk3600'   -j64  all
Makefile:33: REMOTE IPv6 address not set, defaulting to [::1]
Makefile:38: REMOTE_EID_NODE destination node number not set, defaulting to 100
Makefile:44: LOCAL_EID_NODE destination node number not set, defaulting to 100
Building application "bplib_cla_udp" for "stk3600" with CPU "efm32".

[INFO] Consider using git-cache-rs to speed up your build and reduce network traffic! See: https://guides.riot-os.org/build-system/advanced_build_system_tricks/#speed-up-builds-with-git-cache-rs
[INFO] Consider using git-cache-rs to speed up your build and reduce network traffic! See: https://guides.riot-os.org/build-system/advanced_build_system_tricks/#speed-up-builds-with-git-cache-rs
"make" -C /data/riotbuild/riotbase/build/pkg/bplib -f riot.mk BUILDDIR=/data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib
"make" -C /data/riotbuild/riotbase/pkg/bplib/cla/udp
"make" -C /data/riotbuild/riotbase/pkg/bplib/fwp
"make" -C /data/riotbuild/riotbase/pkg/bplib/init
"make" -C /data/riotbuild/riotbase/pkg/bplib/nc
"make" -C /data/riotbuild/riotbase/pkg/bplib/storage/vfs/ordered
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: all warnings being treated as errors
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/aa/arp/src/bplib_arp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/bpa/ct/src/bplib_ct.o] Error 1
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: /data/riotbuild/riotbase/build/pkg/cmsis/CMSIS/DSP/Include: No such file or directory [-Werror=missing-include-dirs]
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/bpa/pdb/src/bplib_pdb.o] Error 1
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/mem/src/bplib_ben_allocator.o] Error 1
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/version/src/bplib_version.o] Error 1
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/rbt/src/bplib_rbt_api.o] Error 1
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/eid/src/bplib_eid.o] Error 1
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/crc/src/bplib_crc.o] Error 1
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/rbt/src/bplib_rbt_iterator.o] Error 1
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/rbt/src/bplib_rbt_impl.o] Error 1
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/aa/as/src/bplib_as.o] Error 1
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/aa/fwp/src/bplib_fwp.o] Error 1
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/aa/as/src/bplib_as_internal.o] Error 1
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/em/src/bplib_em.o] Error 1
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/aa/nc/src/bplib_nc_internal.o] Error 1
cc1: all warnings being treated as errors
make[2]: *** [/data/riotbuild/riotbase/Makefile.base:162: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/bplib_init/bplib_init.o] Error 1
make[1]: *** [Makefile:25: bplib_init] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/pl/src/bplib_pl.o] Error 1
make[2]: *** [/data/riotbuild/riotbase/Makefile.base:162: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/bplib_fwp/bplib_riot_fwp.o] Error 1
make[1]: *** [Makefile:19: bplib_fwp] Error 2
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/aa/nc/src/bplib_nc_rwlock.o] Error 1
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/bpa/ebp/src/bplib_ebp.o] Error 1
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/cla/src/bplib_cla_internal.o] Error 1
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/cbor/src/bplib_cbor_decode_bundle.o] Error 1
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/cbor/src/bplib_cbor_decode_primary.o] Error 1
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/cbor/src/bplib_cbor_encode_primary.o] Error 1
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/qm/src/bplib_qm_job.o] Error 1
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/cbor/src/bplib_cbor_encode_bundle.o] Error 1
cc1: all warnings being treated as errors
make[2]: *** [/data/riotbuild/riotbase/Makefile.base:162: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/bplib_stor_vfs_ordered/cache.o] Error 1
make[2]: *** Waiting for unfinished jobs....
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/aa/nc/src/bplib_nc.o] Error 1
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/cbor/src/bplib_cbor_crc.o] Error 1
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/cbor/src/bplib_cbor_encode_types.o] Error 1
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/qm/src/bplib_qm_waitqueue.o] Error 1
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/bpa/bi/src/bplib_bi.o] Error 1
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/cbor/src/bplib_cbor_decode_canonical.o] Error 1
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/qm/src/bplib_qm.o] Error 1
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/time/src/bplib_time.o] Error 1
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/cbor/src/bplib_cbor_encode_extension.o] Error 1
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/bpa/pi/src/bplib_pi.o] Error 1
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/mem/src/bplib_mem.o] Error 1
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/cbor/src/bplib_cbor_encode_payload.o] Error 1
make[2]: *** [/data/riotbuild/riotbase/Makefile.base:162: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/bplib_nc/bplib_riot_nc.o] Error 1
make[1]: *** [Makefile:22: bplib_nc] Error 2
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/time/src/bplib_time_internal.o] Error 1
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/cla/src/bplib_cla.o] Error 1
cc1: all warnings being treated as errors
make[2]: *** [/data/riotbuild/riotbase/Makefile.base:162: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/bplib_cla_udp/bplib_cla_udp.o] Error 1
make[1]: *** [Makefile:42: bplib_cla_udp] Error 2
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/ci/cbor/src/bplib_cbor_decode_types.o] Error 1
cc1: all warnings being treated as errors
make[2]: *** [riot.mk:38: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/aa/nc/src/bplib_nc_directives.o] Error 1
make[1]: *** [Makefile:49: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/pkg-build/bplib/libbplib.a] Error 2
cc1: all warnings being treated as errors
make[2]: *** [/data/riotbuild/riotbase/Makefile.base:162: /data/riotbuild/riotbase/examples/networking/dtn/bplib_cla_udp/bin/stk3600/bplib_stor_vfs_ordered/storage.o] Error 1
make[1]: *** [Makefile:29: bplib_stor_vfs_ordered] Error 2
make: *** [/data/riotbuild/riotbase/Makefile.include:807: pkg-build] Error 2
make[1]: *** [/home/buechse/RIOTstuff/riot-vanilla/RIOT/makefiles/docker.inc.mk:395: ..in-docker-container] Error 2
make[1]: Leaving directory '/home/buechse/RIOTstuff/riot-vanilla/RIOT/examples/networking/dtn/bplib_cla_udp'

@crasbe crasbe left a comment

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.

This fixes the build issues with LLVM on native32 and native64.

Comment thread pkg/bplib/nc/include/bplib_riot_nc.h Outdated
Comment thread pkg/bplib/Makefile.include Outdated
@crasbe

crasbe commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

This is the examples/networking/dtn/bplib_cla_udp/Makefile.ci, now that everything builds successfully (with #22180 and #22179 applied):

BOARD_INSUFFICIENT_MEMORY := \
    airfy-beacon \
    arduino-mkr1000 \
    arduino-mkrfox1200 \
    arduino-mkrwan1300 \
    arduino-mkrzero \
    arduino-nano-33-iot \
    arduino-zero \
    b-l072z-lrwan1 \
    bastwan \
    blackpill-stm32f103c8 \
    blackpill-stm32f103cb \
    bluepill-stm32f030c8 \
    bluepill-stm32f103c8 \
    bluepill-stm32f103cb \
    calliope-mini \
    cc1350-launchpad \
    cc2538dk \
    cc2650-launchpad \
    cc2650stk \
    e104-bt5010a-tb \
    e104-bt5011a-tb \
    e180-zg120b-tb \
    ek-lm4f120xl \
    feather-m0 \
    feather-m0-lora \
    feather-m0-wifi \
    firefly \
    frdm-kl43z \
    gd32vf103c-start \
    generic-cc2538-cc2592-dk \
    hamilton \
    hifive1 \
    hifive1b \
    i-nucleo-lrwan1 \
    ikea-tradfri \
    im880b \
    limifrog-v1 \
    lobaro-lorabox \
    lsn50 \
    maple-mini \
    mbed_lpc1768 \
    microbit \
    nrf51dongle \
    nucleo-c031c6 \
    nucleo-c071rb \
    nucleo-f030r8 \
    nucleo-f031k6 \
    nucleo-f042k6 \
    nucleo-f070rb \
    nucleo-f072rb \
    nucleo-f091rc \
    nucleo-f103rb \
    nucleo-f302r8 \
    nucleo-f303k8 \
    nucleo-f334r8 \
    nucleo-f410rb \
    nucleo-g431rb \
    nucleo-l011k4 \
    nucleo-l031k6 \
    nucleo-l053r8 \
    nucleo-l073rz \
    nz32-sc151 \
    olimexino-stm32 \
    omote \
    opencm904 \
    openmote-b \
    openmote-cc2538 \
    pba-d-01-kw2x \
    remote-pa \
    remote-reva \
    remote-revb \
    samd10-xmini \
    samd20-xpro \
    samd21-xpro \
    saml10-xpro \
    saml11-xpro \
    saml21-xpro \
    samr21-xpro \
    samr30-xpro \
    samr34-xpro \
    seeedstudio-gd32 \
    seeeduino_arch-pro \
    seeeduino_xiao \
    sensebox_samd21 \
    serpente \
    sipeed-longan-nano \
    sipeed-longan-nano-tft \
    slstk3301a \
    slstk3400a \
    slstk3401a \
    sltb001a \
    slwstk6000b-slwrb4150a \
    slwstk6220a \
    sodaq-autonomo \
    sodaq-explorer \
    sodaq-one \
    sodaq-sara-aff \
    sodaq-sara-sff \
    spark-core \
    stk3200 \
    stk3600 \
    stm32c0116-dk \
    stm32c0316-dk \
    stm32f030f4-demo \
    stm32f0discovery \
    stm32f7508-dk \
    stm32g0316-disco \
    stm32l0538-disco \
    stm32mp157c-dk2 \
    weact-g030f6 \
    wemos-zero \
    yarm \
    yunjia-nrf51822 \
    #

@crasbe crasbe self-assigned this Apr 8, 2026
Comment thread pkg/bplib/patches/0009-Add-CFLAGS-for-LLVM.patch Outdated
@RainbowSimon

Copy link
Copy Markdown
Contributor Author

All remaining review findings have been integrated in the fixup commits.

@crasbe crasbe left a comment

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.

Alrighty then, let's get this merged now.

Thank you for enduring the review and applying all the fixes! You can squash your commits now :)

@RainbowSimon

RainbowSimon commented Apr 16, 2026

Copy link
Copy Markdown
Contributor Author

Any Idea why the tests suddenly complain about whitespaces in the patches?
Also, I should probably split the examples in another commit right?

@crasbe

crasbe commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Any Idea why the tests suddenly complain about whitespaces in the patches?

Good question, no idea. I think you can add an exception for *.patch in dist/tools/whitespacecheck/ignore_list.txt in a separate commit.

I checked other patches and they also have the whitespaces. It's just the space where the diff would place a + or - otherwise.

Also, I should probably split the examples in another commit right?

That would be good 👍

Port https://github.com/nasa/bplib. This initial port has the following
features:
1. Port of bplib version 7.0.2. This is the first major release of bplib
   and still does not implement all features of BPv7. Fragmentation,
   Status Reports and Custody Transfer are missing currently. Extensions
   like BPSec are not supported, but there are plans to implement
   support in future versions of bplib.
2. An abstraction layer for easy initialization and configuration.
   This is modular and can be turned off (also partially). Especially
   callbacks for the system time are automatically set, which might need
   to be adjusted for a different implementation.
3. Two storage methods using the vfs
4. Two CLAs (Convergence Layer Adapters), i.e. ways to send bundles over
   other networks. Here UDP and BLE with NimBLE are supported currently.

Refer to the Doxygen documentation for additional information regarding
configuration options etc.
This implements two basic example configurations of bplib to send
bundles over the currently available convergence layers: UDP and BLE.
@github-actions github-actions Bot added the Area: tools Area: Supplementary tools label Apr 17, 2026
@crasbe

crasbe commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Thank you! Unfortunately we are limited in the CI resources, so the merge has to wait for a few days.

@crasbe crasbe added the CI: ready for merge train 🚃 PR is ready to be merged and awaiting the next merge train label Apr 20, 2026
@maribu
maribu added this pull request to the merge queue Apr 20, 2026
@crasbe crasbe added the State: waiting for other PR State: The PR requires another PR to be merged first label Apr 20, 2026
@crasbe
crasbe removed this pull request from the merge queue due to a manual request Apr 20, 2026
@crasbe

crasbe commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

@maribu the merge won't succeed without #22179 unfortunately. I forgot to add the waiting for other PR flag.

@crasbe crasbe removed the State: waiting for other PR State: The PR requires another PR to be merged first label Apr 20, 2026
@crasbe
crasbe enabled auto-merge April 20, 2026 22:43
@crasbe
crasbe added this pull request to the merge queue Apr 20, 2026
Merged via the queue into RIOT-OS:master with commit 636998c Apr 21, 2026
27 of 28 checks passed
@MrKevinWeiss MrKevinWeiss added this to the Release 2026.07 milestone Jul 15, 2026
@RainbowSimon
RainbowSimon deleted the bplib-port branch July 23, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: doc Area: Documentation Area: examples Area: Example Applications Area: pkg Area: External package ports Area: tools Area: Supplementary tools CI: no fast fail don't abort PR build after first error CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: ready for merge train 🚃 PR is ready to be merged and awaiting the next merge train 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.

4 participants