Topics

ILI9340 Display Example


Muhammad Muh <muhammad.muh83@...>
 

Dear All,

I hope you all are doing well.

I am trying an example in
zephyrproject/zephyr/sample/display/ili9340

The example is building fine with nucleo board
west build -b nucleo_l476rg .

BUT

Please advise on the following error when building with nrf52840 west build -b nrf52840_pca10056 .

FAILED: CMakeFiles/app.dir/src/main.c.obj
ccache /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DBUILD_VERSION=zephyr-v2.0.0-1364-gbb3cd11bf192 -DKERNEL -DNRF52840_XXAA -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/muh/zephyrproject/zephyr/kernel/include -I/home/muh/zephyrproject/zephyr/arch/arm/include -I/home/muh/zephyrproject/zephyr/include -I/home/muh/zephyrproject/zephyr/include/drivers -Izephyr/include/generated -I/home/muh/zephyrproject/zephyr/soc/arm/nordic_nrf/nrf52 -I/home/muh/zephyrproject/zephyr/ext/hal/cmsis/Core/Include -I/home/muh/zephyrproject/modules/hal/nordic/nrfx -I/home/muh/zephyrproject/modules/hal/nordic/nrfx/drivers/include -I/home/muh/zephyrproject/modules/hal/nordic/nrfx/mdk -I/home/muh/zephyrproject/modules/hal/nordic/. -isystem /home/muh/zephyrproject/zephyr/lib/libc/minimal/include -isystem /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-ze
phyr-eabi/8.3.0/include -isystem /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/include-fixed -Os -imacros/home/muh/zephyrproject/zephyr/samples/display/ili9340/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mthumb -mcpu=cortex-m4 -imacros/home/muh/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/muh/zephyrproject/zephyr/samples/display/ili9340=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/muh/zephyrproject/zephyr=ZEPHYR_BASE -ffunction-sections -fdata-sections -mabi=aapcs -march=armv7e-m -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj   -c ../src/main.c
../src/main.c: In function 'main':
../src/main.c:49:27: error: 'DT_INST_0_ILITEK_ILI9340_LABEL' undeclared (first use in this function); did you mean 'DT_INST_0_JEDEC_SPI_NOR_LABEL'?
  dev = device_get_binding(DT_INST_0_ILITEK_ILI9340_LABEL);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           DT_INST_0_JEDEC_SPI_NOR_LABEL
../src/main.c:49:27: note: each undeclared identifier is reported only once for each function it appears in
[4/106] Building C object zephyr/CMake...r/soc/arm/nordic_nrf/nrf52/power.c.obj
ninja: build stopped: subcommand failed.

Regards



Jan Van Winkel
 

Hi Muhammad,

For the nrf52840_pca10056 you need to specify a display shield that supports ili9340, eg. west build -b nrf52840_pca10056 -- -DSHIELD=adafruit_2_8_tft_touch_v2

Note that ili9340 sample has been removed in the latest master as there is now a common sample that support different kind of display shields.

Regards,
Jan

On Thu, Mar 5, 2020 at 1:03 PM Muhammad Muh <muhammad.muh83@...> wrote:
Dear All,

I hope you all are doing well.

I am trying an example in
zephyrproject/zephyr/sample/display/ili9340

The example is building fine with nucleo board
west build -b nucleo_l476rg .

BUT

Please advise on the following error when building with nrf52840 west build -b nrf52840_pca10056 .

FAILED: CMakeFiles/app.dir/src/main.c.obj
ccache /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DBUILD_VERSION=zephyr-v2.0.0-1364-gbb3cd11bf192 -DKERNEL -DNRF52840_XXAA -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/muh/zephyrproject/zephyr/kernel/include -I/home/muh/zephyrproject/zephyr/arch/arm/include -I/home/muh/zephyrproject/zephyr/include -I/home/muh/zephyrproject/zephyr/include/drivers -Izephyr/include/generated -I/home/muh/zephyrproject/zephyr/soc/arm/nordic_nrf/nrf52 -I/home/muh/zephyrproject/zephyr/ext/hal/cmsis/Core/Include -I/home/muh/zephyrproject/modules/hal/nordic/nrfx -I/home/muh/zephyrproject/modules/hal/nordic/nrfx/drivers/include -I/home/muh/zephyrproject/modules/hal/nordic/nrfx/mdk -I/home/muh/zephyrproject/modules/hal/nordic/. -isystem /home/muh/zephyrproject/zephyr/lib/libc/minimal/include -isystem /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-ze
phyr-eabi/8.3.0/include -isystem /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/include-fixed -Os -imacros/home/muh/zephyrproject/zephyr/samples/display/ili9340/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mthumb -mcpu=cortex-m4 -imacros/home/muh/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/muh/zephyrproject/zephyr/samples/display/ili9340=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/muh/zephyrproject/zephyr=ZEPHYR_BASE -ffunction-sections -fdata-sections -mabi=aapcs -march=armv7e-m -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj   -c ../src/main.c
../src/main.c: In function 'main':
../src/main.c:49:27: error: 'DT_INST_0_ILITEK_ILI9340_LABEL' undeclared (first use in this function); did you mean 'DT_INST_0_JEDEC_SPI_NOR_LABEL'?
  dev = device_get_binding(DT_INST_0_ILITEK_ILI9340_LABEL);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           DT_INST_0_JEDEC_SPI_NOR_LABEL
../src/main.c:49:27: note: each undeclared identifier is reported only once for each function it appears in
[4/106] Building C object zephyr/CMake...r/soc/arm/nordic_nrf/nrf52/power.c.obj
ninja: build stopped: subcommand failed.

Regards



Muhammad Muh <muhammad.muh83@...>
 

Dear Mr Jan,

Thank you very much for your help. The problem is resolved until the program Building. Now when I west flash, it runs but I am not getting any output on the screen.  I am using the following Ada Fruit version.

Regards
Muhammad



From: Jan Van Winkel <jan.van_winkel@...>
Sent: Thursday, March 5, 2020 9:01 PM
To: Muhammad Muh <muhammad.muh83@...>
Cc: devel@... <devel@...>
Subject: Re: [Zephyr-devel] ILI9340 Display Example
 
Hi Muhammad,

For the nrf52840_pca10056 you need to specify a display shield that supports ili9340, eg. west build -b nrf52840_pca10056 -- -DSHIELD=adafruit_2_8_tft_touch_v2

Note that ili9340 sample has been removed in the latest master as there is now a common sample that support different kind of display shields.

Regards,
Jan

On Thu, Mar 5, 2020 at 1:03 PM Muhammad Muh <muhammad.muh83@...> wrote:
Dear All,

I hope you all are doing well.

I am trying an example in
zephyrproject/zephyr/sample/display/ili9340

The example is building fine with nucleo board
west build -b nucleo_l476rg .

BUT

Please advise on the following error when building with nrf52840 west build -b nrf52840_pca10056 .

FAILED: CMakeFiles/app.dir/src/main.c.obj
ccache /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DBUILD_VERSION=zephyr-v2.0.0-1364-gbb3cd11bf192 -DKERNEL -DNRF52840_XXAA -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/muh/zephyrproject/zephyr/kernel/include -I/home/muh/zephyrproject/zephyr/arch/arm/include -I/home/muh/zephyrproject/zephyr/include -I/home/muh/zephyrproject/zephyr/include/drivers -Izephyr/include/generated -I/home/muh/zephyrproject/zephyr/soc/arm/nordic_nrf/nrf52 -I/home/muh/zephyrproject/zephyr/ext/hal/cmsis/Core/Include -I/home/muh/zephyrproject/modules/hal/nordic/nrfx -I/home/muh/zephyrproject/modules/hal/nordic/nrfx/drivers/include -I/home/muh/zephyrproject/modules/hal/nordic/nrfx/mdk -I/home/muh/zephyrproject/modules/hal/nordic/. -isystem /home/muh/zephyrproject/zephyr/lib/libc/minimal/include -isystem /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-ze
phyr-eabi/8.3.0/include -isystem /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/include-fixed -Os -imacros/home/muh/zephyrproject/zephyr/samples/display/ili9340/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mthumb -mcpu=cortex-m4 -imacros/home/muh/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/muh/zephyrproject/zephyr/samples/display/ili9340=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/muh/zephyrproject/zephyr=ZEPHYR_BASE -ffunction-sections -fdata-sections -mabi=aapcs -march=armv7e-m -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj   -c ../src/main.c
../src/main.c: In function 'main':
../src/main.c:49:27: error: 'DT_INST_0_ILITEK_ILI9340_LABEL' undeclared (first use in this function); did you mean 'DT_INST_0_JEDEC_SPI_NOR_LABEL'?
  dev = device_get_binding(DT_INST_0_ILITEK_ILI9340_LABEL);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           DT_INST_0_JEDEC_SPI_NOR_LABEL
../src/main.c:49:27: note: each undeclared identifier is reported only once for each function it appears in
[4/106] Building C object zephyr/CMake...r/soc/arm/nordic_nrf/nrf52/power.c.obj
ninja: build stopped: subcommand failed.

Regards



Jan Van Winkel
 

Hi Muhammad,

Could you switch to latest master and test with samples/drivers/display, for me that sample is working with the same adafruit display?
Keep in mind that in case you have a preview development kit of the nrf52840_pca10056 you will need an extra patch:

Regards,
Jan

On Fri, Mar 6, 2020 at 2:15 PM Muhammad Muh <muhammad.muh83@...> wrote:
Dear Mr Jan,

Thank you very much for your help. The problem is resolved until the program Building. Now when I west flash, it runs but I am not getting any output on the screen.  I am using the following Ada Fruit version.

Regards
Muhammad



From: Jan Van Winkel <jan.van_winkel@...>
Sent: Thursday, March 5, 2020 9:01 PM
To: Muhammad Muh <muhammad.muh83@...>
Cc: devel@... <devel@...>
Subject: Re: [Zephyr-devel] ILI9340 Display Example
 
Hi Muhammad,

For the nrf52840_pca10056 you need to specify a display shield that supports ili9340, eg. west build -b nrf52840_pca10056 -- -DSHIELD=adafruit_2_8_tft_touch_v2

Note that ili9340 sample has been removed in the latest master as there is now a common sample that support different kind of display shields.

Regards,
Jan

On Thu, Mar 5, 2020 at 1:03 PM Muhammad Muh <muhammad.muh83@...> wrote:
Dear All,

I hope you all are doing well.

I am trying an example in
zephyrproject/zephyr/sample/display/ili9340

The example is building fine with nucleo board
west build -b nucleo_l476rg .

BUT

Please advise on the following error when building with nrf52840 west build -b nrf52840_pca10056 .

FAILED: CMakeFiles/app.dir/src/main.c.obj
ccache /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DBUILD_VERSION=zephyr-v2.0.0-1364-gbb3cd11bf192 -DKERNEL -DNRF52840_XXAA -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/muh/zephyrproject/zephyr/kernel/include -I/home/muh/zephyrproject/zephyr/arch/arm/include -I/home/muh/zephyrproject/zephyr/include -I/home/muh/zephyrproject/zephyr/include/drivers -Izephyr/include/generated -I/home/muh/zephyrproject/zephyr/soc/arm/nordic_nrf/nrf52 -I/home/muh/zephyrproject/zephyr/ext/hal/cmsis/Core/Include -I/home/muh/zephyrproject/modules/hal/nordic/nrfx -I/home/muh/zephyrproject/modules/hal/nordic/nrfx/drivers/include -I/home/muh/zephyrproject/modules/hal/nordic/nrfx/mdk -I/home/muh/zephyrproject/modules/hal/nordic/. -isystem /home/muh/zephyrproject/zephyr/lib/libc/minimal/include -isystem /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-ze
phyr-eabi/8.3.0/include -isystem /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/include-fixed -Os -imacros/home/muh/zephyrproject/zephyr/samples/display/ili9340/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mthumb -mcpu=cortex-m4 -imacros/home/muh/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/muh/zephyrproject/zephyr/samples/display/ili9340=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/muh/zephyrproject/zephyr=ZEPHYR_BASE -ffunction-sections -fdata-sections -mabi=aapcs -march=armv7e-m -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj   -c ../src/main.c
../src/main.c: In function 'main':
../src/main.c:49:27: error: 'DT_INST_0_ILITEK_ILI9340_LABEL' undeclared (first use in this function); did you mean 'DT_INST_0_JEDEC_SPI_NOR_LABEL'?
  dev = device_get_binding(DT_INST_0_ILITEK_ILI9340_LABEL);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           DT_INST_0_JEDEC_SPI_NOR_LABEL
../src/main.c:49:27: note: each undeclared identifier is reported only once for each function it appears in
[4/106] Building C object zephyr/CMake...r/soc/arm/nordic_nrf/nrf52/power.c.obj
ninja: build stopped: subcommand failed.

Regards



Muhammad Muh <muhammad.muh83@...>
 

Thank you Mr Jan for your response.

I am using nRF52840 PCA 10056 DK. Moreover, i am using now the latest CODE as mentioned by you in the previous email. Still, the following commands are giving errors. Please advise.

Commands:
west build -b nrf52840_pca10056 . and
west build -b nrf52840_pca10056 -- -shield=adafruit_2_8_tft_touch_v2

Errors:
[17/124] Building C object CMakeFiles/app.dir/src/main.c.obj
FAILED: CMakeFiles/app.dir/src/main.c.obj
ccache /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DBUILD_VERSION=zephyr-v2.0.0-1364-gbb3cd11bf192 -DKERNEL -DNRF52840_XXAA -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/muh/zephyrproject/zephyr/kernel/include -I/home/muh/zephyrproject/zephyr/arch/arm/include -I/home/muh/zephyrproject/zephyr/include -I/home/muh/zephyrproject/zephyr/include/drivers -Izephyr/include/generated -I/home/muh/zephyrproject/zephyr/soc/arm/nordic_nrf/nrf52 -I/home/muh/zephyrproject/zephyr/ext/hal/cmsis/Core/Include -I/home/muh/zephyrproject/modules/hal/nordic/nrfx -I/home/muh/zephyrproject/modules/hal/nordic/nrfx/drivers/include -I/home/muh/zephyrproject/modules/hal/nordic/nrfx/mdk -I/home/muh/zephyrproject/modules/hal/nordic/. -isystem /home/muh/zephyrproject/zephyr/lib/libc/minimal/include -isystem /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/include -isystem /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/include-fixed -Os -imacros/home/muh/zephyrproject/zephyr/samples/drivers/display/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mthumb -mcpu=cortex-m4 -imacros/home/muh/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/muh/zephyrproject/zephyr/samples/drivers/display=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/muh/zephyrproject/zephyr=ZEPHYR_BASE -ffunction-sections -fdata-sections -mabi=aapcs -march=armv7e-m -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj   -c ../src/main.c
In file included from /home/muh/zephyrproject/zephyr/include/logging/log.h:11,
                 from ../src/main.c:10:
../src/main.c: In function 'main':
../src/main.c:183:35: error: 'DISPLAY_DEV_NAME' undeclared (first use in this function); did you mean 'DT_FLASH_DEV_NAME'?
  LOG_INF("Display sample for %s", DISPLAY_DEV_NAME);
                                   ^~~~~~~~~~~~~~~~
/home/muh/zephyrproject/zephyr/include/logging/log_core.h:230:6: note: in definition of macro 'Z_LOG_TO_PRINTK'
    ##__VA_ARGS__);          \
      ^~~~~~~~~~~
/home/muh/zephyrproject/zephyr/include/logging/log_core.h:287:2: note: in expansion of macro '__LOG'
  __LOG(_level,           \
  ^~~~~
/home/muh/zephyrproject/zephyr/include/logging/log.h:61:24: note: in expansion of macro 'Z_LOG'
 #define LOG_INF(...)   Z_LOG(LOG_LEVEL_INF, __VA_ARGS__)
                        ^~~~~
../src/main.c:183:2: note: in expansion of macro 'LOG_INF'
  LOG_INF("Display sample for %s", DISPLAY_DEV_NAME);
  ^~~~~~~
../src/main.c:183:35: note: each undeclared identifier is reported only once for each function it appears in
  LOG_INF("Display sample for %s", DISPLAY_DEV_NAME);
                                   ^~~~~~~~~~~~~~~~
/home/muh/zephyrproject/zephyr/include/logging/log_core.h:230:6: note: in definition of macro 'Z_LOG_TO_PRINTK'
    ##__VA_ARGS__);          \
      ^~~~~~~~~~~
/home/muh/zephyrproject/zephyr/include/logging/log_core.h:287:2: note: in expansion of macro '__LOG'
  __LOG(_level,           \
  ^~~~~
/home/muh/zephyrproject/zephyr/include/logging/log.h:61:24: note: in expansion of macro 'Z_LOG'
 #define LOG_INF(...)   Z_LOG(LOG_LEVEL_INF, __VA_ARGS__)
                        ^~~~~
../src/main.c:183:2: note: in expansion of macro 'LOG_INF'
  LOG_INF("Display sample for %s", DISPLAY_DEV_NAME);
  ^~~~~~~
../src/main.c:234:7: error: 'PIXEL_FORMAT_BGR_565' undeclared (first use in this function); did you mean 'PIXEL_FORMAT_RGB_565'?
  case PIXEL_FORMAT_BGR_565:
       ^~~~~~~~~~~~~~~~~~~~
       PIXEL_FORMAT_RGB_565
[19/124] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/fdtable.c.obj
ninja: build stopped: subcommand failed.
ERROR: command exited with status 1: /home/muh/cmake-3.13.1-Linux-x86_64/bin/cmake --build /home/muh/zephyrproject/zephyr/samples/drivers/display/build
 
Regards
Muhammad.


From: Jan Van Winkel <jan.van_winkel@...>
Sent: Saturday, March 7, 2020 5:54 PM
To: Muhammad Muh <muhammad.muh83@...>
Cc: Jan Van Winkel <jan.van_winkel@...>; devel@... <devel@...>
Subject: Re: [Zephyr-devel] ILI9340 Display Example
 
Hi Muhammad,

Could you switch to latest master and test with samples/drivers/display, for me that sample is working with the same adafruit display?
Keep in mind that in case you have a preview development kit of the nrf52840_pca10056 you will need an extra patch:

Regards,
Jan

On Fri, Mar 6, 2020 at 2:15 PM Muhammad Muh <muhammad.muh83@...> wrote:
Dear Mr Jan,

Thank you very much for your help. The problem is resolved until the program Building. Now when I west flash, it runs but I am not getting any output on the screen.  I am using the following Ada Fruit version.

Regards
Muhammad



From: Jan Van Winkel <jan.van_winkel@...>
Sent: Thursday, March 5, 2020 9:01 PM
To: Muhammad Muh <muhammad.muh83@...>
Cc: devel@... <devel@...>
Subject: Re: [Zephyr-devel] ILI9340 Display Example
 
Hi Muhammad,

For the nrf52840_pca10056 you need to specify a display shield that supports ili9340, eg. west build -b nrf52840_pca10056 -- -DSHIELD=adafruit_2_8_tft_touch_v2

Note that ili9340 sample has been removed in the latest master as there is now a common sample that support different kind of display shields.

Regards,
Jan

On Thu, Mar 5, 2020 at 1:03 PM Muhammad Muh <muhammad.muh83@...> wrote:
Dear All,

I hope you all are doing well.

I am trying an example in
zephyrproject/zephyr/sample/display/ili9340

The example is building fine with nucleo board
west build -b nucleo_l476rg .

BUT

Please advise on the following error when building with nrf52840 west build -b nrf52840_pca10056 .

FAILED: CMakeFiles/app.dir/src/main.c.obj
ccache /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DBUILD_VERSION=zephyr-v2.0.0-1364-gbb3cd11bf192 -DKERNEL -DNRF52840_XXAA -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/muh/zephyrproject/zephyr/kernel/include -I/home/muh/zephyrproject/zephyr/arch/arm/include -I/home/muh/zephyrproject/zephyr/include -I/home/muh/zephyrproject/zephyr/include/drivers -Izephyr/include/generated -I/home/muh/zephyrproject/zephyr/soc/arm/nordic_nrf/nrf52 -I/home/muh/zephyrproject/zephyr/ext/hal/cmsis/Core/Include -I/home/muh/zephyrproject/modules/hal/nordic/nrfx -I/home/muh/zephyrproject/modules/hal/nordic/nrfx/drivers/include -I/home/muh/zephyrproject/modules/hal/nordic/nrfx/mdk -I/home/muh/zephyrproject/modules/hal/nordic/. -isystem /home/muh/zephyrproject/zephyr/lib/libc/minimal/include -isystem /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-ze
phyr-eabi/8.3.0/include -isystem /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/include-fixed -Os -imacros/home/muh/zephyrproject/zephyr/samples/display/ili9340/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mthumb -mcpu=cortex-m4 -imacros/home/muh/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/muh/zephyrproject/zephyr/samples/display/ili9340=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/muh/zephyrproject/zephyr=ZEPHYR_BASE -ffunction-sections -fdata-sections -mabi=aapcs -march=armv7e-m -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj   -c ../src/main.c
../src/main.c: In function 'main':
../src/main.c:49:27: error: 'DT_INST_0_ILITEK_ILI9340_LABEL' undeclared (first use in this function); did you mean 'DT_INST_0_JEDEC_SPI_NOR_LABEL'?
  dev = device_get_binding(DT_INST_0_ILITEK_ILI9340_LABEL);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           DT_INST_0_JEDEC_SPI_NOR_LABEL
../src/main.c:49:27: note: each undeclared identifier is reported only once for each function it appears in
[4/106] Building C object zephyr/CMake...r/soc/arm/nordic_nrf/nrf52/power.c.obj
ninja: build stopped: subcommand failed.

Regards



Jan Van Winkel
 

Hi Muhammad,

Looks like you made a typo in the build command it should be something like:
west build -b nrf52840_pca10056 samples/drivers/display -- -DSHIELD=adafruit_2_8_tft_touch_v2


Regards,
Jan

On Mon, Mar 9, 2020 at 7:33 AM Muhammad Muh <muhammad.muh83@...> wrote:
Thank you Mr Jan for your response.

I am using nRF52840 PCA 10056 DK. Moreover, i am using now the latest CODE as mentioned by you in the previous email. Still, the following commands are giving errors. Please advise.

Commands:
west build -b nrf52840_pca10056 . and
west build -b nrf52840_pca10056 -- -shield=adafruit_2_8_tft_touch_v2

Errors:
[17/124] Building C object CMakeFiles/app.dir/src/main.c.obj
FAILED: CMakeFiles/app.dir/src/main.c.obj
ccache /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DBUILD_VERSION=zephyr-v2.0.0-1364-gbb3cd11bf192 -DKERNEL -DNRF52840_XXAA -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/muh/zephyrproject/zephyr/kernel/include -I/home/muh/zephyrproject/zephyr/arch/arm/include -I/home/muh/zephyrproject/zephyr/include -I/home/muh/zephyrproject/zephyr/include/drivers -Izephyr/include/generated -I/home/muh/zephyrproject/zephyr/soc/arm/nordic_nrf/nrf52 -I/home/muh/zephyrproject/zephyr/ext/hal/cmsis/Core/Include -I/home/muh/zephyrproject/modules/hal/nordic/nrfx -I/home/muh/zephyrproject/modules/hal/nordic/nrfx/drivers/include -I/home/muh/zephyrproject/modules/hal/nordic/nrfx/mdk -I/home/muh/zephyrproject/modules/hal/nordic/. -isystem /home/muh/zephyrproject/zephyr/lib/libc/minimal/include -isystem /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/include -isystem /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/include-fixed -Os -imacros/home/muh/zephyrproject/zephyr/samples/drivers/display/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mthumb -mcpu=cortex-m4 -imacros/home/muh/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/muh/zephyrproject/zephyr/samples/drivers/display=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/muh/zephyrproject/zephyr=ZEPHYR_BASE -ffunction-sections -fdata-sections -mabi=aapcs -march=armv7e-m -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj   -c ../src/main.c
In file included from /home/muh/zephyrproject/zephyr/include/logging/log.h:11,
                 from ../src/main.c:10:
../src/main.c: In function 'main':
../src/main.c:183:35: error: 'DISPLAY_DEV_NAME' undeclared (first use in this function); did you mean 'DT_FLASH_DEV_NAME'?
  LOG_INF("Display sample for %s", DISPLAY_DEV_NAME);
                                   ^~~~~~~~~~~~~~~~
/home/muh/zephyrproject/zephyr/include/logging/log_core.h:230:6: note: in definition of macro 'Z_LOG_TO_PRINTK'
    ##__VA_ARGS__);          \
      ^~~~~~~~~~~
/home/muh/zephyrproject/zephyr/include/logging/log_core.h:287:2: note: in expansion of macro '__LOG'
  __LOG(_level,           \
  ^~~~~
/home/muh/zephyrproject/zephyr/include/logging/log.h:61:24: note: in expansion of macro 'Z_LOG'
 #define LOG_INF(...)   Z_LOG(LOG_LEVEL_INF, __VA_ARGS__)
                        ^~~~~
../src/main.c:183:2: note: in expansion of macro 'LOG_INF'
  LOG_INF("Display sample for %s", DISPLAY_DEV_NAME);
  ^~~~~~~
../src/main.c:183:35: note: each undeclared identifier is reported only once for each function it appears in
  LOG_INF("Display sample for %s", DISPLAY_DEV_NAME);
                                   ^~~~~~~~~~~~~~~~
/home/muh/zephyrproject/zephyr/include/logging/log_core.h:230:6: note: in definition of macro 'Z_LOG_TO_PRINTK'
    ##__VA_ARGS__);          \
      ^~~~~~~~~~~
/home/muh/zephyrproject/zephyr/include/logging/log_core.h:287:2: note: in expansion of macro '__LOG'
  __LOG(_level,           \
  ^~~~~
/home/muh/zephyrproject/zephyr/include/logging/log.h:61:24: note: in expansion of macro 'Z_LOG'
 #define LOG_INF(...)   Z_LOG(LOG_LEVEL_INF, __VA_ARGS__)
                        ^~~~~
../src/main.c:183:2: note: in expansion of macro 'LOG_INF'
  LOG_INF("Display sample for %s", DISPLAY_DEV_NAME);
  ^~~~~~~
../src/main.c:234:7: error: 'PIXEL_FORMAT_BGR_565' undeclared (first use in this function); did you mean 'PIXEL_FORMAT_RGB_565'?
  case PIXEL_FORMAT_BGR_565:
       ^~~~~~~~~~~~~~~~~~~~
       PIXEL_FORMAT_RGB_565
[19/124] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/fdtable.c.obj
ninja: build stopped: subcommand failed.
ERROR: command exited with status 1: /home/muh/cmake-3.13.1-Linux-x86_64/bin/cmake --build /home/muh/zephyrproject/zephyr/samples/drivers/display/build
 
Regards
Muhammad.


From: Jan Van Winkel <jan.van_winkel@...>
Sent: Saturday, March 7, 2020 5:54 PM
To: Muhammad Muh <muhammad.muh83@...>
Cc: Jan Van Winkel <jan.van_winkel@...>; devel@... <devel@...>
Subject: Re: [Zephyr-devel] ILI9340 Display Example
 
Hi Muhammad,

Could you switch to latest master and test with samples/drivers/display, for me that sample is working with the same adafruit display?
Keep in mind that in case you have a preview development kit of the nrf52840_pca10056 you will need an extra patch:

Regards,
Jan

On Fri, Mar 6, 2020 at 2:15 PM Muhammad Muh <muhammad.muh83@...> wrote:
Dear Mr Jan,

Thank you very much for your help. The problem is resolved until the program Building. Now when I west flash, it runs but I am not getting any output on the screen.  I am using the following Ada Fruit version.

Regards
Muhammad



From: Jan Van Winkel <jan.van_winkel@...>
Sent: Thursday, March 5, 2020 9:01 PM
To: Muhammad Muh <muhammad.muh83@...>
Cc: devel@... <devel@...>
Subject: Re: [Zephyr-devel] ILI9340 Display Example
 
Hi Muhammad,

For the nrf52840_pca10056 you need to specify a display shield that supports ili9340, eg. west build -b nrf52840_pca10056 -- -DSHIELD=adafruit_2_8_tft_touch_v2

Note that ili9340 sample has been removed in the latest master as there is now a common sample that support different kind of display shields.

Regards,
Jan

On Thu, Mar 5, 2020 at 1:03 PM Muhammad Muh <muhammad.muh83@...> wrote:
Dear All,

I hope you all are doing well.

I am trying an example in
zephyrproject/zephyr/sample/display/ili9340

The example is building fine with nucleo board
west build -b nucleo_l476rg .

BUT

Please advise on the following error when building with nrf52840 west build -b nrf52840_pca10056 .

FAILED: CMakeFiles/app.dir/src/main.c.obj
ccache /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DBUILD_VERSION=zephyr-v2.0.0-1364-gbb3cd11bf192 -DKERNEL -DNRF52840_XXAA -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/muh/zephyrproject/zephyr/kernel/include -I/home/muh/zephyrproject/zephyr/arch/arm/include -I/home/muh/zephyrproject/zephyr/include -I/home/muh/zephyrproject/zephyr/include/drivers -Izephyr/include/generated -I/home/muh/zephyrproject/zephyr/soc/arm/nordic_nrf/nrf52 -I/home/muh/zephyrproject/zephyr/ext/hal/cmsis/Core/Include -I/home/muh/zephyrproject/modules/hal/nordic/nrfx -I/home/muh/zephyrproject/modules/hal/nordic/nrfx/drivers/include -I/home/muh/zephyrproject/modules/hal/nordic/nrfx/mdk -I/home/muh/zephyrproject/modules/hal/nordic/. -isystem /home/muh/zephyrproject/zephyr/lib/libc/minimal/include -isystem /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-ze
phyr-eabi/8.3.0/include -isystem /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/include-fixed -Os -imacros/home/muh/zephyrproject/zephyr/samples/display/ili9340/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mthumb -mcpu=cortex-m4 -imacros/home/muh/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/muh/zephyrproject/zephyr/samples/display/ili9340=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/muh/zephyrproject/zephyr=ZEPHYR_BASE -ffunction-sections -fdata-sections -mabi=aapcs -march=armv7e-m -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj   -c ../src/main.c
../src/main.c: In function 'main':
../src/main.c:49:27: error: 'DT_INST_0_ILITEK_ILI9340_LABEL' undeclared (first use in this function); did you mean 'DT_INST_0_JEDEC_SPI_NOR_LABEL'?
  dev = device_get_binding(DT_INST_0_ILITEK_ILI9340_LABEL);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           DT_INST_0_JEDEC_SPI_NOR_LABEL
../src/main.c:49:27: note: each undeclared identifier is reported only once for each function it appears in
[4/106] Building C object zephyr/CMake...r/soc/arm/nordic_nrf/nrf52/power.c.obj
ninja: build stopped: subcommand failed.

Regards



Muhammad Muh <muhammad.muh83@...>
 

Hi Mr Jan,

Now the LCD is showing the output by following your kind guidelines.

Thank you.

Best Regards
Muhammad


From: Jan Van Winkel <jan.van_winkel@...>
Sent: Tuesday, March 10, 2020 3:33 PM
To: Muhammad Muh <muhammad.muh83@...>
Cc: Jan Van Winkel <jan.van_winkel@...>; devel@... <devel@...>
Subject: Re: [Zephyr-devel] ILI9340 Display Example
 
Hi Muhammad,

Looks like you made a typo in the build command it should be something like:
west build -b nrf52840_pca10056 samples/drivers/display -- -DSHIELD=adafruit_2_8_tft_touch_v2


Regards,
Jan

On Mon, Mar 9, 2020 at 7:33 AM Muhammad Muh <muhammad.muh83@...> wrote:
Thank you Mr Jan for your response.

I am using nRF52840 PCA 10056 DK. Moreover, i am using now the latest CODE as mentioned by you in the previous email. Still, the following commands are giving errors. Please advise.

Commands:
west build -b nrf52840_pca10056 . and
west build -b nrf52840_pca10056 -- -shield=adafruit_2_8_tft_touch_v2

Errors:
[17/124] Building C object CMakeFiles/app.dir/src/main.c.obj
FAILED: CMakeFiles/app.dir/src/main.c.obj
ccache /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DBUILD_VERSION=zephyr-v2.0.0-1364-gbb3cd11bf192 -DKERNEL -DNRF52840_XXAA -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/muh/zephyrproject/zephyr/kernel/include -I/home/muh/zephyrproject/zephyr/arch/arm/include -I/home/muh/zephyrproject/zephyr/include -I/home/muh/zephyrproject/zephyr/include/drivers -Izephyr/include/generated -I/home/muh/zephyrproject/zephyr/soc/arm/nordic_nrf/nrf52 -I/home/muh/zephyrproject/zephyr/ext/hal/cmsis/Core/Include -I/home/muh/zephyrproject/modules/hal/nordic/nrfx -I/home/muh/zephyrproject/modules/hal/nordic/nrfx/drivers/include -I/home/muh/zephyrproject/modules/hal/nordic/nrfx/mdk -I/home/muh/zephyrproject/modules/hal/nordic/. -isystem /home/muh/zephyrproject/zephyr/lib/libc/minimal/include -isystem /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/include -isystem /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/include-fixed -Os -imacros/home/muh/zephyrproject/zephyr/samples/drivers/display/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mthumb -mcpu=cortex-m4 -imacros/home/muh/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/muh/zephyrproject/zephyr/samples/drivers/display=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/muh/zephyrproject/zephyr=ZEPHYR_BASE -ffunction-sections -fdata-sections -mabi=aapcs -march=armv7e-m -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj   -c ../src/main.c
In file included from /home/muh/zephyrproject/zephyr/include/logging/log.h:11,
                 from ../src/main.c:10:
../src/main.c: In function 'main':
../src/main.c:183:35: error: 'DISPLAY_DEV_NAME' undeclared (first use in this function); did you mean 'DT_FLASH_DEV_NAME'?
  LOG_INF("Display sample for %s", DISPLAY_DEV_NAME);
                                   ^~~~~~~~~~~~~~~~
/home/muh/zephyrproject/zephyr/include/logging/log_core.h:230:6: note: in definition of macro 'Z_LOG_TO_PRINTK'
    ##__VA_ARGS__);          \
      ^~~~~~~~~~~
/home/muh/zephyrproject/zephyr/include/logging/log_core.h:287:2: note: in expansion of macro '__LOG'
  __LOG(_level,           \
  ^~~~~
/home/muh/zephyrproject/zephyr/include/logging/log.h:61:24: note: in expansion of macro 'Z_LOG'
 #define LOG_INF(...)   Z_LOG(LOG_LEVEL_INF, __VA_ARGS__)
                        ^~~~~
../src/main.c:183:2: note: in expansion of macro 'LOG_INF'
  LOG_INF("Display sample for %s", DISPLAY_DEV_NAME);
  ^~~~~~~
../src/main.c:183:35: note: each undeclared identifier is reported only once for each function it appears in
  LOG_INF("Display sample for %s", DISPLAY_DEV_NAME);
                                   ^~~~~~~~~~~~~~~~
/home/muh/zephyrproject/zephyr/include/logging/log_core.h:230:6: note: in definition of macro 'Z_LOG_TO_PRINTK'
    ##__VA_ARGS__);          \
      ^~~~~~~~~~~
/home/muh/zephyrproject/zephyr/include/logging/log_core.h:287:2: note: in expansion of macro '__LOG'
  __LOG(_level,           \
  ^~~~~
/home/muh/zephyrproject/zephyr/include/logging/log.h:61:24: note: in expansion of macro 'Z_LOG'
 #define LOG_INF(...)   Z_LOG(LOG_LEVEL_INF, __VA_ARGS__)
                        ^~~~~
../src/main.c:183:2: note: in expansion of macro 'LOG_INF'
  LOG_INF("Display sample for %s", DISPLAY_DEV_NAME);
  ^~~~~~~
../src/main.c:234:7: error: 'PIXEL_FORMAT_BGR_565' undeclared (first use in this function); did you mean 'PIXEL_FORMAT_RGB_565'?
  case PIXEL_FORMAT_BGR_565:
       ^~~~~~~~~~~~~~~~~~~~
       PIXEL_FORMAT_RGB_565
[19/124] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/fdtable.c.obj
ninja: build stopped: subcommand failed.
ERROR: command exited with status 1: /home/muh/cmake-3.13.1-Linux-x86_64/bin/cmake --build /home/muh/zephyrproject/zephyr/samples/drivers/display/build
 
Regards
Muhammad.


From: Jan Van Winkel <jan.van_winkel@...>
Sent: Saturday, March 7, 2020 5:54 PM
To: Muhammad Muh <muhammad.muh83@...>
Cc: Jan Van Winkel <jan.van_winkel@...>; devel@... <devel@...>
Subject: Re: [Zephyr-devel] ILI9340 Display Example
 
Hi Muhammad,

Could you switch to latest master and test with samples/drivers/display, for me that sample is working with the same adafruit display?
Keep in mind that in case you have a preview development kit of the nrf52840_pca10056 you will need an extra patch:

Regards,
Jan

On Fri, Mar 6, 2020 at 2:15 PM Muhammad Muh <muhammad.muh83@...> wrote:
Dear Mr Jan,

Thank you very much for your help. The problem is resolved until the program Building. Now when I west flash, it runs but I am not getting any output on the screen.  I am using the following Ada Fruit version.

Regards
Muhammad



From: Jan Van Winkel <jan.van_winkel@...>
Sent: Thursday, March 5, 2020 9:01 PM
To: Muhammad Muh <muhammad.muh83@...>
Cc: devel@... <devel@...>
Subject: Re: [Zephyr-devel] ILI9340 Display Example
 
Hi Muhammad,

For the nrf52840_pca10056 you need to specify a display shield that supports ili9340, eg. west build -b nrf52840_pca10056 -- -DSHIELD=adafruit_2_8_tft_touch_v2

Note that ili9340 sample has been removed in the latest master as there is now a common sample that support different kind of display shields.

Regards,
Jan

On Thu, Mar 5, 2020 at 1:03 PM Muhammad Muh <muhammad.muh83@...> wrote:
Dear All,

I hope you all are doing well.

I am trying an example in
zephyrproject/zephyr/sample/display/ili9340

The example is building fine with nucleo board
west build -b nucleo_l476rg .

BUT

Please advise on the following error when building with nrf52840 west build -b nrf52840_pca10056 .

FAILED: CMakeFiles/app.dir/src/main.c.obj
ccache /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DBUILD_VERSION=zephyr-v2.0.0-1364-gbb3cd11bf192 -DKERNEL -DNRF52840_XXAA -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/muh/zephyrproject/zephyr/kernel/include -I/home/muh/zephyrproject/zephyr/arch/arm/include -I/home/muh/zephyrproject/zephyr/include -I/home/muh/zephyrproject/zephyr/include/drivers -Izephyr/include/generated -I/home/muh/zephyrproject/zephyr/soc/arm/nordic_nrf/nrf52 -I/home/muh/zephyrproject/zephyr/ext/hal/cmsis/Core/Include -I/home/muh/zephyrproject/modules/hal/nordic/nrfx -I/home/muh/zephyrproject/modules/hal/nordic/nrfx/drivers/include -I/home/muh/zephyrproject/modules/hal/nordic/nrfx/mdk -I/home/muh/zephyrproject/modules/hal/nordic/. -isystem /home/muh/zephyrproject/zephyr/lib/libc/minimal/include -isystem /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-ze
phyr-eabi/8.3.0/include -isystem /home/muh/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/include-fixed -Os -imacros/home/muh/zephyrproject/zephyr/samples/display/ili9340/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mthumb -mcpu=cortex-m4 -imacros/home/muh/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/muh/zephyrproject/zephyr/samples/display/ili9340=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/muh/zephyrproject/zephyr=ZEPHYR_BASE -ffunction-sections -fdata-sections -mabi=aapcs -march=armv7e-m -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj   -c ../src/main.c
../src/main.c: In function 'main':
../src/main.c:49:27: error: 'DT_INST_0_ILITEK_ILI9340_LABEL' undeclared (first use in this function); did you mean 'DT_INST_0_JEDEC_SPI_NOR_LABEL'?
  dev = device_get_binding(DT_INST_0_ILITEK_ILI9340_LABEL);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           DT_INST_0_JEDEC_SPI_NOR_LABEL
../src/main.c:49:27: note: each undeclared identifier is reported only once for each function it appears in
[4/106] Building C object zephyr/CMake...r/soc/arm/nordic_nrf/nrf52/power.c.obj
ninja: build stopped: subcommand failed.

Regards