Closed gymboh32 closed 4 years ago
Hi @gymboh32,
Which version of pyocd are you using? I am on 0.19.0 (ubuntu), I see the deprecated message but the tool still works.
Maybe it is an access right problem, are you on Linux?
Regards,
I'm running ubuntu 18.04 LTS pyocd version: 0.19.0 2018 GNAT came with pyocd version 0.8.0
I don't think it is an access problem because I can debug without an issue (on both versions of pyocd). I had also added the udev rules just to be sure of that.
What concerns me is the warning about not being able to program the flash. Which is exactly what I'm trying to do. Is pyocd misidentifying the target type?
I was able to successfully flash.
It was the target type being misidentified as a cortex_m
when it should be nrf51
.
How did you fix the problem?
I had to run pyocd flash -t nrf51 /path/to/main.bin
in the terminal. Using the flash to board
option in GPS runs pyocd-flashtool -a 0x00000000 /path/to/main.bin
which automatically identifies the target type as cortex_m
.
The micro:bit has a nrf51822
which is built around the cortex_m
so it makes sense that the pyocd tool chose the wrong target type.
Is there a way to configure the target type (or any other pyocd switches) in the gpr file or as a preference in GPS?
Hello, I had same problem, I think it is a problem of GNAT-GPS, I had posted here
Hello @yago83
Does pyocd flash -t nrf51 /path/to/main.bin
work for you?
Hello @Fabien-Chouteau
Thank you, it works perfect! It seems it is being investigating how to fix this problem in GNAT-GPS
Thank you!
@gymboh32 @yago83 Do you mind trying again with GNAT community 2019?
I am on Ubuntu 18.04 and everything works out of the box.
I recently bought myself a Micro:bit and decided to try writing my project in Ada, which inevitably led me here. I figured I would get started with the example scrolling text but when I tried flashing to the board I was presented with the following error messages:
![image](https://user-images.githubusercontent.com/7156818/56178766-62172b80-5fd1-11e9-98e9-64368f239768.png)
I dug a bit into the exception message to see what was going on to find the whole Cortex_M class was unsupported![image](https://user-images.githubusercontent.com/7156818/56179082-77408a00-5fd2-11e9-99b1-531d93096917.png)
So I thought maybe updating to the latest pyocd package would solve this only to find the following messages:
![image](https://user-images.githubusercontent.com/7156818/56179224-def6d500-5fd2-11e9-95ad-59e4ae6bad4d.png)
Debugging to the board works but flashing does not seem possible.
With these errors I don't see how others were able to flash to the Microbit successfully, and it might be more of a question for the folks over at pyOCD.
Also, with the discovery of GPS using deprecated tools I was wondering if there was any path to updating them, not that it seems to make a difference in my case.
Any help forward on how to flash the Microbit would be appreciated.