We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Problem: OpenWRT lora_gateway-5.0.1 compile as DEBUG enable

  • @optech try this:

    make menuconfig
    Check "Enable package source tree override" in the "Advanced configuration options (for developers)" menu
    exit and save

    make package/feeds/packages/lora-gateway-hal/clean V=s
    make package/feeds/packages/lora-gateway-hal/prepare USE_SOURCE_DIR=~/lora_gateway-5.0.1 V=s
    make package/feeds/packages/lora-gateway-hal/compile V=s

  • @optech I should mention that if all you want to do is turn on the debug options you can just tweak the patch file because this overrides the library.cfg settings. To do this just edit package/feeds/packages/net/lora-gateway-hal/patches/0001-add-cmake-support.patch

    Line 126 has the debug options you are looking for, just change the OFF to ON for the required options, then clean and make build again and you'll see the debug options you set are turned on.

    SPI_DEV_PATH is set in package/feeds/packages/net/lora-gateway-hal/patches/0002-add-preprocessing-for-SPI_DEV_PATH-and-SPI_SPEED.patch

  • @crispyoz I tried your advices as you commented.

    • I done --> "Check "Enable package source tree override" in the "Advanced configuration options (for developers)" " step

    • "make package/feeds/packages/lora-gateway-hal/clean V=s" is ok.

    • "make package/feeds/packages/lora-gateway-hal/prepare USE_SOURCE_DIR=~/lora_gateway-5.0.1 V=s" delete "lora_gateway-5.0.1" folder from main path, then creates a symbolic link to "~/lora_gateway-5.0.1".

    • "make package/feeds/packages/lora-gateway-hal/compile V=s" compiles well but the result is same as before, no output as my changes in source codes or header/configuration files.

    This operation just changes the path of "lora_gateway-5.0.1"... šŸ˜•

    If I execute a "make package/feeds/packages/lora-gateway-hal/clean V=s", it deletes the symbolic link. So, if I compile again, it download the "lora_gateway-5.0.1" folder again to the original path, then compile the original code... šŸ˜–

  • @crispyoz I tried the edit the patch file also. I made :

    +option(DEBUG_SPI "Active debug mode in SPI module" ON)
    +option(DEBUG_REG "Active debug mode in REG module" ON)

    But when i load the executable file (util_spi_stress) to omega2s+ as getting from "lora_gateway-5.0.1/bin", i can not see any debug output.

    But this time i see changes in config.h:

    #define DEBUG_AUX 0
    #define DEBUG_SPI 1
    #define DEBUG_REG 1
    #define DEBUG_HAL 0
    #define DEBUG_GPS 0
    #define DEBUG_GPIO 0
    #define DEBUG_LBT 0

    Do you think it is correct path for compiled executable? --> "lora_gateway-5.0.1/bin" ???

    By the way, I wanna edit sources also to solve a communication problem as looking debug outputs...

  • @optech if you look at the code it doesn't log much at all, regardless of the debug settings.

    clean does remove the symlink. This is basically a hack so it's always going to be a pain. This is why my original suggestion was to fork the source and set up your own package so you have control of the code.

  • This post is deleted!

  • @crispyoz How can i set up a separate package ? When I copy and compile separately at different location, it compiles but no changes at output (changes for source codes and configs)? I mean not for just debug outputs, i cant get results for source code changes too.. Could you tried something at your side to reproduce the problem with a small source code change(like console print text change)?

  • @crispyoz I cloned "https://github.com/Lora-net/lora_gateway.git" repository and I made cross compile settings. Then I can see the results what i did šŸ™‚ Thank you for your help @crispyoz and @Lazar-Demin

  • @optech Congratulations.
    This was my original advice, because the other methods are really workarounds/hacks/shortcuts. In my experience shortcuts rarely are that.

  • @crispyoz Yes it is. I remember. Thank you šŸ™‚

Looks like your connection to Community was lost, please wait while we try to reconnect.