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