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

Strange compiler error #1359

Closed
obdevel opened this issue Apr 6, 2023 · 1 comment
Closed

Strange compiler error #1359

obdevel opened this issue Apr 6, 2023 · 1 comment

Comments

@obdevel
Copy link

obdevel commented Apr 6, 2023

I'm trying to compile the LVGL graphics library and have a compiler error I've never seen before. A google search doesn't throw up anything recent or relevant. I'm compiling for Pico W but this doesn't seem related. The assembler seems to be complaining that the compiler has generated invalid code.

I'm using Bodmer's TFT_eSPI library for the low-level stuff and this works well on its own, but I'd like to try a higher level of abstraction and have access to the LVGL UI widgets.

I have raised an issue with the LVGL project (https://forum.lvgl.io/t/rp2040-and-lvgl/11071/2) with full details but I've received no responses yet (my post is the third one in this thread).

Any thoughts ? I'm happy to try any suggestions.

The error output is:

/Users/xxx/Library/Arduino15/packages/rp2040/tools/pqt-gcc/1.5.0-b-c7bab52/bin/arm-none-eabi-gcc -c -Wall -Wextra -Werror=return-type -Wno-ignored-qualifiers -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DUSBD_PID=0x000a -DUSBD_VID=0x2e8a -DUSBD_MAX_POWER_MA=250 "-DUSB_MANUFACTURER=\"Raspberry Pi\"" "-DUSB_PRODUCT=\"Pico\"" -DPICO_CYW43_ARCH_THREADSAFE_BACKGROUND=1 -DCYW43_LWIP=1 -DLWIP_IPV6=0 -DLWIP_IPV4=1 -DLWIP_IGMP=1 -DLWIP_CHECKSUM_CTRL_PER_NETIF=1 "-DARDUINO_VARIANT=\"rpipico\"" -DTARGET_RP2040 -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions -DARM_MATH_CM0_FAMILY -DARM_MATH_CM0_PLUS -MMD -iprefix/Users/xxx/Library/Arduino15/packages/rp2040/hardware/rp2040/3.1.0/ @/Users/xxx/Library/Arduino15/packages/rp2040/hardware/rp2040/3.1.0/lib/platform_inc.txt -I/Users/xxx/Library/Arduino15/packages/rp2040/hardware/rp2040/3.1.0/include -std=gnu17 -g -pipe -DF_CPU=133000000L -DARDUINO=10819 -DARDUINO_RASPBERRY_PI_PICO "-DBOARD_NAME=\"RASPBERRY_PI_PICO\"" -DARDUINO_ARCH_RP2040 -Os -I/Users/xxx/Library/Arduino15/packages/rp2040/hardware/rp2040/3.1.0/cores/rp2040 -I/Users/xxx/Library/Arduino15/packages/rp2040/hardware/rp2040/3.1.0/variants/rpipico -I/Users/xxx/Documents/Arduino/libraries/TFT_eSPI -I/Users/xxx/Library/Arduino15/packages/rp2040/hardware/rp2040/3.1.0/libraries/SPI/src -I/Users/xxx/Library/Arduino15/packages/rp2040/hardware/rp2040/3.1.0/libraries/LittleFS/src -I/Users/xxx/Documents/Arduino/libraries/lvgl/src /Users/xxx/Documents/Arduino/libraries/lvgl/src/core/lv_obj.c -o /var/folders/03/s3pv8qk91w78m4_st_nbxl5m0000gn/T/arduino_build_571161/libraries/lvgl/core/lv_obj.c.o
{standard input}: Assembler messages:
{standard input}: Error: unaligned opcodes detected in executable segment
@earlephilhower
Copy link
Owner

This is an unfortunately known bug in GCC 10.x where there's a case statement that gets invalid assembly generated. The LVGL source is fine, the core is fine, but unfortunately GCC somehow slipped out w/a problem.

Right now if you need this, then see #1294 for a GCC 12 pre-release build.

At some point we will move to GCC 12, but in my experience changing a compiler always uncovers new and wonderfully odd bugs. So it's going to wait for a major release (i.e. 4.x) and not just slipped in as a minor one. I also think as of SDK1.5 there were a couple Pico-SDK issued w/GCC12 that still need to be addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants