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

Compatibility with micro:bit v2 #3

Closed
microbit-sam opened this issue Nov 18, 2020 · 10 comments
Closed

Compatibility with micro:bit v2 #3

microbit-sam opened this issue Nov 18, 2020 · 10 comments

Comments

@microbit-sam
Copy link

Hi @KitronikLtd ,

As you might have seen from microsoft/pxt-microbit#3506 this extension is currently not compiling against the latest version of Micro:bit CODAL. This means it will not work with micro:bit V2.

Software for micro:bit V2 boards is built using CODAL rather than the DAL, and no longer includes the mbed layer. We’ve implemented the most frequently used mbed classes to support easy porting of existing extensions, but there may still be corner cases with this compatibility layer.

As your extension is currently not building, it will be disabled for micro:bit V2. People attempting to use your extension with a micro:bit V2 board will get error 929. This extension will only be re-enabled on micro:bit V2 once it is fixed.

There are details on how to ensure extensions work on both version of the micro:bit here (lancaster-university/codal-microbit-v2#31).

Looking at your extension source I believe that your extension falls under this category:

Use of mbed APIs that are not included in the compatibility layer, or microbit-dal APIs that need different constructors

We're looking into compatibility issues with MicroBitFont, and will track updates in lancaster-university/codal-microbit-v2#31.

/home/build/prjclone/pxtapp/pxt-kitronik-zip-tile/zip_tile.cpp:18:1: error: 'MicroBitFont' was not declared in this scope
@KitronikLtd
Copy link
Owner

@microbit-sam Please can you check the v3-makecode branch for this repo, as this has the changes we believe are neccessary to be compatible with the CODAL changes?

@microbit-sam
Copy link
Author

Yep that looks right - apologies for the generic copy-paste issue

I've added a typedef to fix this globally lancaster-university/codal-microbit-v2#32, so if you wish to keep your code as is this should be fixed in the next CODAL tag

@KitronikLtd
Copy link
Owner

Great, thanks!

@AlasdairAtKitronik
Copy link
Collaborator

@microbit-sam Although I had tested all of this in the beta version of MakeCode V3, now that MakeCode V3 has gone live, this extension no longer seems to be working - when downloading, it just hangs with this screen:
image

Why would it not be working now, given it was tested and fine in the beta?

@microbit-sam
Copy link
Author

Could you try recreating this in a new project? I'm not exactly sure what the problem is, but I'm also experiencing some hangs when opening existing projects that use extensions (it isn't just yours)

@AlasdairAtKitronik
Copy link
Collaborator

I've created several new projects for all the tests I've done, not opening any previous programs.

@AlasdairAtKitronik
Copy link
Collaborator

@microbit-sam Programs are now compiling for the Tile extension, and I can program a V1 micro:bit, but now I'm getting
":( E927" scrolling immediately on the V2 display. What is this error?
I don't understand, because I had the Tile working for V2 micro:bit in the /beta editor several weeks ago.

@microbit-sam
Copy link
Author

E927 is shown for disabled extensions, these are specified by a list, rather than on compile time

I've asked Microsoft to ignore the list for /beta, and if you wish to be removed from the list please can you submit an issue to Microsoft (I have no control over the list, sorry)
https://github.com/microsoft/pxt-microbit/issues/new?template=feature_request.md

@AlasdairAtKitronik
Copy link
Collaborator

@microbit-sam Thanks - issue submitted now.

@AlasdairAtKitronik
Copy link
Collaborator

ZIP Tile now working correctly with V2 micro:bit

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

No branches or pull requests

3 participants