ChanServ changed the topic of #rust-embedded to: Welcome to the Rust Embedded IRC channel! Bridged to #rust-embedded:matrix.org and logged at https://libera.irclog.whitequark.org/rust-embedded, code of conduct at https://www.rust-lang.org/conduct.html
crabbedhaloablut has quit []
emerent has quit [Ping timeout: 246 seconds]
emerent has joined #rust-embedded
GenTooMan has quit [Ping timeout: 248 seconds]
pbsds has quit [Quit: The Lounge - https://thelounge.chat]
pbsds has joined #rust-embedded
GenTooMan has joined #rust-embedded
GenTooMan has quit [Ping timeout: 248 seconds]
WSalmon has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
WSalmon has joined #rust-embedded
GenTooMan has joined #rust-embedded
Darius has quit [Ping timeout: 245 seconds]
Darius has joined #rust-embedded
crabbedhaloablut has joined #rust-embedded
nex8192 has left #rust-embedded [Error from remote client]
IlPalazzo-ojiisa has joined #rust-embedded
nex8192 has joined #rust-embedded
IsaBang[m] has quit [Quit: Idle timeout reached: 172800s]
onio has joined #rust-embedded
<onio> I get an error when I issue cargo build command for esp32c3. "error: failed to run custom build command for 'esp-idf-sys v0.33.1' any I idea why this might be failing
<onio> I am running on Ubuntu 22.04.03 LTS in a VM
<sourcebox[m]> dirbaio: I had a brief look at the rp2040 hal how the multicore startup is done. I could try to do something similar, but there are possible pitfalls: when the second core is started, there's no stack at all. So either `inline(always)` has to work in any case, or a naked function has to be used as entry point. But I think they're still unstable, aren't they? Then I would have to execute some assembly right at the start to setup
<sourcebox[m]> stacks, the vector table and also the FPU. It already happened to me that code crashed when NEON was enabled because the compiler decided to use some related instructions even if my code did not do anything with floats. What I also see in the rp2040-hal is that there are things relying on the calling conventions. Hopefully this will never change in the future.
<dirbaio[m]> > naked function has to be used as entry point. But I think they're still unstable, aren't they?
<dirbaio[m]> you can do it with global asm too, which is stable
<sourcebox[m]> I think I will come back to this topic later. ATM there are more questions than answers to get it right. A Cortex-A is quite complex in some behaviour, it needs several stacks because there are different modes than can be switched like system, supervisor etc.
M9names[m] has quit [Quit: Idle timeout reached: 172800s]
onio has quit [Remote host closed the connection]
onio has joined #rust-embedded
yoyofreeman has quit [Remote host closed the connection]
yoyofreeman has joined #rust-embedded
yoyofreeman has quit [Remote host closed the connection]
firefrommoonligh has joined #rust-embedded
<firefrommoonligh> <JamesMunns[m]> "Feel free to refer to:..." <- > <@jamesmunns:beeper.com> Feel free to refer to:... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/aBvnTRnARTvsHodfTzACbIJK>)
<firefrommoonligh> * Those are a lot of words and no deleting squatted crate names.
yoyofreeman has joined #rust-embedded
onio has quit [Read error: Connection reset by peer]
onio has joined #rust-embedded
yoyofreeman has quit [Quit: Leaving]
yoyofreeman has joined #rust-embedded
<JamesMunns[m]> <sourcebox[m]> "I think I will come back to this..." <- The usual answer here is to use an MMU and the page table for each core, I think. Not 100% certain tho.
nex8192 has left #rust-embedded [Error from remote client]
<sourcebox[m]> <JamesMunns[m]> "The usual answer here is to..." <- MMU is used anyway. I'm mainly talking about all the things that have to be setup before you can even enable it.
yoyofreeman has quit [Remote host closed the connection]
yoyofreeman has joined #rust-embedded
yoyofreeman has quit [Remote host closed the connection]
GenTooMan has quit [Ping timeout: 240 seconds]
starblue has quit [Ping timeout: 246 seconds]
GenTooMan has joined #rust-embedded
GenTooMan has quit [Excess Flood]
GenTooMan has joined #rust-embedded
GenTooMan has quit [Ping timeout: 248 seconds]
GenTooMan has joined #rust-embedded
onio has quit [Quit: Leaving]
GenTooMan has quit [Ping timeout: 240 seconds]
lynaghk[m] has joined #rust-embedded
<lynaghk[m]> I'm working on an tool to generate a browser UI from a Rust type that lets you read/write that type on a live microcontroller (via serial).... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/OxLQFOiXVguArSSswddokwyS>)
dkhayes117[m] has joined #rust-embedded
<dkhayes117[m]> lynaghk: I'm not sure how applicable this is, but dngrs (spookyvision@{github,cohost}): has this rust web ui project that might be helpful https://github.com/spookyvision/embedded-web-ui
GenTooMan has joined #rust-embedded
<lynaghk[m]> Thanks! Yeah, the author pointed it out when I asked about my idea here last week. Very similar idea, though I don't want the embedded device to have to specify everything to a generic frontend (as that requires more runtime resources). I need some way to make it easy for developers to compile a bespoke frontend based on their type definition.
<lynaghk[m]> I just recorded a demo of my proof of concept: https://d189ym6tlc5mr2.cloudfront.net/misc/2023_08_12_eui_demo.mp4 UI is generated from the following type definition:... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/maaDyuxsVjAxSBbWXfBZKkfK>)
yandrik[m] has joined #rust-embedded
<yandrik[m]> Looks very nice! I might make something like that for Kolibri too, basically a one-function setter UI generator for all the embedded-graphics displays. Mind if I copy some of your code for that?
<lynaghk[m]> would be happy to share code, planning on open sourcing once I figure out how to make it ergonomic for developers to use. basically I know I need it to be just a few lines to throw into a project, otherwise I'll never actually use it =D
GenTooMan has quit [Ping timeout: 246 seconds]
<lynaghk[m]> right now the UI generation is done in ClojureScript since that's what I know best. I think that would be able to stay generic (i.e., I can compile myself when publishing the crate for public consumption). But the WASM runtime would need to be generated by the end consumer. That's what's sorta tricky to figure out. Right now I'm using trunk to generate it, but I don't want end-users to have to install and use that.
<lynaghk[m]> want it to be automagically done via cargo as much as possible.
<yandrik[m]> Kolibri already supports widget layout and such, which would all be done on-device. I assume that the complicated part would be getting the introspection -> UI part, which you seem to already have completed
<lynaghk[m]> Mine's just proof of concept right now, basically using postcard's experimental Schema stuff serialized to JSON, and then the ClojureScript builds a UI against that which constructs JavaScript values, which the WASM bit deserializes back into Rust, then serializes into postcard to send down to the embedded device.
<lynaghk[m]> there are still plenty of widgets to sort out (I only have enums, structs, and u8 primitives done now). user-defined widgets would be useful, but at that point it'd be easiest to fork the ClojureScript and edit there, rather than try to expose some sort of "API".
<yandrik[m]> Interesting, gotta take a look at Postcard's Schema. Do you know whether the schema can be accessed at compile time? Making a macro would be maximally efficient for this I believe
<yandrik[m]> (plus, making a headless UI thing would be interesting. Basically same idea as yours, but instead of MCU <---> Host it would be MCU (headless) <---> MCU (with touchscreen), but I'm sure there's a crate out there for remote getters and setters already. Just can't remember the name...)
<lynaghk[m]> what sort of efficiency are you wondering about? Here's what's on the WASM side of my proof of concept (I just copied the type definition over)... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/cBInXfRfGHXjHBqSldrBmNBH>)
<lynaghk[m]> Gotta run right now, but happy to discuss further or pair. Drop me an email if you want: kevin@keminglabs.com
<yandrik[m]> Thanks, will do! [Kolibri](http://github.com/yandrik/kolibri) is my take on an embedded GUI framework, so all the code runs on the MCU. If every widgets' order and position and such are pre-computed at compile time, the runtime overhead will be lower, hopefully. Plus, the order staying the same is really, really important for all the incremental redraw stuff, that's what I meant
<yandrik[m]> s/what/why/, s/meant/believe that a macro would be awesome for this/
K900 has quit [Quit: Idle timeout reached: 172800s]
starblue has joined #rust-embedded
danielb[m] has quit [Quit: Idle timeout reached: 172800s]
thiskappaisgrey[ has joined #rust-embedded
<thiskappaisgrey[> Hello. I'm relatively new to embedded programming, and I have a question. How do I write Rust code to expose the RP2040's storage as a mass USB storage device? I don't know the vocab around this, but I wanted to achieve something like in Circuitpython where I can upload configuration files that my Rust firmware can read to change the behavior of my program. I couldn't find any resources on how to achieve this after googling,
<thiskappaisgrey[> so... Thank you.
<dngrsspookyvisio> <lynaghk[m]> "Thanks! Yeah, the author pointed..." <- FWIW: it's totally possible to map your examples (light, color) to UI widgets on the control side as well, so I don't think my approach has an *inherent* overhead (which would either way be rather neglible - a byte or two)
<dngrsspookyvisio> anyway, nice that you got things going too!
<dngrsspookyvisio> <lynaghk[m]> "right now the UI generation is..." <- you can precompile a wasm project and read configuration stuff e.g. as base64 encoded url parameter
<dngrsspookyvisio> I very much recommend Dioxus for this kind of stuff
<dngrsspookyvisio> s/stuff/UI generation/
<dngrsspookyvisio> since it's written in Rust you avoid crossing a language barrier that way, which always comes with annoying bridging code
<dngrsspookyvisio> thiskappaisgrey[: try #rp-rs:matrix.org if you don't get an answer here
<dngrsspookyvisio> <yandrik[m]> "(plus, making a headless UI..." <- do ping me if you remember the remote crate, sounds interesting
starblue has quit [Ping timeout: 246 seconds]
diondokter[m] has quit [Quit: Idle timeout reached: 172800s]
starblue has joined #rust-embedded
crabbedhaloablut has quit []
IlPalazzo-ojiisa has quit [Remote host closed the connection]
GenTooMan has joined #rust-embedded
nex8192 has joined #rust-embedded
nex8192 has left #rust-embedded [Error from remote client]