microsoft / pxt-microbit

A Blocks / JavaScript code editor for the micro:bit built on Microsoft MakeCode
https://makecode.microbit.org
Other
715 stars 588 forks source link

Due to Bluetooth settings in pxt.json, the compilation does not go through. #3752

Closed satakagi closed 3 years ago

satakagi commented 3 years ago

Describe the bug If you change the Bluetooth settings in pxt.json, the compile will not go through and you will not be able to proceed.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://makecode.microbit.org/_Ajk632E3gE56'
  2. Click on 'Edit code'
  3. Click on 'Download'
  4. It's stuck in the compile.

Expected behavior

Set makecode to javascript mode and select pxt.json. If you add the following code (yotta part), for example, the compilation will not be completed and the screen of your web browser will remain in compilation mode.

pxt.json

{
    "name": "testBLE2",
    "description": "",
    "dependencies": {
        "core": "*",
        "microphone": "*",
        "bluetooth": "*"
    },
    "files": [
        "main.blocks",
        "main.ts",
        "README.md"
    ],
    "targetVersions": {
        "branch": "v3.0.60",
        "tag": "v3.0.60",
        "commits": "https://github.com/microsoft/pxt-microbit/commits/07e6457bfa581487f1ec30941556f426bd071cb0",
        "target": "3.0.60",
        "pxt": "6.0.35"
    },
    "preferredEditor": "tsprj",
    "yotta": {
        "config": {
            "microbit-dal": {
                "bluetooth": {
                    "enabled": 1
                }
            }
        },
        "optionalConfig": {
            "microbit-dal": {
                "stack_size": 1280,
                "gatt_table_size": "0x300"
            }
        }
    }
}

Below is another pxt.json example. This is a configuration that was working properly as of two weeks ago. These settings are to avoid memory overflow when using Bluetooth on V1.x micro:bit. (reduce gatt_table_size to 0x300)

pxt.json

{
    "name": "WebI2C_GPIO_bridge",
    "description": "",
    "dependencies": {
        "core": "*",
        "bluetooth": "*"
    },
    "files": [
        "main.ts",
        "README.md",
        "custom.ts"
    ],
    "preferredEditor": "tsprj",
    "yotta": {
        "config": {
            "microbit-dal": {
                "bluetooth": {
                    "open": 1,
                    "whitelist": 0,
                    "event_service": 0,
                    "eddystone_url": 0,
                    "eddystone_uid": 0
                },
                "gatt_table_size": "0x300"
            }
        }
    }
}

micro:bit version (please complete the following information): Stop at the compilation stage in makecode.microbit.org. Therefore, a micro:bit connection is not required.

Desktop (please complete the following information):

satakagi commented 3 years ago

3755 might be a close issue.

jaustin commented 3 years ago

Looks like this user had and extension in https://makecode.microbit.org/_Ajk632E3gE56 - but it's affecting V1 too. Seems to be since the release last week.

abchatra commented 3 years ago

@satakagi This share project is working. Can you retry?

abchatra commented 3 years ago

Or share the URL which is failing.

satakagi commented 3 years ago

Thanks, as of now, all the code (projects) we have is now going through the compilation successfully!