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: 245 seconds]
starblue has joined #rust-embedded
kenny has quit [Quit: WeeChat 4.0.2]
crabbedhaloablut has joined #rust-embedded
GenTooMan has quit [Ping timeout: 260 seconds]
GenTooMan has joined #rust-embedded
GenTooMan has quit [*.net *.split]
dne has quit [*.net *.split]
lightningwright has quit [*.net *.split]
cr1901 has quit [*.net *.split]
dreamcat4 has quit [*.net *.split]
jr-oss has quit [*.net *.split]
re_irc has quit [*.net *.split]
duderonomy has quit [*.net *.split]
Darius has quit [*.net *.split]
WSalmon has quit [*.net *.split]
corecode has quit [*.net *.split]
jasperw has quit [*.net *.split]
Ekho has quit [*.net *.split]
HumanGeek has quit [*.net *.split]
kenrendell[m] has quit [*.net *.split]
sknebel has quit [*.net *.split]
hifi has quit [*.net *.split]
SanchayanMaity has quit [*.net *.split]
nohit has quit [*.net *.split]
diagprov has quit [*.net *.split]
m5zs7k has quit [*.net *.split]
sauce has quit [*.net *.split]
Foxyloxy has quit [*.net *.split]
zagura has quit [*.net *.split]
wose has quit [*.net *.split]
sigmaris has quit [*.net *.split]
tafama has quit [*.net *.split]
seds has quit [*.net *.split]
stephe has quit [*.net *.split]
agg has quit [*.net *.split]
edm has quit [*.net *.split]
nadja has quit [*.net *.split]
NishanthMenon has quit [*.net *.split]
whitequark has quit [*.net *.split]
hmw has quit [*.net *.split]
HumanGeek has joined #rust-embedded
dne has joined #rust-embedded
corecode has joined #rust-embedded
jasperw has joined #rust-embedded
Darius has joined #rust-embedded
NishanthMenon has joined #rust-embedded
hmw has joined #rust-embedded
edm has joined #rust-embedded
nadja has joined #rust-embedded
dreamcat4 has joined #rust-embedded
agg has joined #rust-embedded
stephe has joined #rust-embedded
re_irc has joined #rust-embedded
sknebel has joined #rust-embedded
jr-oss has joined #rust-embedded
WSalmon has joined #rust-embedded
tafama has joined #rust-embedded
lightningwright has joined #rust-embedded
sigmaris has joined #rust-embedded
Foxyloxy has joined #rust-embedded
wose has joined #rust-embedded
m5zs7k has joined #rust-embedded
sauce has joined #rust-embedded
zagura has joined #rust-embedded
cr1901 has joined #rust-embedded
seds has joined #rust-embedded
GenTooMan has joined #rust-embedded
HumanGeek has quit [Max SendQ exceeded]
tafama has quit [Max SendQ exceeded]
HumanGeek has joined #rust-embedded
nohit has joined #rust-embedded
SanchayanMaity has joined #rust-embedded
hifi has joined #rust-embedded
diagprov has joined #rust-embedded
tafa has joined #rust-embedded
<re_irc> <@yashwanthsingh:matrix.org> Hi I'm trying to compile code esp32 in rust on Mac
<re_irc> espup install
<re_irc> I have installed espup on machine by following commands, I have used the following commands.
<re_irc> cargo install espup
<re_irc> chmod a+x $HOME/export-esp.sh
<re_irc> $HOME/export-esp.sh
<re_irc> espup install -t all
<re_irc> I’m trying to compile example esp32 code from https://github.com/esp-rs/esp-wifi, I’m getting the following error.
<re_irc> Caused by:
<re_irc> process didn't exit successfully: rustc - --crate-name ___ --print=file-names -C link-arg=-Tlinkall.x -C link-arg=-Trom_functions.x --target xtensa-esp32-none-elf --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg (exit status: 1)
<re_irc> --- stderr
<re_irc> error: Error loading target specification: Could not find specification for target "xtensa-esp32-none-elf". Run rustc --print target-list for a list of built-in targets```
<re_irc> GitHub - esp-rs/espup: Tool for installing and maintaining Espressif Rust ecosystem. - GitHub
<re_irc> Tool for installing and maintaining Espressif Rust ecosystem. - GitHub - esp-rs/espup: Tool for installing and maintaining Espressif Rust ecosystem.
<re_irc> what should be my next steps?
kenrendell[m] has joined #rust-embedded
<re_irc> <@yashwanthsingh:matrix.org> what should be my next steps to add target to xtensa-esp32-none-elf
whitequark has joined #rust-embedded
<re_irc> <@bugadani:matrix.org> : you should be good to go, you just need to use the toolchain as, for example "cargo +esp build"
<re_irc> <@yashwanthsingh:matrix.org> error: Error loading target specification: Could not find specification for target "xtensa-esp32-none-elf". Run "rustc --print target-list" for a list of built-in targets
Ekho has joined #rust-embedded
m5zs7k has quit [Ping timeout: 250 seconds]
m5zs7k has joined #rust-embedded
<re_irc> <@yashwanthsingh:matrix.org> : It didn't work could you elaborate
<re_irc> <@bugadani:matrix.org> : Sorry I don't have a Mac, maybe someone else can help you better.
<re_irc> <@bugadani:matrix.org> +As long as you have ran "export-esp.sh" in the current terminal, "cargo +esp ..." should just work, according to my experience
<re_irc> <@bugadani:matrix.org> * in
<re_irc> <@yashwanthsingh:matrix.org> : okay thank you
starblue has quit [Ping timeout: 260 seconds]
<re_irc> <@thejpster:matrix.org> TIL we host our own docs for cortex-m-rt: https://docs.rust-embedded.org/cortex-m-rt/0.6.1/cortex_m_rt/index.html
<re_irc> <@thejpster:matrix.org> I assume that's from back when docs.rs didn't like our weird shenanigans
starblue has joined #rust-embedded
starblue has quit [Quit: WeeChat 3.8]
<re_irc> <@sourcebox:matrix.org> The global_asm! macro doesn't like something like "push {r0-r3, r12, lr}" because of the curly braces. Is there any valid replacement for them?
<re_irc> <@firefrommoonlight:matrix.org> : I need to probably self host docs due to feature gates; that's another use case
<re_irc> <@jannic:matrix.org> : AFAIK "push {{r0-r3, r12, lr}}" should work.
<re_irc> <@sourcebox:matrix.org> Ok, thanks.
<re_irc> <@sourcebox:matrix.org> Maybe I'm even not doing it the right way. Is there some equivalent for "__attribute__((interrupt("IRQ")))"?
kenny has joined #rust-embedded
<re_irc> <@jannic:matrix.org> I may be completely wrong, but from the command I guess you are targeting ARM, and as far as I know, there's no need to do anything special for an interrupt handler, the calling conventions are like those of a regular function call. So I guess you don't need such an attribute at all.
<re_irc> <@dirbaio:matrix.org> not sure if that's the case for cortex-a
<re_irc> <@jannic:matrix.org> Not sure either. https://gcc.gnu.org/onlinedocs/gcc/ARM-Function-Attributes.html only says "On ARMv7-M the interrupt type is ignored, and the attribute means the function may be called with a word-aligned stack pointer." As it specifically says "ARMv7-M", it may not be true for -A.
<re_irc> <@dirbaio:matrix.org> and it def wasn't the case for armv4/v5
exark has quit [Quit: quit]
exark has joined #rust-embedded
<re_irc> <@sourcebox:matrix.org> When I don't do push/pop and just use a plain Rust function, it crashes badly.
dc740 has joined #rust-embedded
<re_irc> <@sourcebox:matrix.org> Normally, I would expect that if inlining could be disabled the compiler has to safe the registers accordingly, but the "#[inline(never)]" attribute is just a suggestion, so it can't be trusted.
dc740 has quit [Remote host closed the connection]
dc740 has joined #rust-embedded
dc740 has quit [Client Quit]
emerent has quit [Ping timeout: 246 seconds]
emerent has joined #rust-embedded
<re_irc> <@thejpster:matrix.org> blob:https://developer.arm.com/46707ad6-354a-42bd-84b6-c8a263cf2b48
<re_irc> <@thejpster:matrix.org> https://developer.arm.com/documentation/den0024/a/AArch64-Exception-Handling/Interrupt-handling#:~:text=ARMv8%20Models-,Interrupt%20handling,reserved%20for%20secure%20interrupt%20sources.
<re_irc> <@thejpster:matrix.org> That diagram suggests that Armv8-A cannot stack registers on IRQ or FIQ and you need to do it manually.
<re_irc> We are so spoiled with Cortex-M cores!
<re_irc> <@thejpster:matrix.org> See also Cortex-M taking the Main Stack Pointer from the interrupt vector table so you don’t need to write any assembly at all to run a program.
<re_irc> <@sourcebox:matrix.org> Yeah, it's quite new stuff for me also.
<re_irc> <@sourcebox:matrix.org> But I want to avoid using interrupts on Cortex-A anyway because they degrade performance by a good amount there.
<re_irc> <@sourcebox:matrix.org> For the things that need them, I still have the M4 core.
<re_irc> <@sourcebox:matrix.org> Nevertheless, it's not a bad idea to have the handler setup correctly ;-)
IlPalazzo-ojiisa has joined #rust-embedded
<re_irc> <@ragarnoy:matrix.org> Hey, does anyone have any idea why I can't attach to the RTT with probe-rs when using a daplink debugger?
<re_irc> <@dngrs:matrix.org> : I probably can't help you with that but is there an error message you can supply?
<re_irc> <@yatekii:matrix.org> : do you have version 0.19 of probe-rs? we release 0.20 that fixes a heavy bug with RTT :)
<re_irc> <@ragarnoy:matrix.org> : sadly i closed my setup and I don't have the message anymore
<re_irc> <@ragarnoy:matrix.org> : oh!
<re_irc> <@ragarnoy:matrix.org> i'll have to try right now lol
<re_irc> <@ragarnoy:matrix.org> it's not on crates io yet i guess?
<re_irc> <@ragarnoy:matrix.org> : that did it, thanksz
<re_irc> <@mali:grusbv.com> Hi, I have an isse about the folder structure. In a crate I have this structure:
<re_irc> └── src
<re_irc> ├── Cargo.toml
<re_irc> .
<re_irc> ├── fmt.rs
<re_irc> ├── lite.rs
<re_irc> ├── lib.rs
<re_irc> ├── standard.rs
<re_irc> ├── tests
<re_irc> │ └── mock.rs
<re_irc> └── utils.rs
<re_irc> I have unit tests in both "lite.rs" and "standard.rs" and they both use a mock object defined in tests/mock.rs like this:
<re_irc> #[cfg(test)]
<re_irc> mod tests {
<re_irc> use super::*;
<re_irc> #[path = "../../tests/mock.rs"]
<re_irc> mod mock;
<re_irc> /// etc..
<re_irc> Although this config worked some time ago with changes in my host system (win->mac)/toolchains(more recent nightly) etc it throws error:
<re_irc> error: couldn't read flash-manager/src/lite/tests/../../test-utils/mock.rs: No such file or directory (os error 2)
<re_irc> --> flash-manager/src/lite.rs:353:5
<re_irc> |
<re_irc> 353 | mod mock;
<re_irc> | ^^^^^^^^^
<re_irc> Now I wonder about the path, flash-manager/src/lite/tests/../../test-utils/mock.rs: it seems that lite.rs expects a folder named after itself and somehow maybe since that folder is not there it throws.No wonder if I create empty dummy folders it works:
<re_irc> ├── Cargo.toml
<re_irc> ├── Readme.md
<re_irc> └── src
<re_irc> ├── fmt.rs
<re_irc> ├── lib.rs
<re_irc> ├── lite
<re_irc> │ └── tests
<re_irc> ├── lite.rs
<re_irc> ├── standard
<re_irc> │ └── tests
<re_irc> ├── standard.rs
<re_irc> ├── tests
<re_irc> │ └── mock.rs
<re_irc> └── utils.rs
<re_irc> This is an eyesore, is there a better way?
<re_irc> <@mali:grusbv.com> * flash-manager/src/lite/tests/../../tests/mock.rs:
<re_irc> <@dirbaio:matrix.org> i'd put it somewhere in the crate tree that's accessible by all tests
<re_irc> <@dirbaio:matrix.org> for example in "lib.rs": "#[cfg(test)] mod test_mock;"
<re_irc> <@dirbaio:matrix.org> and put the code in "src/test_mock.rs"
<re_irc> <@mali:grusbv.com> Oh that is nice
<re_irc> <@dirbaio:matrix.org> then from tests, just "use crate::test_mock;"
<re_irc> <@dirbaio:matrix.org> * crate::test_mock::whatever;"
<re_irc> <@mali:grusbv.com> Perfect, thank you.
<re_irc> <@mali:grusbv.com> This is clean.
<re_irc> <@dirbaio:matrix.org> avoiding "#[path]" makes code easier to navigate too
dc740 has joined #rust-embedded
<re_irc> <@mali:grusbv.com> It seems that a recent build of serde broke my build.
<re_irc> <@mali:grusbv.com> Oh, it somehow is std default?
<re_irc> <@dngrs:matrix.org> mali ⚡️: with many crates you have to do "default_features = false", yeah
<re_irc> <@mali:grusbv.com> I see, but serde was functional until a minute agi or sth\
<re_irc> <@mali:grusbv.com> * ago or sth
<re_irc> <@dngrs:matrix.org> maybe something in your dependency tree uses serde as well and features get unified
<re_irc> <@mali:grusbv.com> Ahh
<re_irc> <@mali:grusbv.com> let me take a look, good point.
<re_irc> <@dngrs:matrix.org> "cargo-tree" might help
dc740 has quit [Remote host closed the connection]
<re_irc> <@mali:grusbv.com> yep, used that.
<re_irc> <@daley_:matrix.org> Do you know that you can earn $5,000 or more weekly from crypto Trading? With Just $500… 100% Inbox Admin on Telegram for more details 👇👇👇👇👇👇 https://t.me/PROFITSWITHSTEVE
crabbedhaloablut has quit [Ping timeout: 260 seconds]
crabbedhaloablut has joined #rust-embedded
<re_irc> <@shakencodes:matrix.org> Is the mechanism for attaching placing a function into the interrupt table basically these three steps?
<re_irc> 1. Precede the function with #[interrupt]
<re_irc> 2. Function signature is fn interrupt_name() -- no arguments, no return
<re_irc> 3. Name the function with the interrupt vector name
<re_irc> and, if the above is correct, how does one find the list of correct names?
<re_irc> <@dngrs:matrix.org> for 3, refer to your PAC and/or the data sheet
<re_irc> <@dngrs:matrix.org> and 1,2: yeah at least if you're on cortex-m
<re_irc> <@dngrs:matrix.org> in general though, once you get past a toy example phase, I'd recommend checking out embassy and/or RTIC for a higher level of task abstraction
<re_irc> <@dngrs:matrix.org> resource management can get annoying
IlPalazzo-ojiisa has quit [Quit: Leaving.]