- Edited
mikcatta try this:
Open up powershell.exe
in Adminstrator mode and run:
choco uninstall cmake
choco install -y cmake --version 3.18.5
Then delete your build
directory and try again.
mikcatta try this:
Open up powershell.exe
in Adminstrator mode and run:
choco uninstall cmake
choco install -y cmake --version 3.18.5
Then delete your build
directory and try again.
Hi @jaredwolff
Tried that, and cmake didn’t seem to be added to the PATH, so had to add it manually and now it reports as:
C:\nfed\nrf9160-feather\samples\blinky>cmake -version
cmake version 3.18.5
But I still get the same error as before:-
CMake Error at C:/nfed/zephyr/cmake/extensions.cmake:1457 (message):
Assertion failed: The toolchain is unable to build a dummy C file. See
CMakeError.log.
Call Stack (most recent call first):
C:/nfed/zephyr/CMakeLists.txt:42 (assert)
-- Configuring incomplete, errors occurred!
See also "C:/nfed/nrf9160-feather/samples/blinky/build/CMakeFiles/CMakeOutput.log".
See also "C:/nfed/nrf9160-feather/samples/blinky/build/CMakeFiles/CMakeError.log".
FATAL ERROR: command exited with status 1: 'c:\program files\cmake\bin\cmake.EXE' '-BC:\nfed\nrf9160-feather\samples\blinky\build' '-SC:\nfed\nrf9160-feather\samples\blinky' -GNinja -DBOARD=circuitdojo_feather_nrf9160ns
mikcatta where are you running these commands? powershell.exe
? You don’t have any other cmake
installations before using choco
correct?
I will add, what are you using to do your edits? I’m starting to see that my setup is not working in standalone powershell.exe
but in the shell provided by VSCode. (as that’s how I did my testing)
Can you try installing cmake
with cmd.exe
instead?
It might be that there is some weirdness when using powershell.exe
standalone. I have a build cooking away using standalone cmd.exe
I am running the commands from the Windows cmd prompt, is that OK?
I’ve done a search for cmake.exe and found the following:-
`C:>dir /s cmake.exe
Volume in drive C is OS
Volume Serial Number is 52E2-0FD2
Directory of C:\Program Files\CMake\bin
18/11/2020 07:21 8,964,752 cmake.exe
1 File(s) 8,964,752 bytes
Directory of C:\Users\mike_\ncs\v1.3.2\toolchain\opt\bin
14/11/2020 17:21 7,792,128 cmake.exe
1 File(s) 7,792,128 bytes
Directory of C:\Users\mike_\ncs\v1.4.0\toolchain\opt\bin
15/11/2020 11:57 7,792,128 cmake.exe`
But they don’t appear in the PATH…
C:\>echo %PATH%
C:\Python39\Scripts\;C:\Python39\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\app\mike_\product\11.2.0\odac;C:\app\mike_\product\11.2.0\odac\bin;C:\app\mike_\product\11.2.0\client_64bit_odac\bin;C:\app\mike_\product\11.2.0\client_64bit_odac;C:\Program Files (x86)\Intel\iCLS Client\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Apache\maven\bin;C:\Program Files\Java\jdk1.8.0_161\bin;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin;C:\instantclient_11_1;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\NTP\bin;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\nRFConnectSDK\bin;c:\program files\cmake\bin;C:\Program Files (x86)\GNU Tools Arm Embedded\9 2019-q4-major\bin;C:\Users\mike_\AppData\Local\Microsoft\WindowsApps;C:\ProgramData\mike_\atom\bin;C:\Users\mike_\AppData\Local\Microsoft\WindowsApps;C:\Users\mike_\AppData\Roaming\npm;C:\Users\mike_\AppData\Local\Programs\Microsoft VS Code\bin
@mikcatta I will add you may have to delete the build
directory before trying in cmd.exe
. Hopefully this fixes your issues. I’ve updated the instructions to hopefully address this issue when building in standalone terminal.
https://docs.jaredwolff.com/nrf9160-sdk-setup-windows.html#sdk-install
@jaredwolff Didn’t work for me, but it’s getting late so will try again tomorrow.
@mikcatta what does your root nfed
directory look like?
Directory of C:\nfed
15/12/2020 19:48 <DIR> .
15/12/2020 19:48 <DIR> ..
15/12/2020 19:36 <DIR> .west
15/12/2020 19:45 <DIR> bootloader
15/12/2020 19:47 <DIR> mbedtls
15/12/2020 19:52 <DIR> modules
15/12/2020 19:37 <DIR> nrf
15/12/2020 19:36 <DIR> nrf9160-feather
15/12/2020 19:46 <DIR> nrfxlib
15/12/2020 19:46 <DIR> test
15/12/2020 19:52 <DIR> tools
15/12/2020 19:59 <DIR> zephyr
mikcatta hmm looks ok. So you’re still getting the “Cannot compile dummy file” error on both Linux and Windows?
What’s the version of your compiler?
Evening @jaredwolff
I’ve got a bit further on Linux, but not quite to point of compiling !
Both Win & Ubuntu report:
- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
I believe I have a compile on Ubuntu !
Memory region Used Size Region Size %age Used
FLASH: 12876 B 441856 B 2.91%
SRAM: 3904 B 128 KB 2.98%
IDT_LIST: 56 B 2 KB 2.73%
[158/158] Generating zephyr/merged_domains.hex
Had to follow these instructions on the Nordic site for the Python dependencies, which are ever so slightly different to the instructions on your site. [https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_installing.html#installing-the-required-tools]
pip3 install –user -r zephyr/scripts/requirements.txt
pip3 install –user -r nrf/scripts/requirements.txt
pip3 install –user -r bootloader/mcuboot/scripts/requirements.txt
I am using CMake 3.18.5 on Ubuntu, but I am not sure that was the issue.
Hi @jaredwolff Just to clarify….
I have created a ~/.zephyrrc file which contains
export PATH=$PATH:/home/mike/cmake-3.18.5-Linux-x86_64/bin
export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
export GNUARMEMB_TOOLCHAIN_PATH="~/gnuarmemb"
I installed cmake-3.18.5 from source, so it installed it locally. Again not sure, that was the issue. The GNUARMEMB was installed into the directory ~/gnuarmemb
On first compile, I had to add the “-p” command, so ran west build -b circuitdojo_feather_nrf9160ns -p
Some of these steps may not be necessary, but it seems to compile a hex file now at least on Ubuntu. Next step will be to see if I can flash it from the VM or maybe in needs to be transferred to Windows for programming the board, but that’s tomorrow little game.
Got it. I’m looking into utilizing the nRF Desktop SDK Manager. Since you have those already installed, it would make the most sense to use them. Stay tuned..
HI @jaredwolff
Apologises, I thought I’d have a go at compiling one of the main apps for the Feather at https://docs.jaredwolff.com/nrf9160-agps-sample.html
From the /home/mike/nfed/nrf/samples/nrf9160/nrf_cloud_agps, I’ve added the additional lines to the prj.conf, but when I try and compile it says:-
**/home/mike/nfed/nrf/samples/nrf9160/nrf_cloud_agps/prj.conf:61: warning: attempt to assign the value '"feather-"' to the undefined symbol NRF_CLOUD_CLIENT_ID_PREFIX**
Parsing /home/mike/nfed/nrf/samples/nrf9160/nrf_cloud_agps/Kconfig
Loaded configuration '/home/mike/nfed/zephyr/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160ns_defconfig'
Merged configuration '/home/mike/nfed/nrf/samples/nrf9160/nrf_cloud_agps/prj.conf'
error: Aborting due to Kconfig warnings
CMake Error at /home/mike/nfed/zephyr/cmake/kconfig.cmake:217 (message):
command failed with return code: 1
Call Stack (most recent call first):
/home/mike/nfed/zephyr/cmake/app/boilerplate.cmake:506 (include)
/home/mike/nfed/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
/home/mike/nfed/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
CMakeLists.txt:9 (find_package)
-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /home/mike/cmake-3.18.5-Linux-x86_64/bin/cmake -B/home/mike/nfed/nrf/samples/nrf9160/nrf_cloud_agps/build -S/home/mike/nfed/nrf/samples/nrf9160/nrf_cloud_agps -GNinja -DBOARD=circuitdojo_feather_nrf9160ns
Without that line, it compiles just fine. What I am doing wrong here please?
mikcatta this example only works on newer versions of the nRF Connect SDK. What version are you using?
Hi @jaredwolf I was just following the instructions on your website, if that doesn’t work, can you clarify that on the site at the URL https://docs.jaredwolff.com/nrf9160-agps-sample.html ?
@jaredwolff I use the pre-built binary, can I set a custom APN for use with my O2/Telefonica SIM?
mikcatta @jaredwolff I use the pre-built binary, can I set a custom APN for use with my O2/Telefonica SIM?
Unfortunately not.
mikcatta actually you should be able to set a APN if it doesn’t get set already. Have you tried without editing anything? Otherwise you can try something like this in LTE Link Monitor:
AT+CGDCONT="0,\"IPv4v6\",\"internet.apn\""
Whereas you can replace internet.apn
with your APN.
Hope that helps!