01:12
IlPalazzo-ojiisa has quit [Quit: Leaving.]
01:27
starblue has quit [Ping timeout: 246 seconds]
01:29
starblue has joined #rust-embedded
01:46
<
M9names[m] >
Not that I'm aware of, I usually just fall back to 8bit when I need 8bit
02:14
starblue has quit [Ping timeout: 272 seconds]
02:15
starblue has joined #rust-embedded
02:22
AugustoRoman[m] has quit [Quit: Idle timeout reached: 172800s]
06:11
enaut[m] has quit [Quit: Idle timeout reached: 172800s]
10:04
starblue has quit [Ping timeout: 264 seconds]
10:05
starblue has joined #rust-embedded
10:40
IlPalazzo-ojiisa has joined #rust-embedded
11:50
jakzale has joined #rust-embedded
11:53
<
jakzale >
Does anyone know why rustup does not provide riscv32im-unknown-none-elf target?
11:53
mali[m] has joined #rust-embedded
11:53
<
mali[m] >
Is there a good guideline for error handling for embedded?
11:54
<
mali[m] >
Or is there a vague consensus?
11:54
<
mali[m] >
jakzale: are you on nightly? I remember some tagets being only available on some snapshots
11:56
<
mali[m] >
I see that that architecture has limited support?
11:58
<
mali[m] >
Found this: If the desired target is under Tier 2.5 or Tier 3 then it likely cannot be added directly via rustup and will required additional work.
11:58
<
jakzale >
maili[m]: I'm on nightly, which has risc32-i, -imac, -imafc, and -imc, but not -im.
12:01
IlPalazzo-ojiisa has quit [Quit: Leaving.]
12:03
<
mali[m] >
I remember that a particular nightly snapshot lacked the architecture that I needed, I had to select an earlier build.
12:03
<
mali[m] >
But in your case it seems to be an arch that is already a deprioritized
12:18
<
jakzale >
mali[m] thanks! I will try to switch to riscv32-imac then.
12:19
<
mali[m] >
I must give you a warning there, I am not entirely sure (:
12:19
<
mali[m] >
There might be others who develop pon RISC-V
12:19
<
mali[m] >
I just remember an instance from the past.
12:28
<
M9names[m] >
strange that it shows as tier2 in the rustc book but doesn't have core compiled...
12:30
<
M9names[m] >
you can just ask cargo to build core for riscv32im as part of your project build if you on nightly anyway
12:31
<
mali[m] >
that arch is not available in rustup target list
12:31
<
mali[m] >
but is available in riscv32im-unknown-none-elf
12:31
<
mali[m] >
* but is available in rustc --print target-list
12:34
<
mali[m] >
It smells like "you have to compile the toolchain for this target"
12:35
<
M9names[m] >
but that would mean it's not tier 2?
12:40
djdisodo[m] has joined #rust-embedded
12:40
<
djdisodo[m] >
unlike uart
12:40
<
djdisodo[m] >
spi and iic is provided with clock so it should be possible to make pure software driver for spi or iic that is stable
12:40
<
djdisodo[m] >
is there any one that's written using embedded-hal api?
12:41
<
djdisodo[m] >
or maybe embassy, to set lower bound for clock interval
12:44
<
djdisodo[m] >
dirbaio[m]: is there async version?
12:44
<
dirbaio[m] >
not afaik
12:44
<
dirbaio[m] >
but it doesn't make much sense, since it requires the cpu to be busy 100% of the time doing the bitbanging
12:46
<
djdisodo[m] >
dirbaio[m]: what if clock speed isn't that fast?
12:47
<
JamesMunns[m] >
djdisodo[m]: if you think it would be useful you could make one that is async! I think nobody has made it because nobody wanted it yet.
12:47
<
JamesMunns[m] >
(bitbang-hal isn't "official" either, just something neat someone made that fills that gap)
12:48
<
M9names[m] >
this was in the same stabilisation rfc and has rust-std built, but rv32im isn't.
12:51
<
vollbrecht[m] >
ah interesting link, here i see a tier2.5 for the first time. Is this tier2.5 targets without hosttools?
13:16
dreamcat4 has joined #rust-embedded
13:45
orclev[m] has quit [Quit: Idle timeout reached: 172800s]
14:11
IlPalazzo-ojiisa has joined #rust-embedded
14:22
<
JamesMunns[m] >
looks like it only runs on pushes to master and cron, not PRs?
14:22
<
JamesMunns[m] >
so when you MQ it, it'll run, but not on the PR itself
14:23
<
JamesMunns[m] >
ah, does the empty item means it runs on all PRs? I don't know gha syntax that well
14:23
<
dirbaio[m] >
I think so yes? it means "no conditions"
14:25
<
JamesMunns[m] >
I think you need to set a positive match? like branches: * or something?
14:25
<
JamesMunns[m] >
idk, again, not super familiar with it
14:26
<
JamesMunns[m] >
then: TIL and i'm out of ideas :D
14:29
<
dirbaio[m] >
i've force-merged the PR since it's only docs changes anyway
14:29
<
dirbaio[m] >
and gha is not running either for the commit on master :D
14:29
<
dirbaio[m] >
it's as if gha is completely off on that repo
14:31
<
dirbaio[m] >
repo settings look ok 🤷
16:14
ryan-summers[m] has quit [Quit: Idle timeout reached: 172800s]
17:14
mabez[m] has quit [Quit: Idle timeout reached: 172800s]
17:35
diondokter[m] has quit [Quit: Idle timeout reached: 172800s]
17:36
IlPalazzo-ojiisa has quit [Quit: Leaving.]
18:09
kenny has quit [Quit: WeeChat 4.2.1]
18:14
_whitelogger has joined #rust-embedded
18:24
therealprof[m] has quit [Quit: Idle timeout reached: 172800s]
18:25
IlPalazzo-ojiis1 has joined #rust-embedded
18:36
cbjamo[m] has quit [Quit: Idle timeout reached: 172800s]
18:43
bartmassey[m] has quit [Quit: Idle timeout reached: 172800s]
18:57
AtleoS has quit [Read error: Connection reset by peer]
18:58
AtleoS has joined #rust-embedded
19:29
dne has quit [Read error: Connection reset by peer]
19:31
dne has joined #rust-embedded
19:35
<
mali[m] >
Long ago I had written an accelerometer device driver, I had written this:
19:36
<
mali[m] >
I sort of get this, but I am failing a bit on the Error definitions.
19:36
<
mali[m] >
I mean, I wrote it, but still I wrote it not fully grasping it
19:38
<
mali[m] >
Does this mean that this impl is valid for all Error E s that spi::Transfer and spi::Write Traits allow?
19:38
<
mali[m] >
* Does this mean that this impl is valid for all Error E s that spi::Transfer and spi::Write Traits allow?
19:38
<
mali[m] >
* Does this mean that this impl is valid for all Error E s that spi::Transfer and spi::Write Traits allow?
19:39
<
mali[m] >
Then whatever this Error type is, I return that type.
19:40
<
mali[m] >
Somehow PinError is also in the definition, the result is not of type `Result<, PinError>`
19:41
<
mali[m] >
I want to write explicit Errors like WrongID and raise them to the application
19:44
<
Ecco >
Dang, I'm fighting the type system
19:44
<
Ecco >
let mut spi = Spi::new_txonly(p.SPI1, p.PB4, p.PA15, NoDma, NoDma, spi_config);
19:44
<
Ecco >
What is the type of the spi variable here?
19:45
<
Ecco >
I'm trying to define a type alias to make my life easier, but I just can't figure out the original type of the "spi" variable
19:48
GrantM11235[m] has joined #rust-embedded
19:48
<
GrantM11235[m] >
Is this embassy-stm32? It should be something like `Spi<'static, SPI1, NoDma, NoDma>`
19:48
<
Ecco >
Hmm, indeed, it is. Thanks!
19:49
<
Ecco >
Did you just know? Or is there a way to figure that out?
19:49
<
GrantM11235[m] >
If you use rust-analyzer it should show up in your IDE
19:55
<
GrantM11235[m] >
That shows that the function returns `Self`, which in this case is `Spi<'d, T, Rx, Tx>` it also tells you that `T` is the type of `peri` function argument, `Tx` is `txdma`, and `Rx` is `rxdma`
20:00
<
GrantM11235[m] >
Normally you would see something like `peri: T`, but in this case it is `peri: impl Peripheral<P=T>`. That is a trick that embassy uses to allow you to construct the spi with either `p.SPI1` or `&mut p.SPI1`
20:05
<
GrantM11235[m] >
docs.embassy.dev shows the docs for the latest git version of the embassy crates, which might not be the same version that you are using. You can see a local version of the docs (for all your dependencies, not just embassy) by running cargo docs --show
20:10
adamgreig[m] has quit [Quit: Idle timeout reached: 172800s]
20:20
<
Ecco >
awesome, thank you so much!!!
20:27
timokrgr[m] has quit [Quit: Idle timeout reached: 172800s]
21:38
dne has quit [Remote host closed the connection]
21:39
dne has joined #rust-embedded
22:27
IlPalazzo-ojiis1 has quit [Quit: Leaving.]
22:53
firefrommoonligh has quit [Quit: Idle timeout reached: 172800s]