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

Unit test with nrf52+ Segger

Hello,
I am developing a big project with the nrf52832 + several peripheral devices and I want to integrate the notion of unit test to my project (in Segger embedded studio).

I have already done some unit-tests with python but never in embedded systems.
Can someone help me get started?

Or how do you test that your code is working well ? I know that i can flash the code and see the result but it's not a rigorous testing as unit-test.

Parents
  • Hi,

    For the nRF5 SDK we do testing at all levels (using the V model). Modules in our SDK that are not labeled "experimental" are considered to be fully production tested from our side.

    We have kits connected to a PC and use nrfjprog to program the kits with the firmware to test. We have a dongle connected to the PC and use pc-ble-driver (or similar) for testing BLE communication. We also use controllable USB hubs (where power can be turned on and off programatically) for resetting kits, etc. This means all of the steps for testing can be command line scripted.

    For unit tests we use Unity. Have a look at the thread Changing unity printf to Segger RTT for a bit more information and for a test example (from SDK 13.0.0, but the principles are the same.)

    Regards,
    Terje

Reply
  • Hi,

    For the nRF5 SDK we do testing at all levels (using the V model). Modules in our SDK that are not labeled "experimental" are considered to be fully production tested from our side.

    We have kits connected to a PC and use nrfjprog to program the kits with the firmware to test. We have a dongle connected to the PC and use pc-ble-driver (or similar) for testing BLE communication. We also use controllable USB hubs (where power can be turned on and off programatically) for resetting kits, etc. This means all of the steps for testing can be command line scripted.

    For unit tests we use Unity. Have a look at the thread Changing unity printf to Segger RTT for a bit more information and for a test example (from SDK 13.0.0, but the principles are the same.)

    Regards,
    Terje

Children
Related