Marlin: [BUG] Compile error after updating to STM32 7.0.0

Created on 2 Jul 2020  路  13Comments  路  Source: MarlinFirmware/Marlin

I'm not sure if this is a bug with Marlin or something else?

Board: BOARD_MKS_ROBIN_NANO

After updating the STM32 platform on PlatformIO to ST STM32 7.0.0 > STM32F103VE using the command "platformio update" under Linux, I can't compile Marlin anymore.

I've tried it with a lightly modified vanilla version of branch bugfix-2.0.x (set the correct board BOARD_MKS_ROBIN_NANO and enabled FSMC_GRAPHICAL_DISPLAY).

Compilation terminates with this error:

In file included from Marlin/src/HAL/STM32F1/dogm/../../../inc/../HAL/./STM32F1/HAL.h:36,
                 from Marlin/src/HAL/STM32F1/dogm/../../../inc/../HAL/HAL.h:26,
                 from Marlin/src/HAL/STM32F1/dogm/../../../inc/MarlinConfig.h:30,
                 from Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_fsmc.cpp:29:
Marlin/src/HAL/STM32F1/dogm/../../../inc/../HAL/./STM32F1/fastio.h:30:10: fatal error: libmaple/gpio.h: No such file or directory
   30 | #include <libmaple/gpio.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.

Any idea how to fix it?

The file is actually present in my file system under ~/.platformio/packages/framework-arduinoststm32-maple/STM32F1/system/libmaple/include/libmaple/gpio.h

I have no idea why it doesn't find it anymore.

Edit: For now I've reverted back to PLATFORM: ST STM32 6.1.1 > STM32F103VE by restoring a backup of the ~/.platformio folder, and compilation succeeds again

Confirmed ! Fix Included Patch

All 13 comments

I'm seeing the same issue on a Robin Nano/latest bugfix-2.0.x build after PIO updated STM32 to 7.0 earlier today. It might be wise to lock down the STM32 version in PIO to <7.0 until it's fixed.

My PR to upgrade to 7.0 (#18496) is only for boards using HAL/STM32. In the bugfix-2.0.x branch boards using HAL/STM32F1 are already capped to ststm32 6.1.

Not on the Nano apparently. Or PIO is ignoring the cap since it happily updated on my build.

https://github.com/MarlinFirmware/Marlin/blob/7b6629c08c66987bf0e071cffd72a7d05a6649f4/platformio.ini#L630-L645

The other Nano environment uses different settings:

https://github.com/MarlinFirmware/Marlin/blob/7b6629c08c66987bf0e071cffd72a7d05a6649f4/platformio.ini#L543-L553

I'd call that a merge error.
That was probably added about the same time all the STM32F1 targets were refactored in the platformio.ini.

Could be. I don't know why or _if_ they need to be different.

These are the only unique lines:

extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_nano35.py
MKS-LittlevGL=https://github.com/makerbase-mks/MKS-LittlevGL/archive/master.zip

You could probably replace it with this and it would work fine:
(I have edited this so it should work now)

#
# MKS Robin Nano (STM32F103VET6) - MKS UI (LVGL)
#
[env:mks_robin_nano35]
platform      = ${common_stm32f1.platform}
extends       = env:mks_robin_nano
extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_nano35.py
lib_deps      = ${common_stm32f1.lib_deps}
     MKS-LittlevGL=https://github.com/makerbase-mks/MKS-LittlevGL/archive/master.zip

If you make that edit you should relocate it in the file to be next to the mks_robin_nano while you are at it.

Using the updated mks_robin_nano35 environment as above, It fails instantly with the following despite having a board defined:

> Executing task: platformio run <

Processing mks_robin_nano35 (platform: ststm32@<6.2.0; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
Error: BoardConfig: Board is not defined
================================================ [FAILED] Took 0.57 seconds ================================================

Wiping out PIO folders (including a super delete/reset) didn't help, so maybe it has to use platform = ststm32?

Edit: Here's a link to my Robin Nano 1.2/TFT35 LVGL build for testing.

I think I got the extends line wrong, try:
extends = env:mks_robin_nano

I went back and edited that snippet a few replies up so anybody can copy/paste it and it will work now.

I put in PR https://github.com/MarlinFirmware/Marlin/pull/18516 to get this fixed for everyone.

@Miraculix200 this fix has been merged into the bugfix-2.0.x branch. Since the problem was so clear and easy to reproduce, I'm assuming it is now solved for you as well. I'll close this issue, but please let us know if it doesn't work for you when you test with the updated branch.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

heming3501 picture heming3501  路  4Comments

Kaibob2 picture Kaibob2  路  4Comments

ceturan picture ceturan  路  4Comments

Glod76 picture Glod76  路  3Comments

StefanBruens picture StefanBruens  路  4Comments