From 37af94edde7b42f1894484831b6d958bc4b27124 Mon Sep 17 00:00:00 2001 From: Thomas Huber <113915837+huber-th@users.noreply.github.com> Date: Sun, 3 Mar 2024 21:05:00 -0800 Subject: [PATCH] feat(docs): Add warning to new shield docs how Kconfig treats whitspaces Added a warning to the shield section explaining that Kconfig does not ignore whitespaces on function calls and therefore adding whitespaces after the comma will break functionality. --- docs/docs/development/new-shield.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/docs/development/new-shield.mdx b/docs/docs/development/new-shield.mdx index 0dcface3..2cd82bc6 100644 --- a/docs/docs/development/new-shield.mdx +++ b/docs/docs/development/new-shield.mdx @@ -79,6 +79,10 @@ config SHIELD_MY_BOARD def_bool $(shields_list_contains,my_board) ``` +:::warning +Kconfig uses only commas for delimiters, and keeps all whitespaces in the function call. Therefore do not add a whitespace after the comma when configuring your shield as this would be treated as <code> my_board</code> (with a leading whitespace) and will cause issues. +::: + This will make sure that a new configuration value named `SHIELD_MY_BOARD` is set to true whenever `my_board` is used as the shield name, either as the `SHIELD` variable [in a local build](build-flash.mdx) or in your `build.yaml` file [when using Github Actions](../customization). Note that this configuration value will be used in `Kconfig.defconfig` to set other properties about your shield, so make sure that they match. **For split boards**, you will need to add configurations for the left and right sides. For example, if your split halves are named `my_board_left` and `my_board_right`, it would look like this: