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

Zephyr with adxl362 fails to compile #14

Open
ddandare opened this issue May 29, 2020 · 1 comment
Open

Zephyr with adxl362 fails to compile #14

ddandare opened this issue May 29, 2020 · 1 comment

Comments

@ddandare
Copy link

Hi,
I'm trying to add adxl362 accelerometer support to Zephyr. the accelerometer is connected to SPI1 via multicon and is working ok using an ASM program.
However, when trying to compile, using wall, a Zephyr program (hello world) with this driver enabled, I get this error:

In file included from ../soc/riscv/swervolf/soc.h:12,
                 from ../include/arch/riscv/arch.h:25,
                 from ../include/arch/cpu.h:25,
                 from ../include/kernel_includes.h:39,
                 from ../include/kernel.h:17,
                 from /home/artecs/zephyr/drivers/sensor/adxl362/adxl362.c:11:
zephyr/include/generated/devicetree_unfixed.h:603:36: error: 'DT_N_S_soc_S_spi_80001100_S_adi_adxl362_0_P_spi_max_frequency' undeclared here (not in a function); did you mean 'DT_N_S_soc_S_spi_80001040_S_flash_0_P_spi_max_frequency'?

hello world works ok with this driver disabled using guiconfig.

spi1, adxl362 and spi-max-frequency are included in swervolf_nexys.dts as follows:

&spi1 {
	status = "okay";

	adi_adxl362: adi_adxl362@0 {
		compatible = "adi_adxl362";
		label = "adi_adxl362";
		reg = <0>;
		spi-max-frequency = <2000000>;
	};
};

spi1@80001100 is defined at riscv32-swerv.dtsi.

any hint on the cause of the error?
Thanks

@olofk
Copy link
Collaborator

olofk commented Dec 26, 2022

I'm afraid I'm absolutely terrible with device trees and the Zephyr macros. If you ever found out how to make this work I would be happy to know more

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

No branches or pull requests

2 participants