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.23k stars 19.22k forks source link

[BUG] BigTreeTech SKR Pro - Broken compilation with new ststm32@5.5.0 #14672

Closed Evg33 closed 5 years ago

Evg33 commented 5 years ago

platformio.ini

[env:BIGTREE_SKR_PRO]
#platform = ststm32
platform = ststm32@5.4.3
tpruvot commented 5 years ago

what is broken ? some pastebin ?

Evg33 commented 5 years ago

...
Compiling .pioenvs\BIGTREE_SKR_PRO\FrameworkArduino\stm32\LL\stm32yyxx_ll_usart.c.o
Compiling .pioenvs\BIGTREE_SKR_PRO\FrameworkArduino\stm32\LL\stm32yyxx_ll_usb.c.o
Compiling .pioenvs\BIGTREE_SKR_PRO\FrameworkArduino\stm32\LL\stm32yyxx_ll_utils.c.o
Compiling .pioenvs\BIGTREE_SKR_PRO\FrameworkArduino\stm32\PortNames.c.o
CIompiling .pioenvs\BIGTREE_SKR_PRO\FrameworkArduino\stm32\analog.c.o
n file included from C:\users\evg33\.platformio\packages\framework-arduinoststm32\cores\arduino\stm32/pinmap.h:22:0,
                 from C:\users\evg33\.platformio\packages\framework-arduinoststm32\cores\arduino\stm32/PeripheralPins.h:34,
                 from C:\users\evg33\.platformio\packages\framework-arduinoststm32\variants\BIGTREE_GENERIC_STM32F407_5X/variant.h:37,     
                 from C:\users\evg33\.platformio\packages\framework-arduinoststm32\system\STM32F4xx/stm32f4xx_hal_conf.h:4,
                 from C:\users\evg33\.platformio\packages\framework-arduinoststm32\system\Drivers\STM32F4xx_HAL_Driver\Inc/stm32f4xx_hal.h:30,
                 from C:\users\evg33\.platformio\packages\framework-arduinoststm32\system\Drivers\CMSIS\Device\ST\STM32F4xx\Include/stm32f4xx.h:250,
                 from C:\users\evg33\.platformio\packages\framework-arduinoststm32\cores\arduino\stm32\stm32_def.h:35,
                 from C:\users\evg33\.platformio\packages\framework-arduinoststm32\cores\arduino\stm32\PortNames.h:33,
                 from C:\users\evg33\.platformio\packages\framework-arduinoststm32\cores\arduino\stm32\PortNames.c:30:
C:\users\evg33\.platformio\packages\framework-arduinoststm32\cores\arduino\stm32/PinNames.h:16:12: error: 'PortA' undeclared here (not in a function)
   PA_0  = (PortA << 4) + 0x00,
            ^~~~~
C:\users\evg33\.platformio\packages\framework-arduinoststm32\cores\arduino\stm32/PinNames.h:33:12: error: 'PortB' undeclared here (not in a function); did you mean 'PortA'?
   PB_0  = (PortB << 4) + 0x00,
            ^~~~~
            PortA
C:\users\evg33\.platformio\packages\framework-arduinoststm32\cores\arduino\stm32/PinNames.h:50:12: error: 'PortC' undeclared here (not in a function); did you mean 'PortB'?
   PC_0  = (PortC << 4) + 0x00,
            ^~~~~
            PortB
C:\users\evg33\.platformio\packages\framework-arduinoststm32\cores\arduino\stm32/PinNames.h:68:12: error: 'PortD' undeclared here (not in a function); did you mean 'PortC'?
   PD_0  = (PortD << 4) + 0x00,
            ^~~~~
            PortC
C:\users\evg33\.platformio\packages\framework-arduinoststm32\cores\arduino\stm32/PinNames.h:86:12: error: 'PortE' undeclared here (not in a function); did you mean 'PortD'?
   PE_0  = (PortE << 4) + 0x00,
            ^~~~~
            PortD
compilation terminated due to -fmax-errors=5.
*** [.pioenvs\BIGTREE_SKR_PRO\FrameworkArduino\stm32\PortNames.c.o] Error 1
C:\users\evg33\.platformio\packages\framework-arduinoststm32\cores\arduino\stm32\analog.c: In function 'get_adc_internal_channel':
C:\users\evg33\.platformio\packages\framework-arduinoststm32\cores\arduino\stm32\analog.c:243:10: error: 'PADC_TEMP' undeclared (first use 
in this function); did you mean 'PADC_BASE'?
     case PADC_TEMP:
          ^~~~~~~~~
          PADC_BASE
C:\users\evg33\.platformio\packages\framework-arduinoststm32\cores\arduino\stm32\analog.c:243:10: note: each undeclared identifier is reported only once for each function it appears in
C:\users\evg33\.platformio\packages\framework-arduinoststm32\cores\arduino\stm32\analog.c:248:10: error: 'PADC_VREF' undeclared (first use 
in this function); did you mean 'PADC_TEMP'?
     case PADC_VREF:
          ^~~~~~~~~
          PADC_TEMP
C:\users\evg33\.platformio\packages\framework-arduinoststm32\cores\arduino\stm32\analog.c:253:10: error: 'PADC_VBAT' undeclared (first use 
in this function); did you mean 'PADC_VREF'?
     case PADC_VBAT:
          ^~~~~~~~~
          PADC_VREF
*** [.pioenvs\BIGTREE_SKR_PRO\FrameworkArduino\stm32\analog.c.o] Error 1
======================================================= [ERROR] Took 47.85 seconds =======================================================

=============================================================== [SUMMARY] ===============================================================  
Environment BIGTREE_SKR_PRO             [FAILED]
================================================= 1 failed, 0 succeeded in 47.99 seconds ================================================= 
Процесс терминала завершен с кодом выхода: 1
Evg33 commented 5 years ago

But with "platform = ststm32@5.4.3" compilation ok.

tpruvot commented 5 years ago

yep indeed, seems to break the STM32F407xx (same for black_stm32f407ve)

Evg33 commented 5 years ago

Thank you !

Evg33 commented 5 years ago

How to fix compilation with latest ststm32 ? Now we have a patch with the old version of ststm32 in palatformio.ini. Maybe we should fix for the new version of ststm32 ?

tpruvot commented 5 years ago

Imo you should dig in ststm32 forums or github... and see what was changed to bug this F407VE

Evg33 commented 5 years ago

Broken at https://github.com/platformio/platform-ststm32/commit/3c27299f954a5e9b084db9e7e91c79cf9a1818aa

tpruvot commented 5 years ago

yep, so might be the framework-arduinoststm32 version changed

Evg33 commented 5 years ago

issue: https://github.com/platformio/platform-ststm32/issues/267

Evg33 commented 5 years ago

https://github.com/platformio/platform-ststm32/issues/267#issuecomment-513671435

Hi @Evg33 , @tpruvot ! In the 5.5.0 release, we switched to the latest STM32Duino (v1.6.1). I'm guessing the compilation fails because they changed the mechanism of how stm32f4xx_hal_conf.h is handled. Now there is common stm32fxxx_hal_conf.h per STM32 family (e.g. system/STM32F4xx/stm32f4xx_hal_conf.h)

Evg33 commented 5 years ago

Problem in framework-arduinoststm32 When i change "framework-arduinoststm32" from "~3.10601.190716" to "~3.10500.190222" in file C:\Users\xxx.platformio\platforms\ststm32\platform.json and platformio.ini to

[env:BIGTREE_SKR_PRO]
platform = ststm32

Compilation ok.

Evg33 commented 5 years ago

"version": "~3.10500.190327" ok "version": "~3.10601.190716" fail

Evg33 commented 5 years ago

@tpruvot delete tools section from buildroot/share/PlatformIO/boards/BigTree_SKR_Pro.json and compilation ok with platform = ststm32

Thx 2 @valeros https://github.com/platformio/platform-ststm32/issues/266#issuecomment-526292630

[env:BIGTREE_SKR_PRO]
#platform = ststm32@5.4.3
platform = ststm32
Evg33 commented 5 years ago

Today I can’t repeat a successful compilation :(

tpruvot commented 5 years ago

its normal: https://travis-ci.org/MarlinFirmware/Marlin/builds

basilfx commented 5 years ago

@Evg33 can you try #15285?

Evg33 commented 5 years ago

@basilfx

image

DATA:    [=         ]  13.1% (used 25756 bytes from 196608 bytes)
PROGRAM: [==        ]  15.0% (used 157596 bytes from 1048576 bytes)
BIGTREE_SKR_PRO         SUCCESS   00:03:48.461

The board starts normally. Thank you !

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.