Node-red-mcu-plugin v1.0: Integrating Node-RED MCU Edition into the Node-RED editor

I have tried playing with this. I believe that I have everything installed correctly but when I try to do a build with the plugin I get a "make: *** Waiting for unfinished jobs...." on the console and nothing ever comes back.

Oops, I am also getting some errors

/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:58:25: error: unknown type name 'mcpwm_unit_t'
 static bool pw_callback(mcpwm_unit_t mcpwm, mcpwm_capture_channel_id_t cap_sig, const cap_event_data_t *edata, void *arg);
                         ^~~~~~~~~~~~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:58:45: error: unknown type name 'mcpwm_capture_channel_id_t'
 static bool pw_callback(mcpwm_unit_t mcpwm, mcpwm_capture_channel_id_t cap_sig, const cap_event_data_t *edata, void *arg);
                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:58:87: error: unknown type name 'cap_event_data_t'
 static bool pw_callback(mcpwm_unit_t mcpwm, mcpwm_capture_channel_id_t cap_sig, const cap_event_data_t *edata, void *arg);
                                                                                       ^~~~~~~~~~~~~~~~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:62:50: error: unknown type name 'mcpwm_unit_t'
 static uint8_t mcpwmFromChannel(uint8_t channel, mcpwm_unit_t *unit, mcpwm_io_signals_t *signal, mcpwm_capture_signal_t *select);
                                                  ^~~~~~~~~~~~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:62:70: error: unknown type name 'mcpwm_io_signals_t'
 static uint8_t mcpwmFromChannel(uint8_t channel, mcpwm_unit_t *unit, mcpwm_io_signals_t *signal, mcpwm_capture_signal_t *select);
                                                                      ^~~~~~~~~~~~~~~~~~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:62:98: error: unknown type name 'mcpwm_capture_signal_t'
 static uint8_t mcpwmFromChannel(uint8_t channel, mcpwm_unit_t *unit, mcpwm_io_signals_t *signal, mcpwm_capture_signal_t *select);
                                                                                                  ^~~~~~~~~~~~~~~~~~~~~~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c: In function 'xs_pulsewidth_constructor':
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:83:5: error: unknown type name 'mcpwm_unit_t'
     mcpwm_unit_t unit;
     ^~~~~~~~~~~~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:84:5: error: unknown type name 'mcpwm_io_signals_t'
     mcpwm_io_signals_t signal;
     ^~~~~~~~~~~~~~~~~~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:85:5: error: unknown type name 'mcpwm_capture_signal_t'
     mcpwm_capture_signal_t select;
     ^~~~~~~~~~~~~~~~~~~~~~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:154:5: error: unknown type name 'mcpwm_capture_config_t'
     mcpwm_capture_config_t conf = {
     ^~~~~~~~~~~~~~~~~~~~~~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:155:9: error: field name not in record or union initializer
         .cap_edge = MCPWM_BOTH_EDGE,
         ^
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:155:9: note: (near initialization for 'conf')
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:155:21: error: 'MCPWM_BOTH_EDGE' undeclared (first use in this function)
         .cap_edge = MCPWM_BOTH_EDGE,
                     ^~~~~~~~~~~~~~~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:155:21: note: each undeclared identifier is reported only once for each function it appears in
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:156:9: error: field name not in record or union initializer
         .cap_prescale = 1,
         ^
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:156:9: note: (near initialization for 'conf')
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:156:25: warning: excess elements in scalar initializer
         .cap_prescale = 1,
                         ^
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:156:25: note: (near initialization for 'conf')
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:157:9: error: field name not in record or union initializer
         .capture_cb = pw_callback,
         ^
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:157:9: note: (near initialization for 'conf')
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:157:23: error: 'pw_callback' undeclared (first use in this function); did you mean 'xsCallback'?
         .capture_cb = pw_callback,
                       ^~~~~~~~~~~
                       xsCallback
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:157:23: warning: excess elements in scalar initializer
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:157:23: note: (near initialization for 'conf')
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:158:9: error: field name not in record or union initializer
         .user_data = pw
         ^
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:158:9: note: (near initialization for 'conf')
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:158:22: warning: excess elements in scalar initializer
         .user_data = pw
                      ^~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:158:22: note: (near initialization for 'conf')
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:162:13: error: request for member 'cap_edge' in something not a structure or union
         conf.cap_edge = MCPWM_NEG_EDGE;
             ^
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:162:25: error: 'MCPWM_NEG_EDGE' undeclared (first use in this function)
         conf.cap_edge = MCPWM_NEG_EDGE;
                         ^~~~~~~~~~~~~~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:165:13: error: request for member 'cap_edge' in something not a structure or union
         conf.cap_edge = MCPWM_POS_EDGE;
             ^
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:165:25: error: 'MCPWM_POS_EDGE' undeclared (first use in this function)
         conf.cap_edge = MCPWM_POS_EDGE;
                         ^~~~~~~~~~~~~~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c: In function 'xs_pulsewidth_destructor':
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:176:5: error: unknown type name 'mcpwm_unit_t'
     mcpwm_unit_t unit;
     ^~~~~~~~~~~~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:177:5: error: unknown type name 'mcpwm_io_signals_t'
     mcpwm_io_signals_t signal;
     ^~~~~~~~~~~~~~~~~~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:178:5: error: unknown type name 'mcpwm_capture_signal_t'
     mcpwm_capture_signal_t select;
     ^~~~~~~~~~~~~~~~~~~~~~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c: At top level:
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:230:25: error: unknown type name 'mcpwm_unit_t'
 static bool pw_callback(mcpwm_unit_t mcpwm, mcpwm_capture_channel_id_t cap_sig, const cap_event_data_t *edata, void *arg)
                         ^~~~~~~~~~~~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:230:45: error: unknown type name 'mcpwm_capture_channel_id_t'
 static bool pw_callback(mcpwm_unit_t mcpwm, mcpwm_capture_channel_id_t cap_sig, const cap_event_data_t *edata, void *arg)
                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:230:87: error: unknown type name 'cap_event_data_t'
 static bool pw_callback(mcpwm_unit_t mcpwm, mcpwm_capture_channel_id_t cap_sig, const cap_event_data_t *edata, void *arg)
                                                                                       ^~~~~~~~~~~~~~~~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:293:50: error: unknown type name 'mcpwm_unit_t'
 static uint8_t mcpwmFromChannel(uint8_t channel, mcpwm_unit_t *unit, mcpwm_io_signals_t *signal, mcpwm_capture_signal_t *select)
                                                  ^~~~~~~~~~~~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:293:70: error: unknown type name 'mcpwm_io_signals_t'
 static uint8_t mcpwmFromChannel(uint8_t channel, mcpwm_unit_t *unit, mcpwm_io_signals_t *signal, mcpwm_capture_signal_t *select)
                                                                      ^~~~~~~~~~~~~~~~~~
/home/joe/Projects/moddable/modules/io/pulsewidth/esp32/_pulsewidth.c:293:98: error: unknown type name 'mcpwm_capture_signal_t'
 static uint8_t mcpwmFromChannel(uint8_t channel, mcpwm_unit_t *unit, mcpwm_io_signals_t *signal, mcpwm_capture_signal_t *select)
                                                                                                  ^~~~~~~~~~~~~~~~~~~~~~
make: *** [/home/joe/Projects/moddable/build/tmp/esp32/saola_wroom/debug/mz5ve8vnodc/makefile:1999: /home/joe/Projects/moddable/build/tmp/esp32/saola_wroom/debug/mz5ve8vnodc/_pulsewidth.c.o] Error 1
make: *** Waiting for unfinished jobs....```

Hi @jmorris644 !
Could you share the flow you're trying to build?
I can offer to check what's happening there...

2 Likes

Just testing with an inject and debug node. Nothing else.

Thank you for the report.
I can confirm that the build fails on both saola devices.
As it looks like this is not related to Node-RED (but rather a topic of the core SDK), I've created an issue @ the Moddable repository.

Thanks! I will try another device and report back.

Hi @ralphwetzel,

Would like to start again with this, since Peter and Andy have been so kind to support the wt32-eth01 board on my request. Started from scratch again, and everything installed well (I think/hope) except your plugin:

pi@raspberrypi:~/.node-red $ npm install @ralphwetzel/node-red-mcu-plugin
npm ERR! Cannot set properties of null (setting 'peer')

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2023-01-30T22_17_13_696Z-debug-0.log

It happens both via command line or via the Node-RED palette menu.

Thanks!!

Is it this one?

Hi Julian,
Sorry just updated my question. Had posted the wrong command. Sorry for the confusion.

1 Like

Too quick for my own good :grin:

Just back in from taking my son out for a 21st birthday Thai meal so you caught me just right - or just wrong as the case may be!

1 Like

Hi @BartButenaers!
Sorry; can't reproduce this on my systems.
Could you send me the log please (PM or post it here) so I can check what causing this?

Hi @BartButenaers !
To get the support for your esp32/wt32_eth01 board, you currently need to install the latest 1.1.2-post version of the plugin, directly from GitHub:

npm install https://github.com/ralphwetzel/node-red-mcu-plugin

I don't know if this makes any difference though concerning the error you hit...

npm install ralphwetzel/node-red-mcu-plugin should be enough to install from GitHub's main branch.

Hmm, none of those commands work for me. They all give the same error, whether I download it from Github or from Npm.

I assume it is not related to Raph's package, but to my npm version. Read about other users having the same issue (for other package). Some of them posted it was resolved by upgrading from 8.15.0 to 8.16.0. Tried that but it didn't help...

Thanks for the tip!!