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

Drivers from nRF5_SDK to Mesh SDK

Hello,

I would like to add the ST7735 driver from the nRF5_SDK to the Mesh SDK along with the necessary components (SPI,..). I copied the entire components directory to my Mesh SDK. But I have an issue with the cmake operation when trying to build the example as it cannot find the include files.

What is the best way to solve this issue? Should I modify some CMake files?

Thanks.

UPDATE 19/01/2018: mesh_pwm.zip Screenshot Mesh_PWM.png

  • Hi Hung, Thank you for providing me with an example. I am getting an error when trying to compile your files external/nRF5_SDK_14.1/components/drivers_nrf/timer/nrf_drv_timer.h:79:53: error: 'TIMER0_ENABLED' undeclared here (not in a function) #define TIMER1_INSTANCE_INDEX TIMER0_INSTANCE_INDEX+TIMER0_ENABLED Do you know what might cause that? Thanks

  • TIMER0_ENABLED should be defined (=1) inside sdk_config.h inside \examples\light_switch_PWM\server\config, please check.

  • Hi Hung, I tried to implement your example following your indications. I modified the CMakeLists.txt with what you added to link the files. I then tried to run the PWM application but I still get errors during compilation.

    [ 61%] Linking C executable light_switch_server_nrf52840_xxAA_s140_5.0.0-3.alpha.elf CMakeFiles/light_switch_server_nrf52840_xxAA_s140_5.0.0-3.alpha.dir/src/main.c.obj: In function main': examples/light_switch/server/src/main.c:155: undefined reference toapp_pwm_init' examples/light_switch/server/src/main.c:157: undefined reference to app_pwm_enable' examples/light_switch/server/src/main.c:159: undefined reference toapp_pwm_channel_duty_set' collect2: error: ld returned 1 exit status make[2]: *** [examples/light_switch/server/light_switch_server_nrf52840_xxAA_s140_5.0.0-3.alpha.elf]

  • It's telling app_pwm is not included properly in your application, have you included the source file and path to the header files ?

    Another option is to integrate the Mesh example into the nRF5 SDK. Have a look here.

  • Yes i tested the code before updloading.

    app_pwm_channel_duty_set is defined inside app_pwm.c and declared in app_pwm.h . Make sure you the .h in your main.c and included the .c in your project. If you still have problem, please take a screenshot and send me your project.

Related