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

MakeCode 2022 leaves less RAM than V4 for user code #4808

Open
martinwork opened this issue Jul 8, 2022 · 6 comments
Open

MakeCode 2022 leaves less RAM than V4 for user code #4808

martinwork opened this issue Jul 8, 2022 · 6 comments

Comments

@martinwork
Copy link
Contributor

martinwork commented Jul 8, 2022

Describe the bug

Arising from support ticket https://support.microbit.org/helpdesk/tickets/55037 (private)

The customer's Bluetooth project runs out of memory (Error 020) in micro:bit V1.5.

microbit-JBN8C-Prj-BT-DPAD-XF-ObjectSensor.zip

I created a project in MakeCode V4 by copying the Javascript, and it works without running out of memory.

microbit-ble-v4.zip

To Reproduce
Steps to reproduce the behavior:

  1. Flash hex to micro:bit
  2. Connect via Bluetooth from iOS app
  3. Use Monitor & Control, Gamepad panel buttons
  4. See error 020

Expected behavior
Project that worked on V4 continues to work.

Screenshots
Add screenshots to help explain your problem. You can copy paste the screenshot in the github report. The .gif screen recording is very useful as well.

micro:bit version (please complete the following information):

You can find this information in the lower right hand corner of the back of micro:bit (the side that says BBC micro:bit).

  • Which version of the micro:bit is this relevant to [ EG V1.3, V1.5, V2.0, or specify it's not hardware related ]
    V1.5

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows
  • Browser [e.g. chrome, safari] Chrome
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6] iPad Air 2
  • OS: [e.g. iOS8.1] iOS 15.5
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@microbit-carlos
Copy link
Collaborator

Thanks Martin!
It's also worth mentioning that for V1 the DAL hasn't changed, so that points at the additional RAM being consumed by the MakeCode side.

Might be worth checking, if as indicated #4788 (comment), the additional memory usage was between 4.1.5 & 4.16.

@martinwork
Copy link
Contributor Author

While I found it worked with my micro:bit V1.5 on MakeCode v4, I think the customer has a micro:bit v1.3, and their code was originally created on MakeCode v2. They have now tested their original hex in each MakeCode version and report that it starts to run out of memory for them on MakeCode v3.

@itibanbosi
Copy link

Memory over occurs in both V2 and V1.5 of micro: bit.
It worked in V4 of MakeCode, but in V5 I get the following error.
Program too ig by 3964bytes!

@eanders-ms
Copy link
Contributor

@martinwork can you kindly test with this build? https://microbit.staging.pxt.io/app/90d23a3465264bc5f2cb314fce5d4be956dd7b12-3596625c81#

The hex it generates has a smaller footprint, but I'm having trouble pairing Bluetooth, unable to fully test with your sample.

@martinwork
Copy link
Contributor Author

@eanders-ms I can pair with the original sample downloaded from that build. I reset to Bluetooth mode via A+B+RESET. because triple press didn't work.
But I can't test the OOM error because there's an immediate error 071, because of lancaster-university/codal-microbit-v2#331, which should be fixed in the next CODAL tag by lancaster-university/codal-microbit-v2@2a1984e.

@martinwork
Copy link
Contributor Author

@eanders-ms Tested with the new live. It fails as with v5. After connecting in the iOS micro:bit app Monitor & Control, pressing gamepad button A triggers 020.

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

No branches or pull requests

6 participants