!WqsLCItsZbJGhRjnxP:matrix.org

stm32-rs

471 Members
Discussion and support for stm32-rs projects. History is publicly viewable. Bridged to #stm32-rs on Libera IRC. Code of conduct: https://www.rust-lang.org/conduct.html. Public logs: https://libera.irclog.whitequark.org/stm32-rs53 Servers

Load older messages


SenderMessageTime
22 Apr 2024
@jamesmunns:beeper.comJames Munns * yeah, as Ryan said, only down to the port level, so like DynamicPin<PORTA>or whatever, which means you can't putPA4, PB6, PC0 in an array. 14:34:28
@ryan-summers:matrix.orgryan-summersThere are probably some negligible performance impacts, but likely nothing you'd notice14:35:46
@jamesmunns:beeper.comJames MunnsAh! I missed that! sorry!14:35:40
@jo_we:matrix.orgjo_we
In reply to @ryan-summers:matrix.org
There are probably some negligible performance impacts, but likely nothing you'd notice
can definitely work with that!
14:37:12
@burrbull:matrix.orgburrbull Not sure I understood what you want. Maybe this?
let ar = [pa0.into_push_pull_output().erase(), pb1.into_push_pull_output().erase()]
14:41:57
@jo_we:matrix.orgjo_weyes, for sure. I now have an array of erased output pins. I just have to scrap the idea of contraining it to hardware intended nss pins, but thats not toooooo bad14:42:49
@jo_we:matrix.orgjo_wemanaged to implement it this way! thanks again for tolerating me being "difficult" xD14:55:17
@burrbull:matrix.orgburrbull
In reply to @jo_we:matrix.org
yes, for sure. I now have an array of erased output pins. I just have to scrap the idea of contraining it to hardware intended nss pins, but thats not toooooo bad
as has been already said, you can make enum of possible types and implement OutputPin for this enum
15:00:30
@jo_we:matrix.orgjo_weill look into this as well 15:01:55
23 Apr 2024
@esm3:matrix.orgesm3 joined the room.22:50:47
24 Apr 2024
@bibble235:matrix.orgbibble235Hi folks, I am really new and have a really stupid question. I only seem to be able to run my code with a debugger. If I flash a release version it runs connected to the STlink but use a plain USB on my scope no joy.09:36:27
@jamesmunns:beeper.comJames MunnsWhat panic and logging crate are you using? I think the old semi hosting crates would hang with no debugger attached10:05:38
@bibble235:matrix.orgbibble235
In reply to @jamesmunns:beeper.com
What panic and logging crate are you using? I think the old semi hosting crates would hang with no debugger attached
https://github.com/antoinevg/stm32f3-rust-examples/blob/master/Cargo.toml
10:27:40
@bibble235:matrix.orgbibble235panic-itm = "0.4.0"10:28:01
@bibble235:matrix.orgbibble235use cortex_m::{iprintln, interrupt::Mutex};10:29:58
@jamesmunns:beeper.comJames Munnsyeah, I wonder if that iprintln is causing problems, looking now10:30:10
@jamesmunns:beeper.comJames Munnshttps://github.com/rust-embedded/cortex-m/blob/master/cortex-m/src/itm.rs#L1310:30:29
@jamesmunns:beeper.comJames Munnsyeah, probably, if the ITM fifo fills up it'll hang10:30:40
@bibble235:matrix.orgbibble235Assuming this is semihosting of some sort10:30:54
@jamesmunns:beeper.comJames Munns ITM is sort of like semihosting, but the failure is likely the same. If you comment out all the iprintln lines does it start working? 10:31:23
@bibble235:matrix.orgbibble235Just restarting on rust and getting up to speed10:31:27
@jamesmunns:beeper.comJames Munns(those examples are all also 5 years old, and might be out of date).10:32:01
@jamesmunns:beeper.comJames Munnsyou can also try https://github.com/embassy-rs/embassy/tree/main/examples/stm32f3, if you'd like10:32:20
@jamesmunns:beeper.comJames Munns Those use defmt-rtt, which won't hang if there is no debugger attached. 10:32:35
@bibble235:matrix.orgbibble235Thanks, I wanted somewhere to start from which worked before changing, updating. Any idea why it might hang, never worked, change in toolchain underneath code. Do people start with blink and work backwards.11:56:29
@jamesmunns:beeper.comJames Munns

Any idea why it might hang

Because ITM is blocking on sending, but it can't send because there is no debugger attached (at least that's what I'm guessing).

12:46:11
25 Apr 2024
@bibble235:matrix.orgbibble235
In reply to @jamesmunns:beeper.com

Any idea why it might hang

Because ITM is blocking on sending, but it can't send because there is no debugger attached (at least that's what I'm guessing).

All working now with
[dependencies]
cortex-m = "0.7.7"
cortex-m-rt = "0.7.4"

stm32f3xx-hal = { version = "0.10.0", features = ["rt", "stm32f303xc"] }
lazy_static = { version = "1.3.0", features = ["spin_no_std"] }
panic-probe = { version = "0.3.1", features = ["defmt"] }

atomic = "0.6.0"

01:41:09
@tumler:matrix.orgTim set a profile picture.12:12:54
@tumler:matrix.orgTim changed their profile picture.12:13:11
@tumler:matrix.orgTim changed their profile picture.12:13:53

There are no newer messages yet.


Back to Room ListRoom Version: 5