# How to use relative paths in build flags?

Hi,
How can I use a path relative to workspace_dir as a build flag?

I am trying to add include folders. Eg: I would like to do the following:
build_flags =
-I \${workspace_dir}/utils/segger_rtt/RTT

Please let me know, the docs are not very clear on this and I tried different things without success
Thanks

Just use `-I utils/segger_rtt/RTT`, PlatformIO will automatically resolve path from a current working directory (which is project directory).

1 Like