!LdaNPfUfvefOLewEIM:matrix.org

esp-rs

1965 Members
Using Rust on the ESP series microcontrollers. https://github.com/esp-rs | https://matrix.to/#/#esp-rs-community-meetins:matrix.org | https://esp-rs.github.io/book/175 Servers

Load older messages


SenderMessageTime
19 Jun 2024
@vollbrecht:matrix.orgvollbrechteach cpu has about ~32 slots with fixed priority. They work independently.12:03:39
@vollbrecht:matrix.orgvollbrecht * each cpu has about ~32 slots with a fixed priority set to each slot. They work independently. 12:05:36
@vollbrecht:matrix.orgvollbrechtbut it gets quite a more complicated, you have around 100 signals that can be maped into that slots. You can for example map signal A into one slot A in cpuA and slot a in cpuB. You can also accumulate multiple signals A,B,C into one slot A in cpuA. That is not possible in every combination but it can be done.12:09:10
@vollbrecht:matrix.orgvollbrechtso what happen in every situation is quite situational ;D12:09:34
@bugadani:matrix.orgdanielb (esp-hal user)esp-hal only uses uh... 4? 5? CPU interrupts or so IIRC12:10:16
@vollbrecht:matrix.orgvollbrecht *

but it gets quite a more complicated, you have around 100 signals that can be maped into that slots. You can for example map signal A into one slot A in cpuA and slot a in cpuB. You can also accumulate multiple signals A,B,C into one slot A in cpuA.

Not every combination is possible but some can be done.

12:10:19
@vollbrecht:matrix.orgvollbrecht *

but it gets quite a more complicated, you have around 100 signals that can be maped into that slots. You can for example map signal A into one slot A in cpuA and slot A in cpuB. You can also accumulate multiple signals A,B,C into one slot A in cpuA.

Not every combination is possible but some can be done.

12:10:49
@okhsunrogm:matrix.orgokhsunrogmCan I share USB Serial on my esp32-c3 for both logs and embedded-cli (via embedded-io)?12:53:56
@okhsunrogm:matrix.orgokhsunrogmCan I use UART if it's already used for logs and stdout?12:54:15
@vollbrecht:matrix.orgvollbrechtif you want to access them seperatly on your desktop than you need some sort of framing schema to make them distinguishable, but other than that i don't see a problem. Have a log at the log implementation in esp-idf-svc. There you see how we write the logs to stdout. 13:02:32
@vollbrecht:matrix.orgvollbrechtAlso notice that esp-idf emmits logs that you dont directly control.13:03:10
@vollbrecht:matrix.orgvollbrechtThere are hooks to intercept all that if one wants to do so13:03:37
@vollbrecht:matrix.orgvollbrecht * if you want to access them seperatly on your desktop than you need some sort of framing schema to make them distinguishable, but other than that i don't see a problem. Have a look at the log implementation in esp-idf-svc. There you see how we write the logs to stdout. 13:04:04
@vollbrecht:matrix.orgvollbrechtIf you are using the esp32c3's usb-jtag than you could also do something like rtt13:04:43
@vollbrecht:matrix.orgvollbrechtthat is not using the usb-serial but comunicating over probe-rs. There you can than have different "channels" that are independent13:05:23
@bugadani:matrix.orgdanielb (esp-hal user)
In reply to @vollbrecht:matrix.org
that is not using the usb-serial but comunicating over probe-rs. There you can than have different "channels" that are independent
fair warning, I think multiple channels is only well-supported in cargo embed, but you'll get multiple terminal tabs for free which is pretty nice IMO
13:08:06
@vollbrecht:matrix.orgvollbrecht
In reply to @bugadani:matrix.org
fair warning, I think multiple channels is only well-supported in cargo embed, but you'll get multiple terminal tabs for free which is pretty nice IMO
I saw some weeks ago there was some talk about maybe allowing normal uart/usb log output to be read by probe-rs. Was that only an idea thrown in the room or something more concreate?
13:09:56
@bugadani:matrix.orgdanielb (esp-hal user)nothing concrete, there isn't any urgent need to get it done atm.13:10:29
@vollbrecht:matrix.orgvollbrechtso one can concurrently use rtt and uart13:10:35
@bugadani:matrix.orgdanielb (esp-hal user)yes there are applications for sure, but as probe-rs is a volunteer developmed software it'll get done when someone needs it to be done :D13:11:36
@okhsunrogm:matrix.orgokhsunrogm

I managed to use embedded_io_adapters::std::FromStd

let mut embedded_writer = FromStd::new(stdout());
    embedded_writer.write_all(b"Writing using embedded_io\n").unwrap();
    embedded_writer.flush();
    println!("Writing using std");
13:18:09
@okhsunrogm:matrix.orgokhsunrogm *

I managed to use embedded_io_adapters::std::FromStd

let mut embedded_writer = FromStd::new(stdout());
embedded_writer.write_all(b"Writing using embedded_io\n").unwrap();
embedded_writer.flush();
println!("Writing using std");
13:18:31
@vollbrecht:matrix.orgvollbrechtif you are reading the default logoutput keep in mind that we are using ANSI escape sequences from the logs. So handle it with whatever you are reading it.13:20:04
@bugadani:matrix.orgdanielb (esp-hal user) you should be able to sdkconfig out the colored logs but here's an example of how ansi-parser can do it 13:22:06
@wassasin:matrix.orgwassasin

Trying to integrate the esp_wifi_embassy_dhcp.rs example for an esp32c3. The example with xtask runs fine, but integrated into my binary crate it does not. While I am debugging, perhaps if I ask the question here, someone here immediately knows the cause. It hangs in the controller.start().await.unwrap(); call. If I start it with logging enabled, the following is the last log entry:

[TRACE esp_wifi::wifi::os_adapter] wifi_apb80m_request - no-op
[TRACE esp_wifi::wifi::os_adapter] wifi_clock_enable
[TRACE esp_wifi::wifi::os_adapter] phy_enable
[TRACE esp_wifi::common_adapter::chip_specific] phy_enable_clock
[TRACE esp_wifi::common_adapter::chip_specific] phy_enable_clock done!
[TRACE esp_wifi::common_adapter::chip_specific] phy_version ????
14:21:10
@kaspar:schleiser.deKaspar
In reply to @wassasin:matrix.org

Trying to integrate the esp_wifi_embassy_dhcp.rs example for an esp32c3. The example with xtask runs fine, but integrated into my binary crate it does not. While I am debugging, perhaps if I ask the question here, someone here immediately knows the cause. It hangs in the controller.start().await.unwrap(); call. If I start it with logging enabled, the following is the last log entry:

[TRACE esp_wifi::wifi::os_adapter] wifi_apb80m_request - no-op
[TRACE esp_wifi::wifi::os_adapter] wifi_clock_enable
[TRACE esp_wifi::wifi::os_adapter] phy_enable
[TRACE esp_wifi::common_adapter::chip_specific] phy_enable_clock
[TRACE esp_wifi::common_adapter::chip_specific] phy_enable_clock done!
[TRACE esp_wifi::common_adapter::chip_specific] phy_version ????
Which executor are you using? I hit sth similar with the Interrupt executor on esp32c3: https://github.com/esp-rs/esp-wifi-sys/issues/437
14:41:17
@wassasin:matrix.orgwassasin Kaspar: the default threading executor, the interrupt scheduler is not supported for RiscV I believe 14:56:12
@okhsunrogm:matrix.orgokhsunrogmReading from stdin on esp32-c3 usb-serial isn't really straightforward... Any examples?15:10:22
@wassasin:matrix.orgwassasin Okay, figured it out, esp-wifi uses the RTC somewhere and I was using that peripheral as well 15:13:05
@rilwy:matrix.orgrilwy joined the room.16:03:43

There are no newer messages yet.


Back to Room ListRoom Version: 5