build from source issue

Questions and discussion about running MicroPython on a micro:bit board.
Target audience: MicroPython users with a micro:bit.
Post Reply
pthwebdev
Posts: 8
Joined: Tue Jul 02, 2019 1:49 pm

build from source issue

Post by pthwebdev » Mon Jul 08, 2019 8:03 am

Hi,

I have build the nRF52 version with BOARD=microbit. I have a very recent version, 1.11.
The build does create a hex file. I can flash this onto the board (using the "mount", I don't use PyOCD).
However, the serial output only gives a single 'M'. At first I thought it could be a baudrate issue, but the M is also the first character of the MicroPython prompt.
In main.c I added do_str with a print("ABCD") and rebuilt the project. After flashing, the serial output only gives a single 'A'. So, I think it is something different than a baudrate issue.

I have used a gcc-7 and a gcc-8 version. Could it be related to the compiler?

When downloading a MicroPython project from the MicroBit website and online editor, the hex file does work (although it is much larger), so the board is OK.

I do remember, though I am not sure, that I had the same issue when building for STM32 for a NUCLEO board.

Any ideas? Is this a known issue?

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: build from source issue

Post by jimmo » Mon Jul 08, 2019 8:26 am

Any chance you can try with pyocd to compare?

FWIW, I was able to build and flash for microbit successfully a few days ago (but I was using pyocd). gcc 8.3

Which program are you using to access the ACM device? It almost sounds like it could be flow control? But I don't really know, that's just a random thought.

pthwebdev
Posts: 8
Joined: Tue Jul 02, 2019 1:49 pm

Re: build from source issue

Post by pthwebdev » Mon Jul 08, 2019 9:07 am

I just did a complete update of the mp project. Seeing as I just did that about two weeks or so ago, I did not think too much could have changed.

However, after the git pull and submodule init followed by a make clean and make all, I got a hex file that now seems to work. Yeah!

As for flow-control; I work on a Mac and use a variety of tools to access serial communication. They all reacted the same, so I concluded that it could not be the tools. Especially, since I have over a dozen or so different boards that I work with, so I have quite a bit of experience with these tools.
Further, the same board with another version of MicroPython and using the same serial access tools did work.
However, for most of the work, I have my own script. It's got a few niceties.

As for PyOCD, the reason to have and use the MicroBit is its ease of programming. I have different boards with nRF52, but without the same ease of programming. These are next in line to be programmed and tested. Now I haved cleared the hurdle using the MicroBit, the other boards should be easier.

Post Reply