GenTooMan has quit [Remote host closed the connection]
GenTooMan has joined #rust-embedded
nex8192 has left #rust-embedded [Error from remote client]
nex8192 has joined #rust-embedded
starblue has quit [Ping timeout: 248 seconds]
starblue has joined #rust-embedded
therealprof[m] has joined #rust-embedded
<therealprof[m]>
<adinack[m]> "i have never used this platform..." <- I noticed the PRs, thanks for that, but I'm currently on business travel across the continents... I'll have a quick look now but not promises... Please ping me again in 8 days or so if no one else takes care of them in the meantime.
<adinack[m]>
therealprof[m]: thank you, no rush, i just wanted to get my foot into this chat, enjoy the continents
<therealprof[m]>
All good, I do need a reminder every now and then to not miss anything in the excessive GH spam.
<vrakaslabs[m]>
Is there any documentation on how to integrate new hardware with existing network stacks? I presume smoltcp is what I should be targeting?
<vrakaslabs[m]>
Is there any documentation on how to integrate new hardware with existing network stacks? I presume smoltcp is what I should be targeting?
crabbedhaloablut has joined #rust-embedded
<vrakaslabs[m]>
<vrakaslabs[m]> "Alright, I've got a barebones..." <- At this point think I'm mostly unclear what an MVP setup of smoltcp looks like. I'm used to lwip with FreeRTOS, and in that setup I would aim for an ICMP demo as the proof of concept.
<vrakaslabs[m]>
vrakaslabs[m]: For ICMP reply to work do I need need to call `iface.poll()` in a loop?
<vrakaslabs[m]>
<vrakaslabs[m]> "For ICMP reply to work do I need..." <- Also I'm unclear if/how smoltcp handles interrupts from the Ethernet hardware, and what the timing looks like for RxTokens. Where in the process does the system wait until a packet is RXd?
<vrakaslabs[m]>
vrakaslabs[m]: (I am very new to Rust, but I've written Ethernet drivers before, in C/++)
<dirbaio[m]>
dirbaio[m]: this is for raw smoltcp, which is more low-level, everything's based on manual polling so that it's agnostic to execution model (interrupts, tasks..)
<dirbaio[m]>
dirbaio[m]: you might want to check out [embassy-net](https://crates.io/crates/embassy-net) for a higher-level alternative. it wraps `smoltcp` with `async`, so it's more similar to what you'd expect from a network stack in a C RTOS.
<dirbaio[m]>
dirbaio[m]: so you spawn a backgournd task that handles the network stack, then you can await sending/receiving data on sockets from multiple of your tasks
nex8192 has left #rust-embedded [Error from remote client]
nex8192 has joined #rust-embedded
hmw has quit [Quit: Bye.]
hmw has joined #rust-embedded
nex8192 has left #rust-embedded [Error from remote client]
nex8192 has joined #rust-embedded
emerent has quit [Ping timeout: 256 seconds]
emerent_ has joined #rust-embedded
emerent_ is now known as emerent
GeorgesP[m] has joined #rust-embedded
<GeorgesP[m]>
Hi, using serde-json-core, how to deserialize a JSON with an array of elements with different types like this one : "{["a string", 4]}" ? I use heapless::Vec for the array, but if I use enum to manage the different types, then serde-json-core expect b'"' or b'{' and return Error:: ExpectedSomeValue ... (no_std question)
JamesMunns[m] has joined #rust-embedded
<JamesMunns[m]>
To support this, you would need something like serde json's Value type, and it would probably require a heap (in the general case). serde json core specifically doesn't support that.
<GeorgesP[m]>
Is there a way with heapless or some alloc on stack ? (Would prefer get heap free)
crabbedhaloablut has quit []
Foxyloxy has quit [Ping timeout: 245 seconds]
Foxyloxy has joined #rust-embedded
<JamesMunns[m]>
Not easily, the main issue is that a value can contain another value, so you have a recursive type.
<JamesMunns[m]>
There are some different hacks you could use like limiting it to "a list of up to 20 items that can each be a number or a string of up to 10 characters", that could work with heapless, but there's not a general way to solve this afaik.
<vrakaslabs[m]>
<dirbaio[m]> "so you spawn a backgournd task..." <- Thanks for the help, I’ll take a look tonight!
nex8192 has left #rust-embedded [Error from remote client]