Welcome! Log In Create A New Profile

Advanced

Marlin 2.0.X Bugfix Platformio error compilation

Posted by Dgils 
Marlin 2.0.X Bugfix Platformio error compilation
November 17, 2019 08:41AM
Hello all,

I tried to compile a marlin 2.0.x for an SKR 1.3 +TMC5160 V1.1 for a delta printer type kossel K800XL ...
I use visual studio code + pio platform

I suppose there is missing something somewhere... But I don't know what is missing and in wich file.
Could someone help me ?
I can provide You other files / informations if needed

Here is what I received as message :


CIompiling .pio\build\LPC1768\src\src\lcd\menu\menu_ubl.cpp.o
n file included from Marlin\src\lcd\menu\menu_sdcard.cpp:31:
Marlin\src\lcd\menu\menu_sdcard.cpp: In function 'void menu_sdcard()':
Marlin\src\lcd\menu\menu_sdcard.cpp:128:29: error: 'MSG_CARD_MENU' was not declared in this scope
C ompiling .pio\build\LPC1768\src\src\lcd\ultralcd.cpp.o
MENU_ITEM(sdfolder, MSG_CARD_MENU, card);
Compiling .pio\build\LPC1768\src\src\libs\L6470\L6470_Marlin.cpp.o
^~~~~~~~~~~~~
Marlin\src\lcd\menu\menu.h:316:88: note: in definition of macro '_MENU_ITEM_VARIANT_P'
draw_menu_item ## VARIANT ## _ ## TYPE(encoderLine == _thisItemNr, _lcdLineNr, PLABEL, ## __VA_ARGS__); \
^~~~~~
Marlin\src\lcd\menu\menu.h:346:103: note: in expansion of macro 'PSTR'
#define MENU_ITEM(TYPE, LABEL, ...) _MENU_ITEM_VARIANT_P(TYPE, , false, PSTR(LABEL), ## __VA_ARGS__)
^~~~
Marlin\src\lcd\menu\menu_sdcard.cpp:128:9: note: in expansion of macro 'MENU_ITEM'
MENU_ITEM(sdfolder, MSG_CARD_MENU, card);
^~~~~~~~~
Marlin\src\lcd\menu\menu_sdcard.cpp:128:29: note: suggested alternative: 'MSG_INFO_MENU'
MENU_ITEM(sdfolder, MSG_CARD_MENU, card);
^~~~~~~~~~~~~
Marlin\src\lcd\menu\menu.h:316:88: note: in definition of macro '_MENU_ITEM_VARIANT_P'
draw_menu_item ## VARIANT ## _ ## TYPE(encoderLine == _thisItemNr, _lcdLineNr, PLABEL, ## __VA_ARGS__); \
^~~~~~
Marlin\src\lcd\menu\menu.h:346:103: note: in expansion of macro 'PSTR'
#define MENU_ITEM(TYPE, LABEL, ...) _MENU_ITEM_VARIANT_P(TYPE, , false, PSTR(LABEL), ## __VA_ARGS__)
^~~~
Marlin\src\lcd\menu\menu_sdcard.cpp:128:9: note: in expansion of macro 'MENU_ITEM'
MENU_ITEM(sdfolder, MSG_CARD_MENU, card);
^~~~~~~~~
Marlin\src\lcd\menu\menu_sdcard.cpp:130:27: error: 'MSG_CARD_MENU' was not declared in this scope
MENU_ITEM(sdfile, MSG_CARD_MENU, card);
^~~~~~~~~~~~~
Marlin\src\lcd\menu\menu.h:316:88: note: in definition of macro '_MENU_ITEM_VARIANT_P'
draw_menu_item ## VARIANT ## _ ## TYPE(encoderLine == _thisItemNr, _lcdLineNr, PLABEL, ## __VA_ARGS__); \
^~~~~~
Marlin\src\lcd\menu\menu.h:346:103: note: in expansion of macro 'PSTR'
#define MENU_ITEM(TYPE, LABEL, ...) _MENU_ITEM_VARIANT_P(TYPE, , false, PSTR(LABEL), ## __VA_ARGS__)
^~~~
Marlin\src\lcd\menu\menu_sdcard.cpp:130:9: note: in expansion of macro 'MENU_ITEM'
MENU_ITEM(sdfile, MSG_CARD_MENU, card);
^~~~~~~~~
Marlin\src\lcd\menu\menu_sdcard.cpp:130:27: note: suggested alternative: 'MSG_INFO_MENU'
MENU_ITEM(sdfile, MSG_CARD_MENU, card);
^~~~~~~~~~~~~
Marlin\src\lcd\menu\menu.h:316:88: note: in definition of macro '_MENU_ITEM_VARIANT_P'
draw_menu_item ## VARIANT ## _ ## TYPE(encoderLine == _thisItemNr, _lcdLineNr, PLABEL, ## __VA_ARGS__); \
^~~~~~
Marlin\src\lcd\menu\menu.h:346:103: note: in expansion of macro 'PSTR'
#define MENU_ITEM(TYPE, LABEL, ...) _MENU_ITEM_VARIANT_P(TYPE, , false, PSTR(LABEL), ## __VA_ARGS__)
^~~~
Marlin\src\lcd\menu\menu_sdcard.cpp:130:9: note: in expansion of macro 'MENU_ITEM'
MENU_ITEM(sdfile, MSG_CARD_MENU, card);
^~~~~~~~~
*** [.pio\build\LPC1768\src\src\lcd\menu\menu_sdcard.cpp.o] Error 1











-----------------------------------------------------------------------------------------------------
PROBLEMS 4
{
"resource": "/c:/3dprinter/BIGTREETECH-SKR-V1.3-master/firmware/Marlin-bugfix-2.0.x/Marlin/src/lcd/menu/menu_sdcard.cpp",
"owner": "cpp",
"severity": 8,
"message": "'MSG_CARD_MENU' was not declared in this scope",
"startLineNumber": 130,
"startColumn": 27,
"endLineNumber": 130,
"endColumn": 27
}


----------------------------------------------------------------------------------------------------------
Here is part of the file menu_sdcard.ccp


if (ui.should_draw()) for (uint16_t i = 0; i < fileCnt; i++) {
if (_menuLineNr == _thisItemNr) {
const uint16_t nr =
#if ENABLED(SDCARD_RATHERRECENTFIRST) && DISABLED(SDCARD_SORT_ALPHA)
fileCnt - 1 -
#endif
i;

card.getfilename_sorted(nr);

if (card.flag.filenameIsDir)
MENU_ITEM(sdfolder, MSG_CARD_MENU, card);
else
MENU_ITEM(sdfile, MSG_CARD_MENU, card);
}
else {
MENU_ITEM_DUMMY();
}
}
Re: Marlin 2.0.X Bugfix Platformio error compilation
November 17, 2019 09:30AM
That is a language string...

Seem like that name changed from MSG_CARD_MENU to MSG_MEDIA_MENU

So update the code with the new name.

NB current marlin bugfix 2.0 does not reference MSG_CARD_MENU anywhere....
The change from card to media happened on Aug 14 2019, how old is your code?
[github.com]

Edited 1 time(s). Last edit at 11/17/2019 09:38AM by Dust.
Re: Marlin 2.0.X Bugfix Platformio error compilation
November 17, 2019 09:55AM
Seem to be worst, here is result:



Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: [docs.platformio.org]
PLATFORM: NXP Arduino LPC176x 0.0.2 > NXP LPC1768
HARDWARE: LPC1768 100MHz, 31.80KB RAM, 464KB Flash
DEBUG: Current (cmsis-dap) On-board (cmsis-dap) External (blackmagic, jlink)
PACKAGES: framework-arduino-lpc176x 0.1.3, toolchain-gccarmnoneeabi 1.80201.190214 (8.2.1)
Converting Marlin.ino
LDF: Library Dependency Finder -> [bit.ly]
LDF Modes: Finder ~ off, Compatibility ~ strict
Found 6 compatible libraries
Scanning dependencies...
Dependency Graph
|-- 1.0.0
|-- 1.0.0
|-- 0.4
|-- 0.5.2
|-- 1.2.4
|--

Unable to find destination disk (Autodetect Error)
Please select it in platformio.ini using the upload_port keyword (https://docs.platformio.org/en/latest/projectconf/section_env_upload.html) or copy the firmware (.pio/build/LPC1768/firmware.bin) manually to the appropriate disk

Linking .pio\build\LPC1768\firmware.elf
c:/users/systadmin/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: .pio/build/LPC1768/src/src/gcode/sdcard/M20.cpp.o: in function `GcodeSuite::M20()':
c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M20.cpp:33: multiple definition of `GcodeSuite::M20()'; .pio/build/LPC1768/src/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp.o:c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard\../parser.h:133: first defined here
c:/users/systadmin/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: .pio/build/LPC1768/src/src/gcode/sdcard/M21_M22.cpp.o: in function `GcodeSuite::M21()':
c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M21_M22.cpp:33: multiple definition of `GcodeSuite::M21()'; .pio/build/LPC1768/src/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp.o:c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard\../parser.h:102: first defined here
c:/users/systadmin/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: .pio/build/LPC1768/src/src/gcode/sdcard/M21_M22.cpp.o: in function `GcodeSuite::M22()':
c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M21_M22.cpp:38: multiple definition of `GcodeSuite::M22()'; .pio/build/LPC1768/src/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp.o:c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard\../parser.h:102: first defined here
c:/users/systadmin/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: .pio/build/LPC1768/src/src/gcode/sdcard/M23.cpp.o: in function `GcodeSuite::M23()':
c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M23.cpp:38: multiple definition of `GcodeSuite::M23()'; .pio/build/LPC1768/src/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp.o:c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard\../parser.h:102: first defined here
c:/users/systadmin/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: .pio/build/LPC1768/src/src/gcode/sdcard/M24_M25.cpp.o: in function `GcodeSuite::M24()':
c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M24_M25.cpp:44: multiple definition of `GcodeSuite::M24()'; .pio/build/LPC1768/src/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp.o:c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard\../parser.h:102: first defined here
c:/users/systadmin/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: .pio/build/LPC1768/src/src/gcode/sdcard/M24_M25.cpp.o: in function `GcodeSuite::M25()':
c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M24_M25.cpp:82: multiple definition of `GcodeSuite::M25()'; .pio/build/LPC1768/src/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp.o:c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M20-M30_M32-M34_M524_M928.cpp:121: first defined here
c:/users/systadmin/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: .pio/build/LPC1768/src/src/gcode/sdcard/M26.cpp.o: in function `GcodeSuite::M26()':
c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M26.cpp:33: multiple definition of `GcodeSuite::M26()'; .pio/build/LPC1768/src/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp.o:c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M20-M30_M32-M34_M524_M928.cpp:148: first defined here
c:/users/systadmin/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: .pio/build/LPC1768/src/src/gcode/sdcard/M27.cpp.o: in function `GcodeSuite::M27()':
c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M27.cpp:35: multiple definition of `GcodeSuite::M27()'; .pio/build/LPC1768/src/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp.o:c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M20-M30_M32-M34_M524_M928.cpp:158: first defined here
c:/users/systadmin/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: .pio/build/LPC1768/src/src/gcode/sdcard/M28_M29.cpp.o: in function `GcodeSuite::M28()':
c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M28_M29.cpp:61: multiple definition of `GcodeSuite::M28()'; .pio/build/LPC1768/src/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp.o:c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M20-M30_M32-M34_M524_M928.cpp:203: first defined here
c:/users/systadmin/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: .pio/build/LPC1768/src/src/gcode/sdcard/M28_M29.cpp.o: in function `GcodeSuite::M29()':
c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M28_M29.cpp:71: multiple definition of `GcodeSuite::M29()'; .pio/build/LPC1768/src/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp.o:c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M20-M30_M32-M34_M524_M928.cpp:213: first defined here
c:/users/systadmin/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: .pio/build/LPC1768/src/src/gcode/sdcard/M30.cpp.o: in function `GcodeSuite::M30()':
c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M30.cpp:33: multiple definition of `GcodeSuite::M30()'; .pio/build/LPC1768/src/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp.o:c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M20-M30_M32-M34_M524_M928.cpp:219: first defined here
c:/users/systadmin/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: .pio/build/LPC1768/src/src/gcode/sdcard/M32.cpp.o: in function `GCodeParser::has_value()':
c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M32.cpp:42: multiple definition of `GcodeSuite::M32()'; .pio/build/LPC1768/src/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp.o:c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M20-M30_M32-M34_M524_M928.cpp:236: first defined here
c:/users/systadmin/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: .pio/build/LPC1768/src/src/gcode/sdcard/M524.cpp.o: in function `GcodeSuite::M524()':
c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M524.cpp:35: multiple definition of `GcodeSuite::M524()'; .pio/build/LPC1768/src/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp.o:c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M20-M30_M32-M34_M524_M928.cpp:293: first defined here
c:/users/systadmin/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: .pio/build/LPC1768/src/src/gcode/sdcard/M928.cpp.o: in function `GcodeSuite::M928()':
c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M928.cpp:35: multiple definition of `GcodeSuite::M928()'; .pio/build/LPC1768/src/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp.o:c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\gcode\sdcard/M20-M30_M32-M34_M524_M928.cpp:300: first defined here
c:/users/systadmin/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: .pio/build/LPC1768/src/src/lcd/menu/menu_sdcard.cpp.o: in function `lcd_sd_updir()':
c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\lcd\menu/menu_sdcard.cpp:41: multiple definition of `lcd_sd_updir()'; .pio/build/LPC1768/src/src/lcd/menu/menu_media.cpp.o:c:\3dprinter\BIGTREETECH-SKR-V1.3-master\firmware\Marlin-bugfix-2.0.x/Marlin\src\lcd\menu/menu_media.cpp:41: first defined here
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\LPC1768\firmware.elf] Error 1
============================================================================ [ERROR] Took 10.04 seconds ============================================================================

==================================================================================== [SUMMARY] ====================================================================================
Environment megaatmega2560 [IGNORED]
Environment megaatmega1280 [IGNORED]
Environment at90usb1286_cdc [IGNORED]
Environment at90usb1286_dfu [IGNORED]
Environment DUE [IGNORED]
Environment DUE_USB [IGNORED]
Environment DUE_debug [IGNORED]
Environment LPC1768 [FAILED]
Environment LPC1769 [IGNORED]
Environment melzi [IGNORED]
Environment melzi_optiboot [IGNORED]
Environment rambo [IGNORED]
Environment sanguino_atmega644p [IGNORED]
Environment sanguino_atmega1284p [IGNORED]
Environment STM32F1 [IGNORED]
Environment fysetc_STM32F1 [IGNORED]
Environment BIGTREE_SKR_MINI [IGNORED]
Environment STM32F4 [IGNORED]
Environment STM32F7 [IGNORED]
Environment ARMED [IGNORED]
Environment alfawise_U20 [IGNORED]
Environment mks_robin [IGNORED]
Environment mks_robin_lite [IGNORED]
Environment mks_robin_mini [IGNORED]
Environment mks_robin_nano [IGNORED]
Environment jgaurora_a5s_a1 [IGNORED]
Environment black_stm32f407ve [IGNORED]
Environment BIGTREE_SKR_PRO [IGNORED]
Environment BIGTREE_BTT002 [IGNORED]
Environment teensy31 [IGNORED]
Environment teensy35 [IGNORED]
Environment malyanm200 [IGNORED]
Environment esp32 [IGNORED]
Environment fysetc_f6_13 [IGNORED]
Environment linux_native [IGNORED]
Environment adafruit_grandcentral_m4 [IGNORED]
====================================================================== 1 failed, 0 succeeded in 10.15 seconds ======================================================================
The terminal process terminated with exit code: 1
Re: Marlin 2.0.X Bugfix Platformio error compilation
November 17, 2019 08:07PM
delete the directory you put marlin in and start again...

It looks like you have extracted multiple version into one directory duplicating lots of code.
Re: Marlin 2.0.X Bugfix Platformio error compilation
November 17, 2019 08:25PM
ALso it looks like your trying to use the bigtree version of marlin

that is 4 months out of date. use the official marlin from [github.com]

There have been lots of bugs fixed since the bigtree version
Sorry, only registered users may post in this forum.

Click here to login