Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify include paths and defines via the command line, instead of using the project.yml file #828

Open
bo-dani opened this issue Nov 26, 2023 · 1 comment

Comments

@bo-dani
Copy link

bo-dani commented Nov 26, 2023

I'm trying to set up Ceedling in a way that, instead of hardcoding a bunch of include paths and defines in the project.yml file, I take them from the compile_commands.json file instead.

I haven't found a way of telling Ceedling to use it as an input, so instead I'm trying to get the defines and include paths myself, this is how I do it:

tr -s ' ' '\n' < .build/compile_commands.json | grep '^\-D' | sort -u | tr -s '\n' ' '

and for the include paths:

tr -s ' ' '\n' < .build/compile_commands.json | grep '^\-I' | sort -u | sed 's/-I..\/..\/..\/..\/src/-I../' | sed 's/\/\.$//' | tr -s '\n' ' '

If I run this, I get the following include path:

-I../rtos/FreeRTOS/Source/include

Which matches what I had set up in the project.yml:

- +:../rtos/FreeRTOS/Source/include

However, this doesn't seem to do the trick as I'm getting the following error:

ERROR: Found no file 'FreeRTOS.h' in search paths.

I tried to run a simple test by doing this, but it doesn't work either:

ceedling test:all "-I../rtos/FreeRTOS/Source/include"

Does anybody know what I'm doing wrong?

@mkarlesky
Copy link
Member

Hi, @bo-dani. There's no support in any version of Ceedling right now that allows you to add search paths or #define symbols from the command line. I can see the value of making that possible. Changes for command line handling in the upcoming 1.0.0 release are a foundation for this sort of ability. We'll add it to the backlog for consideration in post-1.0.0 work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants