phoenix-rtos / phoenix-rtos-project

Sample project using Phoenix-RTOS
https://phoenix-rtos.com
BSD 3-Clause "New" or "Revised" License
42 stars 32 forks source link

plo: new error after last changes: `Can't open file on usb0` #545

Open damianloew opened 1 year ago

damianloew commented 1 year ago

Screenshot from 2022-11-07 13-35-23

agkaminski commented 1 year ago

I don't really see anything dangerous in these commits, maybe it somehow made some other problem more apparent?

damianloew commented 1 year ago

I think so, please let me know whether I should check something in detail. Maybe it's related to https://github.com/phoenix-rtos/phoenix-rtos-project/issues/489

It seems that new usb driver in plo is needed to solve this problem, like in https://github.com/phoenix-rtos/phoenix-rtos-project/issues/489

agkaminski commented 1 year ago

My thought for future debugging - it might be worth checking if hal_interruptsDisable really do disable interrupt

damianloew commented 1 year ago

It seemed to occur only on damaged imxrt117x-unit, so I think it's probably not a problem with system.

damianloew commented 1 year ago

As it was discovered during nightly run (https://github.com/phoenix-rtos/phoenix-rtos-project/actions/runs/5285224467/jobs/9563608911) this issue may still happen, even on a proper board. This happen for the following phrtos-project revision: https://github.com/phoenix-rtos/phoenix-rtos-project/commit/ab93a3aeac748f002075fb997f1290f87b6bd19e

damianloew commented 9 months ago

Update: very similar issue is still being encountered, both on imxrt106x and imxrt117x. There are usually 2 following error messages: Screenshot from 2023-10-09 12-13-29

Screenshot from 2023-10-09 12-13-16

There is nothing suspicious in dmesg output during those fails. It seems that phoenixd is launched too early and 0.5s sleep after finding an ACM device in test runner solves the problem.

On the second screen the error is caused by failed open() which sets ENOENT errno: https://github.com/phoenix-rtos/phoenix-rtos-hostutils/blob/58629f306cc09e2b01ddcaeb0dbd883d778e7bdb/common/serial.c#L32

The host, where the issue has been reproduced was Raspberry Pi 4B with Raspberry Pi OS Lite 64bit (Debian GNU/Linux 11) without modemManager installed and mtp-probe removed.