microsoft / pxt-maker

MakeCode target for "Maker" boards (beta)
https://maker.makecode.com/
Other
120 stars 82 forks source link

Error Compile with codal MKR1300 #73

Closed sabas1080 closed 6 years ago

sabas1080 commented 6 years ago

Hi @pelikhan

I am trying to compile a version with codal mkr1300, when trying to do it, the binary is generated, but the execution of pxt serve does not end

My log https://makecode.com/compile/497c9a0073cb7220b49cb8fb6a541bd0fd2d4956c1c3eb93d7dbbe349c70067e.log

pxt-core: 4.1.44 pxt commons 0.24.6

Thanks

pelikhan commented 6 years ago

Try this to get a local build output

pxt serve --local
sabas1080 commented 6 years ago
***
*** Build failed: target build failed: ENOENT: no such file or directory, open 'built/codal/build/CIRCUIT_PLAYGROUND.hex'
Error: ENOENT: no such file or directory, open 'built/codal/build/CIRCUIT_PLAYGROUND.hex'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at Object.patchCodalHexInfo [as patchHexInfo] (/Users/sabas/Documents/proyectoshd/pxt-produccion/pxt/built/buildengine.js:120:17)
    at /Users/sabas/Documents/proyectoshd/pxt-produccion/pxt/built/pxt.js:133248:56
    at tryCatcher (/Users/sabas/Documents/proyectoshd/pxt-produccion/pxt/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/sabas/Documents/proyectoshd/pxt-produccion/pxt/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/Users/sabas/Documents/proyectoshd/pxt-produccion/pxt/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/Users/sabas/Documents/proyectoshd/pxt-produccion/pxt/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/Users/sabas/Documents/proyectoshd/pxt-produccion/pxt/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/Users/sabas/Documents/proyectoshd/pxt-produccion/pxt/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/Users/sabas/Documents/proyectoshd/pxt-produccion/pxt/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/Users/sabas/Documents/proyectoshd/pxt-produccion/pxt/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
***
pelikhan commented 6 years ago

Try

pxt clean

and build again.

sabas1080 commented 6 years ago

I've changed to "codalBinary": "MRK1300", and


*** Build failed: target build failed: ENOENT: no such file or directory, open 'built/codal/build/MRK1300.hex' Error: ENOENT: no such file or directory, open 'built/codal/build/MRK1300.hex' at Object.fs.openSync (fs.js:646:18) at Object.fs.readFileSync (fs.js:551:33) at Object.patchCodalHexInfo [as patchHexInfo] (/Users/sabas/Documents/proyectoshd/pxt-produccion/pxt/built/buildengine.js:120:17) at /Users/sabas/Documents/proyectoshd/pxt-produccion/pxt/built/pxt.js:133248:56 at tryCatcher (/Users/sabas/Documents/proyectoshd/pxt-produccion/pxt/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/Users/sabas/Documents/proyectoshd/pxt-produccion/pxt/node_modules/bluebird/js/release/promise.js:512:31) at Promise._settlePromise (/Users/sabas/Documents/proyectoshd/pxt-produccion/pxt/node_modules/bluebird/js/release/promise.js:569:18) at Promise._settlePromise0 (/Users/sabas/Documents/proyectoshd/pxt-produccion/pxt/node_modules/bluebird/js/release/promise.js:614:10) at Promise._settlePromises (/Users/sabas/Documents/proyectoshd/pxt-produccion/pxt/node_modules/bluebird/js/release/promise.js:693:18) at Async._drainQueue (/Users/sabas/Documents/proyectoshd/pxt-produccion/pxt/node_modules/bluebird/js/release/async.js:133:16) at Async._drainQueues (/Users/sabas/Documents/proyectoshd/pxt-produccion/pxt/node_modules/bluebird/js/release/async.js:143:10) at Immediate.Async.drainQueues (/Users/sabas/Documents/proyectoshd/pxt-produccion/pxt/node_modules/bluebird/js/release/async.js:17:14) at runCallback (timers.js:789:20) at tryOnImmediate (timers.js:751:5) at processImmediate [as _immediateCallback] (timers.js:722:5)


sabas1080 commented 6 years ago

apparently the folder built/codal/build/file.hex is not being generated

pelikhan commented 6 years ago

If you are building for a new codal, you are going to need a new variant in pxttarget.json and a new build service. We will need to setup the build service.

sabas1080 commented 6 years ago

What is the easiest way to do this? everything arises as a result of this https://github.com/lancaster-university/mbed-classic/pull/10

sabas1080 commented 6 years ago

my proposal

        "mkr1300": {
            "serial": {
                "useHF2": false
            },
            "compile": {
                "isNative": true,
                "useUF2": true,
                "webUSB": false,
                "hasHex": true,
                "deployDrives": ".*",
                "deployFileMarker": "INFO_UF2.TXT",
                "driveName": "DRIVE",
                "openocdScript": "source [find interface/cmsis-dap.cfg]; set CHIPNAME at91samd21g18; source [find target/at91samdXX.cfg]",
                "flashChecksumAddr": 8372,
                "flashCodeAlign": 256,
                "floatingPoint": true,
                "taggedInts": true,
                "upgrades": []
            },
            "compileService": {
                "codalTarget": {
                    "name": "codal-mkr1300",
                    "url": "https://github.com/ElectronicCats/codal-mkr1300",
                    "branch": "v0.0.6",
                    "type": "git"
                },
                "codalBinary": "MKR1300",
                "serviceId": "codalmrk1300",
                "yottaConfig": {
                    "pxt": {
                        "board": {
                            "id": "BOARD_ID_MKR"
                        }
                    }
                }
            }
        },
pelikhan commented 6 years ago

We'll setup the build tomorrow.

pelikhan commented 6 years ago

This is for the arduino-mkr-1300 board right?

wero1414 commented 6 years ago

Hi @pelikhan yes is for the MKR-1300

pelikhan commented 6 years ago

Btw we have a discord to speed up comm https://aka.ms/makecodecommunity

pelikhan commented 6 years ago

See PR https://github.com/Microsoft/pxt-maker/pull/75

sabas1080 commented 6 years ago

thanks @pelikhan , but when trying to compile, I have the next error:

{ Error: Bad HTTP status code: 412 at https://www.makecode.com/api/compile/extension; message: {"message":""}

pelikhan commented 6 years ago

In master?

Get Outlook for iOShttps://aka.ms/o0ukef


From: Sabas notifications@github.com Sent: Saturday, October 20, 2018 11:32 AM To: Microsoft/pxt-maker Cc: Peli de Halleux; Mention Subject: Re: [Microsoft/pxt-maker] Error Compile with codal MKR1300 (#73)

thanks @pelikhanhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpelikhan&data=02%7C01%7Cjhalleux%40microsoft.com%7Cd47eb4b3c6c448514c8b08d636ba653b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636756571520813467&sdata=8rEOo7%2BvwTep%2F%2BqI%2B3PiD2mfSmn5WEsXgo5QXtY43cA%3D&reserved=0 , but when trying to compile, I have the next error:

{ Error: Bad HTTP status code: 412 at https://www.makecode.com/api/compile/extension; message: {"message":""}

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fpxt-maker%2Fissues%2F73%23issuecomment-431607141&data=02%7C01%7Cjhalleux%40microsoft.com%7Cd47eb4b3c6c448514c8b08d636ba653b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636756571520813467&sdata=a91CrGzcWIT7W8xXsnI1Aqx9IFknk6gJJwl8UvXHxcI%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAD-4KfuOW95oOKzDsiUCjvwQzqNUYp6Tks5um2w9gaJpZM4Xvq5u&data=02%7C01%7Cjhalleux%40microsoft.com%7Cd47eb4b3c6c448514c8b08d636ba653b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636756571520823480&sdata=G9tEpXj6mqoYnpG7onzDIrYxqTnMmXTgMPGtDuekbZw%3D&reserved=0.

sabas1080 commented 6 years ago

I reinstalled dependencies and everything ok, thanks @pelikhan