<re_irc>
<rjmp> Actually, this is worse than I thought. Even if I do not take the TSC as an argument, there are linking problems that prevent two different versions of the PAC from linking:
<re_irc>
warning: Linking globals named 'DEVICE_PERIPHERALS': symbol multiply defined!
<re_irc>
error: failed to load bitcode of module "stm32f0-9c614b73ce91b0b9.stm32f0.38c6535e-cgu.0.rcgu.o":
<re_irc>
So is it the case that there is no way for two different PACs to link? And if so, am I also right that there's no way for a crate to deconflict? Even if I set the dependency to "stm32f0 = "*"", cargo pulls the most recent, while "stm32f0xx-hal" depends on an older one.
<re_irc>
<rjmp> The background is that I want to create a driver crate for the ST touch controller that works for various families, and provides a driver for the controller as well as some processing of capacitance for the interface elements. So, it needs to use a PAC. I can select which pac (e.g. "stm32f0" or "stm32f3") by features, but I can't find anyway to tolerate changes in version of the pac used by the application....
<re_irc>
<rjmp> I wonder if perhaps the definition of DEVICE_PERIPHERALS should be gated by the "rt" feature. That makes creating a peripheral driver in a crate at least _possible_. Ideally, the RegisterBlock would be provided to the crate driver just like to HAL drivers, but that truly does require a way to ensure the crate and app are using the same PAC version, I think.
dc740 has quit [Remote host closed the connection]
conplan has joined #rust-embedded
starblue has quit [Ping timeout: 240 seconds]
starblue has joined #rust-embedded
<conplan>
does anyone know what _stack_end_cpu0 means for an ESP32?
<conplan>
I'm using the esp toolchain installed with esp-pup
<conplan>
It's exactly as stated in esp-rs
<Darius>
dunno then sorry
<Darius>
check you have exactly the correct CPU etc..
<conplan>
can you elaborate on this point? are there multiple cpus for the ESP32-WROOM-32E?
<re_irc>
<rjmp> I'm guessing a lot here as I've never used the esp toolchain at all, but is it at least possible that everything printed there is part of a normal programming and now your program is running? It's not clear to me if that output is an error or just a cryptic log of programming the code. It's possible it's programmed correctly but for some reason not blinking the LED
<conplan>
I thought it was just a stock ESP32
<conplan>
I find that unlikely, because there is no blinking LED.
<re_irc>
<rjmp> I'm just suggesting not to get too hyperfocused on the log output there. Could be something as simple as not enabling a GPIO as output, having a loop {} before the LED blink...I dunno there's all kinds of ways to write programs intended to blink an LED but that actually don't :)
<conplan>
rjmp: I appreciate that; its certainly good advice.
<conplan>
I also haven't been able to get esp_println to work
<re_irc>
<rjmp> I don't know...since you are getting output there, I guess you would get some output on a panic?
<re_irc>
<rjmp> Could test by forcing a panic right away
<conplan>
yeah, can confirm... it's not the program.. I can't even set the LED low
<conplan>
rjmp: how to do this?
<re_irc>
<rjmp> "panic!("I'm failing!");"
<re_irc>
<rjmp> Of course, maybe it is in fact never loading or booting properly. Sorry I can't really help with that, I'm not at all familiar with the platfomr.
<re_irc>
<rjmp> But good luck!
<conplan>
okay, I force a panic. It worked, but before it said that, it gave a _stack_end_cpu0 error...
<conplan>
so it may be generic output
<re_irc>
<rjmp> I don't think a _stack_end_cpu0 error is a thing
<re_irc>
<rjmp> I _suspect_ that when it prints, e.g. `load:0x40078000,len:17448
<re_irc>
0x40078000 - _stack_end_cpu0, that is because it is loading code between the address 0x4007800 and _stack_end_cpu0
<re_irc>
<rjmp> You're saying when you add the panic! line, you get the message out?
<conplan>
didn't get the message in the panic, it simply paniced
<conplan>
thanks guys for the help. Especially to ou rjmp. you turned out to be right
<re_irc>
<rjmp> Congrats. Glad I could help reach the first blink milestone.
<conplan>
do atomics work with the ESP32
<re_irc>
<sydbayeck> How could I use LED as light sensor on microbit-v2? The hardware overview page of micro:bit say : "This LED matrix is also used to sense ambient light, by repeatedly switching some of the LED drive pins into inputs and sampling the voltage decay time, which is roughly proportional to ambient light levels." I can't figure out how to measure "the voltage decay time".
<Darius>
I think that output is rfom the ESP bootloader BTW
<Darius>
and by CPU check I mean make certain you are compiling for the one you have
limpkin has quit [Quit: limpkin]
limpkin has joined #rust-embedded
IlPalazzo-ojiisa has joined #rust-embedded
starblue has quit [Ping timeout: 256 seconds]
starblue has joined #rust-embedded
genpaku has quit [Remote host closed the connection]
genpaku has joined #rust-embedded
<re_irc>
<sydbayeck> rtt_init_print!();
<re_irc>
let board = Board::take().unwrap();
<re_irc>
let mut column1 = board.display_pins.col1.into_floating_input();
<re_irc>
let mut column1 = board.display_pins.col1.into_floating_input();
<re_irc>
let board = Board::take().unwrap();
causal has quit [Quit: WeeChat 3.7.1]
steew has joined #rust-embedded
emerent has quit [Ping timeout: 256 seconds]
emerent has joined #rust-embedded
<re_irc>
< (@firefrommoonlight:matrix.org)> Does anyone have recommendations for learning Postcard syntax and capes? No ex folder on GH. Readme/Docs page shows byte arrays, String use. I'm curious how it works with options, enums, floats etc. As well as using arrays vice headless or alloc Vec
<re_irc>
< (@firefrommoonlight:matrix.org)> (I assume to use arrays you'd modify the example to use .to_slice vice .to_vec)
<re_irc>
< (@firefrommoonlight:matrix.org)> Does anyone have recommendations for learning Postcard syntax and capabilities? The readme and docs page shows byte arrays, String use. I'm curious how it works with options, enums, floats etc. As well as using arrays vice headless or alloc Vec
<re_irc>
< (@firefrommoonlight:matrix.org)> Does anyone have recommendations for learning Postcard syntax and capabilities? The readme and docs page shows byte arrays, and String use. I'm curious how it works with options, enums, floats etc. As well as using arrays vice headless or alloc Vec
dc740 has joined #rust-embedded
conplan has quit [Remote host closed the connection]
<re_irc>
< (@firefrommoonlight:matrix.org)> Does anyone have recommendations for learning Postcard syntax and capabilities? The readme and docs page shows byte arrays, and String use. I'm curious how it works with options, enums, floats etc. As well as using arrays, vice heapless or alloc Vec
dne has quit [Remote host closed the connection]
dne has joined #rust-embedded
seer has quit [Quit: quit]
seer has joined #rust-embedded
conplan has joined #rust-embedded
dequbed has quit [Quit: bye!]
conplan has quit [Quit: Leaving.]
conplan has joined #rust-embedded
conplan has quit [Remote host closed the connection]
<re_irc>
<Crylo (he/they)> i got a microbit for my hs python programming class
<re_irc>
<Crylo (he/they)> which is great because i can turn around and also learn rust with it once the semester is over
<re_irc>
< (@jamesmunns:beeper.com)> : happy to answer questions, but it works with pretty much any data type.
<re_irc>
It's not really a "syntax", you define some Rust data type, and then it can be serialized.
<re_irc>
< (@jamesmunns:beeper.com)> conceptually, it takes any rust data type that impls Serialize (usually a top level struct that has all the fields you care about, which each all impl serialize), and you pick the method that matches your intended "destination".
<re_irc>
"to_slice" will take a slice, and give you back the sub-slice that contains the serialized bytes (like you give it a 128 byte buffer, and if it took 73 bytes to serialize, it'll give you back a subslice of those 73 bytes)
<re_irc>
"to_stdvec" or "to_vec" will give you an "alloc::Vec" or "heapless::Vec"
IlPalazzo-ojiisa has quit [Remote host closed the connection]