Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with LTO enabled #108

Closed
averyanalex opened this issue Jan 12, 2023 · 4 comments
Closed

Doesn't work with LTO enabled #108

averyanalex opened this issue Jan 12, 2023 · 4 comments

Comments

@averyanalex
Copy link

WiFi connects (judging by the logs) regardless of LTO, but with lto = true in Cargo.toml it hangs somewhere after connection.

I use this code:

wifi_interface.connect().unwrap();

println!("Wait to get connected");
loop {
    let res = wifi_interface.is_connected();
    match res {
        Ok(connected) => {
            if connected {
                break;
            }
        }
        Err(err) => {
            println!("{:?}", err);
            loop {}
            // wifi_interface.connect().unwrap();
        }
    }
}

println!("Wait to get an ip address");
let network = Network::new(wifi_interface, current_millis);
loop {
    network.poll_dhcp().unwrap();

    network.work();

    if network.is_iface_up() {
        println!("got ip {:?}", network.get_ip_info());
        break;
    }
}

wifi_led.set_high().unwrap();

And with LTO led never turns on.

@bjoernQ
Copy link
Contributor

bjoernQ commented Jan 12, 2023

On which target does this happen?

@averyanalex
Copy link
Author

On which target does this happen?

esp32c3, riscv32imc-unknown-none-elf

@TheButlah
Copy link
Contributor

Possibly related: #99

@MabezDev
Copy link
Member

MabezDev commented Feb 9, 2023

We're now recommending disabling LTO for now (#116), we've seen some strange issues on both Xtensa and RISCV of which the root cause seems to be LTO. Hopefully we'll be able to enable it again in the future :).

@MabezDev MabezDev closed this as completed Feb 9, 2023
@ProfFan ProfFan mentioned this issue Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants