Error by building own app


Olga Syrbachova <syrba4eva28@...>
 

Hi! I want to create my own app. So I've followed the instructions given on the website https://docs.zephyrproject.org/latest/application/index.html. For the beginning I just copied the src/main.c, CMakeLists.txt (here I changed the project name to "my_app") and orj.conf from zephyrproject/zephyr/samples/hello_world to Home/app. Next I ran
west build -b qemu_x86
and got an error:

ol@ol-H270M-DS3H:~$ west build -b qemu_x86 ~/app
usage: west [-h] [-z ZEPHYR_BASE] [-v] [-V] <command> ...
west: error: argument <command>: invalid choice: 'build' (choose from 'init', 'update', 'list', 'manifest', 'diff', 'status', 'forall', 'help', 'config', 'topdir', 'selfupdate')


I also tried to run this command with --pristine, but it didn't work. What am I doing wrong? Any help would be highly appreciated. Thank you in advance.


hans@...
 

Probably, you need to set some environment variables.
Look here for an explanation:
https://docs.zephyrproject.org/latest/guides/env_vars.html#zephyr-environment-scripts


Bolivar, Marti
 

Hello,

Please refer to this troubleshooting item:

https://docs.zephyrproject.org/latest/guides/west/troubleshooting.html#invalid-choice-build-or-flash-etc

"Olga Syrbachova via lists.zephyrproject.org"
<syrba4eva28=gmail.com@lists.zephyrproject.org> writes:

Hi! I want to create my own app. So I've followed the instructions given on
the website https://docs.zephyrproject.org/latest/application/index.html.
For the beginning I just copied the src/main.c, CMakeLists.txt (here I
changed the project name to "my_app") and orj.conf from
zephyrproject/zephyr/samples/hello_world to Home/app. Next I ran

west build -b qemu_x86

and got an error:

ol@ol-H270M-DS3H:~$ west build -b qemu_x86 ~/app
usage: west [-h] [-z ZEPHYR_BASE] [-v] [-V] <command> ...
west: error: argument <command>: invalid choice: 'build' (choose from
'init', 'update', 'list', 'manifest', 'diff', 'status', 'forall',
'help', 'config', 'topdir', 'selfupdate')

I also tried to run this command with --pristine, but it didn't work.
What am I doing wrong? Any help would be highly appreciated. Thank you
in advance.