Skip to content

Conversation

@intervall-ludger
Copy link

This PR adds support for Linux ARM64 (aarch64) platforms, specifically tested on Raspberry Pi 4/5.

Changes

Pre-built Libraries

Added pre-built static libraries for aarch64:

  • coines-api/pc/coines_pc/platform/Linux/ble/simpleble-0.6.0/libs/aarch64/libsimpleble.a
  • coines-api/pc/coines_pc/platform/Linux/ble/simpleble-0.6.0/libs/aarch64/libsimpleble-c.a
  • coines-api/pc/coines_pc/platform/Linux/serial/libusbp-1.0/libs/aarch64/libusbp-1.a

Added pre-built shared library:

  • coines-api/pc/python/coinespy/libcoines_arm_64.so

Makefile Updates

Updated coines-api/pc/python/Makefile:

  • Added aarch64 architecture detection (alongside existing arm64 for macOS)
  • Skip -m64 flag for aarch64 (not supported on ARM)
  • Output library named libcoines_arm_64.so for Linux ARM64

Python Library Loading

Updated coines-api/pc/python/coinespy/coines.py:

  • Added detection for aarch64 and arm64 machine types on Linux
  • Loads libcoines_arm_64.so for ARM64 Linux platforms

Documentation

Updated README.md:

  • Added ARM64/aarch64 to supported Linux platforms
  • Added note about libbluetooth-dev dependency for BLE support on ARM64

Testing

Tested on:

  • Raspberry Pi 5, Debian Bookworm (aarch64)
  • BME690 sensor via USB (APP3.0 Shuttleboard)
$ python3 -c "import coinespy as cpy; b = cpy.CoinesBoard(); print(b.open_comm_interface(cpy.CommInterface.USB))"
ErrorCodes.COINES_SUCCESS

Dependencies

On ARM64 Linux, the following packages are required:

sudo apt install libusb-1.0-0-dev libudev-dev libdbus-1-dev libbluetooth-dev

Build Instructions

On an ARM64 Linux system:

cd coines-api/pc/python
make

This produces coinespy/libcoines_arm_64.so.

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