DEV Community


Discussion on: I'm programming a sumobot with the world's safest programming language

nilutpolkashyap profile image
Nilutpol Kashyap

I am facing some issues in programming my microbit using the GNAT programming studio. I am using a Windows 10 machine.
I have installed the below two packages in my windows 10. But i am still not able to get it working.

1) GNAT native --- gnat-community-2019-20190517-x86_64-windows-bin.exe which is of 380 mb

2) GNAT arm-elf --- gnat-community-2019-20190517-arm-elf-windows64-bin.exe which is of 142 mb

Are these the correct packages?
Once i connect the microbit and go for Build->Bareboard->pyocd gdbserver, the leds in the microbit stop flashing and the yellow led continuously starts blinking. I get the ouotput as

INFO:root:ROM table #1 @ 0xe00ff000 cidr=b105100d pidr=4000bb471
INFO:root:CPU core is Cortex-M0
INFO:root:4 hardware breakpoints, 0 literal comparators
INFO:root:2 hardware watchpoints
INFO:root:Telnet: server started on port 4444
INFO:root:GDB server started at port:1234

After that when i go for Flash to board option for the main.adb file I get an error.

gprbuild --target=arm-eabi -d -PD:\GNAT\2019\bin\microbit_example.gpr D:\GNAT\2019\bin\src\main.adb -largs -Wl,-Map=map.txt
gprbuild: "main" up to date
[2019-12-31 14:19:47] process terminated successfully, elapsed time: 00.39s
Retrieving the load address.
arm-eabi-objdump D:\GNAT\2019\bin\obj\main -h
Load address is: 0x00000000
Creating the binary (flashable) image.
arm-eabi-objcopy -O binary D:\GNAT\2019\bin\obj\main D:\GNAT\2019\bin\obj\main.bin
Flashing image to board...
pyocd-flashtool -a 0x00000000 D:\GNAT\2019\bin\obj\main.bin
No connected boards
Error: There is no board connected.
Could not flash the executable.
[workflow stopped]

Please help me out.
Thank You

bosepchuk profile image
Blaine Osepchuk Author

I had one more idea about your problem.

I had a similar issue connecting to the microbit and it turned out the USB cable I was using was designed for charging one of those portable lithium ion battery packs and it didn't have the signal wires connected.

Could you have a defective cable?

bosepchuk profile image
Blaine Osepchuk Author • Edited

Those are the correct packages. I'm on windows 10 too. I installed them in the opposite order though. I don't know if it matters but you might want to uninstall and reinstall if nothing else works. I followed the directions here:

I use the 'build all' button in the GUI to build and the 'flash to board' button to flash the microbit. The commands looks similar to what you did but you might want to try that if my next suggestion doesn't work.

You need to manually edit a file to make flashing work. The directions are here. The error isn't the same as I got but it might be the same cause.

Finally, make sure you allow all drivers to install when you install the AdaCore software and plug in the microbit to your usb system. It's possible that your antivirus or something similar blocked them from showing up.

That's all the suggestions I have. Good luck!