Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Compile error after updating to STM32 7.0.0 #18505

Closed
Miraculix200 opened this issue Jul 2, 2020 · 13 comments
Closed

[BUG] Compile error after updating to STM32 7.0.0 #18505

Miraculix200 opened this issue Jul 2, 2020 · 13 comments
Labels
Bug: Confirmed ! Fix Included A fix is included in the description Needs: Patch A patch is needed to fix this

Comments

@Miraculix200
Copy link

Miraculix200 commented Jul 2, 2020

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

@shitcreek
Copy link
Contributor

shitcreek commented Jul 2, 2020

Please try searching for the issue first. These are the threads that I've found that may help you.
#18288 (comment)
#18288
#18440
#18496

@thisiskeithb
Copy link
Member

thisiskeithb commented Jul 2, 2020

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.

@sjasonsmith
Copy link
Contributor

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.

@thisiskeithb
Copy link
Member

thisiskeithb commented Jul 2, 2020

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

Marlin/platformio.ini

Lines 630 to 645 in 7b6629c

#
# MKS Robin Nano (STM32F103VET6) - MKS UI (LVGL)
#
[env:mks_robin_nano35]
platform = ststm32
board = genericSTM32F103VE
platform_packages = tool-stm32duino
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
${common.build_flags} -std=gnu++14 -DHAVE_SW_SERIAL -DSS_TIMER=4
build_unflags = -std=gnu++11
extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_nano35.py
src_filter = ${common.default_src_filter} +<src/HAL/STM32F1>
lib_deps = ${common.lib_deps}
SoftwareSerialM
MKS-LittlevGL=https://github.com/makerbase-mks/MKS-LittlevGL/archive/master.zip
lib_ignore = Adafruit NeoPixel, SPI

The other Nano environment uses different settings:

Marlin/platformio.ini

Lines 543 to 553 in 7b6629c

#
# MKS Robin Nano (STM32F103VET6) - Emulated Graphical 128x64 (DOGM) UI
#
[env:mks_robin_nano]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103VE
platform_packages = tool-stm32duino
extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_nano.py
build_flags = ${common_stm32f1.build_flags}
-DMCU_STM32F103VE -DSS_TIMER=4

@sjasonsmith
Copy link
Contributor

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.

@thisiskeithb
Copy link
Member

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

@sjasonsmith
Copy link
Contributor

sjasonsmith commented Jul 2, 2020

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.

@sjasonsmith sjasonsmith added Bug: Confirmed ! Needs: Patch A patch is needed to fix this Fix Included A fix is included in the description labels Jul 2, 2020
@thisiskeithb
Copy link
Member

thisiskeithb commented Jul 2, 2020

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.

@sjasonsmith
Copy link
Contributor

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

@sjasonsmith
Copy link
Contributor

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

@thisiskeithb
Copy link
Member

I put in PR #18516 to get this fixed for everyone.

@sjasonsmith
Copy link
Contributor

@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.

@github-actions
Copy link

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.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug: Confirmed ! Fix Included A fix is included in the description Needs: Patch A patch is needed to fix this
Projects
None yet
Development

No branches or pull requests

4 participants