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

scripts: dts/Generate compatible flags #9974

Merged
merged 2 commits into from
Sep 14, 2018

Conversation

erwango
Copy link
Member

@erwango erwango commented Sep 13, 2018

Generate CONFIG_DT_COMPAT_xx flags using nodes compatible property.

These flags could be used for SW build control.
Following is an example of this new 'Compatibles' section in generated_dts_board.h for board disco_l475_iot1 in sample/hello_world:

/* Compatibles */
#define CONFIG_DT_COMPAT_ARM_V7M_NVIC			
#define CONFIG_DT_COMPAT_FIXED_PARTITIONS		
#define CONFIG_DT_COMPAT_GPIO_KEYS			
#define CONFIG_DT_COMPAT_GPIO_LEDS			
#define CONFIG_DT_COMPAT_SOC_NV_FLASH			
#define CONFIG_DT_COMPAT_ST_HTS221			
#define CONFIG_DT_COMPAT_ST_LIS3MDL_MAGN		
#define CONFIG_DT_COMPAT_ST_LPS22HB_PRESS		
#define CONFIG_DT_COMPAT_ST_LSM6DSL			
#define CONFIG_DT_COMPAT_ST_SPBTLE_RF			
#define CONFIG_DT_COMPAT_ST_STM32L4_FLASH_CONTROLLER	
#define CONFIG_DT_COMPAT_ST_STM32_GPIO			
#define CONFIG_DT_COMPAT_ST_STM32_I2C_V2		
#define CONFIG_DT_COMPAT_ST_STM32_PINMUX		
#define CONFIG_DT_COMPAT_ST_STM32_RCC			
#define CONFIG_DT_COMPAT_ST_STM32_RTC			
#define CONFIG_DT_COMPAT_ST_STM32_SPI_FIFO		
#define CONFIG_DT_COMPAT_ST_STM32_TIMERS		
#define CONFIG_DT_COMPAT_ST_STM32_UART			
#define CONFIG_DT_COMPAT_ST_STM32_USART			
#define CONFIG_DT_COMPAT_ST_VL53L0X	

Add 'generation: define' directive to 'compatible' property.
When existing for a type of device, move compatible property
description in device base structure (eg: i2c.yaml)

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
@erwango erwango requested a review from galak September 13, 2018 15:39
@erwango erwango force-pushed the dev_generate_compat_flags branch 2 times, most recently from 1f8085d to 9efc4e9 Compare September 14, 2018 11:27
Generate CONFIG_DT_COMPAT flags using available nodes
'compatible' property.
Store them in a bogus node_address key of defs dict so
duplicates could be removed.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
@galak galak merged commit c5ada39 into zephyrproject-rtos:master Sep 14, 2018
@erwango erwango deleted the dev_generate_compat_flags branch September 3, 2019 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants