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

Compilation issue when using #define USE_ARDUINO_GFX_LIBRARY for nRF52840 #2

Closed
qbalsdon opened this issue Nov 4, 2023 · 4 comments
Assignees
Labels
Seeed_Arduino_RoundDisplay Label for Seeed_Arduino_RoundDisplay UAY Unassigned yet

Comments

@qbalsdon
Copy link

qbalsdon commented Nov 4, 2023

I have:

  • Installed the Arduino IDE
  • Set up Arduino for the nRF2840
  • Added the LVGL, I2C BM8563 RTC and Arduino GFX libraries.
  • Manually installed the TFT_eSPI library from a ZIP file
  • Manually installed the Seeed Studio Round Display for XIAO library from a ZIP file
  • Copied the lv_conf.h file from the Seeed_Arduino_RoundDisplay library to the root Arduino library directory (/Users/{username}/Documents/Arduino/libraries/Seeed_Arduino_Round_display/lv_conf.h)

Since I am using a nRF52840, I did not configure the TFT_eSPI as I was informed by the tutorial I could skip this.

I then tried to compile the following code:

#include <lvgl.h>

// uncomment a library for display driver
// #define USE_TFT_ESPI_LIBRARY
#define USE_ARDUINO_GFX_LIBRARY

#include "lv_xiao_round_screen.h"
#include "lv_hardware_test.h"

void setup()
{
    Serial.begin( 115200 );  //prepare for possible serial debug 
    Serial.println( "XIAO round screen - LVGL_Arduino" );

    lv_init();

    lv_xiao_disp_init();
    lv_xiao_touch_init();

    lv_hardware_test();
}

void loop()
{
    lv_timer_handler();  //let the GUI do its work 
    delay( 5 );
}

And I get the following output:

In file included from /Users/{username}/{path_to_folder}/HardwareTest/HardwareTest.ino:8:
/Users/{username}/{path_to_folder}/HardwareTest/lv_hardware_test.h:67:42: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
   67 |     lv_label_set_text_fmt(battery_label, "%"LV_PRId32"%", battery_level_percent());
      |                                          ^
/Users/{username}/{path_to_folder}/HardwareTest/lv_hardware_test.h:73:41: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
   73 |     lv_label_set_text_fmt(slider_label, "%"LV_PRId32, lv_slider_get_value(slider));
      |                                         ^
In file included from /Users/username}/{path_to_folder}/HardwareTest/HardwareTest.ino:7:
/Users/{username}/Documents/Arduino/libraries/Seeed_Arduino_Round_display/src/lv_xiao_round_screen.h:37:28: error: expected type-specifier before 'Arduino_NRFXSPI'
   37 | Arduino_DataBus *bus = new Arduino_NRFXSPI(XIAO_DC, XIAO_CS, SCK, MOSI, MISO);
      |                            ^~~~~~~~~~~~~~~

exit status 1

I understand the first 2 are warnings, but the error is with Arduino_DataBus *bus = new Arduino_NRFXSPI(XIAO_DC, XIAO_CS, SCK, MOSI, MISO); - I found a similar one on the moonournation repo and tried Arduino_DataBus *bus = new Arduino_HWSPI(TFT_DC, TFT_CS, false); in /Users/{username}/Documents/Arduino/libraries/Seeed_Arduino_Round_display/src/lv_xiao_round_screen.h as was suggested but it also doesn't work.

Can I get some help fixing this please?

@GodfatherXF1
Copy link

  • Copied the lv_conf.h file from the Seeed_Arduino_RoundDisplay library to the root Arduino library directory (/Users/{username}/Documents/Arduino/libraries/Seeed_Arduino_Round_display/lv_conf.h)

You shouldn't "copy" & paste it, but "cut" & paste it in the (/Users/{username}/Documents/Arduino/libraries) directory.

@MatthewJeffson MatthewJeffson added UAY Unassigned yet Seeed_Arduino_RoundDisplay Label for Seeed_Arduino_RoundDisplay labels Oct 9, 2024
@limengdu
Copy link
Member

If you want to use the GFX library, you need to use the mbed version of the XIAO nRF52840 on-board package.

@Lesords Lesords self-assigned this Oct 14, 2024
@Lesords Lesords assigned ackPeng and unassigned Lesords Oct 16, 2024
@ackPeng
Copy link
Contributor

ackPeng commented Oct 16, 2024

@qbalsdon Do you have any questions about this issue?

@Lesords
Copy link
Contributor

Lesords commented Oct 30, 2024

Hello,

I'm going to close this issue, feel free to re-open it if you have any other questions.

[Autocommentary]

@Lesords Lesords closed this as completed Oct 30, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Issues and PR Assemble Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Seeed_Arduino_RoundDisplay Label for Seeed_Arduino_RoundDisplay UAY Unassigned yet
Projects
Status: Done
Development

No branches or pull requests

7 participants