emerent has quit [Remote host closed the connection]
emerent has joined #rust-embedded
ymwm has joined #rust-embedded
Darius_ has joined #rust-embedded
Darius has quit [Ping timeout: 256 seconds]
Darius_ is now known as Darius
Amadiro has joined #rust-embedded
jringstad__ has joined #rust-embedded
jringstad__ has quit [Remote host closed the connection]
Amadiro_ has joined #rust-embedded
Amadiro has quit [Ping timeout: 256 seconds]
Amadiro_ is now known as Amadiro
<re_irc>
<barafael> olaoni: you can also check what the utils do, and imitate that
<re_irc>
<ryan-summers> olaoni: You can also build + flash the example project directly from the stm32h7xx-hal repository. If you want it all in a standalone bin, you're going to have to pull in any associated code for the project
<re_irc>
<ryan-summers> And by no means would I say it should be simple to build without the utilities folder. The compiler needs to resolve all the symbols when you compile. If you have a header file in C declaring some "my_function()", you have to compile said function into your code as well
<re_irc>
<ryan-summers> And by no means would I say it should be simple to build without the utilities folder. The compiler needs to resolve all the symbols when you compile. If you have a header file in C declaring some "my_function()", you have to compile said function into your code as well. This is identical to what the "utilities" module is in the example - it's extra code that has to get compiled into the blinky example. You can...
<re_irc>
... modify the example to not need it, but you can't just leave it out without modifying the example code
<re_irc>
<olaoni> barafael: Thanks the issue with removing the utilities folder in standalone project has not been resolved
<re_irc>
<olaoni> ryan-summers: Yes I am now aware of that now. I have been able to build standalone and from the stm32h7xx-hal reposistory. Going forward I will opt for the latter as I am now slowing beginning to understand the whole structure.
<re_irc>
I have managed to run the blinky on the stm32h743 nucleo board both in repo and standalone.
<re_irc>
<olaoni> * slowly
starblue has quit [Ping timeout: 272 seconds]
starblue has joined #rust-embedded
starblue has quit [Ping timeout: 256 seconds]
ymwm_ has joined #rust-embedded
ymwm has quit [Ping timeout: 240 seconds]
<re_irc>
<olaoni> ryan-summers: I am trying to use cargo-embed for debugging code. You sent me this link yesterday https://crates.io/crates/cargo-embed however when I add
<re_irc>
cargo-embed = "0.12.0" to my Config.toml file it breaks the build. I am building from stm32h7xx-hal repository.
<re_irc>
I am getting the following error when cargo-embed is added
<re_irc>
<ryan-summers> cargo-embed is a standalone binary, not a library dependency. You install it by running "cargo install cargo-embed", and then you use it by using "cargo embed <args>"
<re_irc>
<olaoni> I have installed it
<re_irc>
<ryan-summers> You don't put it in Cargo.toml
<re_irc>
<olaoni> ah okay
<re_irc>
<olaoni> one more question about <args> in the instruction. This is going to be --chip STM32H743ZITx right?
<re_irc>
<burrbull> yes. in command line or in Embed.toml
<re_irc>
<olaoni> burrbull: Thanks
<re_irc>
<olaoni> I am running the following command from stm32h7xx-hal repo base directory but getting error. I have added added to the same directory a .embed.toml file which I have edited to contain both stlink vid and pid number.
<re_irc>
<9names (@9names:matrix.org)> you still need to have --features=stm32h743v,rt
<re_irc>
<Noah> Has anyone here used TFTP or similar to upgrade their devices over ETH (in Rudt ofc) or would be willing to code this on a contract basis?
<re_irc>
<Noah> * Rust
<re_irc>
<ryan-summers> Man, a generic TFTP bootloader in Rust would actually be super nice. I did that exact thing a few years back in C++ and it was a nice mechanism to bootload
<re_irc>
<ryan-summers> Maybe it could be added onto "blethrs"? Don't know how widely the project is still used though, I just remember some chatter about it a while ago
<re_irc>
<olaoni> 9names: Yes I did issue the following command first _*cargo build --features=stm32h743v,rt*_ once it built successfully I then issued the _*cargo embed --chip STM32H743ZITx*_
<re_irc>
<ryan-summers> cargo-embed runs "cargo-build" before flasing, so features supplied in the first build call are completely ignored and overwritten with the new build
<re_irc>
<olaoni> ryan-summers: okay thanks
bpye8 has joined #rust-embedded
limpkin_ has joined #rust-embedded
xnor_ has joined #rust-embedded
Foxyloxy_ has joined #rust-embedded
limpkin has quit [*.net *.split]
xnor has quit [*.net *.split]
Foxyloxy has quit [*.net *.split]
bpye has quit [*.net *.split]
bpye8 is now known as bpye
ymwm_ has quit [Ping timeout: 256 seconds]
<re_irc>
<Mehmet Ali> Hi all! Is there a clever way to define registers in a device driver, but in different banks?
<re_irc>
<Mehmet Ali> I mean a register in bank A is different of a register in a bank B
<re_irc>
<Mehmet Ali> Generally, I put all registers in an enum, and implement all methods there
<re_irc>
<Mehmet Ali> Now, I can define an enum for each bank, but I think there should be a way to get that information there somehow and treat them all as equals.
<re_irc>
<Mehmet Ali> I guess this might work:
<re_irc>
DRIVE_CONFIG =(0x13,0x00),
<re_irc>
<Mehmet Ali> DEVICE_CONFIG =(0x11,0x00),
<re_irc>
DRIVE_CONFIG =(0x13,0x00),
<re_irc>
DEVICE_CONFIG =(0x11,0x00),
<re_irc>
<Mehmet Ali> pub enum Register_0 {
<re_irc>
<Mehmet Ali> pub enum Register_0 {
<re_irc>
DRIVE_CONFIG =(0x13,0x00),
<re_irc>
DEVICE_CONFIG =(0x11,0x00),
<re_irc>
<burrbull> olaoni: add "--release" to build optimized version
<re_irc>
<ryan-summers> Mehmet Ali: Check out diondoktor's device-driver: https://github.com/diondokter/device-driver - I think there's a proc-macro in the works to improve it as well
<re_irc>
<ryan-summers> * diondokter's
<re_irc>
<Mehmet Ali> Yep that might be handy
<re_irc>
<olaoni> burrbull: what should I add --release build option to? is this to *cargo embed --chip STM32H743ZITx --release*
<re_irc>
Finished release [optimized + debuginfo] target(s) in 50.24s
<re_irc>
<ryan-summers> Are you building in the HAL repository? If so, you have to specify the --example
<re_irc>
<olaoni> ryan-summers: yes, I am. Sorry I forgot about --example
<re_irc>
<ryan-summers> Also, there's no need to <name> in every message, and it can be quite distracting for me personally 😅
<re_irc>
<olaoni> okay sorry about that
<re_irc>
<dalepsmith> IRC habits
<re_irc>
<olaoni> cool learning fast
<re_irc>
<ryan-summers> Glad to hear it :) Rust's got a lot of stuff to take in early on for sure
ymwm_ has joined #rust-embedded
<re_irc>
<mutantbob> Ugh. I just ran into a problem with bindgen. It seems to calculate the "__bindgen_padding" wrong when a base class lives in a "blocklist_file()" .
<re_irc>
<mutantbob> It works fine on stable x86_64, but not for AVR
crabbedhaloablut has quit [Remote host closed the connection]