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

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

Compatibility with micro:bit v2 #3

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

Comments

@microbit-sam
Copy link

Hi @DFRobot,

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

/home/build/prjclone/pxtapp/NaturalScience/ds18b20.cpp:33:30: fatal error: TimedInterruptIn.h: No such file or directory
@microbit-pauline
Copy link

@tangjie133 - Are you able to look at this issue?

@microbit-carlos
Copy link

@tangjie133 is this extension compatible with micro:bit V2?

Looking at the C++ code in https://github.com/DFRobot/pxt-DFRobot-NaturalScience/blob/master/ds18b20.cpp there is conditional code for V1 and V2, so it does look like it has been updated to run in V2. Could you confirm if that is the case?

Currently it is marked as V1-only inside MakeCode:
https://github.com/microsoft/pxt-microbit/blob/v7.0.13/targetconfig.json#L268

So a user loading this extension on a micro:bit V2 would see only see the error code 927 (programme not compatible) and the programme won't run. If you can confirm the extension works for V2 we can update MakeCode so that it loads correctly in V2.

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