microsoft / pxt-calliope

A Microsoft MakeCode editor for the Calliope Mini board
https://makecode.calliope.cc
Other
39 stars 23 forks source link

WebUSB for Segger devices #248

Open Amerlander opened 1 year ago

Amerlander commented 1 year ago

Calliope mini 2 is based on J-Link by segger instead of CMSIS-DAP.

The current implementation of WebUSB in pxt only supports dapjs and therefore webUSB is not working in MakeCode for the Calliope mini 2.

We tryed to implement J-Link WebUSB, but it seems like the interfaces are hard coded somewhere in pxt and it is not possible to do this only in the pxt-calliope target.

image

@jwunderl could you help us to figgure out if and how J-Link webUSB could be implemented into pxt and our pxt target, to support the webUSB capabilitys of the Calliope mini 2?


Sample implementation of J-Link webUSB: https://www.segger.com/jlink_webusb_update_target_firmware.html

Implementation of WebUSB API: https://www.segger.com/seggerbulk.js https://www.segger.com/programming.js

Amerlander commented 1 year ago

https://github.com/microsoft/pxt/blob/9ef1988d50f506cdd757c9318ef18360ad264f9d/pxtlib/webusb.ts#L509