Skip to content

Use the srp_platform toolchains, sys_time include - #564

Merged
Mateusz-Krajewski merged 2 commits into
masterfrom
mavlink/s1-toolchain
Nov 23, 2026
Merged

Mateusz-Krajewski merged 2 commits into
masterfrom
mavlink/s1-toolchain

Conversation

@Mateusz-Krajewski

@Mateusz-Krajewski Mateusz-Krajewski commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

these pull requests add the Ebyte E220 LoRa modem as a MavlinkDaemon radio driver plugin and deploy the daemon on the EC. They replace the single pull request #563, now closed. The platform side is the stack starting at SRP-Platform/srp_platform#79.

  • Removes the local copy of the armv7 (BBB) toolchain (bazel/toolchain/, third_party/toolchains/, register_all_toolchains() / deps() in WORKSPACE). It was the same as srp_platform's; install() of srp_platform already registers the armv7, armv7-on-macOS and aarch64 musl (RPi Zero 2W) toolchains and fetches their archives, so BBB and RPi both build with the platform toolchains.
  • Adds the missing <cstdint> to core/time/sys_time.hpp.
  • supports_pic (needed by the linkshared MAVLink radio plugins, otherwise "recompile with -fPIC") now comes from the platform toolchains: toolchain: enable supports_pic in all C++ toolchains SRP-Platform/srp_platform#89. Regular binaries stay without -fPIC.
  • Dependency: the current platform package (20261116-212020) has no supports_pic, so the E220 plugin (radio: common RadioDriver and E220 modem #565/radio: E220 static driver registration, simulator end-to-end test and config tool #566) links on BBB only after a platform package with that change is published and include_srp_platform(...) is bumped. Regular builds (ec:pkg, fc:pkg) do not need it.
  • How to test: bazel build --config=bbb-EB_V2 //deployment/cpu/ec:pkg and the existing unit tests (toolchain resolution now picks @srp_platform//bazel/toolchain/...).
  • Part 1/4 of the srp stack.

@Mateusz-Krajewski

Copy link
Copy Markdown
Member Author

tu brakuje pic dla beaglebone

@Mateusz-Krajewski Mateusz-Krajewski changed the title mavlink: ARM toolchain PIC support and sys_time include Use the srp_platform toolchains, sys_time include Nov 22, 2026
The armv7 (BBB) toolchain in bazel/toolchain and its repositories in third_party/toolchains were a copy of srp_platform's. srp_platform install() already registers the armv7, armv7-on-macOS and aarch64 musl (RPi Zero 2W) toolchains and fetches their archives, so the local copy is removed and both boards build with the platform toolchains. supports_pic (needed by linkshared MAVLink radio plugins) comes with the platform toolchains from SRP-Platform/srp_platform#80.
@Mateusz-Krajewski

Copy link
Copy Markdown
Member Author

blocked by SRP-Platform/srp_platform#89

@Mateusz-Krajewski
Mateusz-Krajewski merged commit e6303f4 into master Nov 23, 2026
3 of 4 checks passed
@Mateusz-Krajewski
Mateusz-Krajewski deleted the mavlink/s1-toolchain branch November 23, 2026 10:51
srp-platform-zuul Bot added a commit to SRP-Platform/srp_platform that referenced this pull request Nov 23, 2026
toolchain: enable supports_pic in all C++ toolchains

Prepare for dynamic lib
Enables the supports_pic feature in all platform C++ toolchains:

arm-cortex_a8-linux-gnueabihf (BBB, armv7),
arm-cortex_a8-linux-gnueabihf macOS variant,
aarch64-linux-musl (RPi Zero 2W).

Without it Bazel does not build the PIC variant of the dependencies, so a cc_binary(linkshared = True) (e.g. a MAVLink radio driver plugin .so loaded by MavlinkDaemon) fails to link with "recompile with -fPIC". Ordinary binaries are built exactly as before (no -fPIC): Bazel uses the PIC variant only for what goes into a shared object.
Why separately: srp now uses the platform toolchains directly (Simba-Avionic/srp#564 removes its local copy of the armv7 toolchain), so the E220 plugin in srp links on BBB/RPi once a platform package with this change is published. The MAVLink stack (#80) carries the same change for armv7/aarch64; after this is merged it adds nothing there.
How to test: bazel build --config=bbb-platform / RPi builds of the existing targets (unchanged output for regular binaries), and a linkshared target for the target platform links.

Reviewed-by: Bartosz Śnieg <snieg45@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant