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
fooker has quit [Ping timeout: 265 seconds]
fooker has joined #rust-embedded
sigmaris has quit [Quit: ZNC - https://znc.in]
sigmaris has joined #rust-embedded
stgloor has joined #rust-embedded
majors_ has joined #rust-embedded
Allie has quit [Ping timeout: 260 seconds]
NishanthMenon has quit [Ping timeout: 260 seconds]
majors has quit [Ping timeout: 260 seconds]
stgl has quit [Ping timeout: 260 seconds]
stgloor is now known as stgl
Allie has joined #rust-embedded
NishanthMenon has joined #rust-embedded
<ryan-summers[m]> <Dherse[m]> "Hello, I've hit a strange issue:..." <- Is the object your storing some repr(C) or other oddly packed structure? Rust should be ensuring that things are aligned for your given architecture. Does enabling the MPU enable some interrupt for unaligned access that previously wasn't enabled when the MPU is disabled
<ryan-summers[m]> * is disabled?
m5zs7k has quit [Ping timeout: 244 seconds]
m5zs7k has joined #rust-embedded
baxbear[m] has joined #rust-embedded
<baxbear[m]> Greetings people I am new to this group and would like to know whether it is okay to ask questions here about: https://github.com/rust-embedded/rust-raspberrypi-OS-tutorials - I've read the introductory book about rust (the extended version with the quizzes) some 2 years ago and never used rust so far. Now I thought maybe it would be fun doing the tutorial while remembering rust, further refresh my knowledge about OSs and start
<baxbear[m]> some embedded development (all stuff that I haven't done since I've finished my computer science degree).
<baxbear[m]> Basically, I would like to ask which hardware you recommend (since I have to buy all the stuff anyway) if I would like to execute the tutorials while having the least amount of problems? (Taking into account that I have no debugging experience regarding embedded or hardware-oriented development)
<diondokter[m]> baxbear[m]: > <@baxbear:matrix.org> Greetings people I am new to this group and would like to know whether it is okay to ask questions here about: https://github.com/rust-embedded/rust-raspberrypi-OS-tutorials - I've read the introductory book about rust (the extended version with the quizzes) some 2 years ago... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/umlbLPQNWxNjguogXVrZufxz>)
<diondokter[m]> The microbit is also pretty cheap
<ryan-summers[m]> Honestly, if you're just getting started with embedded, I would highly advise against doing a custom RPI OS. Instead, using something like the Raspberry Pi Pico or the microbit embedded book
K900 has joined #rust-embedded
<K900> I would generally recommend a VM
<K900> So you don't have to buy an RPi
<baxbear[m]> Alright, I think in that case I follow your recommendation. Thanks a lot!
<K900> Also probably worth noting that embedded and osdev aren't really the same thing
<K900> Though they share similarities
<baxbear[m]> I am not sure about the differences but in general I would assume developing a small OS for a specific hardware with statically loaded processes a simple memory management unit and a general scheduler would tick both boxes?
<K900> Not really
<baxbear[m]> oh okay
<K900> Embedded stuff generally doesn't have an OS
<K900> Or has very little of an OS
<baxbear[m]> Okay, probably something I learn within the tutorial you've provided?
<K900> Which one?
<K900> What is your actual end goal?
<baxbear[m]> The microbit one - goal: having fun learning about embedded development - I mean it just diverged slightly based on a wrong assumption of mine as you noticed :D
<diondokter[m]> baxbear[m]: You could do this perfectly well on an embedded device
<diondokter[m]> You don't have page tables and virtual memory though
<baxbear[m]> What is preventing me from adding own implementations of those concepts in later project phases - like in an incremental build up? I accept that it isn't common - maybe I also can directly experience why it is unusual/uncommon (e.g. by performance problems etc.) when trying it? But maybe I stick with the standard embedded tutorials and save this stuff for when I am more comfortable with the basics
<K900> Most embedded things just don't really need a full OS
<K900> They're mostly fixed function
<K900> So you need maybe task priorities, but definitely no memory or process isolation
<baxbear[m]> Hmm, makes sense
<diondokter[m]> K900: Well, that really depends!
<diondokter[m]> Tock OS is one of the most used RTOSses built in Rust and I hear one of reasons to use it is the process isolation
AlexandrosLiarok has joined #rust-embedded
<AlexandrosLiarok> what's the best way to get a static mut reference to a MaybeUninit array without adding it to bss ?
<AlexandrosLiarok> it seems just using uninit adds increases bss size.
<AlexandrosLiarok> I control the linker script and need to allocate large regions to pass to C ffi.
<AlexandrosLiarok> s//`/, s//`/, s/adds//
<dirbaio[m]> why don't you want it in .bss?
<AlexandrosLiarok> Mainly to get better size estimation of the actual static vars
<AlexandrosLiarok> I do use link_section btw
<AlexandrosLiarok> Using uninit still adds to the bss size
ivmarkov[m] has joined #rust-embedded
<ivmarkov[m]> but so what (sorry to interfere)? it is not like bss take space in flash?
thejpster[m] has joined #rust-embedded
<thejpster[m]> By has size do you mean a the value reported by the program called size?
<thejpster[m]> If so, try size -A
<AlexandrosLiarok> Thanks that was it.
<AlexandrosLiarok> Yea I thought it was actually adding to bss but it was just the report format
<JamesMunns[m]> Fwiw: statics that are filled with zeros are also in bss, and the uninit section does still count for your total static memory usage, so you should be counting it.
<ryan-summers[m]> Is there a way to get rust-toolchain to specify a target triple? I have both MSVC and GNU versions locally and want to explicitly use GNU for a project
<ryan-summers[m]> * Is there a way to get rust-toolchain to specify a target triple / host type? I have both MSVC and GNU versions locally and want to explicitly use GNU for a project
<ryan-summers[m]> * Is there a way to get rust-toolchain to specify a target triple / host type? I have both MSVC and GNU versions locally and want to explicitly use GNU for a project where MSVC is my default
firefrommoonligh has joined #rust-embedded
<firefrommoonligh> <baxbear[m]> "Greetings people I am new to..." <- > <@baxbear:matrix.org> Greetings people I am new to this group and would like to know whether it is okay to ask questions here about: https://github.com/rust-embedded/rust-raspberrypi-OS-tutorials - I've read the introductory book about rust (the extended version with the quizzes... (full message at
<ryan-summers[m]> Oh nevermind, I thought I tried just specifying the triple in rust-toolchain.toml and it didn't work, but it looks like it does
xnor has quit [Ping timeout: 252 seconds]
xnor has joined #rust-embedded
frostie314159[m] has quit [Quit: Idle timeout reached: 172800s]
DominicFischer[m has quit [Quit: Idle timeout reached: 172800s]
jngo102[m] has joined #rust-embedded
<jngo102[m]> Here begins my journey on using rust with the new rp2350
takkaryx[m] has quit [Quit: Idle timeout reached: 172800s]
vollbrecht[m] has quit [Quit: Idle timeout reached: 172800s]
Alistair[m] has joined #rust-embedded
<Alistair[m]> RISC-V or ARM? Or both!
<jngo102[m]> well the product I'm planning to develop on is the Thumby Color which I believe is configured to use the ARM cores
<jngo102[m]> would be cool to tinker around with the other pair tho