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
starblue has quit [Ping timeout: 268 seconds]
starblue has joined #rust-embedded
crabbedhaloablut has quit [Ping timeout: 268 seconds]
loki_val has joined #rust-embedded
rardiol has quit [Ping timeout: 240 seconds]
brazuca has quit [Quit: Client closed]
emerent has quit [Ping timeout: 240 seconds]
emerent has joined #rust-embedded
causal has quit [Quit: WeeChat 3.6]
loki_val has quit [Remote host closed the connection]
crabbedhaloablut has joined #rust-embedded
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #rust-embedded
gsalazar has quit [Ping timeout: 240 seconds]
gsalazar has joined #rust-embedded
Lumpio- has quit [Ping timeout: 240 seconds]
Lumpio- has joined #rust-embedded
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #rust-embedded
<re_irc> <heksa> henrik_alser: Starting again in September, I'm running a 3rd implementation of our seminar on embedded Rust at our university :) I've a small package of exercises including RISC-V Longan Nano PAC/HAL -> interrupts, then a study or a project related to any no_std Rust stuff they can find online.
<re_irc> <heksa> (in Finland)
<re_irc> <henrik_alser> heksa: Awesome! :D I teach a course at Luleå university in embedded systems design where we use Rust (project work is designing an optical mouse hardware + firmware)
<re_irc> <henrik_alser> (Examination in Counterstrike tournament using their devices lol)
rardiol has joined #rust-embedded
rardiol has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Amadiro has joined #rust-embedded
rardiol has joined #rust-embedded
Guest14 has joined #rust-embedded
Guest14 is now known as brazuca
<gsalazar> henrik_alser: heksa: can one access your course materials? I also teach in university and like to look at other courses/materials for approaches and the way to introduce rust might be interesting in a project course I am teaching next semester
<re_irc> <James Munns> heksa: If any students are interested in operating system type stuff, I'd be happy to help mentor them on tasks in mnemOS :D
<re_irc> <James Munns> (current summary docs, working on getting the official docs rewritten atm: https://cohost.org/jamesmunns/post/73038-thoughts-about-mnem-o)
brazuca has quit [Ping timeout: 252 seconds]
explore has joined #rust-embedded
<re_irc> <korken89> Ah henrik_alser, you work with Per?
<re_irc> <henrik_alser> korken89: Yes! 🙌
<re_irc> <korken89> Nice, another one joins us in the North :D
<re_irc> <James Munns> "Per has a posse"
<re_irc> <henrik_alser> korken89: Yeah since covid i’ve been doing it remote!
<re_irc> <korken89> Cool, maybe we'll run into each other in the future then
<re_irc> <korken89> If you come to Luleå that is :)
<re_irc> <henrik_alser> Yeah i’ll make sure! :) I live in south sweden
<re_irc> <henrik_alser> (My role is mostly the hardware design and pcb layout parts)
<re_irc> <korken89> Nice!
<re_irc> <Campbell He> Just curious. Are these courses' material available online?
<re_irc> <henrik_alser> Campbell He: i think it’s all in the school’s non-public intranet/gitlab/discord, but i’ll check what’s available
<re_irc> <henrik_alser> Most is live lectures and labs and working on their project, but there might be slides
Guest14 has joined #rust-embedded
Guest14 is now known as brazuca
gsalazar has quit [Ping timeout: 240 seconds]
gsalazar has joined #rust-embedded
gsalazar has quit [Remote host closed the connection]
gsalazar has joined #rust-embedded
rardiol has quit [Ping timeout: 245 seconds]
dreamcat4 has joined #rust-embedded
gsalazar has quit [Remote host closed the connection]
crabbedhaloablut has quit [Write error: Connection reset by peer]
crabbedhaloablut has joined #rust-embedded
<re_irc> <cagrisk> Hello people, I joined this environment for my questions on https://github.com/stm32-rs/stm32f1xx-hal repository. Is anyone using it for STM32 development?
<re_irc> <cagrisk> Examples in the repo are so old, that they are not even compiled. Documentation is absymal :/ . My program hangs at the DMA example where it reads a serial into memory specifically.
<re_irc> <Mehmet Ali> Sometimes crates have different levels of support for individual chips
<re_irc> <Mehmet Ali> don't know about f1xx specifically
<re_irc> <Mehmet Ali> Supported Microcontrollers
<re_irc> stm32f100
<re_irc> stm32f101
<re_irc> stm32f103
<re_irc> <cagrisk> I am using the crate for F103RB, UART crate is satisfactory but when it comes to DMA, I couldn't make simplest example work. Of course, I had to fix it since it was not being compiled but kept true to its origin
<re_irc> <Mehmet Ali> Sometimes there is an issue that tracks compatbility
<re_irc> <Mehmet Ali> F4 had that
<re_irc> <skylardive1> Anyone know how ARMv5TE target runs on regular ARMv5?
<re_irc> <James Munns> which armv5 target?
<re_irc> <James Munns> T means "thumb mode", and E are the DSP instructions
<re_irc> <James Munns> ARMv5TE or ARMv5TEJL is the most common configuration I've seen, but you probably should be able to tweak the target specification to omit the T/E extensions, it may require you to use build-std though
<re_irc> <James Munns> but it might be worth checking if your chip is actually armv5te even if not listed
brazuca has quit [Quit: Client closed]
<re_irc> <James Munns> (sorry, I should have asked, "which CPU specifically" skylardive1)
<re_irc> <skylardive1> no CPU, it's a generic question
<re_irc> <skylardive1> * CPU in mind,
<re_irc> <James Munns> gotcha. The answer is, "it would run just fine, unless the compiler decided to use thumb instructions or dsp instructions, then it would fault on an invalid instruction"
<re_irc> <James Munns> BUT, I can't recall actually seeing any ARMv5 targets (that aren't at least TE) in the wild, so you might not have a problem
<re_irc> <skylardive1> I use cross-rs
<re_irc> <James Munns> IF you do, then there are ways to tweak the target.
<re_irc> <skylardive1> Oh, that's great.
<re_irc> <skylardive1> I use no_std too
<re_irc> <skylardive1> Does this make the process easier haha?
<re_irc> <James Munns> nope!
<re_irc> <James Munns> https://docs.rust-embedded.org/embedonomicon/custom-target.html discusses how to make a custom target
<re_irc> <skylardive1> How long does this process take?
<re_irc> <James Munns> you would _probably_ base yours on "armv5te-unknown-linux-gnueabi", but you need to make it actually something like "armv5-none-eabi", and make any necessary tweaks
<re_irc> <James Munns> Depends! You need to go find out some information about the specific target, create a target json like that page says, then you would need to tweak the cross-rs image you use to use your target json instead of the built-in target.
<re_irc> <James Munns> if you're pretty familiar with Rust, and can find the right LLVM info, maybe a couple of hours
<re_irc> <James Munns> if it's harder to find, or you need to search hard, or run into trouble, it could take a couple of days?
<re_irc> <James Munns> (it's hard to make a time estimate for someone else, when you don't know what they know :) )
<re_irc> <James Munns> I think one of the game console projects has a bare metal armv4 target that might be really similar, which might help?
<re_irc> <skylardive1> I'm inexperienced.
<re_irc> <skylardive1> What does "bare metal" mean?
<re_irc> <James Munns> no_std, basically
<re_irc> <skylardive1> I see It has no libc.
<re_irc> <James Munns> (no OS)
<re_irc> <skylardive1> Does that mean you use this to write bootloaders and firmware?
<re_irc> <James Munns> yes!
<re_irc> <James Munns> (or operating system kernels)
<re_irc> <James Munns> (or drivers)
<re_irc> <skylardive1> So I can't use it on Linux?
<re_irc> <skylardive1> Gotcha.
<re_irc> <James Munns> you could, but you wouldn't have access to anything like files or network or stuff
<re_irc> <James Munns> (it might make sense if you are building a static library as part of a larger application in C or something)
<re_irc> <skylardive1> James Munns: I see.
<re_irc> <skylardive1> Well those are things that I require.
<re_irc> <K900> What ARMv5 thing are you running on that has an OS?
<re_irc> <James Munns> then you'd want an "armv5-unknown-linux-eabi" target!
<re_irc> <James Munns> (and your code _wouldn't_ be "no_std")
<re_irc> <Campbell He> skylardive1: Then you need a target with "std"
<re_irc> <skylardive1> K900: It's a generic question.
<re_irc> <K900> (assuming your thing is actually running Linux)
<re_irc> <skylardive1> There are no specific CPUs or OS
<re_irc> <skylardive1> Well, Linux.
<re_irc> <James Munns> Then hypothetically I would say:
<re_irc> <James Munns> you _probably_ are going to end up having an armv5te processor when it becomes not-hypothetical.
<re_irc> <K900> I mean, if it's a hypothetical question, _and_ you can somehow get a decently modern Linux kernel to build for an ARMv5 thing, it should work
<re_irc> <K900> But also the last ARMv5 chip was made like 15 years ago so maybe don't
<re_irc> <skylardive1> Okay.
<re_irc> <skylardive1> One more question.
<re_irc> <K900> Like, why ARMv5 specifically?
<re_irc> <skylardive1> I see that Rust has many platforms supported, why haven't they supported every single platform yet?
<re_irc> <skylardive1> That LLVM has to offer.
<re_irc> <K900> Define "platform"?
<re_irc> <K900> You can make Rust generate code for any target LLVM supports
<re_irc> <K900> Supporting things in the standard library is trickier
<re_irc> <K900> Because LLVM does not provide any of that
<re_irc> <skylardive1> Oh...
<re_irc> <K900> But like, you can build no_std code for anything LLVM can generate code for
<re_irc> <K900> It's just not particularly useful without std or some sort of other library to actually interact with the outside world
<re_irc> <skylardive1> Yes I agree.
<re_irc> <K900> Actually I think it might not be _literally anything_
<re_irc> <K900> Because Rust itself does make some assumptions like CHAR_BIT being 8
<re_irc> <K900> That aren't upheld on some weird DSP targets
<re_irc> <K900> But you probably don't care about those unless you work at Realtek or Qualcomm
<re_irc> <James Munns> (does llvm support non-8-bit-char targets?)
<re_irc> <James Munns> I know GCC does, but I dunno about llvm
<cr1901> No
<cr1901> Synopsys may or may not have their own internal fork of LLVM that supports CHAR_BIT % 8 != 0 tho
<re_irc> <James Munns> that doesn't surprise me lol
rardiol has joined #rust-embedded
<re_irc> <K900> I thought CHAR_BIT was 16 on Hexagon at leas
<re_irc> <K900> * least
<re_irc> <K900> But I guess not on LLVM?
<re_irc> <therealprof> cagrisk: How do you mean? The examples are compiled in CI and that ran just 2 days ago...
Guest14 has joined #rust-embedded
<re_irc> <heksa> henrik_alser: Ah, Luleå! I'm hoping we can come up with a collaboration at some point, but I'm way too busy with the new chip we made to push for any new big stuff. There's a student that has proposed that they do their master's on porting RTIC to RISC-V (= our platform) and I'd definitely volunteer to supervise that, whenever they get started on that part of their studies.
<re_irc> <heksa> @irc_libera_gsalazar:psion.agg.io: Legally, yes. In practice no. We'll try to get it sorted this year.
<re_irc> Public education is supposed to be free in Finland, but our tech is not good enough for that.
<re_irc> <chrysn (@chrysn:matrix.org)> I might run into a case where I'd give nrf-softdevice a test run, and AIU that would work best running from embassy (which I've wanted to have a look at for some time).
<re_irc> <chrysn (@chrysn:matrix.org)> I don't have an nRF52 DK at hand, but several other boards (microbit-v2, particle-xenon, nrf52840dongle). Shouldn't be too hard to map them out (like, which are the LED pins here) and run there, right?
<re_irc> <dirbaio> the examples are written for the nrf52840 dk, but it should be easy to get them run anywhere, just changing pin numbers
<re_irc> <chrysn (@chrysn:matrix.org)> ... and they'd probably work best if I have a programmer attached. (Otherwise I'd have to port things to the riotboot bootloader, that'd take more time.)
explore has quit [Quit: Connection closed for inactivity]
rardiol has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<re_irc> <lulf> chrysn: I've made several microbit examples for embassy here https://github.com/drogue-iot/drogue-device/tree/main/examples/nrf52/microbit (with nrf-softdevice in one of them) - there is some BSP in the repo as well + a LED matrix driver for it.
<re_irc> <chrysn (@chrysn:matrix.org)> Awesome, thanks!
brazuca has quit [Quit: Client closed]
Guest14 has joined #rust-embedded
Guest14 is now known as brazuca
brazuca has quit [Client Quit]
Guest14 has joined #rust-embedded
Guest14 is now known as brazuca
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #rust-embedded
causal has joined #rust-embedded
brazuca has quit [Quit: Client closed]
Guest14 has joined #rust-embedded
Guest14 is now known as brazuca
explore has joined #rust-embedded
brazuca has quit [Ping timeout: 252 seconds]
Guest14 has joined #rust-embedded
Guest14 is now known as brazuca
<re_irc> <almindor> eldruin: it should be possible to use https://github.com/rust-embedded-community/usb-device with the max3421e chip/board (provided someone implements it) right?
<re_irc> <eldruin> from the description it seems so, yes
<re_irc> <ub|k> would a patch to use "critical-section" in "alloc-cortex-m" be welcome? I had to do that to have a working allocator in the rp2040, since it's dual core (as suggested by someone in rp-rs)
<re_irc> <ub|k> (it's quite simple TBH, but if it's helpful I'll gladly open a PR)
<re_irc> <dirbaio> ideally "critical-section" 1.0, not 0.2
<re_irc> <dirbaio> hopefully out soon
brazuca has quit [Ping timeout: 252 seconds]
Guest14 has joined #rust-embedded
Guest14 is now known as brazuca
<re_irc> <ub|k> Yeah, it targets 1.0
<re_irc> <dkhayes117> Wow, Nordic is hiring for RISC-V designer/verification. https://twitter.com/coderbyheart/status/1555196196158902272?t=PP706QFwX7e2gPzpyjJJ_Q&s=19
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #rust-embedded
<re_irc> <adamgreig> ub|k: yea, I'd be happy to merge this
<re_irc> <adamgreig> it probably wants to be released about the same time as doing it in c-m I guess, and in any event not until c-s 1.0 is published, but still
brazuca has quit [Quit: Client closed]
Amadiro has quit [Remote host closed the connection]
Amadiro has joined #rust-embedded
explore has quit [Quit: Connection closed for inactivity]
Guest14 has joined #rust-embedded
Guest14 is now known as brazuca
rardiol has joined #rust-embedded