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.
This commit is contained in:
Thomas Huber 2024-03-03 21:05:00 -08:00 committed by Cem Aksoylar
parent db7b197790
commit 37af94edde

View File

@ -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>&nbsp;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: