<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Issues compiling Marlin</title>
        <description> Hi!

I&#039;m having trouble compiling Marlin for Teensy 4.1 board with TMC2209 drivers, BLTouch sensor and DGUS_LCD_UI_RELOADED LCD enabled. I&#039;ve tried the bugfix version however other new errors pop up while compiling! In both compilations I use a clean installation of platformio (i.e. I&#039;ve deleted the .platformio folder from my user folder and reinstalled in each compilation for both production and bugfix branches).

When compiling for Marlin 2.1.2.5 which is the version I want to use I get these errors:


In file included from Marlin\src\gcode\feature\runout\../../../feature/../module/stepper/../../feature/../lcd/../module/settings.h:31:0,
                 from Marlin\src\gcode\feature\runout\../../../feature/../module/stepper/../../feature/../lcd/marlinui.h:31,
                 from Marlin\src\gcode\feature\runout\../../../feature/../module/stepper/../../feature/tmc_util.h:25,
                 from Marlin\src\gcode\feature\runout\../../../feature/../module/stepper/trinamic.h:35,
                 from Marlin\src\gcode\feature\runout\../../../feature/../module/stepper/indirection.h:77,
                 from Marlin\src\gcode\feature\runout\../../../feature/../module/stepper.h:47,
                 from Marlin\src\gcode\feature\runout\../../../feature/runout.h:31,
                 from Marlin\src\gcode\feature\runout\M412.cpp:28:
Marlin\src\gcode\feature\runout\../../../feature/../module/stepper/../../feature/../lcd/../module/../HAL/shared/eeprom_api.h:27:30: fatal error: ../../libs/crc16.h: No such file or directory
compilation terminated.
*** [.pio\build\teensy41\src\src\gcode\feature\runout\M412.cpp.o] Error 1
Marlin\src\inc\Warnings.cpp:86:6: warning: #warning &quot;Note: Auto-assigned LCD_SERIAL_PORT. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)&quot; [-Wcpp]
     #warning &quot;Note: Auto-assigned LCD_SERIAL_PORT. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)&quot;
      ^
Marlin\src\lcd\extui\dgus_reloaded\DGUSDisplay.cpp: In static member function &#039;static void DGUSDisplay::Init()&#039;:
Marlin\src\lcd\extui\dgus_reloaded\DGUSDisplay.cpp:58:3: error: &#039;LCD_SERIAL&#039; was not declared in this scope
   LCD_SERIAL.begin(LCD_BAUDRATE);
   ^
Marlin\src\lcd\extui\dgus_reloaded\DGUSDisplay.cpp: In static member function &#039;static void DGUSDisplay::Read(uint16_t, uint8_t)&#039;:
Marlin\src\lcd\extui\dgus_reloaded\DGUSDisplay.cpp:66:3: error: &#039;LCD_SERIAL&#039; was not declared in this scope
   LCD_SERIAL.write(size);
   ^
Marlin\src\lcd\extui\dgus_reloaded\DGUSDisplay.cpp: In static member function &#039;static void DGUSDisplay::Write(uint16_t, const void*, uint8_t)&#039;:
Marlin\src\lcd\extui\dgus_reloaded\DGUSDisplay.cpp:77:5: error: &#039;LCD_SERIAL&#039; was not declared in this scope
     LCD_SERIAL.write(*data++);
     ^
Marlin\src\lcd\extui\dgus_reloaded\DGUSDisplay.cpp: In static member function &#039;static void DGUSDisplay::WriteString(uint16_t, const void*, uint8_t, bool, bool, bool)&#039;:
Marlin\src\lcd\extui\dgus_reloaded\DGUSDisplay.cpp:111:5: error: &#039;LCD_SERIAL&#039; was not declared in this scope
     LCD_SERIAL.write(&#039; &#039;);
     ^
Marlin\src\lcd\extui\dgus_reloaded\DGUSDisplay.cpp:114:5: error: &#039;LCD_SERIAL&#039; was not declared in this scope
     LCD_SERIAL.write(*data++);
     ^
compilation terminated due to -fmax-errors=5.
*** [.pio\build\teensy41\src\src\lcd\extui\dgus_reloaded\DGUSDisplay.cpp.o] Error 1

I don&#039;t know why the LCD_SERIAL error, is this because Platformio is not automatically downloading the required libraries, or is it because more than one library is being downloaded and trying to link against?


And when compiling for the latest bugfix I get these:


In file included from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre-1-axes.h:44:0,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/Conditionals-1-axes.h:32,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre.h:27,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre-5-post.h:24,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre-6-type.h:24,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfig.h:28,
                 from buildroot/share/PlatformIO/scripts/common-dependencies.h:29:
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration.h:284:11: error: missing binary operator before token &quot;(&quot;
 #if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration.h:988:11: error: missing binary operator before token &quot;(&quot;
 #if EITHER(MORGAN_SCARA, MP_SCARA)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration.h:1787:11: error: missing binary operator before token &quot;(&quot;
 #if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration.h:1991:11: error: missing binary operator before token &quot;(&quot;
 #if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR)
           ^
In file included from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre-1-axes.h:44:0,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/Conditionals-1-axes.h:32,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre.h:27,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre-5-post.h:24,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre-6-type.h:24,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfig.h:28,
                 from buildroot/share/PlatformIO/scripts/common-dependencies.h:29:
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration.h:3039:11: error: missing binary operator before token &quot;(&quot;
 #if EITHER(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration.h:3327:11: error: missing binary operator before token &quot;(&quot;
 #if EITHER(RGB_LED, RGBW_LED)
           ^
In file included from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre-4-adv.h:33:0,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/Conditionals-4-adv.h:32,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre.h:30,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre-5-post.h:24,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre-6-type.h:24,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfig.h:28,
                 from buildroot/share/PlatformIO/scripts/common-dependencies.h:29:
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:303:11: error: missing binary operator before token &quot;(&quot;
   #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:1086:11: error: missing binary operator before token &quot;(&quot;
 #if EITHER(INPUT_SHAPING_X, INPUT_SHAPING_Y)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:1322:11: error: missing binary operator before token &quot;(&quot;
 #if EITHER(DIGIPOT_MCP4018, DIGIPOT_MCP4451)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:1379:28: error: missing binary operator before token &quot;(&quot;
 #if HAS_BED_PROBE &amp;amp;&amp;amp; EITHER(HAS_MARLINUI_MENU, HAS_TFT_LVGL_UI)
                            ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:1436:11: error: missing binary operator before token &quot;(&quot;
 #if EITHER(HAS_DISPLAY, DWIN_LCD_PROUI)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:1500:26: error: missing binary operator before token &quot;(&quot;
 #if HAS_DISPLAY &amp;amp;&amp;amp; EITHER(SDSUPPORT, SET_PROGRESS_MANUALLY)
                          ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:2148:11: error: missing binary operator before token &quot;(&quot;
 #if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:2183:11: error: missing binary operator before token &quot;(&quot;
 #if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:2191:9: error: missing binary operator before token &quot;(&quot;
 #if BOTH(AUTO_BED_LEVELING_UBL, EEPROM_SETTINGS)
         ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:2305:11: error: missing binary operator before token &quot;(&quot;
 #if EITHER(ARC_SUPPORT, BEZIER_CURVE_SUPPORT)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:2393:9: error: missing binary operator before token &quot;(&quot;
 #if BOTH(SDSUPPORT, DIRECT_STEPPING)
         ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:3173:13: error: missing binary operator before token &quot;(&quot;
   #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING)
             ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:3335:11: error: missing binary operator before token &quot;(&quot;
 #if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
           ^
UnicodeEncodeError: &#039;charmap&#039; codec can&#039;t encode character &#039;\u016f&#039; in position 1650: character maps to :
  File &quot;C:\Users\User\.platformio\penv\Lib\site-packages\platformio\builder\main.py&quot;, line 167:
    env.SConscript(env.GetExtraScripts(&quot;pre&quot;), exports=&quot;env&quot;)
  File &quot;C:\Users\User\.platformio\packages\tool-scons\scons-local-4.8.1\SCons\Script\SConscript.py&quot;, line 620:
    return _SConscript(self.fs, *files, **subst_kw)
  File &quot;C:\Users\User\.platformio\packages\tool-scons\scons-local-4.8.1\SCons\Script\SConscript.py&quot;, line 280:
    exec(compile(scriptdata, scriptname, &#039;exec&#039;), call_stack[-1].globals)
  File &quot;F:\Documents\Projects\3D Printer Board\Marlin Firmware\Bugfix\Marlin-bugfix-2.1.x\buildroot\share\PlatformIO\scripts\preflight-checks.py&quot;, line 162:
    sanity_check_target()
  File &quot;F:\Documents\Projects\3D Printer Board\Marlin Firmware\Bugfix\Marlin-bugfix-2.1.x\buildroot\share\PlatformIO\scripts\preflight-checks.py&quot;, line 82:
    file.write(modified_text)
  File &quot;C:\Users\User\.platformio\python3\Lib\encodings\cp1252.py&quot;, line 19:
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]


I&#039;ve attached my platformio.ini, Configuration.h, Configuration_adv.h and pins_TEENSY41.h which are all the files I believe I&#039;ve changed thus far!

Thank you kindly in advance for any help!</description>
        <link>https://reprap.org/forum/read.php?415,896633,896633#msg-896633</link>
        <lastBuildDate>Sat, 18 Jul 2026 11:56:04 -0400</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://reprap.org/forum/read.php?415,896633,896642#msg-896642</guid>
            <title>Re: Issues compiling Marlin</title>
            <link>https://reprap.org/forum/read.php?415,896633,896642#msg-896642</link>
            <description><![CDATA[ The code changes have been merged into marlin bugfix, so bugfix and newer marlins going forward now have the code to support LCD_SERIAL_PORT on TEENSY]]></description>
            <dc:creator>Dust</dc:creator>
            <category>Firmware - Marlin</category>
            <pubDate>Wed, 12 Mar 2025 23:55:02 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?415,896633,896636#msg-896636</guid>
            <title>Re: Issues compiling Marlin</title>
            <link>https://reprap.org/forum/read.php?415,896633,896636#msg-896636</link>
            <description><![CDATA[ I have created a PR to add LCD_SERIAL_PORT support into bugfix 2.1.x  [<a href="https://github.com/MarlinFirmware/Marlin/pull/27736" target="_blank"  rel="nofollow">github.com</a>] for the TEENSY40_41]]></description>
            <dc:creator>Dust</dc:creator>
            <category>Firmware - Marlin</category>
            <pubDate>Mon, 10 Mar 2025 23:38:43 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?415,896633,896635#msg-896635</guid>
            <title>Re: Issues compiling Marlin</title>
            <link>https://reprap.org/forum/read.php?415,896633,896635#msg-896635</link>
            <description><![CDATA[ Hi Dust!<br />
<br />
Thank you for your help!<br />
<br />
<blockquote class="bbcode"><div><small>Quote<br /></small><strong>Dust</strong><br />
Change #define GRID_MAX_POINTS_X to 5</div></blockquote>
<br />
I've changed #define GRID_MAX_POINTS_X to 5 together with #define DGUS_LEVEL_GRID_SIZE from the 100 that I had previously defined in DGUS_Addr.h to 25 now.<br />
<br />
<blockquote class="bbcode"><div><small>Quote<br /></small><strong>Dust</strong><br />
Add this to your Configuration.h<br />
#define LCD_SERIAL_PORT 5 // (as a guess from the updated pins file)</div></blockquote>
<br />
This one I've set in Conditionals_adv.h<br />
<br />
<pre class="bbcode">
#if LCD_IS_SERIAL_HOST &amp;&amp; !defined(LCD_SERIAL_PORT)
  #if MB(MKS_MONSTER8_V1, BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_MINI_E3_V3_0, BTT_SKR_MINI_E3_V3_0_1, BTT_SKR_E3_TURBO, BTT_OCTOPUS_V1_1, BTT_SKR_V3_0, BTT_SKR_V3_0_EZ)
    #define LCD_SERIAL_PORT 1
  #elif MB(CREALITY_V24S1_301, CREALITY_V24S1_301F4, CREALITY_F401RE, CREALITY_V423, MKS_ROBIN)
    #define LCD_SERIAL_PORT 2 // Creality Ender3S1, MKS Robin
  #else
    #define LCD_SERIAL_PORT 5 // Other boards
  #endif
  #ifdef LCD_SERIAL_PORT
    #define AUTO_ASSIGNED_LCD_SERIAL 5
  #endif
#endif</pre>
<br />
Hopefully I did that one right! Although it still gave me an error when I compiled, now I notice this conditional is indeed grayed out in VSCode. I've added  #define LCD_SERIAL_PORT 5 straight in Configuration.h, error seems to be gone now! Thanks!<br />
<br />
<blockquote class="bbcode"><div><small>Quote<br /></small><strong>Dust</strong><br />
Next problem is a larger one, no one has been crazy enough to add a serial lcd support to teensy41 as of yet.</div></blockquote>
<br />
My printer has an LCD, it's an CR-200B. I think I damaged the control board when I connected a BLTouch sensor, the sensor did not come with the printer, it's an added sensor as I was simply tired of manually levelling the bed. I accidently swapped +5V and GND when crimping/assembling the XH connector to attach to the board and that well known smell of burnt electronics began emanating from inside the printer. Not only that I also flashed Creality's incredibly buggy version of Marlin to support a BLTouch sensor in this printer, and now my printer's display neither works, nor can I use the printer with octoprint since it throws an error just after probing the bed with the sensor, haha. Creality doesn't provide the source code for this printer, which they should, since Marlin is licensed as copy left GPL! So I decided to design my own control board from scratch, I have a lot of parts around I can build the board with plus some extra purchased ones already.<br />
<br />
<blockquote class="bbcode"><div><small>Quote<br /></small><strong>Dust</strong><br />
You have set #define TEMP_SENSOR_0 332, the highest temperature this thermistor can read is 150c (highest temperature entry in the table) , Subtracting HOTEND_OVERSHOOT = 135. So the highest temperature you can set HEATER_0_MAXTEMP to is 135<br />
Very few thermistor can read that high a temperature, they break down as such high temperatures</div></blockquote>
<br />
I've changed this back to 1 (100kΩ EPCOS) in Configuration.h:<br />
<br />
<pre class="bbcode">
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_3 0
#define TEMP_SENSOR_4 0
#define TEMP_SENSOR_5 0
#define TEMP_SENSOR_6 0
#define TEMP_SENSOR_7 0
#define TEMP_SENSOR_BED 1
#define TEMP_SENSOR_PROBE 0
#define TEMP_SENSOR_CHAMBER 0
#define TEMP_SENSOR_COOLER 0
#define TEMP_SENSOR_BOARD 0
#define TEMP_SENSOR_REDUNDANT 0</pre>
<br />
The CR-200B nozzle temperature is &lt;= 260 deg. Celcius. I only changed it to 332 because I read in line 461 in Configuration.h the following: 100kΩ Same as #1, but 3.3V scaled for DUE . I thought, since the teensy works with 3.3V then it would be suitable for it, but now that I think about it that doesn't make much sense, since an ADC peripheral from an MCU that operates at 3.3V will read 3.3V as the max value of 1023 if Marlin configures the ADC peripheral as 10bit or 4095 if 12bit.<br />
<br />
Is  #define TEMP_SENSOR_0 1 and #define TEMP_SENSOR_BED 1 appropriate in this case?<br />
<br />
I've also compiled with the changes you suggested with the exception of the thermistor one as I've changed that one back to the default 1, and now Marlin compiles with no errors! Thanks a bunch, Dust!<br />
<br />
I will be taking the display off my printer to test it with the teensy, I'll breadboard all the components, teensy, stepper drivers, stepper motors, 100K thermistors, 3.3 to 5V level converters, mosfets + mosfet gate drivers, etc, and do a test run to see whether everything works as expected before moving onto the actual board design in either kicad or Eagle.<br />
<br />
Thanks!]]></description>
            <dc:creator>jpff</dc:creator>
            <category>Firmware - Marlin</category>
            <pubDate>Mon, 10 Mar 2025 16:07:57 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?415,896633,896634#msg-896634</guid>
            <title>Re: Issues compiling Marlin</title>
            <link>https://reprap.org/forum/read.php?415,896633,896634#msg-896634</link>
            <description><![CDATA[ using the provided files.<br />
<br />
First error I see is<br />
<br />
<pre class="bbcode">
#error "DGUS_LEVEL_GRID_SIZE is incompatible with current mesh."  this need to be 5x5 not 10x10, a requirement of this display</pre>
Change   #define GRID_MAX_POINTS_X to 5<br />
<br />
Second error<br />
<br />
<pre class="bbcode">
Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp:58:3: error: 'LCD_SERIAL' was not declared in this scope</pre>
<br />
This is a serial display. you need to tell Marlin where it is attached.  <br />
<br />
Add this to your Configuration.h <br />
#define LCD_SERIAL_PORT 5  // (as a guess from the updated pins file) <br />
<br />
Next problem is a larger one, no one has been crazy enough to add a serial lcd support to teensy41 as of yet.<br />
<br />
add the following to Marlin/src/HAL/TEENSY40_41/HAL.h lline 114 <br />
<pre class="bbcode">
#ifdef LCD_SERIAL_PORT
  //#if !WITHIN(LCD_SERIAL_PORT, 0, 3)
  //  #error "LCD_SERIAL_PORT must be from 0 to 3."
  //#endif
  DECLARE_SERIAL(LCD_SERIAL_PORT);
  #define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT)
  #if HAS_DGUS_LCD
    #define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.available()
  #endif
#endif</pre>
<br />
add this to Marlin/src/HAL/TEENSY40_41/HAL.cpp line 55<br />
<pre class="bbcode">
#ifdef LCD_SERIAL_PORT
  //#if WITHIN(SERIAL_PORT_3, 0, 8) 
    IMPLEMENT_SERIAL(LCD_SERIAL_PORT);
  //#endif
#endif</pre>
<br />
next error <br />
<br />
<pre class="bbcode">
Marlin/src/module/temperature.cpp:307:33: error: static assertion failed: HEATER_0_MAXTEMP (260) is too high for thermistor_332.h with HOTEND_OVERSHOOT=15</pre>
<br />
You have set #define TEMP_SENSOR_0 332, the highest  temperature this thermistor can read is 150c (highest temperature entry in the table) , Subtracting HOTEND_OVERSHOOT =  135.  So the highest temperature you can set HEATER_0_MAXTEMP to is 135<br />
Very few thermistor can read that high a temperature, they break down as such high temperatures<br />
<br />
For now lower HEATER_0_MAXTEMP to a valid value 135 till you work out what you actually have/want/need<br />
<br />
This builds, but I have no idea if it will do anything useful. But it is a starting point.<br />
<br />
Here are all the updated files<br />
<br />
[attachment 121338 platformio.ini]  (no changes to what you supplied)<br />
[attachment 121339 Configuration.h]<br />
[attachment 121340 Configuration_adv.h] (no changes)<br />
[attachment 121341 HAL.h]  modified Marlin/src/HAL/TEENSY40_41/HAL.h <br />
[attachment 121342 HAL.cpp] modified Marlin/src/HAL/TEENSY40_41/HAL.cpp <br />
[attachment 121343 pins_TEENSY41.h] (no changes)]]></description>
            <dc:creator>Dust</dc:creator>
            <category>Firmware - Marlin</category>
            <pubDate>Mon, 10 Mar 2025 05:24:14 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?415,896633,896633#msg-896633</guid>
            <title>Issues compiling Marlin</title>
            <link>https://reprap.org/forum/read.php?415,896633,896633#msg-896633</link>
            <description><![CDATA[ Hi!<br />
<br />
I'm having trouble compiling Marlin for Teensy 4.1 board with TMC2209 drivers, BLTouch sensor and DGUS_LCD_UI_RELOADED LCD enabled. I've tried the bugfix version however other new errors pop up while compiling! In both compilations I use a clean installation of platformio (i.e. I've deleted the .platformio folder from my user folder and reinstalled in each compilation for both production and bugfix branches).<br />
<br />
When compiling for Marlin 2.1.2.5 which is the version I want to use I get these errors:<br />
<br />
<pre class="bbcode">
In file included from Marlin\src\gcode\feature\runout\../../../feature/../module/stepper/../../feature/../lcd/../module/settings.h:31:0,
                 from Marlin\src\gcode\feature\runout\../../../feature/../module/stepper/../../feature/../lcd/marlinui.h:31,
                 from Marlin\src\gcode\feature\runout\../../../feature/../module/stepper/../../feature/tmc_util.h:25,
                 from Marlin\src\gcode\feature\runout\../../../feature/../module/stepper/trinamic.h:35,
                 from Marlin\src\gcode\feature\runout\../../../feature/../module/stepper/indirection.h:77,
                 from Marlin\src\gcode\feature\runout\../../../feature/../module/stepper.h:47,
                 from Marlin\src\gcode\feature\runout\../../../feature/runout.h:31,
                 from Marlin\src\gcode\feature\runout\M412.cpp:28:
Marlin\src\gcode\feature\runout\../../../feature/../module/stepper/../../feature/../lcd/../module/../HAL/shared/eeprom_api.h:27:30: fatal error: ../../libs/crc16.h: No such file or directory
compilation terminated.
*** [.pio\build\teensy41\src\src\gcode\feature\runout\M412.cpp.o] Error 1
Marlin\src\inc\Warnings.cpp:86:6: warning: #warning "Note: Auto-assigned LCD_SERIAL_PORT. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" [-Wcpp]
     #warning "Note: Auto-assigned LCD_SERIAL_PORT. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
      ^
Marlin\src\lcd\extui\dgus_reloaded\DGUSDisplay.cpp: In static member function 'static void DGUSDisplay::Init()':
Marlin\src\lcd\extui\dgus_reloaded\DGUSDisplay.cpp:58:3: error: 'LCD_SERIAL' was not declared in this scope
   LCD_SERIAL.begin(LCD_BAUDRATE);
   ^
Marlin\src\lcd\extui\dgus_reloaded\DGUSDisplay.cpp: In static member function 'static void DGUSDisplay::Read(uint16_t, uint8_t)':
Marlin\src\lcd\extui\dgus_reloaded\DGUSDisplay.cpp:66:3: error: 'LCD_SERIAL' was not declared in this scope
   LCD_SERIAL.write(size);
   ^
Marlin\src\lcd\extui\dgus_reloaded\DGUSDisplay.cpp: In static member function 'static void DGUSDisplay::Write(uint16_t, const void*, uint8_t)':
Marlin\src\lcd\extui\dgus_reloaded\DGUSDisplay.cpp:77:5: error: 'LCD_SERIAL' was not declared in this scope
     LCD_SERIAL.write(*data++);
     ^
Marlin\src\lcd\extui\dgus_reloaded\DGUSDisplay.cpp: In static member function 'static void DGUSDisplay::WriteString(uint16_t, const void*, uint8_t, bool, bool, bool)':
Marlin\src\lcd\extui\dgus_reloaded\DGUSDisplay.cpp:111:5: error: 'LCD_SERIAL' was not declared in this scope
     LCD_SERIAL.write(' ');
     ^
Marlin\src\lcd\extui\dgus_reloaded\DGUSDisplay.cpp:114:5: error: 'LCD_SERIAL' was not declared in this scope
     LCD_SERIAL.write(*data++);
     ^
compilation terminated due to -fmax-errors=5.
*** [.pio\build\teensy41\src\src\lcd\extui\dgus_reloaded\DGUSDisplay.cpp.o] Error 1</pre>
<br />
I don't know why the LCD_SERIAL error, is this because Platformio is not automatically downloading the required libraries, or is it because more than one library is being downloaded and trying to link against?<br />
<br />
<br />
And when compiling for the latest bugfix I get these:<br />
<br />
<pre class="bbcode">
In file included from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre-1-axes.h:44:0,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/Conditionals-1-axes.h:32,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre.h:27,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre-5-post.h:24,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre-6-type.h:24,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfig.h:28,
                 from buildroot/share/PlatformIO/scripts/common-dependencies.h:29:
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration.h:284:11: error: missing binary operator before token "("
 #if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration.h:988:11: error: missing binary operator before token "("
 #if EITHER(MORGAN_SCARA, MP_SCARA)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration.h:1787:11: error: missing binary operator before token "("
 #if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration.h:1991:11: error: missing binary operator before token "("
 #if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR)
           ^
In file included from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre-1-axes.h:44:0,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/Conditionals-1-axes.h:32,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre.h:27,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre-5-post.h:24,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre-6-type.h:24,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfig.h:28,
                 from buildroot/share/PlatformIO/scripts/common-dependencies.h:29:
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration.h:3039:11: error: missing binary operator before token "("
 #if EITHER(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration.h:3327:11: error: missing binary operator before token "("
 #if EITHER(RGB_LED, RGBW_LED)
           ^
In file included from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre-4-adv.h:33:0,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/Conditionals-4-adv.h:32,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre.h:30,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre-5-post.h:24,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre-6-type.h:24,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfig.h:28,
                 from buildroot/share/PlatformIO/scripts/common-dependencies.h:29:
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:303:11: error: missing binary operator before token "("
   #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:1086:11: error: missing binary operator before token "("
 #if EITHER(INPUT_SHAPING_X, INPUT_SHAPING_Y)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:1322:11: error: missing binary operator before token "("
 #if EITHER(DIGIPOT_MCP4018, DIGIPOT_MCP4451)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:1379:28: error: missing binary operator before token "("
 #if HAS_BED_PROBE &amp;&amp; EITHER(HAS_MARLINUI_MENU, HAS_TFT_LVGL_UI)
                            ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:1436:11: error: missing binary operator before token "("
 #if EITHER(HAS_DISPLAY, DWIN_LCD_PROUI)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:1500:26: error: missing binary operator before token "("
 #if HAS_DISPLAY &amp;&amp; EITHER(SDSUPPORT, SET_PROGRESS_MANUALLY)
                          ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:2148:11: error: missing binary operator before token "("
 #if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:2183:11: error: missing binary operator before token "("
 #if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:2191:9: error: missing binary operator before token "("
 #if BOTH(AUTO_BED_LEVELING_UBL, EEPROM_SETTINGS)
         ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:2305:11: error: missing binary operator before token "("
 #if EITHER(ARC_SUPPORT, BEZIER_CURVE_SUPPORT)
           ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:2393:9: error: missing binary operator before token "("
 #if BOTH(SDSUPPORT, DIRECT_STEPPING)
         ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:3173:13: error: missing binary operator before token "("
   #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING)
             ^
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration_adv.h:3335:11: error: missing binary operator before token "("
 #if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
           ^
UnicodeEncodeError: 'charmap' codec can't encode character '\u016f' in position 1650: character maps to :
  File "C:\Users\User\.platformio\penv\Lib\site-packages\platformio\builder\main.py", line 167:
    env.SConscript(env.GetExtraScripts("pre"), exports="env")
  File "C:\Users\User\.platformio\packages\tool-scons\scons-local-4.8.1\SCons\Script\SConscript.py", line 620:
    return _SConscript(self.fs, *files, **subst_kw)
  File "C:\Users\User\.platformio\packages\tool-scons\scons-local-4.8.1\SCons\Script\SConscript.py", line 280:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "F:\Documents\Projects\3D Printer Board\Marlin Firmware\Bugfix\Marlin-bugfix-2.1.x\buildroot\share\PlatformIO\scripts\preflight-checks.py", line 162:
    sanity_check_target()
  File "F:\Documents\Projects\3D Printer Board\Marlin Firmware\Bugfix\Marlin-bugfix-2.1.x\buildroot\share\PlatformIO\scripts\preflight-checks.py", line 82:
    file.write(modified_text)
  File "C:\Users\User\.platformio\python3\Lib\encodings\cp1252.py", line 19:
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]</pre>
<br />
<br />
I've attached my platformio.ini, Configuration.h, Configuration_adv.h and pins_TEENSY41.h which are all the files I believe I've changed thus far!<br />
<br />
Thank you kindly in advance for any help!]]></description>
            <dc:creator>jpff</dc:creator>
            <category>Firmware - Marlin</category>
            <pubDate>Mon, 10 Mar 2025 03:30:55 -0400</pubDate>
        </item>
    </channel>
</rss>
