Integrating Unit Testing into PSOC Creator?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hey all,

   

I've been working with PSOC creator, specifically with the 4200 series eval boards for about two years now. I recently picked up a book about test driven development in C for embedded systems and am working through it. As part of one of the exercises, the author asks me to set up my environment for TDD (Test driven development). I have been bashing my head at this problem for the better part of a week and finally decided to make my first forum post! The first option would be to just do the unit testing for the firmware on my development system (linux in a virtual box) and never run the tests on the target hardware (The PSOC). I'm not big on this. Part of the TDD for embedded development cycle is verifying that code dependencies and functionality aren't broken across porting and many of the idiosyncrasies of embedded systems happen on the hardware in question. Another thought that I had was using Unity for the unit testing part of this and just integrating it into my PSOC build, which is a possibility. A final thought that I had was doing my hardware design in PSOC creator and then exporting the code to Eclipse where I can happily develop my firmware and use Eclipse based plugins to help with TDD cycle. If people have had luck with the final option, that would be nice as I also do some programming for MSP430 series and eclipse supports programming those as well. 

   

 

   

Sidebar, does anyone know if the miniprog3 is supported in Eclipse?

   

 

   

I apologize if this post seems long winded. I am just getting into TDD and am somewhat of a Noob when it comes to making software in windows.

   

 

   

Thanks

   

Marc

0 Likes
1 Solution
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Its difficult to do TDD with hardware involved. But you can try to separate all the logic and then do local testing. See this blog post for how to do that with Ceedling (I used that with an non-PSoC project with quite some success).

View solution in original post

0 Likes
2 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Its difficult to do TDD with hardware involved. But you can try to separate all the logic and then do local testing. See this blog post for how to do that with Ceedling (I used that with an non-PSoC project with quite some success).

0 Likes
Anonymous
Not applicable

Ok, so basically I can just do my TDD firmware development separately in linux, take out the source files and import them to PSOC creator. 

0 Likes