This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF5340-DK build fail

The drop down does not list the nrf5340dk.

Using nRF Connect Toolchain Manager I open a command prompt in the v1.5.0 sdk,

cd zephyr\samples\drivers\spi_flash

I did:

west build -b nrf5340dk_nrf5340_cpuappns 

and got:

Kconfig header saved to 'C:/ncs/v1.5.0/zephyr/samples/drivers/spi_flash/build/spm/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: C:/ncs/v1.5.0/toolchain/opt/bin/arm-none-eabi-gcc.exe
-- Configuring done
-- Generating done
-- Build files have been written to: C:/ncs/v1.5.0/zephyr/samples/drivers/spi_flash/build/spm
=== child image spm -  end ===
-- Configuring done
CMake Error at ../../../cmake/extensions.cmake:416 (add_library):
  No SOURCES given to target: drivers__spi
Call Stack (most recent call first):
  ../../../cmake/extensions.cmake:393 (zephyr_library_named)
  ../../../drivers/spi/CMakeLists.txt:3 (zephyr_library)
CMake Generate step failed.  Build files cannot be regenerated correctly.


Looking at the spi_flash\boards directory I didn't find nrf5340dk_nrf5340_cpuappns .conf I found nrf5340dk_nrf5340_cpuapp.conf

I copied nrf5340dk_nrf5340_cpuapp.conf to nrf5340dk_nrf5340_cpuappns.conf

and

west build -b nrf5340dk_nrf5340_cpuappns --pristine

then programmed the DK:

JEDEC QSPI-NOR SPI flash testing
==========================

Test 1: Flash erase
Flash erase succeeded!

Test 2: Flash write
Attempting to write 4 bytes
Data read matches data written. Good!!

My thanks to jeff4BLE https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/adding-a-peripheral-to-an-ncs-zephyr-project

and the walk through devicetree, kconfig, api searching

The zephyr/samples/drivers/spi_flash/boards folder needs a nrf5340dk_nrf5340_cpuappns.conf file placed there unless this was a test to see who is awake.

And there is no nRF5340-DK in the tags

Parents
  • Hello,

    Happy to hear you got it going!

    The official NCS samples can be found under Application and Samples in the NCS documentation, and <NCS install path>nrf\samples\. These are tested and developed by Nordic Semiconductor specifically for the supported devices. 

    Samples found in the Zephyr repository, i.e. <NCS install path>zephyr\samples\drivers\spi_flash\, are made by the Zephyr community, and may not be fully tested/developed for a specific Nordic device. That said, most of the samples do work with our devices but may need some tweeking/board overlay/etc. The documentation states "The application will build only for a target that has a devicetree entry with jedec,spi-nor as a compatible." The community may have made a quick proff-of-concept test for the nRF5340 adding only one board configuration. 

    KInd regards,
    Øyvind

Reply
  • Hello,

    Happy to hear you got it going!

    The official NCS samples can be found under Application and Samples in the NCS documentation, and <NCS install path>nrf\samples\. These are tested and developed by Nordic Semiconductor specifically for the supported devices. 

    Samples found in the Zephyr repository, i.e. <NCS install path>zephyr\samples\drivers\spi_flash\, are made by the Zephyr community, and may not be fully tested/developed for a specific Nordic device. That said, most of the samples do work with our devices but may need some tweeking/board overlay/etc. The documentation states "The application will build only for a target that has a devicetree entry with jedec,spi-nor as a compatible." The community may have made a quick proff-of-concept test for the nRF5340 adding only one board configuration. 

    KInd regards,
    Øyvind

Children
No Data
Related