Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
210 views
in Technique[技术] by (71.8m points)

Ada on the microbit: scrolling text example not working, no libusb library found

I followed the adacore tutorial on displaying scrolling text (https://blog.adacore.com/ada-for-microbit-part-1-getting-started) but can't get it working on my microbit.

Maybe my microbit is a more recent version that is not yet supported? The reason I suspect this is that my board id (9904) was not supported the first time I tried to flash to the board. I used the fix described here: Unable to get the Ada scrolling text demo working on the microbit on GNAT 2019 community edition and added the following line in board_ids.py:

"9904": BoardInfo( "micro:bit", "nrf51", "l1_microbit.bin", ),

After doing this, I was able to flash the scrolling text example to the board, but I had the following warning:

0000601:WARNING:common:STLink and CMSIS-DAPv2 probes are not supported because no libusb library was found.

The problem now is that only one LED lights up. It seems as though that single LED lights up correctly according to the input text based on its blinking pattern. I'm not sure whether the libusb warning is what is causing the problem.

I'm using the GNAT 2020 version of x86_64 and the arm-elf. I've been stuck on this for a while and would appreciate any suggestions. Thanks!

Edits:

I'm on windows 10.

I don't think the problem is to do with pyocd/libusb because I no longer get any warnings when flashing to the board, after ensuring I have a libusb dll in the same directory as the python exe in GNAT. The scrolling text example is still not working (only one LED lighting up).

I also tried this on a different computer, with the same result.

From https://github.com/AdaCore/Ada_Drivers_Library/issues/379 it looks like the new versions of the board are not supported by the ada drivers library? But that issue concerns the accelerometer version, I'm not sure if it's the cause in my case.

question from:https://stackoverflow.com/questions/65859253/ada-on-the-microbit-scrolling-text-example-not-working-no-libusb-library-found

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Your LED problem is going to be that the V2 board has reworked the relationship between GPIO pins and LEDs (now hugely more useful!)

The microbit.org page here says

The LED matrix is physically laid out as a 5x5. On the V2 board this is implemented as a 5x5 matrix, but in the V1, this is implemented as a scanned matrix of 9x3 (i.e. 9 columns by 3 rows). Row 2 Col 8, and Row 2 Col 9 are not used.

You’ll need to rework Ada_Drivers_Library/boards/MicroBit/src/microbit-display.adb in the section marked "Pixel to IO Pins".


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...