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

Error in makefiles created by Node-RED MCU #1071

Closed
NW-Lab opened this issue Mar 25, 2023 · 7 comments
Closed

Error in makefiles created by Node-RED MCU #1071

NW-Lab opened this issue Mar 25, 2023 · 7 comments

Comments

@NW-Lab
Copy link
Contributor

NW-Lab commented Mar 25, 2023

Build environment: Windows Node-RED MCU Plugin
Target device:  M5Stich_cplus + sht3x

Description
Thank you for automatically embedding the sensor driver.
I get the following error:


mcconfig -d -x localhost:5004 -m -p esp32/m5stick_cplus
C:\Espressif\tools\idf-exe\1.0.3\idf.py.exe
C:\Espressif\frameworks\esp-idf-v4.4.4\tools\idf.py
c:\pjt\moddable\build\tmp\esp32\m5stick_cplus\debug\qnkkmq7msvl\makefile(111) : fatal error U1033: 構文エラー : 予期しない 'c:\pjt\moddable\modules\drivers\sensors\sht3x\manifest.json'
Stop.


Corresponding part
image

I think "#3" in the previous line is probably bad.

thanks.

@phoddie
Copy link
Collaborator

phoddie commented Mar 25, 2023 via email

@NW-Lab
Copy link
Contributor Author

NW-Lab commented Mar 25, 2023

flows.json is this

[
  {
    "id": "959d95b9238f454e",
    "type": "tab",
    "label": "フロー 3",
    "disabled": false,
    "info": "",
    "env": []
  },
  {
    "id": "ca0d5fae48fbbf69",
    "type": "inject",
    "z": "959d95b9238f454e",
    "name": "",
    "props": [
      {
        "p": "payload"
      },
      {
        "p": "topic",
        "vt": "str"
      }
    ],
    "repeat": "5",
    "crontab": "",
    "once": false,
    "onceDelay": 0.1,
    "topic": "",
    "payload": "",
    "payloadType": "date",
    "x": 190,
    "y": 120,
    "wires": [
      [
        "39a8b30d5a307223"
      ]
    ]
  },
  {
    "id": "cc3f24157c2ed3d8",
    "type": "debug",
    "z": "959d95b9238f454e",
    "name": "debug 1",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "false",
    "statusVal": "",
    "statusType": "auto",
    "x": 500,
    "y": 120,
    "wires": []
  },
  {
    "id": "39a8b30d5a307223",
    "type": "sensor",
    "z": "959d95b9238f454e",
    "name": "",
    "platform": "",
    "module": "embedded:sensor/Humidity-Temperature/SHT3x",
    "options": {
      "sensor": {
        "io": "I2C",
        "bus": "default",
        "address": "0x44"
      }
    },
    "configuration": "{}",
    "moddable_manifest": {
      "include": [
        "$(MODDABLE)/modules/drivers/sensors/sht3x/manifest.json"
      ]
    },
    "x": 370,
    "y": 120,
    "wires": [
      [
        "cc3f24157c2ed3d8"
      ]
    ]
  }
]

@NW-Lab
Copy link
Contributor Author

NW-Lab commented Mar 25, 2023

This is build.bat generated by mcu plugin.

CALL "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars32.bat"
pushd %IDF_PATH%
CALL "C:\Espressif\idf_cmd_init.bat"
popd
@echo mcconfig -d -x localhost:5004 -m -p esp32/m5stick_cplus
mcconfig -d -x localhost:5004 -m -p esp32/m5stick_cplus

@phoddie
Copy link
Collaborator

phoddie commented Mar 25, 2023

Thank you for the additional information. The extra data on the source path is unnecessary. It can be removed by replacing this line in mcmanifest.js with the following:

this.parseManifest(source, {...node.moddable_manifest, directory: this.currentDirectory});

Would you give that a try?

FWIW – The path with extra data is being output for all platforms. However, it doesn't generate an error on macOS but clearly does on Windows. That's why I didn't notice the problem.

@NW-Lab
Copy link
Contributor Author

NW-Lab commented Mar 26, 2023

Thank you for your reply.

Once fixed, I get this error:
"### Error: 'C:\Users\tauchi\node_modules\@ralphwetzel\node-red-mcu-plugin\node-red-mcu\manifest_runtime.json': manifest not found!"

Probably, I think that it is really "c:\users\tauchi\.node-red\node_modules.....", but there is no ".node-red".

The manifest automatically generated by the plugin is as follows.

{
  "build": {
    "MODULES": "c:\\pjt\\moddable\\modules",
    "MCUROOT": "C:\\Users\\tauchi\\.node-red\\node_modules\\@ralphwetzel\\node-red-mcu-plugin\\node-red-mcu",
    "REDNODES": "C:\\Users\\tauchi\\AppData\\Roaming\\npm\\node_modules\\node-red\\node_modules\\@node-red\\nodes"
  },
  "include": [
    "$(MCUROOT)/manifest_host.json",
    "$(MCUROOT)/./nodes/mcu/sensor/manifest.json"
  ],
  "modules": {
    "*": [
      "./main",
      {
        "source": "./flows",
        "transform": "nodered2mcu"
      }
    ],
    "~": []
  },
  "preload": [
    "flows"
  ],
  "config": {
    "noderedmcu": {
      "editor": true
    }
  }
}

mkellner pushed a commit that referenced this issue Mar 26, 2023
@NW-Lab
Copy link
Contributor Author

NW-Lab commented Mar 26, 2023

sorry.

Rebuilding Moddeable and restarting the PC seems to be fine.

thank you.

@NW-Lab NW-Lab closed this as completed Mar 26, 2023
@phoddie
Copy link
Collaborator

phoddie commented Mar 26, 2023

Thanks for confirming. I should have mentioned that is necessary to rebuild the tools after making that change. Apologies.

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

2 participants