Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create first BLE-only board, Micro:Bit v2 #5002

Merged
merged 3 commits into from
Jul 15, 2021
Merged

Conversation

tannewt
Copy link
Member

@tannewt tannewt commented Jul 14, 2021

This fixes build issues with USB off, tweaks the README to allow
for BLE-only boards and adds the Micro:Bit v2 definition.

Fixes #4546 Fixes #4680

This fixes build issues with USB off, tweaks the README to allow
for BLE-only boards and adds the Micro:Bit v2 definition.

Fixes micropython#4546
@tannewt tannewt added the ble label Jul 14, 2021
@tannewt tannewt requested a review from jepler July 14, 2021 17:08
@tannewt tannewt added this to the 7.0.0 milestone Jul 14, 2021
Copy link
Member

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The debug printing changes looked weird, but if it's intended then it's OK to merge. No testing performed.

ports/nrf/common-hal/alarm/SleepMemory.c Show resolved Hide resolved
ports/nrf/common-hal/alarm/__init__.c Show resolved Hide resolved
@jepler jepler merged commit e528d8d into adafruit:main Jul 15, 2021
@tyomitch
Copy link
Collaborator

@tannewt I see that the Makefile now relies on a script hexmerge.py which is not in the source tree.
Where is it supposed to be taken from?

@jerryneedell
Copy link
Collaborator

hexmerge.py is part of the intelhex package.
I installed it via pip3 install intelhex

@jerryneedell
Copy link
Collaborator

I would be happy to help with testing this build, but I am completely baffled about how to use the board.
I have occasionally managed to get the serial device to spit out the CP version info (see screenshot), but nothing else. I can see the CIRCPY BLE device but have made no progress connecting to it.
Should I be able to get to the REPL via something like screen? I can connect, but get no responses....
Clearly, I am missing something. Are there any instructions for using code.circuitpython.org?

Screen Shot 2021-07-16 at 7 19 17 AM

@tannewt
Copy link
Member Author

tannewt commented Jul 16, 2021

@tannewt I see that the Makefile now relies on a script hexmerge.py which is not in the source tree.
Where is it supposed to be taken from?

We store python build dependencies in requirements-dev.txt so you should be able to pip install -r requirements-dev.txt to get everything you need.

@tannewt
Copy link
Member Author

tannewt commented Jul 16, 2021

I would be happy to help with testing this build, but I am completely baffled about how to use the board.
I have occasionally managed to get the serial device to spit out the CP version info (see screenshot), but nothing else. I can see the CIRCPY BLE device but have made no progress connecting to it.
Should I be able to get to the REPL via something like screen? I can connect, but get no responses....
Clearly, I am missing something. Are there any instructions for using code.circuitpython.org?

Screen Shot 2021-07-16 at 7 19 17 AM

Thanks for trying this out! I know its super early for apps on the host side.

The USB serial is a conversion of the UART debug output. I'm going to turn this off shortly to make it clearer that this is only meant for BLE use. (Serial is really nice for debugging though.)

The most instructions I've written are on the page itself. I should make it clearer that BLE stuff will only work with Mac Chrome and Android Chrome. Chrome OS and Windows don't support secure characteristics yet (the chrome folks are working on it now I think.)

I think there are some crashes on the device side too unfortunately. I was trying to debug it but ran into debugger and binary blob issues.

So, don't spend too much time hitting a wall with this. It's still very early and will get better as the host side matures.

@jerryneedell
Copy link
Collaborator

jerryneedell commented Jul 16, 2021

I am using an M1 Mac -- I can try going back to an Intel Mac as well if that may be a problem.

Same behavior on Intel Mac

@spoelstraethan
Copy link

@tannewt would there be many changes for the micro:bit v1 to run CircuitPython or is the slightly lower spec hardware not capable?

This is a good comparison of both the new features and the processor/memory differences.

https://kitronik.co.uk/blogs/resources/explore-micro-bit-v1-microbit-v2-differences

@tyomitch
Copy link
Collaborator

tyomitch commented Sep 5, 2021

@spoelstraethan I doubt CircuitPython can be squeezed into 16 KB RAM; even 32 KB boards are a very tight fit.

@tannewt
Copy link
Member Author

tannewt commented Sep 7, 2021

@tannewt would there be many changes for the micro:bit v1 to run CircuitPython or is the slightly lower spec hardware not capable?

No, I don't plan on supporting the v1. As tyomitch points out, the change from 128k ram to 16k ram is a huge downgrade. We regularly have folks frustrated with the 32k ram on the SAMD21.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean up nRF sleep code a bit more Support for micro:bit v2 (nRF52833)
5 participants