MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.28k stars 19.24k forks source link

[BUG] [2.0.x] Linker error: Visual Micro for Visual Studio #12613

Closed j54n1n closed 5 years ago

j54n1n commented 5 years ago

Description

I am working on the firmware for the PowerWASP 3D printer that uses an ATmega2560 on its mainboard. While using a slightly fixed version of the Arduino IDE plugin for Visual Studio I get a linker error of multiple definitions if I do not rename Marlin.cpp from within the src folder.

Steps to Reproduce

  1. Download and install Visual Studio Community 2017 for C++ development
  2. Install the bugfix version 1812.9 of the Visual Micro plugin
  3. Setup from within Visual Studio following options: a. Menu bar: Tools > Options > Visual Micro
    • Build In Project Intermediate: False
    • Build Uses Configuration: True b. Menu bar: vMicro > Compiler
    • Deep Search for Libraries: Unselected
    • Verbose: Selected
  4. Import Arduino Project (Marlin.ino) from the menu bar: File > Open > Arduino Project
  5. Build Solution "Marlin" (F7)

Expected behavior: That a fresh download of the Marlin-bugfix-2.0.x firmware compiles without renaming the Marlin.cpp file. With a renamed Marlin.cpp I get:

Linking it all together ...
# Coping cached core C:\Users\Julian\AppData\Local\Temp\VMBCore\arduino16x\161e5c2bdd7f9f17435e76bd8c26e3f2\core.a to C:\Users\Julian\AppData\Local\Temp\VMBuilds\Marlin\mega_atmega2560\Release\core.a

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections,--relax -mmcu=atmega2560 -o "C:\Users\Julian\AppData\Local\Temp\VMBuilds\Marlin\mega_atmega2560\Release/Marlin.ino.elf" "Marlin.cpp.o" "src\core\serial.cpp.o" "src\core\utility.cpp.o" "src\feature\baricuda.cpp.o" "src\feature\caselight.cpp.o" "src\feature\closedloop.cpp.o" "src\feature\controllerfan.cpp.o" "src\feature\emergency_parser.cpp.o" "src\feature\fanmux.cpp.o" "src\feature\filwidth.cpp.o" "src\feature\fwretract.cpp.o" "src\feature\I2CPositionEncoder.cpp.o" "src\feature\Max7219_Debug_LEDs.cpp.o" "src\feature\mixing.cpp.o" "src\feature\pause.cpp.o" "src\feature\power.cpp.o" "src\feature\power_loss_recovery.cpp.o" "src\feature\runout.cpp.o" "src\feature\snmm.cpp.o" "src\feature\solenoid.cpp.o" "src\feature\tmc_util.cpp.o" "src\feature\twibus.cpp.o" "src\feature\bedlevel\abl\abl.cpp.o" "src\feature\bedlevel\bedlevel.cpp.o" "src\feature\bedlevel\mbl\mesh_bed_leveling.cpp.o" "src\feature\bedlevel\ubl\ubl.cpp.o" "src\feature\bedlevel\ubl\ubl_G29.cpp.o" "src\feature\bedlevel\ubl\ubl_motion.cpp.o" "src\feature\dac\dac_dac084s085.cpp.o" "src\feature\dac\dac_mcp4728.cpp.o" "src\feature\dac\stepper_dac.cpp.o" "src\feature\digipot\digipot_mcp4018.cpp.o" "src\feature\digipot\digipot_mcp4451.cpp.o" "src\feature\leds\blinkm.cpp.o" "src\feature\leds\leds.cpp.o" "src\feature\leds\neopixel.cpp.o" "src\feature\leds\pca9632.cpp.o" "src\feature\leds\printer_event_leds.cpp.o" "src\feature\leds\tempstat.cpp.o" "src\gcode\bedlevel\abl\G29.cpp.o" "src\gcode\bedlevel\abl\M421.cpp.o" "src\gcode\bedlevel\G26.cpp.o" "src\gcode\bedlevel\G42.cpp.o" "src\gcode\bedlevel\M420.cpp.o" "src\gcode\bedlevel\mbl\G29.cpp.o" "src\gcode\bedlevel\mbl\M421.cpp.o" "src\gcode\bedlevel\ubl\G29.cpp.o" "src\gcode\bedlevel\ubl\M421.cpp.o" "src\gcode\bedlevel\ubl\M49.cpp.o" "src\gcode\calibrate\G28.cpp.o" "src\gcode\calibrate\G33.cpp.o" "src\gcode\calibrate\G34_M422.cpp.o" "src\gcode\calibrate\M100.cpp.o" "src\gcode\calibrate\M12.cpp.o" "src\gcode\calibrate\M48.cpp.o" "src\gcode\calibrate\M665.cpp.o" "src\gcode\calibrate\M666.cpp.o" "src\gcode\calibrate\M852.cpp.o" "src\gcode\config\M200-M205.cpp.o" "src\gcode\config\M217.cpp.o" "src\gcode\config\M218.cpp.o" "src\gcode\config\M220.cpp.o" "src\gcode\config\M221.cpp.o" "src\gcode\config\M281.cpp.o" "src\gcode\config\M301.cpp.o" "src\gcode\config\M302.cpp.o" "src\gcode\config\M304.cpp.o" "src\gcode\config\M43.cpp.o" "src\gcode\config\M540.cpp.o" "src\gcode\config\M92.cpp.o" "src\gcode\control\M108_M112_M410.cpp.o" "src\gcode\control\M111.cpp.o" "src\gcode\control\M120_M121.cpp.o" "src\gcode\control\M17_M18_M84.cpp.o" "src\gcode\control\M211.cpp.o" "src\gcode\control\M226.cpp.o" "src\gcode\control\M280.cpp.o" "src\gcode\control\M350_M351.cpp.o" "src\gcode\control\M380_M381.cpp.o" "src\gcode\control\M3-M5.cpp.o" "src\gcode\control\M400.cpp.o" "src\gcode\control\M42.cpp.o" "src\gcode\control\M605.cpp.o" "src\gcode\control\M80_M81.cpp.o" "src\gcode\control\M85.cpp.o" "src\gcode\control\M999.cpp.o" "src\gcode\control\T.cpp.o" "src\gcode\eeprom\M500-M504.cpp.o" "src\gcode\feature\advance\M900.cpp.o" "src\gcode\feature\baricuda\M126-M129.cpp.o" "src\gcode\feature\camera\M240.cpp.o" "src\gcode\feature\caselight\M355.cpp.o" "src\gcode\feature\clean\G12.cpp.o" "src\gcode\feature\digipot\M907-M910.cpp.o" "src\gcode\feature\filwidth\M404-M407.cpp.o" "src\gcode\feature\fwretract\G10_G11.cpp.o" "src\gcode\feature\fwretract\M207-M209.cpp.o" "src\gcode\feature\i2c\M260_M261.cpp.o" "src\gcode\feature\leds\M150.cpp.o" "src\gcode\feature\leds\M7219.cpp.o" "src\gcode\feature\macro\M810-M819.cpp.o" "src\gcode\feature\mixing\M163-M165.cpp.o" "src\gcode\feature\pause\G27.cpp.o" "src\gcode\feature\pause\M125.cpp.o" "src\gcode\feature\pause\M600.cpp.o" "src\gcode\feature\pause\M603.cpp.o" "src\gcode\feature\pause\M701_M702.cpp.o" "src\gcode\feature\powerloss\M1000.cpp.o" "src\gcode\feature\powerloss\M413.cpp.o" "src\gcode\feature\runout\M412.cpp.o" "src\gcode\feature\trinamic\M122.cpp.o" "src\gcode\feature\trinamic\M906.cpp.o" "src\gcode\feature\trinamic\M911-M915.cpp.o" "src\gcode\gcode.cpp.o" "src\gcode\parser.cpp.o" "src\gcode\queue.cpp.o" "src\gcode\geometry\G17-G19.cpp.o" "src\gcode\geometry\G53-G59.cpp.o" "src\gcode\geometry\G92.cpp.o" "src\gcode\geometry\M206_M428.cpp.o" "src\gcode\host\M110.cpp.o" "src\gcode\host\M113.cpp.o" "src\gcode\host\M114.cpp.o" "src\gcode\host\M115.cpp.o" "src\gcode\host\M118.cpp.o" "src\gcode\host\M119.cpp.o" "src\gcode\lcd\M0_M1.cpp.o" "src\gcode\lcd\M117.cpp.o" "src\gcode\lcd\M145.cpp.o" "src\gcode\lcd\M250.cpp.o" "src\gcode\lcd\M300.cpp.o" "src\gcode\lcd\M73.cpp.o" "src\gcode\motion\G0_G1.cpp.o" "src\gcode\motion\G2_G3.cpp.o" "src\gcode\motion\G4.cpp.o" "src\gcode\motion\G5.cpp.o" "src\gcode\motion\G80.cpp.o" "src\gcode\motion\M290.cpp.o" "src\gcode\probe\G30.cpp.o" "src\gcode\probe\G31_G32.cpp.o" "src\gcode\probe\G38.cpp.o" "src\gcode\probe\M401_M402.cpp.o" "src\gcode\probe\M851.cpp.o" "src\gcode\scara\M360-M364.cpp.o" "src\gcode\sdcard\M20-M30_M32-M34_M524_M928.cpp.o" "src\gcode\stats\M31.cpp.o" "src\gcode\stats\M75-M78.cpp.o" "src\gcode\temperature\M104_M109.cpp.o" "src\gcode\temperature\M105.cpp.o" "src\gcode\temperature\M106_M107.cpp.o" "src\gcode\temperature\M140_M190.cpp.o" "src\gcode\temperature\M155.cpp.o" "src\gcode\temperature\M303.cpp.o" "src\gcode\units\G20_G21.cpp.o" "src\gcode\units\M149.cpp.o" "src\gcode\units\M82_M83.cpp.o" "src\HAL\HAL_AVR\HAL.cpp.o" "src\HAL\HAL_AVR\HAL_spi_AVR.cpp.o" "src\HAL\HAL_AVR\MarlinSerial.cpp.o" "src\HAL\HAL_AVR\persistent_store_eeprom.cpp.o" "src\HAL\HAL_AVR\servo_AVR.cpp.o" "src\HAL\HAL_AVR\watchdog_AVR.cpp.o" "src\HAL\HAL_DUE\DebugMonitor_Due.cpp.o" "src\HAL\HAL_DUE\EepromEmulation_Due.cpp.o" "src\HAL\HAL_DUE\HAL.cpp.o" "src\HAL\HAL_DUE\HAL_spi_Due.cpp.o" "src\HAL\HAL_DUE\HAL_timers_Due.cpp.o" "src\HAL\HAL_DUE\InterruptVectors_Due.cpp.o" "src\HAL\HAL_DUE\MarlinSerial_Due.cpp.o" "src\HAL\HAL_DUE\MarlinSerialUSB_Due.cpp.o" "src\HAL\HAL_DUE\persistent_store_eeprom.cpp.o" "src\HAL\HAL_DUE\Servo_Due.cpp.o" "src\HAL\HAL_DUE\Tone.cpp.o" "src\HAL\HAL_DUE\u8g_com_HAL_DUE_shared_hw_spi.cpp.o" "src\HAL\HAL_DUE\u8g_com_HAL_DUE_st7920_sw_spi.cpp.o" "src\HAL\HAL_DUE\watchdog_Due.cpp.o" "src\HAL\HAL_DUE\usb\ctrl_access.c.o" "src\HAL\HAL_DUE\usb\sysclk.c.o" "src\HAL\HAL_DUE\usb\udc.c.o" "src\HAL\HAL_DUE\usb\udi_cdc.c.o" "src\HAL\HAL_DUE\usb\udi_cdc_desc.c.o" "src\HAL\HAL_DUE\usb\udi_composite_desc.c.o" "src\HAL\HAL_DUE\usb\udi_msc.c.o" "src\HAL\HAL_DUE\usb\uotghs_device_due.c.o" "src\HAL\HAL_DUE\usb\usb_task.c.o" "src\HAL\HAL_DUE\usb\sd_mmc_spi_mem.cpp.o" "src\HAL\HAL_ESP32\HAL.cpp.o" "src\HAL\HAL_ESP32\HAL_spi_ESP32.cpp.o" "src\HAL\HAL_ESP32\HAL_timers_ESP32.cpp.o" "src\HAL\HAL_ESP32\ota.cpp.o" "src\HAL\HAL_ESP32\watchdog_ESP32.cpp.o" "src\HAL\HAL_LPC1768\DebugMonitor_LPC1768.cpp.o" "src\HAL\HAL_LPC1768\HAL.cpp.o" "src\HAL\HAL_LPC1768\HAL_spi.cpp.o" "src\HAL\HAL_LPC1768\HAL_timers.cpp.o" "src\HAL\HAL_LPC1768\main.cpp.o" "src\HAL\HAL_LPC1768\MarlinSerial.cpp.o" "src\HAL\HAL_LPC1768\persistent_store_flash.cpp.o" "src\HAL\HAL_LPC1768\persistent_store_sdcard.cpp.o" "src\HAL\HAL_LPC1768\usb_serial.cpp.o" "src\HAL\HAL_LPC1768\watchdog.cpp.o" "src\HAL\HAL_LPC1768\include\digipot_mcp4451_I2C_routines.c.o" "src\HAL\HAL_LPC1768\u8g\HAL_LCD_I2C_routines.c.o" "src\HAL\HAL_LPC1768\u8g\HAL_LCD_pin_routines.c.o" "src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_hw_spi.cpp.o" "src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp.o" "src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_st7920_hw_spi.cpp.o" "src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_st7920_sw_spi.cpp.o" "src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_sw_spi.cpp.o" "src\HAL\HAL_STM32\fastio_STM32.cpp.o" "src\HAL\HAL_STM32\HAL.cpp.o" "src\HAL\HAL_STM32\HAL_Servo_STM32.cpp.o" "src\HAL\HAL_STM32\HAL_spi_STM32.cpp.o" "src\HAL\HAL_STM32\HAL_timers_STM32.cpp.o" "src\HAL\HAL_STM32\persistent_store_impl.cpp.o" "src\HAL\HAL_STM32\watchdog_STM32.cpp.o" "src\HAL\HAL_STM32F1\HAL.cpp.o" "src\HAL\HAL_STM32F1\HAL_Servo_Stm32f1.cpp.o" "src\HAL\HAL_STM32F1\HAL_spi_Stm32f1.cpp.o" "src\HAL\HAL_STM32F1\HAL_timers_Stm32f1.cpp.o" "src\HAL\HAL_STM32F1\persistent_store_flash.cpp.o" "src\HAL\HAL_STM32F1\persistent_store_sdcard.cpp.o" "src\HAL\HAL_STM32F1\watchdog_Stm32f1.cpp.o" "src\HAL\HAL_STM32F4\EEPROM_Emul\eeprom_emul.cpp.o" "src\HAL\HAL_STM32F4\EmulatedEeprom.cpp.o" "src\HAL\HAL_STM32F4\HAL.cpp.o" "src\HAL\HAL_STM32F4\HAL_Servo_STM32F4.cpp.o" "src\HAL\HAL_STM32F4\HAL_spi_STM32F4.cpp.o" "src\HAL\HAL_STM32F4\HAL_timers_STM32F4.cpp.o" "src\HAL\HAL_STM32F4\persistent_store_eeprom.cpp.o" "src\HAL\HAL_STM32F4\watchdog_STM32F4.cpp.o" "src\HAL\HAL_STM32F7\EEPROM_Emul\eeprom_emul.cpp.o" "src\HAL\HAL_STM32F7\EmulatedEeprom.cpp.o" "src\HAL\HAL_STM32F7\HAL.cpp.o" "src\HAL\HAL_STM32F7\HAL_Servo_STM32F7.cpp.o" "src\HAL\HAL_STM32F7\HAL_spi_STM32F7.cpp.o" "src\HAL\HAL_STM32F7\HAL_timers_STM32F7.cpp.o" "src\HAL\HAL_STM32F7\persistent_store_eeprom.cpp.o" "src\HAL\HAL_STM32F7\TMC2660.cpp.o" "src\HAL\HAL_STM32F7\watchdog_STM32F7.cpp.o" "src\HAL\HAL_TEENSY31_32\HAL.cpp.o" "src\HAL\HAL_TEENSY31_32\HAL_Servo_Teensy.cpp.o" "src\HAL\HAL_TEENSY31_32\HAL_spi_Teensy.cpp.o" "src\HAL\HAL_TEENSY31_32\HAL_timers_Teensy.cpp.o" "src\HAL\HAL_TEENSY31_32\persistent_store_impl.cpp.o" "src\HAL\HAL_TEENSY31_32\watchdog_Teensy.cpp.o" "src\HAL\HAL_TEENSY35_36\HAL.cpp.o" "src\HAL\HAL_TEENSY35_36\HAL_Servo_Teensy.cpp.o" "src\HAL\HAL_TEENSY35_36\HAL_spi_Teensy.cpp.o" "src\HAL\HAL_TEENSY35_36\HAL_timers_Teensy.cpp.o" "src\HAL\HAL_TEENSY35_36\persistent_store_eeprom.cpp.o" "src\HAL\HAL_TEENSY35_36\persistent_store_impl.cpp.o" "src\HAL\HAL_TEENSY35_36\watchdog_Teensy.cpp.o" "src\HAL\shared\backtrace\backtrace.cpp.o" "src\HAL\shared\backtrace\unwarm.cpp.o" "src\HAL\shared\backtrace\unwarm_arm.cpp.o" "src\HAL\shared\backtrace\unwarm_thumb.cpp.o" "src\HAL\shared\backtrace\unwarmbytab.cpp.o" "src\HAL\shared\backtrace\unwarmmem.cpp.o" "src\HAL\shared\backtrace\unwinder.cpp.o" "src\HAL\shared\backtrace\unwmemaccess.cpp.o" "src\HAL\shared\I2cEeprom.cpp.o" "src\HAL\shared\persistent_store_api.cpp.o" "src\HAL\shared\servo.cpp.o" "src\HAL\shared\SpiEeprom.cpp.o" "src\lcd\dogm\lcdprint_u8g.cpp.o" "src\lcd\dogm\status_screen_DOGM.cpp.o" "src\lcd\dogm\status_screen_lite_ST7920.cpp.o" "src\lcd\dogm\u8g_dev_ssd1306_sh1106_128x64_I2C.cpp.o" "src\lcd\dogm\u8g_dev_st7565_64128n_HAL.cpp.o" "src\lcd\dogm\u8g_dev_st7920_128x64_HAL.cpp.o" "src\lcd\dogm\u8g_dev_uc1701_mini12864_HAL.cpp.o" "src\lcd\dogm\u8g_fontutf8.cpp.o" "src\lcd\dogm\ultralcd_DOGM.cpp.o" "src\lcd\dogm\ultralcd_st7920_u8glib_rrd_AVR.cpp.o" "src\lcd\extensible_ui\lib\example.cpp.o" "src\lcd\extensible_ui\ui_api.cpp.o" "src\lcd\fontutils.cpp.o" "src\lcd\malyanlcd.cpp.o" "src\lcd\ultralcd.cpp.o" "src\lcd\HD44780\lcdprint_hd44780.cpp.o" "src\lcd\HD44780\ultralcd_HD44780.cpp.o" "src\lcd\menu\menu.cpp.o" "src\lcd\menu\menu_advanced.cpp.o" "src\lcd\menu\menu_bed_corners.cpp.o" "src\lcd\menu\menu_bed_leveling.cpp.o" "src\lcd\menu\menu_configuration.cpp.o" "src\lcd\menu\menu_custom.cpp.o" "src\lcd\menu\menu_delta_calibrate.cpp.o" "src\lcd\menu\menu_filament.cpp.o" "src\lcd\menu\menu_info.cpp.o" "src\lcd\menu\menu_job_recovery.cpp.o" "src\lcd\menu\menu_led.cpp.o" "src\lcd\menu\menu_main.cpp.o" "src\lcd\menu\menu_motion.cpp.o" "src\lcd\menu\menu_sdcard.cpp.o" "src\lcd\menu\menu_temperature.cpp.o" "src\lcd\menu\menu_tune.cpp.o" "src\lcd\menu\menu_ubl.cpp.o" "src\libs\buzzer.cpp.o" "src\libs\hex_print_routines.cpp.o" "src\libs\least_squares_fit.cpp.o" "src\libs\nozzle.cpp.o" "src\libs\stopwatch.cpp.o" "src\libs\vector_3.cpp.o" "src\MarlinCore.cpp.o" "src\module\configuration_store.cpp.o" "src\module\delta.cpp.o" "src\module\endstops.cpp.o" "src\module\motion.cpp.o" "src\module\planner.cpp.o" "src\module\planner_bezier.cpp.o" "src\module\printcounter.cpp.o" "src\module\probe.cpp.o" "src\module\scara.cpp.o" "src\module\servo.cpp.o" "src\module\stepper.cpp.o" "src\module\stepper_indirection.cpp.o" "src\module\temperature.cpp.o" "src\module\tool_change.cpp.o" "src\sd\cardreader.cpp.o" "src\sd\Sd2Card.cpp.o" "src\sd\SdBaseFile.cpp.o" "src\sd\SdFatUtil.cpp.o" "src\sd\SdFile.cpp.o" "src\sd\SdVolume.cpp.o" "src\sd\usb_flashdrive\lib\masstorage.cpp.o" "src\sd\usb_flashdrive\lib\message.cpp.o" "src\sd\usb_flashdrive\lib\parsetools.cpp.o" "src\sd\usb_flashdrive\lib\Usb.cpp.o" "src\sd\usb_flashdrive\Sd2Card_FlashDrive.cpp.o" "src\sd\usb_flashdrive\usb_host.cpp.o" "C:\Users\Julian\AppData\Local\Temp\VMBuilds\Marlin\mega_atmega2560\Release/core.a" "-LC:\Users\Julian\AppData\Local\Temp\VMBuilds\Marlin\mega_atmega2560\Release" -lm
## recipe.objcopy.eep.pattern
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\Users\Julian\AppData\Local\Temp\VMBuilds\Marlin\mega_atmega2560\Release/Marlin.ino.elf" "C:\Users\Julian\AppData\Local\Temp\VMBuilds\Marlin\mega_atmega2560\Release/Marlin.ino.eep"
## recipe.objcopy.hex.pattern
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-objcopy" -O ihex -R .eeprom "C:\Users\Julian\AppData\Local\Temp\VMBuilds\Marlin\mega_atmega2560\Release/Marlin.ino.elf" "C:\Users\Julian\AppData\Local\Temp\VMBuilds\Marlin\mega_atmega2560\Release/Marlin.ino.hex"

Program Marlin size: 52.164 bytes (used 21% of a 253.952 byte maximum) (72,78 secs)
Minimum Memory Usage: 2494 bytes (30% of a 8192 byte maximum)

Actual behavior: Current releases of Marlin-bugfix-2.0.x generate a linker error:

Linking it all together ...
# Coping cached core C:\Users\Julian\AppData\Local\Temp\VMBCore\arduino16x\161e5c2bdd7f9f17435e76bd8c26e3f2\core.a to C:\Users\Julian\AppData\Local\Temp\VMBuilds\Marlin\mega_atmega2560\Release\core.a

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections,--relax -mmcu=atmega2560 -o "C:\Users\Julian\AppData\Local\Temp\VMBuilds\Marlin\mega_atmega2560\Release/Marlin.ino.elf" "Marlin.cpp.o" "src\core\serial.cpp.o" "src\core\utility.cpp.o" "src\feature\baricuda.cpp.o" "src\feature\caselight.cpp.o" "src\feature\closedloop.cpp.o" "src\feature\controllerfan.cpp.o" "src\feature\emergency_parser.cpp.o" "src\feature\fanmux.cpp.o" "src\feature\filwidth.cpp.o" "src\feature\fwretract.cpp.o" "src\feature\I2CPositionEncoder.cpp.o" "src\feature\Max7219_Debug_LEDs.cpp.o" "src\feature\mixing.cpp.o" "src\feature\pause.cpp.o" "src\feature\power.cpp.o" "src\feature\power_loss_recovery.cpp.o" "src\feature\runout.cpp.o" "src\feature\snmm.cpp.o" "src\feature\solenoid.cpp.o" "src\feature\tmc_util.cpp.o" "src\feature\twibus.cpp.o" "src\feature\bedlevel\abl\abl.cpp.o" "src\feature\bedlevel\bedlevel.cpp.o" "src\feature\bedlevel\mbl\mesh_bed_leveling.cpp.o" "src\feature\bedlevel\ubl\ubl.cpp.o" "src\feature\bedlevel\ubl\ubl_G29.cpp.o" "src\feature\bedlevel\ubl\ubl_motion.cpp.o" "src\feature\dac\dac_dac084s085.cpp.o" "src\feature\dac\dac_mcp4728.cpp.o" "src\feature\dac\stepper_dac.cpp.o" "src\feature\digipot\digipot_mcp4018.cpp.o" "src\feature\digipot\digipot_mcp4451.cpp.o" "src\feature\leds\blinkm.cpp.o" "src\feature\leds\leds.cpp.o" "src\feature\leds\neopixel.cpp.o" "src\feature\leds\pca9632.cpp.o" "src\feature\leds\printer_event_leds.cpp.o" "src\feature\leds\tempstat.cpp.o" "src\gcode\bedlevel\abl\G29.cpp.o" "src\gcode\bedlevel\abl\M421.cpp.o" "src\gcode\bedlevel\G26.cpp.o" "src\gcode\bedlevel\G42.cpp.o" "src\gcode\bedlevel\M420.cpp.o" "src\gcode\bedlevel\mbl\G29.cpp.o" "src\gcode\bedlevel\mbl\M421.cpp.o" "src\gcode\bedlevel\ubl\G29.cpp.o" "src\gcode\bedlevel\ubl\M421.cpp.o" "src\gcode\bedlevel\ubl\M49.cpp.o" "src\gcode\calibrate\G28.cpp.o" "src\gcode\calibrate\G33.cpp.o" "src\gcode\calibrate\G34_M422.cpp.o" "src\gcode\calibrate\M100.cpp.o" "src\gcode\calibrate\M12.cpp.o" "src\gcode\calibrate\M48.cpp.o" "src\gcode\calibrate\M665.cpp.o" "src\gcode\calibrate\M666.cpp.o" "src\gcode\calibrate\M852.cpp.o" "src\gcode\config\M200-M205.cpp.o" "src\gcode\config\M217.cpp.o" "src\gcode\config\M218.cpp.o" "src\gcode\config\M220.cpp.o" "src\gcode\config\M221.cpp.o" "src\gcode\config\M281.cpp.o" "src\gcode\config\M301.cpp.o" "src\gcode\config\M302.cpp.o" "src\gcode\config\M304.cpp.o" "src\gcode\config\M43.cpp.o" "src\gcode\config\M540.cpp.o" "src\gcode\config\M92.cpp.o" "src\gcode\control\M108_M112_M410.cpp.o" "src\gcode\control\M111.cpp.o" "src\gcode\control\M120_M121.cpp.o" "src\gcode\control\M17_M18_M84.cpp.o" "src\gcode\control\M211.cpp.o" "src\gcode\control\M226.cpp.o" "src\gcode\control\M280.cpp.o" "src\gcode\control\M350_M351.cpp.o" "src\gcode\control\M380_M381.cpp.o" "src\gcode\control\M3-M5.cpp.o" "src\gcode\control\M400.cpp.o" "src\gcode\control\M42.cpp.o" "src\gcode\control\M605.cpp.o" "src\gcode\control\M80_M81.cpp.o" "src\gcode\control\M85.cpp.o" "src\gcode\control\M999.cpp.o" "src\gcode\control\T.cpp.o" "src\gcode\eeprom\M500-M504.cpp.o" "src\gcode\feature\advance\M900.cpp.o" "src\gcode\feature\baricuda\M126-M129.cpp.o" "src\gcode\feature\camera\M240.cpp.o" "src\gcode\feature\caselight\M355.cpp.o" "src\gcode\feature\clean\G12.cpp.o" "src\gcode\feature\digipot\M907-M910.cpp.o" "src\gcode\feature\filwidth\M404-M407.cpp.o" "src\gcode\feature\fwretract\G10_G11.cpp.o" "src\gcode\feature\fwretract\M207-M209.cpp.o" "src\gcode\feature\i2c\M260_M261.cpp.o" "src\gcode\feature\leds\M150.cpp.o" "src\gcode\feature\leds\M7219.cpp.o" "src\gcode\feature\macro\M810-M819.cpp.o" "src\gcode\feature\mixing\M163-M165.cpp.o" "src\gcode\feature\pause\G27.cpp.o" "src\gcode\feature\pause\M125.cpp.o" "src\gcode\feature\pause\M600.cpp.o" "src\gcode\feature\pause\M603.cpp.o" "src\gcode\feature\pause\M701_M702.cpp.o" "src\gcode\feature\powerloss\M1000.cpp.o" "src\gcode\feature\powerloss\M413.cpp.o" "src\gcode\feature\runout\M412.cpp.o" "src\gcode\feature\trinamic\M122.cpp.o" "src\gcode\feature\trinamic\M906.cpp.o" "src\gcode\feature\trinamic\M911-M915.cpp.o" "src\gcode\gcode.cpp.o" "src\gcode\parser.cpp.o" "src\gcode\queue.cpp.o" "src\gcode\geometry\G17-G19.cpp.o" "src\gcode\geometry\G53-G59.cpp.o" "src\gcode\geometry\G92.cpp.o" "src\gcode\geometry\M206_M428.cpp.o" "src\gcode\host\M110.cpp.o" "src\gcode\host\M113.cpp.o" "src\gcode\host\M114.cpp.o" "src\gcode\host\M115.cpp.o" "src\gcode\host\M118.cpp.o" "src\gcode\host\M119.cpp.o" "src\gcode\lcd\M0_M1.cpp.o" "src\gcode\lcd\M117.cpp.o" "src\gcode\lcd\M145.cpp.o" "src\gcode\lcd\M250.cpp.o" "src\gcode\lcd\M300.cpp.o" "src\gcode\lcd\M73.cpp.o" "src\gcode\motion\G0_G1.cpp.o" "src\gcode\motion\G2_G3.cpp.o" "src\gcode\motion\G4.cpp.o" "src\gcode\motion\G5.cpp.o" "src\gcode\motion\G80.cpp.o" "src\gcode\motion\M290.cpp.o" "src\gcode\probe\G30.cpp.o" "src\gcode\probe\G31_G32.cpp.o" "src\gcode\probe\G38.cpp.o" "src\gcode\probe\M401_M402.cpp.o" "src\gcode\probe\M851.cpp.o" "src\gcode\scara\M360-M364.cpp.o" "src\gcode\sdcard\M20-M30_M32-M34_M524_M928.cpp.o" "src\gcode\stats\M31.cpp.o" "src\gcode\stats\M75-M78.cpp.o" "src\gcode\temperature\M104_M109.cpp.o" "src\gcode\temperature\M105.cpp.o" "src\gcode\temperature\M106_M107.cpp.o" "src\gcode\temperature\M140_M190.cpp.o" "src\gcode\temperature\M155.cpp.o" "src\gcode\temperature\M303.cpp.o" "src\gcode\units\G20_G21.cpp.o" "src\gcode\units\M149.cpp.o" "src\gcode\units\M82_M83.cpp.o" "src\HAL\HAL_AVR\HAL.cpp.o" "src\HAL\HAL_AVR\HAL_spi_AVR.cpp.o" "src\HAL\HAL_AVR\MarlinSerial.cpp.o" "src\HAL\HAL_AVR\persistent_store_eeprom.cpp.o" "src\HAL\HAL_AVR\servo_AVR.cpp.o" "src\HAL\HAL_AVR\watchdog_AVR.cpp.o" "src\HAL\HAL_DUE\DebugMonitor_Due.cpp.o" "src\HAL\HAL_DUE\EepromEmulation_Due.cpp.o" "src\HAL\HAL_DUE\HAL.cpp.o" "src\HAL\HAL_DUE\HAL_spi_Due.cpp.o" "src\HAL\HAL_DUE\HAL_timers_Due.cpp.o" "src\HAL\HAL_DUE\InterruptVectors_Due.cpp.o" "src\HAL\HAL_DUE\MarlinSerial_Due.cpp.o" "src\HAL\HAL_DUE\MarlinSerialUSB_Due.cpp.o" "src\HAL\HAL_DUE\persistent_store_eeprom.cpp.o" "src\HAL\HAL_DUE\Servo_Due.cpp.o" "src\HAL\HAL_DUE\Tone.cpp.o" "src\HAL\HAL_DUE\u8g_com_HAL_DUE_shared_hw_spi.cpp.o" "src\HAL\HAL_DUE\u8g_com_HAL_DUE_st7920_sw_spi.cpp.o" "src\HAL\HAL_DUE\watchdog_Due.cpp.o" "src\HAL\HAL_DUE\usb\ctrl_access.c.o" "src\HAL\HAL_DUE\usb\sysclk.c.o" "src\HAL\HAL_DUE\usb\udc.c.o" "src\HAL\HAL_DUE\usb\udi_cdc.c.o" "src\HAL\HAL_DUE\usb\udi_cdc_desc.c.o" "src\HAL\HAL_DUE\usb\udi_composite_desc.c.o" "src\HAL\HAL_DUE\usb\udi_msc.c.o" "src\HAL\HAL_DUE\usb\uotghs_device_due.c.o" "src\HAL\HAL_DUE\usb\usb_task.c.o" "src\HAL\HAL_DUE\usb\sd_mmc_spi_mem.cpp.o" "src\HAL\HAL_ESP32\HAL.cpp.o" "src\HAL\HAL_ESP32\HAL_spi_ESP32.cpp.o" "src\HAL\HAL_ESP32\HAL_timers_ESP32.cpp.o" "src\HAL\HAL_ESP32\ota.cpp.o" "src\HAL\HAL_ESP32\watchdog_ESP32.cpp.o" "src\HAL\HAL_LPC1768\DebugMonitor_LPC1768.cpp.o" "src\HAL\HAL_LPC1768\HAL.cpp.o" "src\HAL\HAL_LPC1768\HAL_spi.cpp.o" "src\HAL\HAL_LPC1768\HAL_timers.cpp.o" "src\HAL\HAL_LPC1768\main.cpp.o" "src\HAL\HAL_LPC1768\MarlinSerial.cpp.o" "src\HAL\HAL_LPC1768\persistent_store_flash.cpp.o" "src\HAL\HAL_LPC1768\persistent_store_sdcard.cpp.o" "src\HAL\HAL_LPC1768\usb_serial.cpp.o" "src\HAL\HAL_LPC1768\watchdog.cpp.o" "src\HAL\HAL_LPC1768\include\digipot_mcp4451_I2C_routines.c.o" "src\HAL\HAL_LPC1768\u8g\HAL_LCD_I2C_routines.c.o" "src\HAL\HAL_LPC1768\u8g\HAL_LCD_pin_routines.c.o" "src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_hw_spi.cpp.o" "src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp.o" "src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_st7920_hw_spi.cpp.o" "src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_st7920_sw_spi.cpp.o" "src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_sw_spi.cpp.o" "src\HAL\HAL_STM32\fastio_STM32.cpp.o" "src\HAL\HAL_STM32\HAL.cpp.o" "src\HAL\HAL_STM32\HAL_Servo_STM32.cpp.o" "src\HAL\HAL_STM32\HAL_spi_STM32.cpp.o" "src\HAL\HAL_STM32\HAL_timers_STM32.cpp.o" "src\HAL\HAL_STM32\persistent_store_impl.cpp.o" "src\HAL\HAL_STM32\watchdog_STM32.cpp.o" "src\HAL\HAL_STM32F1\HAL.cpp.o" "src\HAL\HAL_STM32F1\HAL_Servo_Stm32f1.cpp.o" "src\HAL\HAL_STM32F1\HAL_spi_Stm32f1.cpp.o" "src\HAL\HAL_STM32F1\HAL_timers_Stm32f1.cpp.o" "src\HAL\HAL_STM32F1\persistent_store_flash.cpp.o" "src\HAL\HAL_STM32F1\persistent_store_sdcard.cpp.o" "src\HAL\HAL_STM32F1\watchdog_Stm32f1.cpp.o" "src\HAL\HAL_STM32F4\EEPROM_Emul\eeprom_emul.cpp.o" "src\HAL\HAL_STM32F4\EmulatedEeprom.cpp.o" "src\HAL\HAL_STM32F4\HAL.cpp.o" "src\HAL\HAL_STM32F4\HAL_Servo_STM32F4.cpp.o" "src\HAL\HAL_STM32F4\HAL_spi_STM32F4.cpp.o" "src\HAL\HAL_STM32F4\HAL_timers_STM32F4.cpp.o" "src\HAL\HAL_STM32F4\persistent_store_eeprom.cpp.o" "src\HAL\HAL_STM32F4\watchdog_STM32F4.cpp.o" "src\HAL\HAL_STM32F7\EEPROM_Emul\eeprom_emul.cpp.o" "src\HAL\HAL_STM32F7\EmulatedEeprom.cpp.o" "src\HAL\HAL_STM32F7\HAL.cpp.o" "src\HAL\HAL_STM32F7\HAL_Servo_STM32F7.cpp.o" "src\HAL\HAL_STM32F7\HAL_spi_STM32F7.cpp.o" "src\HAL\HAL_STM32F7\HAL_timers_STM32F7.cpp.o" "src\HAL\HAL_STM32F7\persistent_store_eeprom.cpp.o" "src\HAL\HAL_STM32F7\TMC2660.cpp.o" "src\HAL\HAL_STM32F7\watchdog_STM32F7.cpp.o" "src\HAL\HAL_TEENSY31_32\HAL.cpp.o" "src\HAL\HAL_TEENSY31_32\HAL_Servo_Teensy.cpp.o" "src\HAL\HAL_TEENSY31_32\HAL_spi_Teensy.cpp.o" "src\HAL\HAL_TEENSY31_32\HAL_timers_Teensy.cpp.o" "src\HAL\HAL_TEENSY31_32\persistent_store_impl.cpp.o" "src\HAL\HAL_TEENSY31_32\watchdog_Teensy.cpp.o" "src\HAL\HAL_TEENSY35_36\HAL.cpp.o" "src\HAL\HAL_TEENSY35_36\HAL_Servo_Teensy.cpp.o" "src\HAL\HAL_TEENSY35_36\HAL_spi_Teensy.cpp.o" "src\HAL\HAL_TEENSY35_36\HAL_timers_Teensy.cpp.o" "src\HAL\HAL_TEENSY35_36\persistent_store_eeprom.cpp.o" "src\HAL\HAL_TEENSY35_36\persistent_store_impl.cpp.o" "src\HAL\HAL_TEENSY35_36\watchdog_Teensy.cpp.o" "src\HAL\shared\backtrace\backtrace.cpp.o" "src\HAL\shared\backtrace\unwarm.cpp.o" "src\HAL\shared\backtrace\unwarm_arm.cpp.o" "src\HAL\shared\backtrace\unwarm_thumb.cpp.o" "src\HAL\shared\backtrace\unwarmbytab.cpp.o" "src\HAL\shared\backtrace\unwarmmem.cpp.o" "src\HAL\shared\backtrace\unwinder.cpp.o" "src\HAL\shared\backtrace\unwmemaccess.cpp.o" "src\HAL\shared\I2cEeprom.cpp.o" "src\HAL\shared\persistent_store_api.cpp.o" "src\HAL\shared\servo.cpp.o" "src\HAL\shared\SpiEeprom.cpp.o" "src\lcd\dogm\lcdprint_u8g.cpp.o" "src\lcd\dogm\status_screen_DOGM.cpp.o" "src\lcd\dogm\status_screen_lite_ST7920.cpp.o" "src\lcd\dogm\u8g_dev_ssd1306_sh1106_128x64_I2C.cpp.o" "src\lcd\dogm\u8g_dev_st7565_64128n_HAL.cpp.o" "src\lcd\dogm\u8g_dev_st7920_128x64_HAL.cpp.o" "src\lcd\dogm\u8g_dev_uc1701_mini12864_HAL.cpp.o" "src\lcd\dogm\u8g_fontutf8.cpp.o" "src\lcd\dogm\ultralcd_DOGM.cpp.o" "src\lcd\dogm\ultralcd_st7920_u8glib_rrd_AVR.cpp.o" "src\lcd\extensible_ui\lib\example.cpp.o" "src\lcd\extensible_ui\ui_api.cpp.o" "src\lcd\fontutils.cpp.o" "src\lcd\malyanlcd.cpp.o" "src\lcd\ultralcd.cpp.o" "src\lcd\HD44780\lcdprint_hd44780.cpp.o" "src\lcd\HD44780\ultralcd_HD44780.cpp.o" "src\lcd\menu\menu.cpp.o" "src\lcd\menu\menu_advanced.cpp.o" "src\lcd\menu\menu_bed_corners.cpp.o" "src\lcd\menu\menu_bed_leveling.cpp.o" "src\lcd\menu\menu_configuration.cpp.o" "src\lcd\menu\menu_custom.cpp.o" "src\lcd\menu\menu_delta_calibrate.cpp.o" "src\lcd\menu\menu_filament.cpp.o" "src\lcd\menu\menu_info.cpp.o" "src\lcd\menu\menu_job_recovery.cpp.o" "src\lcd\menu\menu_led.cpp.o" "src\lcd\menu\menu_main.cpp.o" "src\lcd\menu\menu_motion.cpp.o" "src\lcd\menu\menu_sdcard.cpp.o" "src\lcd\menu\menu_temperature.cpp.o" "src\lcd\menu\menu_tune.cpp.o" "src\lcd\menu\menu_ubl.cpp.o" "src\libs\buzzer.cpp.o" "src\libs\hex_print_routines.cpp.o" "src\libs\least_squares_fit.cpp.o" "src\libs\nozzle.cpp.o" "src\libs\stopwatch.cpp.o" "src\libs\vector_3.cpp.o" "src\module\configuration_store.cpp.o" "src\module\delta.cpp.o" "src\module\endstops.cpp.o" "src\module\motion.cpp.o" "src\module\planner.cpp.o" "src\module\planner_bezier.cpp.o" "src\module\printcounter.cpp.o" "src\module\probe.cpp.o" "src\module\scara.cpp.o" "src\module\servo.cpp.o" "src\module\stepper.cpp.o" "src\module\stepper_indirection.cpp.o" "src\module\temperature.cpp.o" "src\module\tool_change.cpp.o" "src\sd\cardreader.cpp.o" "src\sd\Sd2Card.cpp.o" "src\sd\SdBaseFile.cpp.o" "src\sd\SdFatUtil.cpp.o" "src\sd\SdFile.cpp.o" "src\sd\SdVolume.cpp.o" "src\sd\usb_flashdrive\lib\masstorage.cpp.o" "src\sd\usb_flashdrive\lib\message.cpp.o" "src\sd\usb_flashdrive\lib\parsetools.cpp.o" "src\sd\usb_flashdrive\lib\Usb.cpp.o" "src\sd\usb_flashdrive\Sd2Card_FlashDrive.cpp.o" "src\sd\usb_flashdrive\usb_host.cpp.o" "SD\File.cpp.o" "SD\SD.cpp.o" "SD\utility\Sd2Card.cpp.o" "SD\utility\SdFile.cpp.o" "SD\utility\SdVolume.cpp.o" "SPI\SPI.cpp.o" "C:\Users\Julian\AppData\Local\Temp\VMBuilds\Marlin\mega_atmega2560\Release/core.a" "-LC:\Users\Julian\AppData\Local\Temp\VMBuilds\Marlin\mega_atmega2560\Release" -lm

Error linking for board Arduino/Genuino Mega w/ ATmega2560 (Mega 2560)
Build failed for project 'Marlin'

HardwareSerial0.cpp.o (symbol from plugin)*: In function Serial
(.text+0x0)*: multiple definition of __vector_25
MarlinSerial.cpp.o (symbol from plugin)*: (.text+0x0): first defined here
ld.exe: Disabling relaxation: it will not work with multiple definitions

HardwareSerial0.cpp.o (symbol from plugin)*: In function Serial
(.text+0x0)*: multiple definition of __vector_26
MarlinSerial.cpp.o (symbol from plugin)*: (.text+0x0): first defined here

ccAhxb2J.ltrans0.ltrans.o*: In function Temperature::_temp_error(signed char, char const*, char const*)
temperature.cpp:564: undefined reference to Running
temperature.cpp:572: undefined reference to Running
temperature.cpp:574: undefined reference to kill(char const*)

ccAhxb2J.ltrans2.ltrans.o*: In function main
main.cpp:43: undefined reference to setup
main.cpp:46: undefined reference to loop

collect2.exe*: error: ld returned 1 exit status

Additional Information

Could this change be included in the Marlin-bugfix-2.0.x repository?

thinkyhead commented 5 years ago

I'd rather not rename this file, if it can be avoided. It would be better to rename the Marlin.ino file instead. Or, we can simply continue to not support Visual Studio Community 2017 and simply keep supporting PlatformIO (Atom or Visual Studio Code) and Arduino IDE.

j54n1n commented 5 years ago

But is this Marlin.cpp not the successor of the Marlin_main.cpp from the bugfix-1.1.x branch? Is the new build system with PlatformIO so much different that it does not allow a rename of this file?

just-jason commented 5 years ago

Moving away from the PlatformIO (Atom or Visual Studio Code) and Arduino IDE is a very big step, and it is not necesary at all. By making a small name change the idea is only to increase the compatibility across other platforms. I think that Atom (which also runs on Visual Studio as a plug-in) is a great platform, and up till a few days ago I had never tried out the Visual Micro plug-in, but I too am very impressd at the time saving when compiling with Visual Micro. Either way, this is not about choosing between ONLY one platform, but instead, with a tiny change FromMarin.ccp to MarlinXYZ.ccp, we can all now enjoy the use of ALL platforms. That has to be a plus, don't you think ?

GMagician commented 5 years ago

Or, we can simply continue to not support Visual Studio Community 2017

that's not true. I'm still using and compiling with Visual studio community edition for AVR system , using platform

boelle commented 5 years ago

@j54n1n problem solved?

j54n1n commented 5 years ago

@j54n1n problem solved?

Not really. I asked also in the Visual Micro forum (see: https://www.visualmicro.com/forums/YaBB.pl?num=1545386155/0#1) but it seems it is one of the expected results of VMicro. Basically with the .cpp file named in the same way as the .ino you can hide the cpp file for compilation.

With the latest versions of Arduino IDE 1.8.8 and the Visual Micro plugin 1902.17 you can get it to compile if you do one of the following changes:

or

Note: I used full paths here to make not to much confusion about which part has to be renamed.

@thinkyhead suggested once to rename the Marlin.ino file. If he is happy with that, we could try to find a better name instead of Marlinfw. I am open for suggestions.

boelle commented 5 years ago

Not VMicro but vs code and platform io extension

Or arduino Ide 1.9

j54n1n commented 5 years ago

Ah ok, but in this issue we never talked about VS code and/or PlatformIO. @thinkyhead only mentioned them that he wants to support them instead of VMicro.

Since I am not using them I can give you no hints. Maybe you should try to open a new issue if you found some problem!?

boelle commented 5 years ago

Reason I asked was to find issues that where fixed but not closed. There where many.

But for this one I think we need @thinkyhead to have a look again

j54n1n commented 5 years ago

Reason I asked was to find issues that where fixed but not closed. There where many.

But for this one I think we need @thinkyhead to have a look again

Yes, I agree

InsanityAutomation commented 5 years ago

We should modify the readme actually, 1.8.7 and newer is fine, no need to use the 1.9.0 beta anymore on the arduino ide.

thinkyhead commented 5 years ago

Is there a project file for VisualMicro that can be saved in a location relative-to (above) the source files, such that the project file contains the path to the source files?

j54n1n commented 5 years ago

Is there a project file for VisualMicro that can be saved in a location relative-to (above) the source files, such that the project file contains the path to the source files?

Do you mean something like a makefile?

VMicro does generate a Visual Studio solution file but to get there you first have to open it within Visual Studio by File -> Open -> Arduino Project which then invokes the VM plugin. At that stage the plugin does first a deep search of the entire Arduino "Marlin" sketch. But the scan fails if you do not rename either Marlin.cpp or the Marlin.ino sketch.

The last time I looked at this issue in December the scanning part was successful but I would get a linker error because the Marlin.cpp would get hidden as it is intended by plugin (see: https://www.visualmicro.com/forums/YaBB.pl?num=1545386155/0#1). Now with the most recent version of VMicro the sketch can not be imported anymore because due the Marlin.cpp/Marlin.ino pair it thinks to find the wrong include paths for the SD library.

As mentioned before the VMicro does not expect that there exist a .cpp file with the same name as the .ino file. Till now as a workaround you have to rename one of the files.

Anyhow the folder structure is like this if I go for the Marlinfw.ino workaround:

I highlighted the added files from the VMicro plugin and you can find them as an attachment Marlinfw.zip

Edit: In the .vcxproj and the .vcxproj.filters file you can find a reference to: <ClCompile Include="src\Marlin.cpp" />

GMagician commented 5 years ago

Just to know, I don't use your plugin but I use visual studio and I compile for mega2560 via platformIO. I'm wondering why are you using such pluging instead of VS without it? Which benefit do you have with it?

N.B: In my case platformio generated a native visual studio project, using a plugin I'm able to see the whole project in a tree structure (folder -> subfolder - > file) and manage such project

j54n1n commented 5 years ago

Just to know, I don't use your plugin but I use visual studio and I compile for mega2560 via platformIO. I'm wondering why are you using such pluging instead of VS without it? Which benefit do you have with it?

N.B: In my case platformio generated a native visual studio project, using a plugin I'm able to see the whole project in a tree structure (folder -> subfolder - > file) and manage such project

I think the main difference between the two options is that PlatformIO uses Visual Studio Code. VMicro is instead a plugin for the native Visual Studio (not VS Code) with the avr-gcc from Arduino IDE.

I used this plugin for other projects, and also for Marlin 1.1.x, but with the new 2.0.x branch and the changed files/folder layout it causes the above mentioned problem.

One of the main features of VMicro is faster build times. With multicore build I can get down to 48 seconds on my laptop for the first build, and from the second build onwards I can get down to 4 seconds for the 2.0.x branch. Has PlatformIO similar build times?

GMagician commented 5 years ago

I think the main difference between the two options is that PlatformIO uses Visual Studio Code. VMicro is instead a plugin for the native Visual Studio (not VS Code) with the avr-gcc from Arduino IDE.

that's wrong...I'm using VS2017 community edition, not vs code

One of the main features of VMicro is faster build times.

that may a good reason.

boelle commented 5 years ago

Lack of Activity This issue is being closed due to lack of activity. If you have solved the issue, please let us know how you solved it. If you haven't, please tell us what else you've tried in the meantime, and possibly this issue will be reopened.

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.