-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Problem to build lorawan from samples #31164
Comments
Looks like the lorawan module is not being enabled in your prj.conf file. Try adding the below to your prj.conf (you may need to change the region you use, maybe use menuconfig to determine the one you want). FYI, I've got Lorawan working on the nrf52840DK |
I have added what u said, but it still doesn't work. My prj.conf file is below CONFIG_USE_SEGGER_RTT=y CONFIG_LOG=y CONFIG_LORA=y |
@GABS9718 I guess you can not define symbol |
I tried and the result is the same unfortunately |
@GABS9718 what's the output that west is throwing this time? |
I guess the same: `-- west build: generating a build system warning: LORA_SHELL (defined at drivers/lora/Kconfig:21) was assigned the value 'y' but got the warning: LORA_SX12XX (defined at drivers/lora/Kconfig.sx12xx:11) was assigned the value 'y' but got warning: SPI_0 (defined at drivers/spi/Kconfig:39) was assigned the value 'y' but got the value 'n'. Parsing C:/Users/Gabriel/Desktop/nbps/zephyrproject/zephyr/Kconfig Update the VERSION argument value or use a ... suffix to tell -- Configuring done |
Maybe the problem to link is related with those warnings, where is said that Lora was assigned with yes but got no. Why is this happening? |
@GABS9718 I built the application with 70ac338 using nrf52dk_nrf52832 board with the following symbols:
One thing that you can try is remove the build directory and rebuild with pristine option enabled, I guess removing the build directory is kind of important before actually issuing the following:
Try that out, hope that works. |
I actually was removing the build folder to be sure that this would not have influence. Do u have some another guess that I could try? Do u think that it can be related with the settings in the VS Code with the includePath directory? I'm really lost |
@GABS9718, I don't know about setting up Zephyr with VS Code, however, what I can think that you can do is just trying to compile the application using only west, if that doesn't work, I guess you need to find another option. But, I already tested with west, so, if all steps are okey, you should not have any issues. |
@Mani-Sadhasivam do u have some guess? I have been trying to fix it for a while, but I still just get the same result already writen in this topic. |
@GABS9718 The issue is mostly related to your Kconfig setting. Please use the below diff:
Also note that for getting lora to work, you need to choose the |
Hi @Mani-Sadhasivam, thanks for the help. I have tried what u said, but I still get an error. Do u think that is related with the below print screen? I got this when I did what u said. |
@GABS9718 Did you modify the sample application? There seems to be include errors that might due to wrong env settings or due to your change in samples/lorawan/class_1. But this error is not related to the change I shared. With the above diff, I could get the build to complete successfully. |
@Mani-Sadhasivam No, I did not. I just added in the device tree the node and the aliases for the lora. Everything else is the same as in the last zephyr version in master. I have add some print screens that show this. Now, how my environment variables are setted in my PC. And the error Do u have some other guess? I'm stuck in this for a while and idk what is going on. I have followed the instructions in the documents and everything else in this topic. I guess is something simple that I still could not find. |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
Describe the bug
Hi, I have been trying to set up the LoRa with the nRF52840, but I'm can't build the file.
To Reproduce
Steps to reproduce the behavior:
Add the line lora0 = &lora; in the aliases options from the .dts related to the board nrf52840dk_nrf52840
Add
lora: sx1276@0 {
status = "okay";
compatible = "semtech,sx1276";
reg = <0>;
label = "sx1276";
reset-gpios = <&gpio0 13 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
dio-gpios = <&gpio0 1 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>,
<&gpio0 2 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>,
<&gpio0 3 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>,
<&gpio0 4 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>,
<&gpio0 5 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
spi-max-frequency = <1000000>;
power-amplifier-output = "pa-boost";
};
to the spi1 options in the same file.
Change the prf.conf from samples/lorawan/class_a
_CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_UART_CONSOLE=n
CONFIG_LOG=y
CONFIG_SPI=y
CONFIG_SPI_1=y
CONFIG_SPI_NRFX=y
CONFIG_GPIO=y
CONFIG_PRINTK=y
CONFIG_LORA=y
CONFIG_LORA_SHELL=y
CONFIG_LORA_SX1276=y
CONFIG_HAS_SEMTECH_RADIO_DRIVERS=y
CONFIG_HAS_SEMTECH_LORAMAC=y_
Expected behavior
Build the project
Impact
I'm getting this error:
[145/150] Linking C executable zephyr\zephyr_prebuilt.elf
FAILED: zephyr/zephyr_prebuilt.elf
Environment (please complete the following information):
OS: Windows
Toolchain: GNU ARM Embedded
The newest one from the repository
Additional context
I can build other samples, like hello_world and blinky.
LOG:
The text was updated successfully, but these errors were encountered: