Build system for C meant to be used with unit testing frameworks and libraries Unity, CMock and CException. The [ceedling] tag should be used only where the build system itself is of relevance, consider using tags [unity-test-framework], [cmock] and [cexception] instead.
Questions tagged [ceedling]
41 questions
0
votes
1 answer
Can we use ceedling with Bazel?
I'm working on unit tests for a c embedded project with Bazel, first I tested the code with Ceedling (Unity and cmock) and It worked. And now, I'm trying to merge to Bazel but I did not find any document about using ceedling with Bazel.

Nesmo07
- 15
- 3
0
votes
1 answer
Ceedling error when trying to compile/link with xc16-gcc
I am trying to implement test driven development for my Microchip embedded system process and am trying to do that via Ceedling (Unity, CMock, etc.). I have been trying to follow along with this tutorial:…

double01
- 1
- 1
0
votes
0 answers
Ceedling uses wrong startup file
I am unit-testing STM32 code with Ceedling. My issue is that Ceedling uses crt0.S as startup file, but I need it to use .S instead (otherwise it keeps failing).
Can it be specified somewhere in project.yml?
Here is my compiler setup:
:tools:
…

nero
- 33
- 3
0
votes
2 answers
Ceedling failing to mock header
I am trying to mock a header which is included by a source file I am testing.
The header begins with the following:
#if defined(ICM42600)
#define ICM_WHOAMI ICM42600_WHOAMI
#elif defined(ICM42602)
#define ICM_WHOAMI ICM42602_WHOAMI
#elif…

Daniel Paczuski Bak
- 3,720
- 8
- 32
- 78
0
votes
2 answers
How to unit test static callback routine called from ISR
I am using ceedling to unit test a C application and trying to achieve high coverage ~100%.
I have a static callback function in one of my application module, which is registered to SDK function with function pointer and is called at certain event…

piyj
- 19
- 7
0
votes
2 answers
Writing a macro such that static is disabled when testing
I am having trouble writing this macro. I am using ceedling.
I have a file, "globals.h", which has the following code:
#ifndef globals
#ifndef UNITY
#define STATIC static
#else
#define STATIC
#endif
#define globals…

Daniel Paczuski Bak
- 3,720
- 8
- 32
- 78
0
votes
1 answer
Why gcov is not covering logical && operator?
My piece of code which I am doing unit testing on is something like this:
if(((State !=TCPIP_IPADDR_STATE_ASSIGNED)&& (State !=TCPIP_IPADDR_STATE_ONHOLD) && (State !=TCPIP_IPADDR_STATE_UNASSIGNED)) ||(SoConId==DOIP_INVALID_16))
{
…

antromeda_12
- 3
- 2
0
votes
1 answer
CMock mock some functions but not others from same module
//myfuncs.h
void func1(void);
void func2(void;
I'm doing unit testing. Using CMock with ceedling, is there any way to mock func1(), but run func2() as it was originally written?

Peter Kapteyn
- 354
- 1
- 13
0
votes
1 answer
General unit-testing: possible to mock self functions? (ceedling/CMock)
Is it principally possible to mock the functions of a file to be tested?
E.g. I want to test the file self_test.c consisting of those functions:
#include "self_test.h"
uint8_t function_1(uint8_t argument)
{
return…

T.B.
- 11
- 4
0
votes
1 answer
Ceedling with multiple source file extensions
I am trying to setup up unit tests for my existing embedded project. Unfortunatly the project has mixed extentions for the source files ".c" and ".C". Due to version control history I cannnot just rename all files to ".c"
I tried to edit the yaml…

manituhh
- 1
0
votes
0 answers
Unit testing STM32 with Ceedling
I need to do some unit testing in my C project, which will be used in STM32F0 processor. I could test my abstraction code on x64 gcc, but the problem is i need a platform with little-endian (STM32F0 is little-endian by default). I tried to do some…

Sławomir Kozok
- 141
- 1
- 8