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
explore has joined #rust-embedded
Maik93 has joined #rust-embedded
<Maik93> hi all, any useful hint for AVR breakpoint debugging? (maybe in Clion or VSCode)
<Maik93> or whatever, I'm quite desperate
explore has quit [Quit: Connection closed for inactivity]
starblue has quit [Ping timeout: 268 seconds]
starblue has joined #rust-embedded
dc740 has joined #rust-embedded
Maik93 has quit [Quit: leaving]
Maik93 has joined #rust-embedded
dc740 has quit [Ping timeout: 248 seconds]
<re_irc> <hartan> Does someone have a suggestion how to make an array of "SpiBusDevice"s that are generic over "CS: OutputPin"? I can't just use an array, since the devices are different types because each Gpio is it's own type in the HAL.
<re_irc> <ryan-summers> You can create an enum with all of the (known) CS variants. I've done this for other gpio-generic devices
<re_irc> <ryan-summers> Other than that, you'll need dynamic memory in a Box
<re_irc> <ryan-summers> Since the CS pin could have an unknown size (e.g. what if it's a GPIO pin attached to a GPIO expander?)
<re_irc> <hartan> ryan-summers: And then you implement "OutputPin" for the enum?
<re_irc> <ryan-summers> What I was saying is you create an enum of:
<re_irc> V1(MyDevice<SPI, CS_1>),
<re_irc> V2(MyDevice<SPI, CS_2>),
<re_irc> enum SpiDevice {
<re_irc> }
<re_irc> <ryan-summers> What I was saying is you create an enum of:
<re_irc> enum SpiDevice {
<re_irc> }
<re_irc> V1(MyDevice<SPI, CS_1>),
<re_irc> V2(MyDevice<SPI, CS_2>),
<re_irc> <ryan-summers> Then you can create an array of them since they are all of the "SpiDevice" type
<re_irc> <hartan> ryan-summers: That's clever. I'll try that, thank you!
<re_irc> <explodingwaffle101> depending on your hal you also might be able to use something like https://docs.rs/rp2040-hal/latest/rp2040_hal/gpio/dynpin/index.html
Maik93 has left #rust-embedded [#rust-embedded]
dc740 has joined #rust-embedded
dc740 has quit [Ping timeout: 268 seconds]
rardiol has joined #rust-embedded
causal has joined #rust-embedded
GenTooMan has quit [Ping timeout: 244 seconds]
<re_irc> <wucke13> I would like to link all .o file from within a "libmyrustcrate.a" into one big relocatable elf. Currently I'm unpacking the archive, and run an "ld -r *.o -o fat.elf". Is there a more elegant way to do this?
GenTooMan has joined #rust-embedded
GenTooMan has quit [Ping timeout: 244 seconds]
GenTooMan has joined #rust-embedded
<re_irc> <wucke13> * ".o" files from within a "libmyrustcrate.a" into one big relocatable ELF.
<re_irc> <wucke13> Answer to my self: "ld libmyrustcrate.a --require-defined one_symbol_that_i_need -o fat.elf"
rardiol has quit [Ping timeout: 252 seconds]
rardiol has joined #rust-embedded
rardiol has quit [Ping timeout: 248 seconds]