-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xtensa esp32 target #43
Comments
Hi. Could you try enabling the x86 feature? The issue you are seeing is actually an issue with the heapless library, but I think the x86 feature in mqttrust should fix it. Edit: explanation. https://github.com/japaric/heapless/blob/e33646c189a8b039fed7475e0d0e0f5c736c855f/src/pool/singleton.rs#L17-L47 |
thanks for the quick response. :)
|
That makes sense. But in that case I guess the first step is to figure out what it takes to get heapless pools working with xtensa. After that I would happily update the heapless dependency version and help with a fix if anything more is needed 👍 |
Hm well, I am not really sure about what is going on there. |
The pool allocates a piece of fixed memory, from which we can create Boxes, just like std Box, but in a no_std environment. Why it would not be available in xtensa, I have no idea. Might be as simple as the target arch needs to be added in the feature gating. I would try to open an issue in heapless, or ask in the embedded-rust matrix channel. |
Ah I see, thanks for the clarification. |
I would have no issue in a std feature flag 👍 |
That sounds great. :) Would you mind taking a look at that when you have some time? Shouldn't be that much to implement if I see that right. |
Okay, so I tried to look into the heapless source. So I guess, for now, my best bet to get rustot running under xtensa would be to implement the std feature for mqttrust. |
I'd be happy to make the std feature, when I get the time.. might be I get half an hour tomorrow, otherwise it will be Tuesday. |
Thanks alot. :) This actually compiles for xtensa. Didn't do any runtime tests, but I assume if that implementation works under your architecture, it should also work under the xtensa rust std library. |
Okay sooo there is the same problem in mqttrust and rustot and therefore it might be in scope of this issue. After #44 is merged and published, the mqttrust_core dependency should be updated with the std feature in order to enable compilation for the xtensa architecture. But it will not really be usable when used with the ESP-IDF, which is absolutely crucial to use features like Wifi/Bluetooth etc. on the ESP32 due to Espressifs proprietary source code. Unfortunately the ESP-IDF Rust wrapper libraries such as esp-idf-hal which are basically mandatory to develop rust esp applications, use a newer version - |
Yeah, i am aware of that, but probably wont be able to address it until i can find the time to upgrade the embedded-hal dependency in our entire crate stack. |
Fair, I guess then I'll try to create a fork of both projects and try to make it work somehow for my tech stack and use that until your stack will be upgraded in the future. :) |
That sound great. You are also more than welcome to open a PR on both when you get it working.. that should expedite the process a bit for me as well |
Sure, I don't know if that fork will meet your code standards, but I'll let you know, when the projects work with version |
@jan-br Just wanted to give you a heads up that i have run through my entire stack and updated dependencies.. So this should fix your issue as well, together with FactbirdHQ/rustot#37, that i will merge tomorrow after a release train. |
Oh thanks alot @MathiasKoch . :) I got it to compile with ESP-IDF too, with the updated dependencies. So the only way I could see this working until this issue is resolved and deployed to use the experimental mqtt client of the rust esp-idf and create a custom implementation of the mqttrust traits. |
Also to confirm, your changes seem to be working for xtensa. :) |
Ahh, yeah. TLS is a hard requirement for AWS. Personally i am using an offloaded TCP-IP+TLS stack on my cellular + wifi devices. I would think xtensa has something similar? An alternative i have seen in the community is FFI with mbed-tls |
yes I think esp-idf uses a modified version of mbed-tls. |
Ahh, sad to hear that. If you do figure it out, it should be fairly easy to implement the MQTT client trait here ontop of it in some version. Let me know if you figure it out :) It's always nice to follow along on other users use of ones libraries :) |
Hi :)
I am currently trying to access the AWS IoT SDK in Rust from an XTensa ESP32 which uses the ESP-IDF.
So I stumbled across this neat project, rustot, which seems to be able to do exactly what I am trying to do.
There are some other similar libraries, like the official one from AWS. But they all seem to use Tokio, which is - as far as I know - not working with xtensa yet.
So rustot is the only promising library I could find which might work for my usecase.
But mqttrust - which is used by the project - does not compile for me with the ESP Rust toolchain and its
xtensa-esp32-espidf
target.My test project is just a simple instance of the template, generated like described in the Rust on ESP Book with the mqttrust_core 0.4.1 dependency.
This also occurs outside of my project, when I checkout a fresh version of mqttrust and try to compile it standalone with the esp toolchain, so this is not a problem in my project setup.
Using the default nightly linux toolchain everything is working fine.
I have no idea why this error is occurring. I'd appreciate any input on this topic.
The text was updated successfully, but these errors were encountered: