<re_irc> <@firefrommoonlight:matrix.org> Does not work on F1 though, which it seems you're using
<re_irc> <@lkostka:matrix.org> firefrommoonlight:matrix.org: ooooo totaly different approach without those awful macros and template meta programming. MUCH MUCH readable.
<re_irc> <@lkostka:matrix.org> thx for the link
cr1901 has quit [Remote host closed the connection]
cr1901 has joined #rust-embedded
rardiol has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
rardiol has joined #rust-embedded
starblue has quit [Ping timeout: 240 seconds]
starblue has joined #rust-embedded
<re_irc> <@w00tspeaks:matrix.org> I managed to get probe-rs to flash an lpc55s16-evk board.
<re_irc> <@w00tspeaks:matrix.org> \o/
<re_irc> <@w00tspeaks:matrix.org> Unfortunately, the svd files for the lpc55s16-evk have a lot of crap that svd2rust doesn't support.
<re_irc> <@burrbull:matrix.org> w00tspeaks:matrix.org: What sort of crap you mean?
<re_irc> <@w00tspeaks:matrix.org> They have a bunch of duplicated "enummeratedValue"s with the same name.
<re_irc> <@w00tspeaks:matrix.org> I can send an example if you want
<re_irc> <@w00tspeaks:matrix.org> They are absurd values that aren't actually meaningful.
<re_irc> <@w00tspeaks:matrix.org> I can strip the bogus lines out, but it's a lot of crap to manually strip out of the file.
<re_irc> <@w00tspeaks:matrix.org> It appears to be a bug with the way NXP generated the files, but they won't acknowledge is as their problem.
<re_irc> <@w00tspeaks:matrix.org> All the the val24 enumeratedValues are garbage and not useful.
<re_irc> <@w00tspeaks:matrix.org> For whatever reason, the file is generated with values of 0x18-0x1f that aren't actually useful, and they all get val24 as their names.
<re_irc> <@burrbull:matrix.org> we have similar issue with new stm32 g0 SVDs
<re_irc> <@burrbull:matrix.org> As I can see it is better to clear all enumeratedValues
<re_irc> <@burrbull:matrix.org> If it's hard to do manually you could wtite script witch parse svd with `svd-parser`, iterate over all fields to clear them and resave with `svd-encoder`
<re_irc> <@burrbull:matrix.org> And then use `svdtools` to add right values
<re_irc> <@burrbull:matrix.org> Or use `svdtools` `clear` if you need clear only exact fields
<re_irc> <@w00tspeaks:matrix.org> In this case, it would be good enough to delete all the val24 enumerated values in this peripheral (and a few others with different names, like val25) and keep the others.
<re_irc> <@w00tspeaks:matrix.org> I'm wondering if svd2rust should just ignore dupes
<re_irc> <@burrbull:matrix.org> You can use `.fields().filter(|f| f.name == "foo")` when iterate
<re_irc> <@w00tspeaks:matrix.org> val24 is sometimes okay
<re_irc> <@w00tspeaks:matrix.org> it's only in this peripheral
<re_irc> <@w00tspeaks:matrix.org> Really, I just want anything with description == None to be gone
<re_irc> <@w00tspeaks:matrix.org> I think that might work across teh board on this one.
<re_irc> <@w00tspeaks:matrix.org> BTW, this svd is from the cmsis pack
<re_irc> <@w00tspeaks:matrix.org> FWIW, I have tried to write something to use svdtools to patch the svd, but I haven't been successful.
starblue has quit [Ping timeout: 240 seconds]
tokomak has joined #rust-embedded
rardiol has quit [Ping timeout: 256 seconds]
<re_irc> <@w00tspeaks:matrix.org> Wow. The svd for this board is just garbage. Especially the enumeratedValues.
<re_irc> <@w00tspeaks:matrix.org> burrbull Do you manually remove all the enum values and add reasonable ones?
tokomak has quit [Read error: Connection reset by peer]
tokomak has joined #rust-embedded
<re_irc> <@burrbull:matrix.org> w00tspeaks:matrix.org: If all values same as in example part, definetly yes
cr1901 has quit [Remote host closed the connection]
cr1901 has joined #rust-embedded
<re_irc> <@monacoprinsen:matrix.org> Does anyone know how itm-decode works?
<re_irc> <@monacoprinsen:matrix.org> When I run the flag and file in the /tmp folder it does not stay open to log anything.
<re_irc> <@monacoprinsen:matrix.org> Itm-decode -s itm.txt
<re_irc> <@k900:0upti.me> Your need to give it a file that actually exists
<re_irc> <@k900:0upti.me> That was recorded with something like openocd
<re_irc> <@monacoprinsen:matrix.org> It does exist
<re_irc> <@jamesmunns:beeper.com> I think they mean `itm-decode -s whatever file-that-exists.txt`
<re_irc> <@mehmet:grusbv.com> My builds started to return this when a backtrace is being created:
<re_irc> <@mehmet:grusbv.com> debug information for address 0x29d0a is missing`
<re_irc> <@dirbaio:matrix.org> Mehmet Ali: try enabling Cargo feature `inline-asm` in `cortex-m`
<re_irc> <@mehmet:grusbv.com> Wow, cavalry is here.
<re_irc> <@mehmet:grusbv.com> On it
<re_irc> <@mehmet:grusbv.com> dirbaio:matrix.org: I got millions of these:
<re_irc> <@mehmet:grusbv.com> --> C:\Users\Mehmet Ali Anil\.cargo\registry\src\github.com-1ecc6299db9ec823\cortex-m-0.7.3\src\..\asm\inline.rs:50:5
<re_irc> <@mehmet:grusbv.com> error: cannot find macro `asm` in this scope
<re_irc> <@mehmet:grusbv.com> |
<re_irc> <@dirbaio:matrix.org> update to cortex-m 0.7.4
<re_irc> <@jamesmunns:beeper.com> I think you need nightly for that feature
<re_irc> <@mehmet:grusbv.com> dirbaio:matrix.org: Do I bump up the cortex-m-rt too
<re_irc> <@dirbaio:matrix.org> shouldn't matter
<re_irc> <@dirbaio:matrix.org> or it could be because [Executor::run()](https://github.com/embassy-rs/embassy/blob/master/embassy/src/executor/arch/cortex_m.rs#L49) is no-return (returns `!`)
<re_irc> <@dirbaio:matrix.org> since it'll never return rustc doesn't bother to fully set up the stack frame or something..? Not sure if it's a probe-run bug or rustc bug
<re_irc> <@dirbaio:matrix.org> now that you mention it, mine is unwinding into garbage lol
<re_irc> <@dirbaio:matrix.org> 13: embassy::executor::raw::run_queue::RunQueue::dequeue_all
<re_irc> <@dirbaio:matrix.org> at /home/dirbaio/embassy/embassy/embassy/src/executor/raw/run_queue.rs:71:13
<re_irc> <@dirbaio:matrix.org> 14: embassy::executor::raw::Executor::poll
<re_irc> <@mehmet:grusbv.com> dirbaio:matrix.org: This didn't change much
<re_irc> <@mehmet:grusbv.com> Is there a code that I must have for the backtrace?
<re_irc> <@mehmet:grusbv.com> Sth like defining a panic! macro
<re_irc> <@mehmet:grusbv.com> or similiar
<re_irc> <@dirbaio:matrix.org> no, it's all done by probe-run
<re_irc> <@mehmet:grusbv.com> dirbaio:matrix.org: Oh that is odd.
<re_irc> <@dirbaio:matrix.org> like, the firmware doesn't have the code for printing the stacktrace, it's probe-run that's reading the target's RAM to reconstruct the stack trace and printing it
<re_irc> <@mehmet:grusbv.com> James Munns: I froze the toolchain to:
<re_irc> <@mehmet:grusbv.com> [toolchain]
<re_irc> <@mehmet:grusbv.com> channel = "nightly-2021-12-16"
<re_irc> <@mehmet:grusbv.com> dirbaio:matrix.org: Let me check whether there is a probe-run update, then?
<re_irc> <@mehmet:grusbv.com> Cause probe run is manually updated, innit/
<re_irc> <@dirbaio:matrix.org> yep
<re_irc> <@mehmet:grusbv.com> dirbaio: compiling with release worked somehow.
<re_irc> <@mehmet:grusbv.com> (HOST) INFO success!
<re_irc> <@mehmet:grusbv.com> (HOST) INFO flashing program (25 pages / 100.00 KiB)
<re_irc> <@mehmet:grusbv.com> ────────────────────────────────────────────────────────────────────────────────
<re_irc> <@dirbaio:matrix.org> yeah it's due to the `-> !`, if I change it to return void it works
<re_irc> <@dirbaio:matrix.org> at /home/dirbaio/embassy/embassy/embassy/src/executor/raw/mod.rs:329:13
<re_irc> <@dirbaio:matrix.org> 13: embassy::executor::raw::run_queue::RunQueue::dequeue_all
<re_irc> <@dirbaio:matrix.org> at /home/dirbaio/embassy/embassy/embassy/src/executor/raw/run_queue.rs:71:13
<re_irc> <@dirbaio:matrix.org> it still fails at `main` because `main` is also `-> !`
<re_irc> <@mehmet:grusbv.com> Oh, it did not.
<re_irc> <@mehmet:grusbv.com> mehmet:grusbv.com: Oh, sorry, thats your backtrace.
<re_irc> <@mehmet:grusbv.com> I spin my executable at a led blink, I exit by Ctrl-C
<re_irc> <@mehmet:grusbv.com> Therefore never come to the point where main returns.
<re_irc> <@mehmet:grusbv.com> Do I have to indicate debug >= 2 in the Cargo.toml even if I do not compile for release?
<re_irc> <@mehmet:grusbv.com> I don't remember such a thing.
<re_irc> <@dirbaio:matrix.org> unwinding for `-> !` functions is just broken, tjere
<re_irc> <@dirbaio:matrix.org> just ignore it, there's nothing interesting below `Executor::run` anyway
<re_irc> <@dirbaio:matrix.org> just `main`
<re_irc> <@mehmet:grusbv.com> Well, not dealbreaker I guess, since it is only main in most cases, right
<re_irc> <@mehmet:grusbv.com> 👍️
<re_irc> <@mehmet:grusbv.com> mehmet:grusbv.com: This happens only if I don't use --release now
<re_irc> <@mehmet:grusbv.com> Should I make debug=1 explicit?
<re_irc> <@mehmet:grusbv.com> If I don't state anything, is it default bench?
<re_irc> <@dirbaio:matrix.org> I have no idea, Cargo docs will probably tell
<re_irc> <@mehmet:grusbv.com> >The profile is automatically chosen based on which command is being run if a profile is not specified on the command-line.
<re_irc> <@mehmet:grusbv.com> could be --dev though
<re_irc> <@mehmet:grusbv.com> It sort of makes sense
<re_irc> <@mehmet:grusbv.com> Now this is interesting, when my code is not optimized, and compiled to be 204 KiB, the code does not run (I get no defmt:info traces) And when I exit with Ctrl-C, I get the ERROR:
<re_irc> <@mehmet:grusbv.com> Finished dev [unoptimized + debuginfo] target(s) in 0.62s
<re_irc> <@mehmet:grusbv.com> Running `probe-run --chip nRF52840_xxAA target\thumbv7em-none-eabihf\debug\examples\fft`
<re_irc> <@mehmet:grusbv.com> (HOST) INFO flashing program (51 pages / 204.00 KiB)
<re_irc> <@mehmet:grusbv.com> But if I compile for `--release` then it runs fine.
<re_irc> <@mehmet:grusbv.com> Finished release [optimized + debuginfo] target(s) in 5.18s
<re_irc> <@mehmet:grusbv.com> Running `probe-run --chip nRF52840_xxAA target\thumbv7em-none-eabihf\release\examples\fft`
<re_irc> <@mehmet:grusbv.com> (HOST) INFO flashing program (25 pages / 100.00 KiB)
<re_irc> <@mehmet:grusbv.com> (HOST) WARN (BUG) location info is incomplete; it will be omitted from the output
<re_irc> <@mehmet:grusbv.com> Which is a 100 kiB
<re_irc> <@dirbaio:matrix.org> mehmet:grusbv.com: wow that's one broken error
<re_irc> <@dirbaio:matrix.org> are you using nrf-softdevice + flip-link? it's broken, don't use flip-link
<re_irc> <@dirbaio:matrix.org> that's the cause of this warning
<re_irc> <@dirbaio:matrix.org> > (HOST) WARN program has used at least 190.60/190.60 KiB (100.0%) of stack space
<re_irc> <@dirbaio:matrix.org> and it can cause the stack to clash with the softdevice RAM
<re_irc> <@monacoprinsen:matrix.org> Prints what's in the file at the moment but does not keep the session open...
<re_irc> <@monacoprinsen:matrix.org> Got it to work sort of like I want it.
<re_irc> <@monacoprinsen:matrix.org> On itmdump you had a flag to keep the file open
rardiol has joined #rust-embedded
<re_irc> <@mehmet:grusbv.com> dirbaio:matrix.org: omitting flip link changed the ERROR:
<re_irc> <@mehmet:grusbv.com> Running `probe-run --chip nRF52840_xxAA target\thumbv7em-none-eabihf\debug\examples\fft`
<re_irc> <@mehmet:grusbv.com> Finished dev [unoptimized + debuginfo] target(s) in 2.01s
<re_irc> <@mehmet:grusbv.com> (HOST) INFO flashing program (51 pages / 204.00 KiB)
<re_irc> <@dirbaio:matrix.org> O_o
<re_irc> <@mehmet:grusbv.com> Another binary works under the same conditions
<re_irc> <@dirbaio:matrix.org> maybe you're really overflowing the stack yeah
<re_irc> <@mehmet:grusbv.com> Could be.
<re_irc> <@mehmet:grusbv.com> Let me check that
<re_irc> <@mehmet:grusbv.com> I mean, There is a chance that this was working without softdevice
<re_irc> <@mehmet:grusbv.com> And now the RAM offset pushed it to the point that it is overflowing
<re_irc> <@mehmet:grusbv.com> Not sure, forgot about it.
<re_irc> <@andresv:matrix.org> I always forget to bookmark i. Does anybody have a RTIC 1.0 monotonic impl for stm32f1.
fabic has joined #rust-embedded
crabbedhaloablut has quit [Quit: No Ping reply in 180 seconds.]
crabbedhaloablut has joined #rust-embedded
fabic has quit [Quit: Leaving]
GenTooMan has quit [Quit: Leaving]
GenTooMan has joined #rust-embedded
<re_irc> <@thejpster:matrix.org> I have one on an F0
<re_irc> <@thejpster:matrix.org> Look for Neotron Pico BIOS and hope I pushed my branch
<re_irc> <@thejpster:matrix.org> Also it's but tested. But it did compile...
fabic has joined #rust-embedded
<re_irc> <@andresv:matrix.org> thejpster: could you link it?
smach has joined #rust-embedded
smach has quit [Remote host closed the connection]
smach has joined #rust-embedded
tokomak has quit [Read error: Connection reset by peer]
<re_irc> <@thejpster:matrix.org> Ugh. I should have spent more than two seconds on that thought
<re_irc> <@thejpster:matrix.org> It's Neotron BMC
<re_irc> <@thejpster:matrix.org> And I didn't push the branch :/
smach has quit [Remote host closed the connection]
<re_irc> <@thejpster:matrix.org> And I can already see it's enabling TIM3 but using TIM2. Ugh.
<re_irc> <@thejpster:matrix.org> Let's just say, no, I don't have a good example :(
smach has joined #rust-embedded
fabic has quit [Quit: Leaving]
<re_irc> <@therealprof:matrix.org> adamgreig: https://github.com/orbcode/orbuculum
<re_irc> <@adamgreig:matrix.org> how could I forget 😅 I haven't tried using it myself yet but it does look so neat
<re_irc> <@therealprof:matrix.org> It doesn't get any better or more open soure than
<re_irc> <@therealprof:matrix.org> Dave is such a nice guy, too. Met him at Embedded World a few years ago.
<re_irc> <@therealprof:matrix.org> I wanted to check out how to integrate all of the setup magic into our ecosystem 2 years ago but I forgot...
<re_irc> <@therealprof:matrix.org> There're are also some old blog posts about how to use ITM on his homepage: http://shadetail.com/blog/swo-instrumentation-first-tunes/
rardiol has quit [Ping timeout: 240 seconds]
<re_irc> <@adamgreig:matrix.org> (reminder that there's no meeting this week, we'll resume this time next week)
<re_irc> <@dirbaio:matrix.org> where's my weekly embedded-hal bikeshedding?!?
<re_irc> <@emilgardis:matrix.org> i was getting excited I was actually on time today :(
<re_irc> <@adamgreig:matrix.org> aww, your punctuality is noted anyway!
<re_irc> <@adamgreig:matrix.org> although since you're around therealprof maybe you could check https://github.com/rust-embedded/alloc-cortex-m/pull/52 👀
<re_irc> <@adamgreig:matrix.org> thanks, published
rardiol has joined #rust-embedded
richardeoin has quit [Quit: WeeChat 2.8]
richardeoin has joined #rust-embedded
smach has quit [Ping timeout: 256 seconds]
<re_irc> <@dbrgn:matrix.coredump.ch> Quick hardware question from a software guy... If I replace a 32.768 kHz LSE crystal with 50 kO ESR and 6 pF load capacitance (the Nucleo reference crystal) with another model that has 90 kO ESR and 12.5 pF load capacitance (thanks chip shortage...) , what will be the effect? Do I simply have to replace the two capacitors with different values and it will be OK? I assume the tradeoffs are accuracy and...
<re_irc> ... power consumption?
<re_irc> <@dbrgn:matrix.coredump.ch> (NDK NX3215SA-32.768KHZ-EXS00A-MU00529 vs NX3215SA-32.768K-EXS00A-MU00003)
<re_irc> <@dbrgn:matrix.coredump.ch> Also, is there some magic trick to get hold of some STM32L071s? 😅
<re_irc> <@adamgreig:matrix.org> Yea, just change the load capacitors appropriately, there's not necessarily any tradeoff in accuracy
<re_irc> <@adamgreig:matrix.org> Note the crystal's capacitance is not the number you need to buy capacitors in, but rather the combination of your two load caps and the trace/pin and stm32 internal caps
<re_irc> <@dbrgn:matrix.coredump.ch> Thanks! Yes, currently I simply re-used the values from the reference design.
<re_irc> <@josfemova:matrix.org> So, for the two and a half EOS-S3 owners around here: I've been working on writing the SVD for the thing. Very-Super-Ultra-Duper WIP, but fortunately there's an excel sheet with all the registers. I already got some of those transcribed, blinky already tested but there's a lot more left to test. Dunno if there's enough people to have a separate organization, right now i'm just working on a personal repo ...
<re_irc> <@josfemova:matrix.org> Ofc I'm a n00b so help and counsel are deeply appreciated. I will keep working on getting all the remaining registers transcribed in the meantime
<re_irc> <@josfemova:matrix.org> Special thanks to the people behind svdtools because xml is a god forsaken language and transcribing everything to yaml is way more comfy
<re_irc> <@jamesmunns:beeper.com> Hey adamgreig, I think we're up to ~20 languages for the translation tweet, do you think this would merit a quick one-off blog post? I'm actually super happy at the level of response
<re_irc> <@adamgreig:matrix.org> Yea, it's been a great response! Blog post sounds good to me
<re_irc> <@jamesmunns:beeper.com> K, will add to the list for this week!