Coder Social home page Coder Social logo

Add supported architecture about serialport-rs HOT 2 OPEN

deid84 avatar deid84 commented on June 23, 2024
Add supported architecture

from serialport-rs.

Comments (2)

sirhcel avatar sirhcel commented on June 23, 2024

Hello @deid84, I'm glad to hear that you are successfully using serialport-rs.

Do you think could be useful to add armv7-unknown-linux-gnueabihf to the supported architectures?

We could add this target but this would not change anything for your use case. I bet we have enabled using udev on Linux by default because this is a sensible default for people using serialport-rs on a desktop system as they usually do not have the background with such such details as people working with embedded systems do.

The only difference i saw is that i need to configure my cargo toml in this way:

serialport = {version = "4.2.2", default-features = false}

in order to be able to cross-compile without having error on libudev library, that's a minor issue for me 'cause i don't need to list serial ports on my software.

I have to admit that I have neither cross compiled with libudev manually. Because either Yocto has taken care of the build environment for me or I got annoyed before reaching the finish line. Building for libudev by default is even a sensible default for cross compiling with Yocto. What's wrong for you with disabling the default features?

On the other hand, cross compiling without libudev selects a Sysfs backend for enumerating serial ports. Did you give it a try on your target? For example with our list_ports example? I'm asking because a quick check on an i.MX system some days ago looked at a first glance like our heuristic with Sysfs is failing there and I got no ports enumerated there.

Would some additional words about it in README.md have helped you with switching to a build without default features earlier? If yes, could you make a proposal/file a PR?

Maybe you have some ideas about how to cross-compile succesfully with default features enabled

How does your build setup looks like? And what error are you getting there?

Best regards!

from serialport-rs.

deid84 avatar deid84 commented on June 23, 2024

Hello @sirhcel , sorry for my late reply.

I have to admit that once compiled disabling "default-features" everything worked fine for me.
My project involves a customized layer on a STM32MP1 so I have only 2 RS485 ports in my device tree and I never have to choose between them because they talk with to instruments that will remain in the same position forever.

My question is just in case someone needs a port enumeration also in a armv7 cross-compiled solution.

I think that your idea about giving more information on readme.md would be great, but unfortunately I don't know exactly how to help you to write some additional info. Please let me know if it could be helpful for you if I try to better describe my build setup or something else ok?

Best Regards!

from serialport-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.