I'm starting to look at using Ceedling (+Unity + CMock) for some test driven development but am having trouble getting tests that use/mock the SDK. I'm currently trying to set up unit tests for a custom ble service (an SDK equivalent would be any of the files in the components\ble\ble_services folder) that will run on my PC, not on the target. I am using Cygwin and gccDoes anyone have any experience/guidance/project files for how to set this up?My current yml file looks like this
I am using python to extract include paths and defines from my Keil project file and generate another yml file that I include when running ceedling e.g.
ceedling options:NRF52_S332_SDK153 test:all
this is so i can run tests for each of the targets for my project.I'm currently stuck with errors like
../libnordic/v15.3/components/softdevice/s332/headers/ble.h: In function 'sd_ble_user_mem_reply':../libnordic/v15.3/components/softdevice/s332/headers/nrf_svc.h:68:5: error: unknown register name 'r0' in 'asm' __asm( \ ^.
I have included mock_ble.h in my test file.
TEST_IGNORE_MESSAGE("Need to Implement ble_my_service");
to my understanding there is no support for Ceedling. You can read more about it in this post.
Sorry for resurrecting an old thread.
I have Ceedling working well for my project which uses the Nordic SDK + GCC.
Please be sure to include all relevant defines in your project.yml. Mine looks like this:
# in order to add common defines:
# 1) remove the trailing  from the :common: section
# 2) add entries to the :common: section (e.g. :test: has TEST defined)