chipsalliance / chipsalliance/VeeRwolf

Zephyr with adxl362 fails to compile

Open
#14 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Verilog
Stars
343
Forks
75
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with swervolf_nexys.dts and riscv32-swerv.dtsi, then inspect the generated devicetree_unfixed.h reference reported by the compiler and the adxl362.c driver. Rebuild the hello-world configuration with the driver enabled and determine why the spi-max-frequency property is not generated for the SPI1 node; done means the configuration compiles successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
build-system, embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.