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

Xtensa XCC Build spi_nor.c fail #43745

Closed
hongshui3000 opened this issue Mar 14, 2022 · 0 comments · Fixed by #43978
Closed

Xtensa XCC Build spi_nor.c fail #43745

hongshui3000 opened this issue Mar 14, 2022 · 0 comments · Fixed by #43978
Assignees
Labels
area: SPI SPI bus bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@hongshui3000
Copy link
Contributor

hongshui3000 commented Mar 14, 2022

Describe the bug
log

r/spi_nor.c.obj -c E:/work/zephyr/drivers/flash/spi_nor.c
E:/work/zephyr/drivers/flash/spi_nor.c: In function 'spi_nor_erase':
E:/work/zephyr/drivers/flash/spi_nor.c:686: warning: unused variable 'xcc_ret'
E:/work/zephyr/drivers/flash/spi_nor.c: At top level:
E:/work/zephyr/drivers/flash/spi_nor.c:1231: error: unknown field 'gpio' specified in initializer
E:/work/zephyr/drivers/flash/spi_nor.c:1231: error: unknown field 'port' specified in initializer
E:/work/zephyr/drivers/flash/spi_nor.c:1231: warning: missing braces around initializer
E:/work/zephyr/drivers/flash/spi_nor.c:1231: warning: (near initialization for '(anonymous).

<anonymous>.gpio')E:/zephyr/drivers/flash/spi_nor.c:1231: error: unknown field 'pin' specified in initializer
E:/work/zephyr/drivers/flash/spi_nor.c:1231: warning: excess elements in union initializer
E:/work/zephyr/drivers/flash/spi_nor.c:1231: warning: (near initialization for '(anonymous).<anonymous>')     
E:/work/zephyr/drivers/flash/spi_nor.c:1231: error: unknown field 'dt_flags' specified in initializer
E:/work/zephyr/drivers/flash/spi_nor.c:1231: warning: excess elements in union initializer
E:/work/zephyr/drivers/flash/spi_nor.c:1231: warning: (near initialization for '(anonymous).<anonymous>')   
struct spi_cs_control {
	/**
	 * GPIO devicetree specification of CS GPIO.
	 * The device pointer can be set to NULL to fully inhibit CS control if
	 * necessary. The GPIO flags GPIO_ACTIVE_LOW/GPIO_ACTIVE_HIGH should be
	 * equivalent to SPI_CS_ACTIVE_HIGH/SPI_CS_ACTIVE_LOW options in struct
	 * spi_config.
	 */
	union {                                            ---------------->xcc does not recognize correctly
		struct gpio_dt_spec gpio;
		struct {
			const struct device *gpio_dev;
			gpio_pin_t gpio_pin;
			gpio_dt_flags_t gpio_dt_flags;
		};
	};
	/**
	 * Delay in microseconds to wait before starting the
	 * transmission and before releasing the CS line.
	 */
	uint32_t delay;
};
@hongshui3000 hongshui3000 added the bug The issue is a bug, or the PR is fixing a bug label Mar 14, 2022
@hongshui3000 hongshui3000 changed the title Xtensa Xtensa XCC Build spi_nor.c fail Mar 14, 2022
@mbolivar-nordic mbolivar-nordic added priority: medium Medium impact/importance bug area: SPI SPI bus labels Mar 15, 2022
MaureenHelm added a commit to MaureenHelm/zephyr that referenced this issue Apr 4, 2022
Adds a new test for the SPI_DT_SPEC initializer macro to reproduce the
XCC build failure reported in zephyrproject-rtos#43745 on the intel_adsp_cavs15 board.

Signed-off-by: Maureen Helm <[email protected]>
mbolivar-nordic pushed a commit that referenced this issue Apr 4, 2022
Adds a new test for the SPI_DT_SPEC initializer macro to reproduce the
XCC build failure reported in #43745 on the intel_adsp_cavs15 board.

Signed-off-by: Maureen Helm <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: SPI SPI bus bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants