Using lvgl with TF-M doesn't work: tfm_arch_set_secure_exception_priorities();

Hi,

I'm using an nRF5340DK and an Adafruit 2.8" TFT Touch Shield to implement a touch keyboard on the board. My project uses TF-M, so I'm trying to integrate lvgl into the tfm_secure_partition sdk sample, but it doesn't work.

I have added lvgl configuration, but I don't use any lvgl function. The program print any printk from main. Doing a debug, it stops at the following line of code.

This file is located in the following path: ...\Nordic\v2.2.0\modules\tee\tf-m\trusted-firmware-m\secure_fw\spm\cmsis_psa\main.c

I'm using an Adafruit 2.8" TFT Touch Shield, so I have added the following configuration to CMakeLists.txt:

set(SHIELD adafruit_2_8_tft_touch_v2)

prj.conf:

CONFIG_BUILD_WITH_TFM=y
CONFIG_TFM_PROFILE_TYPE_NOT_SET=y

CONFIG_LV_Z_MEM_POOL_NUMBER_BLOCKS=8
CONFIG_MAIN_STACK_SIZE=17408

CONFIG_DISPLAY=y
CONFIG_DISPLAY_LOG_LEVEL_ERR=y

CONFIG_LOG=y

CONFIG_LVGL=y
CONFIG_LV_MEM_CUSTOM=y
CONFIG_LV_USE_LOG=y
CONFIG_LV_USE_LABEL=y
CONFIG_LV_FONT_MONTSERRAT_14=y

CONFIG_PM_PARTITION_SIZE_TFM=0x60000

I attach the project, in case it is useful to reproduce the problem: 

tfm_secure_partition_lvgl.zip

Regards,
Pablo

Useful information about the project:

- Using nRF5340DK and an Adafruit 2.8" TFT Touch Shield
- Using nRF Connect SDK v2.2.0.
- The project is based on the example: TF-M Secure Partition Sample 

Related