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.19k stars 19.21k forks source link

Marlin 2.0.5.3 compilation error, SKR Pro board #18288

Closed hackebike closed 4 years ago

hackebike commented 4 years ago

Compiling Marlin 2.0.5.3 with my custom configuration files for dual extruder This is for a SKR Pro v1.1 dual extruder, with TMC2209 and sensorless homing/probing enabled.

Here is the error during compilation with VS Code:

configs.zip

Compiling .pio/build/BIGTREE_SKR_PRO/FrameworkArduino/stm32/usb/usb_device_ctlreq.c.o /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10601.190716/cores/arduino/stm32/usb/cdc/usbd_cdc.c: In function 'USBD_CDC_DataIn': /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10601.190716/cores/arduino/stm32/usb/cdc/usbd_cdc.c:650:3: error: unknown type name 'PCD_HandleTypeDef'; did you mean 'USBD_HandleTypeDef'? PCD_HandleTypeDef *hpcd = pdev->pData; ^~~~~~~~~~~~~~~~~ USBD_HandleTypeDef /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10601.190716/cores/arduino/stm32/usb/cdc/usbd_cdc.c:654:65: error: request for member 'IN_ep' in something not a structure or union if ((hcdc->TxLastLength > 0U) && ((hcdc->TxLastLength % hpcd->IN_ep[epnum].maxpacket) == 0U)) {

ellensp commented 4 years ago

Need top part of log that shows what versions of frameworks and libraries your using.

hackebike commented 4 years ago

sorry, here is the complete log: `> Executing task in folder Marlin-2.0.5.3: platformio run <

Processing BIGTREE_SKR_PRO (platform: ststm32; board: BigTree_SKR_Pro; framework: arduino)

Verbose mode can be enabled via -v, --verbose option CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/BigTree_SKR_Pro.html PLATFORM: ST STM32 5.6.0 > STM32F407ZG (192k RAM. 1024k Flash) HARDWARE: STM32F407ZGT6 168MHz, 192KB RAM, 1MB Flash DEBUG: Current (stlink) External (jlink, stlink) PACKAGES:

Environment Status Duration


mega2560 IGNORED mega1280 IGNORED rambo IGNORED FYSETC_F6_13 IGNORED FYSETC_F6_14 IGNORED sanguino644p IGNORED sanguino1284p IGNORED melzi IGNORED melzi_optiboot IGNORED at90usb1286_cdc IGNORED at90usb1286_dfu IGNORED DUE IGNORED DUE_USB IGNORED DUE_debug IGNORED LPC1768 IGNORED LPC1769 IGNORED STM32F103RC IGNORED STM32F103RC_fysetc IGNORED STM32F103RC_btt IGNORED STM32F103RC_btt_USB IGNORED STM32F103RC_btt_512K IGNORED STM32F103RC_btt_512K_USB IGNORED STM32F103RE IGNORED STM32F103RE_btt IGNORED STM32F103RE_btt_USB IGNORED STM32F4 IGNORED STM32F7 IGNORED ARMED IGNORED STM32F103VE_GTM32 IGNORED STM32F103VE_longer IGNORED mks_robin_mini IGNORED mks_robin_nano IGNORED mks_robin IGNORED mks_robin_pro IGNORED mks_robin_lite IGNORED mks_robin_lite3 IGNORED jgaurora_a5s_a1 IGNORED STM32F103CB_malyan IGNORED chitu_f103 IGNORED STM32F401VE_STEVAL IGNORED FLYF407ZG IGNORED FYSETC_S6 IGNORED STM32F407VE_black IGNORED BIGTREE_SKR_PRO FAILED 00:00:14.577 BIGTREE_GTR_V1_0 IGNORED BIGTREE_BTT002 IGNORED teensy31 IGNORED teensy35 IGNORED esp32 IGNORED linux_native IGNORED SAMD51_grandcentral_m4 IGNORED rumba32_f446ve IGNORED rumba32_mks IGNORED include_tree IGNORED ===================================================================================== 1 failed, 0 succeeded in 00:00:14.577 ===================================================================================== The terminal process terminated with exit code: 1`

ellensp commented 4 years ago

your PLATFORM: ST STM32 5.6.0 is old ST STM32 6.1.0 works. Update everything. Hit the platformio Home button along the bottom. click on Platforms and update everything red

hackebike commented 4 years ago

ok, I did the update on VS Code, getting a new error:

`> Executing task: platformio run <

Processing BIGTREE_SKR_PRO (platform: ststm32; board: BigTree_SKR_Pro; framework: arduino)

Verbose mode can be enabled via -v, --verbose option CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/BigTree_SKR_Pro.html PLATFORM: ST STM32 6.1.0 > STM32F407ZG (192k RAM. 1024k Flash) HARDWARE: STM32F407ZGT6 168MHz, 192KB RAM, 1MB Flash DEBUG: Current (stlink) External (jlink, stlink) PACKAGES:









Compiling .pio/build/BIGTREE_SKR_PRO/FrameworkArduino/pins_arduino.c.o 46 | #include "stm32f4xx_hal_conf.h" | ^~~~~~ compilation terminated. In file included from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/system/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:250, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/stm32/stm32_def.h:16, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/stm32/interrupt.h:43, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/board.h:7, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/board.c:1: /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:46:10: fatal error: stm32f4xx_hal_conf.h: No such file or directory


Compiling .pio/build/BIGTREE_SKR_PRO/FrameworkArduino/stm32/HAL/stm32yyxx_hal.c.o 46 | #include "stm32f4xx_hal_conf.h" | ^~~~~~ compilation terminated. In file included from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/system/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:250, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/stm32/stm32_def.h:16, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/stm32/clock.h:43, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/wiring_time.h:23, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/wiring.h:38, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/Arduino.h:32, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/WInterrupts.cpp:20: /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:46:10: fatal error: stm32f4xx_hal_conf.h: No such file or directory


























Environment Status Duration


mega2560 IGNORED mega1280 IGNORED rambo IGNORED FYSETC_F6_13 IGNORED FYSETC_F6_14 IGNORED sanguino644p IGNORED sanguino1284p IGNORED melzi IGNORED melzi_optiboot IGNORED at90usb1286_cdc IGNORED at90usb1286_dfu IGNORED DUE IGNORED DUE_USB IGNORED DUE_debug IGNORED LPC1768 IGNORED LPC1769 IGNORED STM32F103RC IGNORED STM32F103RC_fysetc IGNORED STM32F103RC_btt IGNORED STM32F103RC_btt_USB IGNORED STM32F103RC_btt_512K IGNORED STM32F103RC_btt_512K_USB IGNORED STM32F103RE IGNORED STM32F103RE_btt IGNORED STM32F103RE_btt_USB IGNORED STM32F4 IGNORED STM32F7 IGNORED ARMED IGNORED STM32F103VE_GTM32 IGNORED STM32F103VE_longer IGNORED mks_robin_mini IGNORED mks_robin_nano IGNORED mks_robin IGNORED mks_robin_pro IGNORED mks_robin_lite IGNORED mks_robin_lite3 IGNORED jgaurora_a5s_a1 IGNORED STM32F103CB_malyan IGNORED chitu_f103 IGNORED STM32F401VE_STEVAL IGNORED FLYF407ZG IGNORED FYSETC_S6 IGNORED STM32F407VE_black IGNORED BIGTREE_SKR_PRO FAILED 00:00:06.809 BIGTREE_GTR_V1_0 IGNORED BIGTREE_BTT002 IGNORED teensy31 IGNORED teensy35 IGNORED esp32 IGNORED linux_native IGNORED SAMD51_grandcentral_m4 IGNORED rumba32_f446ve IGNORED rumba32_mks IGNORED include_tree IGNORED ===================================================================================== 1 failed, 0 succeeded in 00:00:06.809 ===================================================================================== The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it. `

shitcreek commented 4 years ago

PIO gets all screwed up sometimes. Try running this script: pio run -t program

hackebike commented 4 years ago

no luck! The strange thing is that a Marlin build from May 19th works fine both for SKR Pro and GTR.

same error: `Mac-Pro:Marlin-2.0.5.3 biskero$ Mac-Pro:Marlin-2.0.5.3 biskero$ Mac-Pro:Marlin-2.0.5.3 biskero$ Mac-Pro:Marlin-2.0.5.3 biskero$ pio run -t program Processing BIGTREE_SKR_PRO (platform: ststm32; board: BigTree_SKR_Pro; framework: arduino)

Verbose mode can be enabled via -v, --verbose option CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/BigTree_SKR_Pro.html PLATFORM: ST STM32 6.1.0 > STM32F407ZG (192k RAM. 1024k Flash) HARDWARE: STM32F407ZGT6 168MHz, 192KB RAM, 1MB Flash DEBUG: Current (stlink) External (jlink, stlink) PACKAGES:









Compiling .pio/build/BIGTREE_SKR_PRO/FrameworkArduino/pins_arduino.c.o 46 | #include "stm32f4xx_hal_conf.h" | ^~~~~~ compilation terminated. Compiling .pio/build/BIGTREE_SKR_PRO/FrameworkArduino/stm32/HAL/stm32yyxx_hal.c.o In file included from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/system/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:250, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/stm32/stm32_def.h:16, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/stm32/interrupt.h:43, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/board.h:7, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/board.c:1: /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:46:10: fatal error: stm32f4xx_hal_conf.h: No such file or directory


Compiling .pio/build/BIGTREE_SKR_PRO/FrameworkArduino/stm32/HAL/stm32yyxx_hal_adc.c.o 46 | #include "stm32f4xx_hal_conf.h" | ^~~~~~ compilation terminated. In file included from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/system/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:250, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/stm32/stm32_def.h:16, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/stm32/clock.h:43, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/wiring_time.h:23, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/wiring.h:38, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/Arduino.h:32, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/WInterrupts.cpp:20: /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:46:10: fatal error: stm32f4xx_hal_conf.h: No such file or directory




Compiling .pio/build/BIGTREE_SKR_PRO/FrameworkArduino/stm32/HAL/stm32yyxx_hal_can.c.o 46 | #include "stm32f4xx_hal_conf.h" | ^~~~~~ compilation terminated. In file included from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/system/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_adc.c:193, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/stm32/HAL/stm32yyxx_hal_adc.c:14: /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:46:10: fatal error: stm32f4xx_hal_conf.h: No such file or directory









Compiling .pio/build/BIGTREE_SKR_PRO/FrameworkArduino/stm32/HAL/stm32yyxx_hal_dac_ex.c.o 46 | #include "stm32f4xx_hal_conf.h" | ^~~~~~ compilation terminated. In file included from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/system/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dac.c:171, from /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/cores/arduino/stm32/HAL/stm32yyxx_hal_dac.c:14: /Users/biskero/.platformio/packages/framework-arduinoststm32@3.10500.190327/system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:46:10: fatal error: stm32f4xx_hal_conf.h: No such file or directory















Environment Status Duration


mega2560 IGNORED mega1280 IGNORED rambo IGNORED FYSETC_F6_13 IGNORED FYSETC_F6_14 IGNORED sanguino644p IGNORED sanguino1284p IGNORED melzi IGNORED melzi_optiboot IGNORED at90usb1286_cdc IGNORED at90usb1286_dfu IGNORED DUE IGNORED DUE_USB IGNORED DUE_debug IGNORED LPC1768 IGNORED LPC1769 IGNORED STM32F103RC IGNORED STM32F103RC_fysetc IGNORED STM32F103RC_btt IGNORED STM32F103RC_btt_USB IGNORED STM32F103RC_btt_512K IGNORED STM32F103RC_btt_512K_USB IGNORED STM32F103RE IGNORED STM32F103RE_btt IGNORED STM32F103RE_btt_USB IGNORED STM32F4 IGNORED STM32F7 IGNORED ARMED IGNORED STM32F103VE_GTM32 IGNORED STM32F103VE_longer IGNORED mks_robin_mini IGNORED mks_robin_nano IGNORED mks_robin IGNORED mks_robin_pro IGNORED mks_robin_lite IGNORED mks_robin_lite3 IGNORED jgaurora_a5s_a1 IGNORED STM32F103CB_malyan IGNORED chitu_f103 IGNORED STM32F401VE_STEVAL IGNORED FLYF407ZG IGNORED FYSETC_S6 IGNORED STM32F407VE_black IGNORED BIGTREE_SKR_PRO FAILED 00:00:06.176 BIGTREE_GTR_V1_0 IGNORED BIGTREE_BTT002 IGNORED teensy31 IGNORED teensy35 IGNORED esp32 IGNORED linux_native IGNORED SAMD51_grandcentral_m4 IGNORED rumba32_f446ve IGNORED rumba32_mks IGNORED include_tree IGNORED ===================================================================================== 1 failed, 0 succeeded in 00:00:06.176 ===================================================================================== Mac-Pro:Marlin-2.0.5.3 biskero$ `

peeff commented 4 years ago

I have the same problem.

hackebike commented 4 years ago

There is a strange thing in the Platformio in VS Code, if I update all I get the following, why there are 2 entries for Platform ST STM32 ?

`Mac-Pro:Marlin-2.0.5.3 biskero$ platformio update Updating contrib-piohome @ 3.2.3 [Up-to-date] Updating contrib-pysite @ 2.37.191020 [Up-to-date] Updating tool-unity @ 1.20500.200322 [Up-to-date] Updating tool-scons @ 3.30102.0 [Up-to-date]

Platform Manager

Platform Atmel AVR

Updating atmelavr @ 2.2.0 [Up-to-date] Updating toolchain-atmelavr @ 1.50400.190710 [Up-to-date] Updating framework-arduino-avr @ 5.0.0 [Up-to-date]

Platform ST STM32

Updating ststm32 @ 6.1.0 [Up-to-date] Updating toolchain-gccarmnoneeabi @ 1.70201.0 [Up-to-date] Updating framework-arduinoststm32 @ 4.10800.200207 [Up-to-date] Updating tool-stm32duino @ 1.0.1 [Up-to-date] Updating tool-openocd @ 2.1000.190707 [Up-to-date] Updating tool-dfuutil @ 1.9.200310 [Up-to-date] Uninstalling framework-arduinoststm32 @ 4.10700.200103: [OK] Uninstalling toolchain-gccarmnoneeabi @ 1.90201.191206: [OK]

Platform ST STM32

Updating ststm32 @ 5.4.3 [Detached] Updating toolchain-gccarmnoneeabi @ 1.70201.0 [Up-to-date] Updating framework-arduinoststm32 @ 3.10500.190327 [Up-to-date] Updating tool-stm32duino @ 1.0.1 [Up-to-date] Updating tool-openocd @ 2.1000.190707 [Up-to-date]

Library Manager

Library Storage: /Users/biskero/.platformio/lib Mac-Pro:Marlin-2.0.5.3 biskero$ `

ellensp commented 4 years ago

I used your platformio, Configuration.h and Configuration_adv.h on Marlin-2.0.5.3 It compiled without any issues. (a few expected warnings only) Here is the full log https://pastebin.com/BPGjfFCv See if you can see any differences in your build, library versions etc.

Unfortunately your logs above are useless as everything in <> is hidden. Ie the names of the libraries making a comparison impossible.

hackebike commented 4 years ago

ok, first thing I noticed: mine: framework-arduinoststm32 3.10500.190327 (1.5.0) your: framework-arduinoststm32 3.10700.191028 (1.7.0)

how do I upgrade to the 1.7.0 in vs code?

other libs are the same Dependency Graph |-- <LiquidCrystal> 1.5.0 | |-- <Wire> 1.0 |-- <TMCStepper> 0.6.2 | |-- <SPI> 1.0 |-- <Adafruit NeoPixel> 1.4.0 |-- <U8glib-HAL> 0.4.1 | |-- <Wire> 1.0 | |-- <SPI> 1.0 |-- <Adafruit MAX31865 library> 1.2.1 | |-- <Adafruit BusIO> 1.3.2 | | |-- <SPI> 1.0 | | |-- <Wire> 1.0 |-- <LiquidTWI2> | |-- <Wire> 1.0 |-- <Arduino-L6470> 0.8.0 |-- <SailfishLCD> |-- <SailfishRGB_LED> | |-- <Wire> 1.0 |-- <SlowSoftI2CMaster> |-- <SPI> 1.0 |-- <Servo> 1.1.2 |-- <IWatchdog> 1.0.0 |-- <Wire> 1.0

ellensp commented 4 years ago

In platforio.ini is

[env:BIGTREE_SKR_PRO]
platform          = ststm32
board             = BigTree_SKR_Pro
platform_packages = framework-arduinoststm32@>=3.107,<4

the last line should force it to use 3.107

Try this click on platformio Home icon then click on platforms find ST STM32 and uninstall it.

Then try a compile. It will re install it, and hopefully the correct version.

hackebike commented 4 years ago

So I uninstall 5.4.3, than upon compilation of Marlin 2.0.5.3 it installed the framework-arduinoststm32 3.10700.191028 (1.7.0) and everything compiled ok !

Thanks

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.