How to us GFX library for mbed on Seeed XAIO 1.28" display using XAIO nrf52x

I"m attempting to get the squareline to either generate or to know how to modify the generated code to use the GFX library for the mbed variant of XAIO nrf52x Or, any other way to get it to work under mbed.

Since this uses the Arduino the “only” option is Arduino with TFT_eSPI So I’m guessing either I’m screwed or some hand code is necessary.

If anyone has suggestions please advise Otherwise I’m guessing I’ll just have to hand code it

SquareLine Studio version: 1.3.4
Dev Platform:Windows 11
Target: Seeed XAO 1.28" touch with XAIO nrf52x mbed

There’s a Seeed board-template already, it uses ESP-IDF and I think it would be better starting point than the Arduino with TFT_eSPI board-template you selected. But if you want to program that Seeed device with Arduino IDE then I understand your choice, because TFT_eSPI probably doesn’t have the display-driver for this display and you’ll need to use the ‘mbed’ version. In either way, you’ll need to create your own board-template by hand if you want to automatically export your project to a compilable version for this specific device, we don’t have this device yet added to our board-template repository. The usual way is to first create a template project which just works, then follow the description at our page about creating a SquareLine Studio board-template from it fur subsequent uses: Open Board Platform (OBP) | SquareLine Studio
We have several advices here at the forum about creating board-templates if you search for it.
(For the ESP-IDF-toolchain based Seeed Studio board-template I used Seeed’s own examples at Seeed Studio · GitHub as starting point, maybe you’ve already looked at their detailed getting-started description at XIAO INTRODUCTION | Seeed Studio Wiki)
Good luck with the ‘mbed’ way.

Thanks I’ll take a walk down that path. Unfortunately I need the mbed variant to support key features of the XAIO nrf52x sense. I have pretty much everything, including the XAO touch display working not using squareline. the GFX library appears to be the only thing that works on mbed :frowning: - my first choice of course was to not use mbed.

I would ask though - where/how do I define to use the GFX library for the display within the OBP?

The used display driver is not defined en the OBP/slb settings, it’s only defined in your source code. To keep flexibility and support any kind of project, SquareLine Studio don’t go into the details of the driver (only updates some hotstrings mentioned in the OBP docs), you should have a working example first (that you already have as you write above) that inits the hardware (HAL_init/etc.) calls lv_init and ui_init and then lv_task_handler/lv_timer_handler in a loop or interrupt in a main.c. This all goes into the zip file beside the slb file. But the form of this is truely unbounded, SquareLine Studio only exports the ‘ui’ folder into it (to the given ui-export path), and ‘lvgl’ folder to the lvgl path given in the slb file. The existing board-templates can be good examples, like the one with TFT_eSPI driver.