-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[BUG] adb is not working on STM32F4Discovery board #15595
Comments
do you luanch adbd in nsh? |
It looks like the enumeration was successful. Maybe you need check wether adbd is launched, as @xiaoxiang781216 suggested. And here is an example enabling ADB for Espressif board: #14906 |
@xiaoxiang781216 @JianyuWang0623 running adbd changed the status from "offline" to "device"
However, when I ran "adb shell" the system crashed:
I tried to increase the stack size, but it didn't help:
|
Sometimes when I run adbd I got this error:
|
Sometimes "adbd" crashes even before running "adb shell", just running it:
|
Because PC is equal 0x0000007e, it means some allocation failed and it is trying to access the field of a structure that was not allocated (point to 0/NULL). The LR was here:
This line:
|
@acassis |
@JianyuWang0623 increasing ADBD stack to 8KB and INT STACK to 2KB avoid the crash, but when I run "adb shell" I get:
|
@acassis The UDC(USB Device Controller) driver may have set the ready flag when the host has not sent the complete package. Enable ADB debug log may also provide helpful information for you, like: adb kill-server
export ADB_TRACE=all
adb start-server
adb -s 1234 shell ls /dev/ |
@JianyuWang0623 thank you very much! This is the debug output:
From nsh side, same error:
|
For: apache#15595 Ref: https://wiki.wireshark.org/CaptureSetup/USB Signed-off-by: wangjianyu3 <[email protected]>
@acassis The ADB debug log only shows that the host has sent data "000eshell:ls /dev...", but recevied no response from device yet. Maybe we need more info to debug:
|
For: apache#15595 Ref: https://wiki.wireshark.org/CaptureSetup/USB Signed-off-by: wangjianyu3 <[email protected]>
Description / Steps to reproduce the issue
$ ./tools/configure.sh stm32f4discovery:adb
$ make -j
$ sudo openocd -f interface/stlink.cfg -f target/stm32f4x.cfg -c init -c "reset halt" -c "flash write_image erase nuttx.bin 0x08000000"
$ adb devices
List of devices attached
1234 offline
The adb0 device files are present:
nsh> ls /dev/adb0/
/dev/adb0:
ep0
ep1
ep2
I don't know if adbd is running, but I think it is because there are many there are 3 Kthread and 1 Task:
nsh> ps
PID GROUP PRI POLICY TYPE NPX STATE EVENT SIGMASK STACK USED FILLED
0 0 0 FIFO Kthread - Ready 0000000000000000 0002032 0000460 22.6k
1 0 224 FIFO Kthread - Waiting Semaphore 0000000000000000 0001984 0000368 18.5c
2 0 100 FIFO Kthread - Waiting Semaphore 0000000000000000 0001984 0000264 13.30
3 3 100 FIFO Task - Running 0000000000000000 0003032 0001536 50.6n
nsh>
Note: there is not Documentation/ to adb on STM32F4Discovery
On which OS does this issue occur?
[OS: Linux]
What is the version of your OS?
Ubuntu 24.04
NuttX Version
mainline: 2779989
Issue Architecture
[Arch: arm]
Issue Area
[Area: Applications]
Verification
The text was updated successfully, but these errors were encountered: