mspm0: ti: cmake: migrate SoC selection from compiler flags to C macro#89
mspm0: ti: cmake: migrate SoC selection from compiler flags to C macro#89ssekar15 wants to merge 1 commit into
Conversation
| @@ -1,4 +1,16 @@ | |||
| if(CONFIG_HAS_MSPM0_SDK) | |||
| if(CONFIG_SOC_FAMILY_TI_MSPM0) | |||
| string(TOUPPER ${CONFIG_SOC} SDK_SOC_SELECT) | |||
There was a problem hiding this comment.
lowercase names for local variables, also file is not indented right
| if(CONFIG_SOC_FAMILY_TI_MSPM0) | ||
| string(TOUPPER ${CONFIG_SOC} SDK_SOC_SELECT) | ||
|
|
||
| file(WRITE "zephyr_device_selection.h" |
There was a problem hiding this comment.
this should be output to the correct location i.e. ${PROJECT_BINARY_DIR}/include/generated/zephyr/
| #ifndef ti_devices_DeviceFamily__include | ||
| #define ti_devices_DeviceFamily__include | ||
|
|
||
| #include <zephyr_device_selection.h> |
There was a problem hiding this comment.
compiles cleanly as compiler flag passed with -I zephyr/zephyr/build/zephyr/include/generated/zephyr
There was a problem hiding this comment.
because you have CONFIG_LEGACY_GENERATED_INCLUDE_PATH which is deprecated and really needs removing, so you need to add zephyr/
Avoid global namespace isolation pollution from zephyr_compile_definitions, prevent HAL related cflags visible to app. zephyrproject-rtos/zephyr#98647. Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
| @@ -1,4 +1,16 @@ | |||
| if(CONFIG_HAS_MSPM0_SDK) | |||
| if(CONFIG_SOC_FAMILY_TI_MSPM0) | |||
There was a problem hiding this comment.
Do we need this check for CONFIG_SOC_FAMILY_TI_MSPM0, shouldn't CONFIG_HAS_MSPM0_SDK check above already handle this?
There was a problem hiding this comment.
as of now it is unclear whether unified HAL will be used for MSMP0 & MSPM33 etc. I would suggest to keep MSPM0 guard.
Avoid global namespace isolation pollution from zephyr_compile_definitions,
prevent HAL related cflags visible to app.
zephyrproject-rtos/zephyr#98647.