Build issue with C++, Platformio, for Marlin

It's been 4 days now trying to build a firmware file for my new MKS Robin Nano 3.1 board. I've installed the hardware and with the default firmware, it seemed to run but It was not configure for the 32 bit system. I've been trying to build with Marlin 2.1 with no success. It comes up with 2 fatal errors.
1. error: operator '==' has no operand.
2. #error "MOTHERBOARD not defined! Use '#define MOTHERBOARD BOARD_...' in
Configuration.h."
I really don't understand #2. The board is, infact, installed in Configuration.h
Here are the 3 lines.

98 #ifndef MOTHERBOARD
99 #define BOARD_MKS_ROBIN_NANO_V3_1
100 #endif

I get a hole bunch of yellow text and those 2 errors. I would assume that if the 2 fatal errors were fixed the yellow ones would disappear? I don't know. I would really appreciate some help. Thanks in advance.

Does it point to which actual line of code gives the 'operator '==' has no operand' error? This just sounds like a syntax error.

The board is, infact, installed in Configuration
'installed'? Show where in Configuration.h MOTHERBOARD is #defined.

I think your line 99 is wrong.

From a web search, my guess is that it should look more like:

1
2
3
4
// Choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
    #define MOTHERBOARD BOARD_MKS_ROBIN_NANO_V3
#endif 

From: https://github.com/makerbase-mks/MKS-Robin-Nano-V3.X/issues/111
(I have no idea what difference the _1 suffix makes, but the point is that you aren't defining MOTHERBOARD in the code you've shown)
Last edited on
Thanks a bunch for the quick response. First, the _1 rev3.1. This is the revision I am currently using or trying to use. Also you were correct. I needed MOTHERBOARD in there as part of the line. But now, although much shorter, is the hole error code. Can you make any sense of this. Again thanks in advance for your help. PS if you need any electronics help, please feel free to ask. I am an electronic circuit designer.

852 | #error "Unknown MOTHERBOARD value set in Configuration.h."
| ^~~~~
CalledProcessError: Command '"C:\Users\rzubl\.platformio\packages\toolchain-gccarmnoneeabi\bin\arm-none-eabi-g++.exe" -D__MARLIN_FIRMWARE__ -DNDEBUG -DHAL_STM32 -DUSBCON -DUSBD_USE_CDC -DTIM_IRQ_PRIO=13 -DADC_RESOLUTION=12 -DPIN_WIRE_SCL=PB6 -DPIN_WIRE_SDA=PB7 -DHAL_PCD_MODULE_ENABLED -D__MARLIN_DEPS__ -w -dM -E -x c++ buildroot/share/PlatformIO/scripts/common-dependencies.h' returned non-zero exit status 1.:
File "C:\Users\rzubl\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 182:
env.SConscript(item, exports="env")
File "C:\Users\rzubl\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Script\SConscript.py", line 597:
return _SConscript(self.fs, *files, **subst_kw)
File "C:\Users\rzubl\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Script\SConscript.py", line 285:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "C:\Users\rzubl\Documents\Marlin-2.1.x\buildroot\share\PlatformIO\scripts\common-dependencies.py", line 247:
apply_features_config()
File "C:\Users\rzubl\Documents\Marlin-2.1.x\buildroot\share\PlatformIO\scripts\common-dependencies.py", line 133:
if not env.MarlinFeatureIsEnabled(feature):
File "C:\Users\rzubl\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Util.py", line 742:
return self.method(*nargs, **kwargs)
File "C:\Users\rzubl\Documents\Marlin-2.1.x\buildroot\share\PlatformIO\scripts\common-dependencies.py", line 216:
load_marlin_features()
File "C:\Users\rzubl\Documents\Marlin-2.1.x\buildroot\share\PlatformIO\scripts\common-dependencies.py", line 204:
define_list = run_preprocessor(env)
File "C:\Users\rzubl\Documents\Marlin-2.1.x\buildroot\share\PlatformIO\scripts\preprocessor.py", line 43:
define_list = subprocess.check_output(cmd, shell=True).splitlines()
File "C:\Users\rzubl\.platformio\python3\lib\subprocess.py", line 424:
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\Users\rzubl\.platformio\python3\lib\subprocess.py", line 528:
raise CalledProcessError(retcode, process.args,
I do not know, other than it doesn't recognize the value you're defining MOTHERBOARD as, as being valid.

When I search the error message next to the #error, I find this thread:
https://www.reddit.com/r/3Dprinting/comments/mqld0k/error_unknown_motherboard_value_set_in/gugsfd2/
Maybe it's helpful.
Last edited on
I'd suggest searching within files to find where values for BOARD_xxxxxx et al are defined. They must be in a file somewhere. Once you're found them, then choose the appropriate one for the #define MOTHERBOARD line.
Topic archived. No new replies allowed.