Servers by jDrones

WSL waf upload hangs

I’m trying to upload the copter firmware from my WSL ubuntu in Windows 10 to my pixracer. The build goes well until the upload stage when it hangs with the message below:

ubuntu@project$ ./waf --targets bin/arducopter --upload
Waf: Entering directory `/home/ubuntu/workspace_WSL/project/build/Pixracer’
Embedding file bootloader.bin:/home/ubuntu/workspace_WSL/project/Tools/bootloaders/Pixracer_bl.bin
Checking for env.py
env added MAIN_STACK=0x400
env added APJ_BOARD_TYPE=STM32F427xx
env added APJ_BOARD_ID=11
env added HAL_WITH_UAVCAN=1
env added FLASH_RESERVE_START_KB=16
env added CHIBIOS_BUILD_FLAGS=USE_FATFS=yes MCU=cortex-m4 ENV_UDEFS=-DCHPRINTF_USE_FLOAT=1 CHIBIOS_PLATFORM_MK=os/hal/ports/STM32/STM32F4xx/platform.mk CHIBIOS_STARTUP_MK=os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk
env appended CPU_FLAGS=[’-mcpu=cortex-m4’, ‘-mfpu=fpv4-sp-d16’, ‘-mfloat-abi=hard’, ‘-u_printf_float’]
env added IOMCU_FW=0
env added PROCESS_STACK=0x2000
[546/549] Linking build/Pixracer/bin/arducopter
[547/549] Generating bin/arducopter.bin
[548/549] apj_gen build/Pixracer/bin/arducopter.bin
[549/549] Uploading build/Pixracer/bin/arducopter.apj
Loaded firmware for b,0, size: 984424 bytes, waiting for the bootloader…
If the board does not respond within 1-2 seconds, unplug and re-plug the USB connector.

Even if I unplug and replug the board nothing happens.
The upload works flawlessly on my other Linux laptop.

In my case the serial port should be /dev/ttyS10 as it is COM10 in Windows.
I’ve tried testing the serial port with cat /dev/ttyS10 but the prompt returns immediately with no output. When I try one of the other tty ports, I get

cat: /dev/ttyS5: Input/output error

My pixracer connects correctly to Mission Planner in Windows.
So it looks like this might be a port access issue in WSL? I’m not sure how to solve that. Has anybody gotten the same issue on WSL?

This is why I added --upload-port. Try:

--upload-port /dev/ttyS10

and if that doesn’t work find out what port it uses in bootloader mode - let’s call it A - and do

--upload-port /dev/ttyS10,/dev/ttySA
Servers by jDrones