I hope this question has not been asked already in Forum if it has my apologies. My first attempt at getting the zephyr tools extension to work from VSCode. I am able to run the zephyr setup and init repo commands . However after that the build step throws an error and send notification I need to run the init repo command first. Even though I have run it previously. Am i missing a step or not doing something right. I am able to see all the folders in the directory after the init repo command. Any help will be appreciated.
Zephyr SDK Tools VSCode extension - Issue at build step
ustireman do you have a log of the build output?
Hi Jared, log files from the Setup command and Init Repo Commands. The Build command did not give me any output. I have copied text here since I could not find a way to attach files. I have a snap shot of the notification after I run the build command but could not attach the
Log Output from Setup
[SETUP] unzip C:\Users\kweku.zephyrtools\downloads\zephyr-tools-0.1.7-x86_64-pc-windows-msvc.zip to C:\Users\kweku.zephyrtools\zephyr-tools
[SETUP] unzip C:\Users\kweku.zephyrtools\downloads\newtmgr.zip to C:\Users\kweku.zephyrtools\newtmgr
[SETUP] unzip C:\Users\kweku.zephyrtools\downloads\ninja-win.zip to C:\Users\kweku.zephyrtools\ninja
[SETUP] unzip C:\Users\kweku.zephyrtools\downloads\cmake-3.22.0-windows-x86_64.zip to C:\Users\kweku.zephyrtools\cmake
[SETUP] Installing zephyr-sdk-0.16.4 toolchain…
[SETUP] 7z extract C:\Users\kweku.zephyrtools\downloads\zephyr-sdk-0.16.4_windows-x86_64_minimal.7z to C:\Users\kweku.zephyrtools\toolchain
[SETUP] 7z extract C:\Users\kweku.zephyrtools\downloads\toolchain_windows-x86_64_arm-zephyr-eabi.7z to C:\Users\kweku.zephyrtools\toolchain\zephyr-sdk-0.16.4
git version 2.43.0.windows.1
[SETUP] git installed
python –version
[SETUP] python3 found
python -m pip –version
pip 21.2.4 from C:\Program Files\lib\site-packages\pip (python 3.9)
[SETUP] pip installed
python -m venv –help
[SETUP] python3 venv OK
python -m venv “C:\Users\kweku.zephyrtools\env”
[SETUP] virtual python environment created
Requirement already satisfied: west in c:\users\kweku.zephyrtools\env\lib\site-packages (1.1.0)
Requirement already satisfied: colorama in c:\users\kweku.zephyrtools\env\lib\site-packages (from west) (0.4.6)
Requirement already satisfied: PyYAML>=5.1 in c:\users\kweku.zephyrtools\env\lib\site-packages (from west) (6.0.1)
Requirement already satisfied: pykwalify in c:\users\kweku.zephyrtools\env\lib\site-packages (from west) (1.8.0)
Requirement already satisfied: setuptools in c:\users\kweku.zephyrtools\env\lib\site-packages (from west) (68.2.0)
Requirement already satisfied: packaging in c:\users\kweku.zephyrtools\env\lib\site-packages (from west) (23.2)
Requirement already satisfied: docopt>=0.6.2 in c:\users\kweku.zephyrtools\env\lib\site-packages (from pykwalify->west) (0.6.2)
Requirement already satisfied: python-dateutil>=2.8.0 in c:\users\kweku.zephyrtools\env\lib\site-packages (from pykwalify->west) (2.8.2)
Requirement already satisfied: ruamel.yaml>=0.16.0 in c:\users\kweku.zephyrtools\env\lib\site-packages (from pykwalify->west) (0.17.35)
Requirement already satisfied: six>=1.5 in c:\users\kweku.zephyrtools\env\lib\site-packages (from python-dateutil>=2.8.0->pykwalify->west) (1.16.0)
Requirement already satisfied: ruamel.yaml.clib>=0.2.7 in c:\users\kweku.zephyrtools\env\lib\site-packages (from ruamel.yaml>=0.16.0->pykwalify->west) (0.2.8)
[notice] A new release of pip is available: 23.2.1 -> 24.0
[notice] To update, run: python.exe -m pip install –upgrade pip
[SETUP] west installed
[SETUP] Zephyr setup complete!
Log ouput from Init Repo
Command failed: west list -f {path:28}
FATAL ERROR: no west workspace found from “c:\Nordic\nrf9160_FEather_Test”; “west list” requires one.
Things to try:
- Change directory to somewhere inside a west workspace and retry.
- Set ZEPHYR_BASE to a zephyr repository path in a west workspace.
- Run “west init” to set up a workspace here.
- Run “west init -h” for additional information.
What is in the folder you’re targeting? (High level directories like zephyr, ncs, etc) When you ran the init command, what did you put as the Git target?
- Edited
I followed the instructions at the link https://docs.circuitdojo.com/nrf9160-sdk-setup-windows.html.
I have an empty folder I create prior to running the Init Repo command and selected that folder. It has just one higher
c:\Nordic\nrf9160_FEather_Test”;
level directory above it on my C drive. I am running Windows 10 by the way if that has any bearing on this. I am putting the link you supplied https://github.com/circuitdojo/nrf9160-feather-examples-and-drivers.git as the target
@ustireman can you provide the output/log from the Init Repo command? I’m guessing there was an error and it couldn’t complete it. You can also try running it again on that same folder and if it was interrupted or missing something it will pick up where it left off.
jaredwolff
Hi Jared,
The output from Init Repo command is below
Command failed: west list -f {path:28}
FATAL ERROR: no west workspace found from “c:\Nordic\nrf9160_FEather_Test”; “west list” requires one.
Things to try:
- Change directory to somewhere inside a west workspace and retry.
- Set ZEPHYR_BASE to a zephyr repository path in a west workspace.
- Run “west init” to set up a workspace here.
- Run “west init -h” for additional information.
I went ahead and tried your suggestion on running it again on the same folder. It picked up but generated a bunch of warnings on my PATH variables for python scripts. So I updated my PATH environment variables and run it again on same folder and that seemed to finally resolve the issue. I have been able to flash the blinky sample to the 9160 feather.
Now a totally newbie question. again. I wanted to try out additional samples in the nfed folder. However running Zephyr Build seems to always point back to the blinky example and I get the following output from the Terminal.
Executing task: west build -b circuitdojo_feather_nrf9160_ns
[0/30] Performing build step for ‘tfm’
ninja: no work to do.
[⅕] Performing build step for ‘mcuboot_subimage’
ninja: no work to do.
Terminal will be reused by tasks, press any key to close it.
I have closed the terminal and VS Code and restarted but that does not work. Do I just delete the build folder from the Blinky example folder in order to be able to select a different project to build?
Thanks again for your help and suggestions
- Edited
ustireman However running Zephyr Build seems to always point back to the blinky example and I get the following output from the Terminal.
If you run Zephyr Tools: Change Project
you can select another project
Thanks so much that works . Zephyr documentation is so vast did’nt know where to start . This has been really helpful as well as your guide.
My end goal -> A project to try and implement the nrf9160 with Bluetooth using the adafruit nrf52840 feather. I understand its a long shot from where I am now . I will be watching your youtube vid on that and take it baby steps . Hopefully I can reach out to you if I do have additional questions along the way
Sounds good!