java-native / jssc

Java library for talking to serial ports (with added build support for maven, cmake, MSVC)
https://discord.gg/RBsUfE9sX9
GNU Lesser General Public License v3.0
164 stars 53 forks source link

Add RISC-V support #144

Closed pietrygamat closed 10 months ago

pietrygamat commented 10 months ago

@tresf do you have readlily available RISC-V hardware? Command

docker run -it --rm --workdir=/work -v $(pwd):/work:Z docker.io/dockcross/linux-riscv64 bash -c "apt-get update && apt-get install --yes cmake maven openjdk-11-jdk-headless && mvn clean install -P dockcross -Dos.target.name=linux -Dos.target.arch=riscv64 -Dos.target.bitness=64"

does produce something .

tresf commented 10 months ago

Thanks, I was preparing the same. Let's also add riscv32 while we're at it.

@tresf do you have readily available RISC-V hardware?

Not yet, but I do have a Qemu instance, which will at least let us know if the initial JNI portions are working.

tresf commented 10 months ago

Test build (with https://github.com/scijava/native-lib-loader/pull/48):

jssc-2.9.6-SNAPSHOT.jar.zip

jssc-2.9.6-SNAPSHOT.jar.zip

tresf commented 10 months ago

Qemu testing for RISCV64 is passing. I'm able to list the virtual COM port, open it and send data.

tresf commented 10 months ago

native-lib-loader has been updated to 2.5.0 with riscv32|64 support per https://github.com/scijava/native-lib-loader/pull/48#issuecomment-1799543994

tresf commented 10 months ago

@pietrygamat I think this is ready for merge. Any objections?

pietrygamat commented 10 months ago

@pietrygamat I think this is ready for merge. Any objections?

It looks good to me.