Trouble building at_client sample

I've mostly gotten the tools installed to build for the SparkFun Thing+ nRF9160 board. It had a version of the at_client installed, in that it responded to some AT commands I'd send (but it also was outputting a logging message about an accelerometer). One of the commands I could not get to work was AT+CGDCONT?, or it would just return OK and no information.

Anyway, I tried to build the at_client sample from the v1.9.1 SDK. I flashed the resulting zephyr.bin file to the device, but it seems to not do anything. I saw in the SparkFun getting started that I needed to add "CONFIG_BOOTLOADER_MCUBOOT=y", but that breaks the build.

I tried deleting the build directory, but it doesn't seem to help:

[205/217] Linking C executable zephyr/zephyr.elf
FAILED: modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-build mcuboot/zephyr/zephyr.hex mcuboot/zephyr/zephyr.elf /opt/nordic/ncs/current/nrf/samples/nrf9160/at_client/build/modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-build /opt/nordic/ncs/current/nrf/samples/nrf9160/at_client/build/mcuboot/zephyr/zephyr.hex /opt/nordic/ncs/current/nrf/samples/nrf9160/at_client/build/mcuboot/zephyr/zephyr.elf 
cd /opt/nordic/ncs/current/nrf/samples/nrf9160/at_client/build/mcuboot && /opt/nordic/ncs/v1.9.1/toolchain/Cellar/cmake/3.21.1/bin/cmake --build . --
[207/217] Linking C executable zephyr/zephyr.elf
FAILED: zephyr/zephyr.elf zephyr/zephyr.map zephyr/zephyr.hex zephyr/zephyr.bin zephyr/zephyr.meta zephyr/zephyr.lst zephyr/zephyr.stat /opt/nordic/ncs/current/nrf/samples/nrf9160/at_client/build/zephyr/zephyr.map /opt/nordic/ncs/current/nrf/samples/nrf9160/at_client/build/zephyr/zephyr.hex /opt/nordic/ncs/current/nrf/samples/nrf9160/at_client/build/zephyr/zephyr.bin /opt/nordic/ncs/current/nrf/samples/nrf9160/at_client/build/zephyr/zephyr.meta /opt/nordic/ncs/current/nrf/samples/nrf9160/at_client/build/zephyr/zephyr.lst /opt/nordic/ncs/current/nrf/samples/nrf9160/at_client/build/zephyr/zephyr.stat 
: && /opt/nordic/ncs/current/toolchain/bin/arm-none-eabi-gcc   zephyr/CMakeFiles/zephyr_final.dir/misc/empty_file.c.obj zephyr/CMakeFiles/zephyr_final.dir/dev_handles.c.obj zephyr/CMakeFiles/zephyr_final.dir/isr_tables.c.obj -o zephyr/zephyr.elf  zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj  -fuse-ld=bfd  -Wl,-T  zephyr/linker.cmd  -Wl,-Map=/opt/nordic/ncs/current/nrf/samples/nrf9160/at_client/build/zephyr/zephyr_final.map  -Wl,--whole-archive  app/libapp.a  zephyr/libzephyr.a  zephyr/arch/common/libarch__common.a  zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a  zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a  zephyr/arch/arch/arm/core/aarch32/cortex_m/cmse/libarch__arm__core__aarch32__cortex_m__cmse.a  zephyr/arch/arch/arm/core/aarch32/mpu/libarch__arm__core__aarch32__mpu.a  zephyr/lib/libc/minimal/liblib__libc__minimal.a  zephyr/lib/posix/liblib__posix.a  zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a  zephyr/boards/arm/circuitdojo_feather_nrf9160/libboards__arm__circuitdojo_feather_nrf9160.a  zephyr/subsys/net/libsubsys__net.a  zephyr/subsys/net/ip/libsubsys__net__ip.a  zephyr/subsys/random/libsubsys__random.a  zephyr/drivers/clock_control/libdrivers__clock_control.a  zephyr/drivers/console/libdrivers__console.a  zephyr/drivers/gpio/libdrivers__gpio.a  zephyr/drivers/serial/libdrivers__serial.a  zephyr/drivers/entropy/libdrivers__entropy.a  zephyr/drivers/timer/libdrivers__timer.a  modules/nrf/lib/nrf_modem_lib/lib..__nrf__lib__nrf_modem_lib.a  modules/nrf/lib/at_monitor/lib..__nrf__lib__at_monitor.a  modules/nrf/lib/at_host/lib..__nrf__lib__at_host.a  modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a  modules/nrf/subsys/fw_info/lib..__nrf__subsys__fw_info.a  modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a  /opt/nordic/ncs/current/nrfxlib/nrf_modem/lib/cortex-m33/soft-float/libmodem.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  -L"/opt/nordic/ncs/v1.9.1/toolchain/bin/../lib/gcc/arm-none-eabi/9.2.1/thumb/v8-m.main/nofp"  -L/opt/nordic/ncs/current/nrf/samples/nrf9160/at_client/build/zephyr  -lgcc  -Wl,--print-memory-usage  zephyr/arch/common/libisr_tables.a  -no-pie  -mcpu=cortex-m33  -mthumb  -mabi=aapcs  -mfp16-format=ieee  -Wl,--gc-sections  -Wl,--build-id=none  -Wl,--sort-common=descending  -Wl,--sort-section=alignment  -Wl,-u,_OffsetAbsSyms  -Wl,-u,_ConfigAbsSyms  -nostdlib  -static  -Wl,-X  -Wl,-N  -Wl,--orphan-handling=warn  spm/libspmsecureentries.a && cd /opt/nordic/ncs/current/nrf/samples/nrf9160/at_client/build/zephyr && /opt/nordic/ncs/v1.9.1/toolchain/Cellar/cmake/3.21.1/bin/cmake -E rename zephyr_final.map zephyr.map && /opt/nordic/ncs/current/toolchain/bin/arm-none-eabi-objcopy --gap-fill 0xff --output-target=ihex --remove-section=.comment --remove-section=COMMON --remove-section=.eh_frame zephyr.elf zephyr.hex && /opt/nordic/ncs/current/toolchain/bin/arm-none-eabi-objcopy --gap-fill 0xff --output-target=binary --remove-section=.comment --remove-section=COMMON --remove-section=.eh_frame zephyr.elf zephyr.bin && /opt/nordic/ncs/current/toolchain/bin/python3 /opt/nordic/ncs/current/zephyr/scripts/zephyr_module.py --zephyr-base /opt/nordic/ncs/current/zephyr --meta-out zephyr.meta && /opt/nordic/ncs/current/toolchain/bin/arm-none-eabi-objdump -d -S zephyr.elf > zephyr.lst && /opt/nordic/ncs/current/toolchain/bin/arm-none-eabi-readelf -e zephyr.elf > zephyr.stat
Memory region         Used Size  Region Size  %age Used
           FLASH:       62672 B     425472 B     14.73%
            SRAM:       32344 B     211736 B     15.28%
        IDT_LIST:          0 GB         2 KB      0.00%
Traceback (most recent call last):
  File "/opt/nordic/ncs/current/zephyr/scripts/zephyr_module.py", line 542, in <module>
    main()
  File "/opt/nordic/ncs/current/zephyr/scripts/zephyr_module.py", line 534, in main
    meta = process_meta(args.zephyr_base, west_proj, modules,
  File "/opt/nordic/ncs/current/zephyr/scripts/zephyr_module.py", line 318, in process_meta
    if project.sha(MANIFEST_REV_BRANCH) != revision:
  File "/opt/nordic/ncs/v1.9.1/toolchain/lib/python3.9/site-packages/west/manifest.py", line 847, in sha
    cp = self.git(f'rev-parse {rev}^{{commit}}', capture_stdout=True,
  File "/opt/nordic/ncs/v1.9.1/toolchain/lib/python3.9/site-packages/west/manifest.py", line 831, in git
    raise subprocess.CalledProcessError(popen.returncode, cmd_list,
subprocess.CalledProcessError: Command '['rev-parse', 'manifest-rev^{commit}']' returned non-zero exit status 128.
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /opt/nordic/ncs/current/toolchain/bin/cmake --build /opt/nordic/ncs/v1.9.1/nrf/samples/nrf9160/at_client/build

(full transcript: https://pastebin.com/DCurPYsu)

I'm puzzled as to what to do next.

Parents
  • Yeah, I re-ran the python dependencies installation. Even with those installed I get the error.

    rev-parse, is that part of git? I noticed the git installed by your tools was broken.

    I think your SDK makes the mistake of trying to install its own copy of all the standard tools, which can really pollute a system. It would be better if you relied on each platform's mechanism for installing common dependencies like python, git, and gcc (e.g. use machomebrew).

  • JetForMe said:
    I think your SDK makes the mistake of trying to install its own copy of all the standard tools, which can really pollute a system. It would be better if you relied on each platform's mechanism for installing common dependencies like python, git, and gcc (e.g. use machomebrew).

    The Toolchain Manager, which I assume that you installed the nRF Connect SDK with , will install the tools needed automatically. That said, it should not interfere with the rest of the system from what I've been informed. I have forwarded this case to our Toolchain Manager developers to get some feedback. 

    JetForMe said:
    Yeah, I re-ran the python dependencies installation. Even with those installed I get the error.

    Looking over your output again, it looks like there are two installs of nRF Connect SDK

    /opt/nordic/ncs/current/zephyr/

    /opt/nordic/ncs/v1.9.1/toolchain

    The Toolchain Manager will install everything in the v1.9.1 folder. Can you please verify that you have not installed two versions?

    Kind regards,
    Øyvind

  • Also, as mentioned in ticket 287809

    nRF Connect for Desktop is not the nRF Connect SDK. The Toolchain Manager, found in nRF Connect for Desktop, will install the nRF Connect SDK and its Toolchain for you. You can install this manually by following our manual install guide for MacOS, or the alternative setup instructions from Zephyr.

Reply Children
No Data
Related