<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>
<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"