Re: Enable SPI driver on nrf52840


Chettimada, Vinayak Kariappa
 

Hi Chuck,

All that I am sayings is, do not modify your repository, do not add anything to prj,conf file.
execute cmake, then either use make or ninja for the target config or menuconfig. Then you get to the Kconfig options for SPI and I2C drivers, select and fill all necessary details like the IRQ priorities and pins etc.
Mind you if the dependencies are not filled correctly, you will need to start all over again (clean, seems some issue with unassigned values to Kconfig options).

Meanwhile, issue with cmake or make failing fatally for missing dependencies will be looked into, https://github.com/zephyrproject-rtos/zephyr/issues/9573

Sebastian / Ulf,
Seems the make menuconfig is un-usable if dependencies like pin assignments are missing after enabling SPI driver for nRF52840.

Regards,
Vinayak

On 23 Aug 2018, at 04:16, cpmcparland@... wrote:

Vinayak,

Thanks for being persistent in looking at this issue.  Sorry for some confusion, I probably didn't state
the behavior I'm seeing very clearly.  At this point, the issue is that the cmake does NOT properly
complete when I include "CONFIG_SPI=y" in the prj.conf file.  My comment about menuconfig  was
just that, in my situation, it was not usable because the make files had not been created by the
cmake script that failed......sorry if that caused some confusion.

When I add CONFIG_SPI=y to the prj.conf file and do a clean cmake for BOARD=nrg52840_pca10056, I
get the following error from cmake:

CMake Error at ../../../CMakeLists.txt:527 (message):
  The Zephyr library 'drivers__spi' was created without source files.  Empty
  (non-imported) libraries are not supported.  Either make sure that the
  library has the sources it should have, or make sure it is not created when
  it has no source files.

Cmake has created all directories in my target directory (......./build/nrf52840_pca10056/zephyr/drivers/......)
But, no source files have been copied into them from the kernel tree.

When I do the same operation, but targeting a different board (arduino_101), the directories get created
and, under target directory root (...../build/arduino_101/zephyr/drivers/spi), the correct board drivers have
been copied.  Cmake completes successfully and the make also completes successfully.

Is there a magic "CONFIG_XXX" that I just don't know about?

Regards,
Chuck

Join {devel@lists.zephyrproject.org to automatically receive all group messages.