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
rainingmessages has joined #rust-embedded
bartmassey[m] has quit [Quit: Idle timeout reached: 172800s]
rmsyn[m] has quit [Quit: Idle timeout reached: 172800s]
ivche_ has joined #rust-embedded
ivche has quit [Ping timeout: 252 seconds]
ivche_ is now known as ivche
sroemer has joined #rust-embedded
<rafael[m]> <M9names[m]> "Maybe the default value for..." <- Thx! Will try that as soon as I find the time this week.
rainingmessages has quit [Quit: bye]
rainingmessages has joined #rust-embedded
pcs38 has joined #rust-embedded
HumanG331 has joined #rust-embedded
sroemer has quit [Quit: WeeChat 4.4.3]
sroemer has joined #rust-embedded
<dngrs[m]> * the #rp-rs:matrix.org room might have
boru has quit [Ping timeout: 268 seconds]
boru has joined #rust-embedded
chrysn[m] has joined #rust-embedded
<chrysn[m]> <krensito> "Does cargo-embed somehow support..." <- > <@krensito:matrix.org> Does cargo-embed somehow support colorful output for the log levels?
<chrysn[m]> > INFO in blue and so on
<chrysn[m]> There's an issue about it at https://github.com/probe-rs/probe-rs/issues/1377 -- I've started to look into how to best resolve the reasons for why the codes are filterd out, but am not sure it can be done easily without just moving to something like a scroll view widget (which then still needs workaround because at least the one I've looked at expects a fixed size rather than indefinitely growing).
boru has quit [Ping timeout: 252 seconds]
boru has joined #rust-embedded
ckrenslehner[m] has joined #rust-embedded
<ckrenslehner[m]> Thanks for this information. I need to take a look at the code at some point to get a better understanding on how things work
pcs38 has quit [Quit: leaving]
sroemer has quit [Quit: WeeChat 4.4.3]
SiddharthChandra has joined #rust-embedded
<SiddharthChandra> Hi, I have a few nice!nano v2 clones (NRF52840) which have the adafruit bootloader pre-flashed. Has anyone used these for rust development? I don’t have a j-link with me so I would like to use the bootloader to flash (like the esp32) controller but don’t want use the u2f file based flashing. The bootloader documentation says it supports serial DFU but I cannot locate a serial device when the device is plugged in
<SiddharthChandra> * based flashing as the workflow is slower. The
<dirbaio[m]> My advice is get a debug probe
<dirbaio[m]> And use SWD to flash and debug
<dirbaio[m]> Nrf is not designed for developing via USB bootloader
<dirbaio[m]> You can get it working and then you can add usb logging to your firmware, but you won't get log messages from panics
<dirbaio[m]> Which is terrible for debugging
<SiddharthChandra> I did consider that. And then considered using a Pi zero to bitbang swd. But those solutions sounds clumsy compared to a bootloder which allows me to flash with serial interface (as I don’t care about debugging)
<SiddharthChandra> * care about hardware debugging)
<dirbaio[m]> You care about panic messages tho?
<SiddharthChandra> And it does not help at all that j-link is expensive.
<dirbaio[m]> If you access an array out of bounds you'll just see the firmware freeze
<dirbaio[m]> With no idea where's the problem
<dirbaio[m]> SiddharthChandra: Get a raspberry pi debug probe. Cheap and works very well with all arm chips including the nrf
<SiddharthChandra> dirbaio[m]: That I do. But isn’t there a way to get that working in some other method?
<dirbaio[m]> No
<dirbaio[m]> If the firmware crashes usb stops working so the panic message can't go through
diondokter[m] has joined #rust-embedded
<diondokter[m]> Using a debug probe is the way these chips are designed to be flashed and debugged. Doing other things can work, but never as good as a real debugger
fooker has quit [Quit: WeeChat 4.4.3]
fooker has joined #rust-embedded
<SiddharthChandra> Okay, will get the Pi debug probe
thejpster[m] has joined #rust-embedded
<thejpster[m]> Other people had no problems with exact same data type for dict
<thejpster[m]> or even the exact same line of code to print it out
<thejpster[m]> It's a heapless::LinearMap if that matters
mabez[m] has joined #rust-embedded
<mabez[m]> host tooling issue?
<dirbaio[m]> If gets too big and overflows the buffer so the whole line gets dropped?
<diondokter[m]> One item being so large it doesn't fit in the RTT buffer?
<thejpster[m]> dirbaio wins a biscuit
<thejpster[m]> Debug formatting for LinearMap<u8, u8, N> is pretty verbose (and in decimal)
<dirbaio[m]> I've seen this before 😐
<thejpster[m]> at about 128 entries, you're over 1024 bytes of string.
<dirbaio[m]> Only with our factory tooling tho. Did it happen with probe-rs as well?
<dirbaio[m]> The issue is not switching RTT to blocking mode properly
<thejpster[m]> it's horrible. I'd much prefer a ... ellipsis indicating truncated output
<thejpster[m]> this was probe-rs 0.27
<dirbaio[m]> If RTT is in blocking mode it should stream the log frame just fine even if it's larger than the buffer
<dirbaio[m]> The cpu blocks if buffer is full, then the probe drains it, then the cpu resumes
<dirbaio[m]> If it's not doing that then it's a bug
<thejpster[m]> I guess I'll need to poll the "are we in blocking mode" bit.
danielb[m] has joined #rust-embedded
<danielb[m]> <dirbaio[m]> "The cpu blocks if buffer is full..." <- the CPU can actually print stuff before the debugger gets to reconfiguring the channel to blocking, unfortunately
<JamesMunns[m]> this is why probe-run used to set a breakpoint to prevent that from happening 😛
<dirbaio[m]> Probe-run had this thing where it'd set a breakpoint on main, run until main , then switch RTT to blocking, then resume
<dirbaio[m]> Yeah
<dirbaio[m]> This was carried over to probe-rs tho
<danielb[m]> JamesMunns[m]: yeah but where to set it to...
<dirbaio[m]> So maybe there's some bug
<danielb[m]> probe-rs doesn't set a breakpoint on main at all
<JamesMunns[m]> dirbaio[m]: I'm pretty sure it wasn't
<dirbaio[m]> danielb[m]: It'd hardcode the symbol used by cortex-m-rt
<dirbaio[m]> Ouch
<danielb[m]> dirbaio[m]: I have my opinion on that
<dirbaio[m]> Well that explains it then
<danielb[m]> also, rtt_target doesn't do anything before main
<JamesMunns[m]> I could have sworn I had an issue on probe-rs tracking this, not sure where it went tho
<diondokter[m]> Afaik, it does still set it to blocking...
<dirbaio[m]> 😩
<danielb[m]> but: 1: nobody cares enough to do it and 2: it's not a good solution due to rtt_target
<JamesMunns[m]> Ah, Tiwalun opened it
<dirbaio[m]> Maybe we can extend RTT somehow so that probe-rs places a magic value on the RTT control block and then init sees it and switches to blocking mode right from the start? This way you don't need any breakpoint funny business
<danielb[m]> segger would be rather sad
<danielb[m]> firmware can detect if a debugger is attached, and configure themselves
<dirbaio[m]> Segger is already sad yhst everyone is using their patented RTT
<dirbaio[m]> s/yhst/that/
<thejpster[m]> SEGGER sponsored my Embedded World demo, and they think defmt over RTT is really cool.
<thejpster[m]> They just asked me to remind everyone it's called "SEGGER RTT" not "RTT".
<danielb[m]> lmao
<thejpster[m]> defmt-over-RTT also works in the Ozone debugger (if you use defmt-print to connect to their TCP socket).
<thejpster[m]> also, this failure mode occurs after ~2 seconds of runtime and about a thousand previous messages.
<JamesMunns[m]> what version of probe-rs?
<JamesMunns[m]> there was an off-by one error in rtt a couple versions ago
<thejpster[m]> 0.27 - the lateste
<thejpster[m]> * 0.27 - the latest
<danielb[m]> okay so is this one of the many rtt bugs we fixed since 0.27?
<thejpster[m]> > Fixed defmt not being able to read messages larger than the RTT buffer.
<danielb[m]> man, why do you make me debug code I've already debugged?
<thejpster[m]> why do you make me use releases with known bugs in them?
<thejpster[m]> (I'm kidding. I know I'm entitled to a Full Refund of the $zero I paid)
<danielb[m]> thejpster[m]: I have an answer for that
<danielb[m]> probe-rs is really frustrating to work on, because the project has a 1-approval-needed policy and no maintainers
<danielb[m]> or, rather, out of the 12 people in the org only Noah occasionally merges stuff
<danielb[m]> or Scott if it's Espressif-relevant
<danielb[m]> so you are allowed to say that a relase is slow in coming, but I don't think the current state is release-ready and I can only take one step at a time
<thejpster[m]> "Why no release", "Because master is not ready to release" - can't argue with that.
<thejpster[m]> (also, I note the choice of branch name but I'm not getting into it)
<danielb[m]> thejpster[m]: you're already getting into it by saying that
cr1901 has quit [Read error: Connection reset by peer]
cr1901 has joined #rust-embedded
ana_briated has quit [Ping timeout: 272 seconds]
t-moe[m] has quit [Quit: Idle timeout reached: 172800s]
bogdan[m] has quit [Quit: Idle timeout reached: 172800s]
<chrysn[m]> ad lost messages: I think every ring buffer where "don't put it in there it's too big" needs a dropped-message indicator or counter.
<chrysn[m]> I've also encounterd this kind of overflow, and spent more time than I should have wondering why my printf debugging didn't take the path it actuallyt ook.
pcs38 has joined #rust-embedded
sroemer has joined #rust-embedded
sroemer has joined #rust-embedded
sroemer has quit [Changing host]
sroemer has quit [Quit: WeeChat 4.4.3]
r[m] has joined #rust-embedded
<r[m]> tags
<JamesMunns[m]> danielb how can I help you call for more maintainers for probe-rs?
<danielb[m]> i can do no such thing, I don't think so :) probe-rs isn't my project
<JamesMunns[m]> Noah same question
<JamesMunns[m]> Let's treat it like a bug and figure out how to resolve it, and let's get probe-rs some more maintainers.
ana_briated has joined #rust-embedded
ana_briated has quit [Remote host closed the connection]
ana_briated has joined #rust-embedded
ana_briated has quit [Remote host closed the connection]
Noah[m] has joined #rust-embedded
<Noah[m]> <danielb[m]> "i can do no such thing, I don'..." <- You are as entitled as anyone :)
<Noah[m]> * You are as entitled to call it your project as me :)
ana_briated has joined #rust-embedded
<danielb[m]> I usually have merge rights to my projects 🙈
ana_briated has quit [Remote host closed the connection]
<Noah[m]> <JamesMunns[m]> "Noah same question" <- eh, it's tricky. essentially same problem as before I started the project. nobody wants to touch this dreadful thing with debug probes, everyone wants to make the shineys with firmware ;)
<Noah[m]> danielb[m]: eh, I tried to improve recently, but I guess not enough :(
<Noah[m]> <JamesMunns[m]> "Let's treat it like a bug and..." <- yeah it's def. a bug. problem is: most of the maintainers that were once upon a time have huge projects/tasks in the oss community (adam, dario) or do this for a living already (dominik)
<Noah[m]> not sure what's up with jack tbh :)
<Noah[m]> fortunately there is some nice folks that answer questions best to their ability in the chat, but nobody actively writes code other than daniel
<Noah[m]> and I am just trying to chip away at my one thousand projects I have -.-
dav1d has quit [Ping timeout: 252 seconds]
dav1d has joined #rust-embedded
<rafael[m]> <M9names[m]> "Maybe the default value for..." <- You are a genius! That was my problem. I did w write where I should have done a modify, overwriting the register and that way basically cuttin power to the core because the EN field is kind of important to be at 1 and not 0 🙂
pcs38 has quit [Ping timeout: 248 seconds]
m5zs7k has quit [Ping timeout: 252 seconds]
m5zs7k has joined #rust-embedded
<reitermarkus[m]> Heapless 0.9.0 is out!
<danielb[m]> wow that's a lot of "Added" entries 👀
<danielb[m]> congrats!
PhilMarkgraf[m] has joined #rust-embedded
<PhilMarkgraf[m]> Went to check it out, but got: docs.rs failed to build heapless-0.9.0
ana_briated has joined #rust-embedded
<reitermarkus[m]> Yeah, just saw it too. Seems we missed adding the bytes feature to CI.
<reitermarkus[m]> Going to sleep now, anyone feel free to fix https://github.com/rust-embedded/heapless/issues/566 in the meantime. :)
rainingmessages has quit [Quit: bye]
rainingmessages has joined #rust-embedded