Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows installation of SDK needs 'just works' installer #9578

Closed
smartyw opened this issue Aug 23, 2018 · 4 comments
Closed

Windows installation of SDK needs 'just works' installer #9578

smartyw opened this issue Aug 23, 2018 · 4 comments
Labels
Enhancement Changes/Updates/Additions to existing features

Comments

@smartyw
Copy link

smartyw commented Aug 23, 2018

Hi

I ran a Zephyr coding workshop last night. Attendees were supposed to arrive with their laptops with the Zephyr SDK already installed and Hello World building without errors. 66% of people had failed to get the SDK installed and working and we then spent a good part of the class trying to solve the various problems. Some were never solved so people had to give up on any hands-on participation.

I had Windows, Mac and Linux users in the class. Most people with problems were Windows users. One was a Mac user.

I think the Mac user's problem was of his own making so we can ignore this.

The Windows users had got to various points, with various issues including:

  1. No CMAKE_CXX_COMPILER could be found.

(user had not run zephyr-env.cmd)

  1. if given arguments:
"STREQUAL" "gccarmemb"

Unknown arguments specified

ZEPHYR_TOOLCHAIN_VARIANT and GNUARMEMB_TOOLCHAIN_PATH were not defined. User had set these up as Windows system variables but not exited and reopened a cmd shell.

  1. Assertion failed: The toolchain is unable to build a dummy C file.

Compiler: CMAKE_C_COMPILER-NOTFOUND

Not sure about this one. User had environment variable GNUARMEMB_TOOLCHAIN_PATH=c:\gnuarmemb and that is the correct path for the ARM toolchain.

I think a proper Windows installer (setup.exe) is needed. This should automate all steps and update environment variables and paths as required. Manually installing the various parts is error prone. Yes, these are generally user errors, failure to follow the instructions properly but that's an inevitable outcome with people!

If a proper installer is not possible, one small improvement would be to tell people to set proper Windows System Variables via the Control Panel rather than running a shell script (zephyr-env.cmd) every time and having the variables vanish every time a shell is closed.

That's it!

Martin

AKA @bluetooth-mdw

@smartyw
Copy link
Author

smartyw commented Aug 23, 2018

Recreated the last issue in my initial description and solved it by deleting everything in the build/ folder.

@ghost
Copy link

ghost commented Aug 23, 2018

I created a video to (hopefully) help Windows users: https://www.youtube.com/watch?v=SjHpqK5jmVk&feature=youtu.be

AKA @smartyw

@nashif nashif added the Enhancement Changes/Updates/Additions to existing features label Aug 23, 2018
SebastianBoe added a commit to SebastianBoe/zephyr that referenced this issue Sep 12, 2018
Introduce a .cmake file that is included by CMake to support
machine-specific configuration without using environment
variables (except for ZEPHYR_BASE).

User testing is showing that Windows users are running into a myriad
of user errors related to environment variables[0]. This PR intends to
resolve them by limiting the required use of environment variables to
a minimum; just ZEPHYR_BASE.

The user errors that will be resolved include:

Forgetting to run zephyr-env.cmd when opening a new terminal.

Not realizing that the environment variable has not been set on all
alive terminals.

And finally; not cleaning the build directory that contains a
prioritized cached value.

The configuration file needs a location and a format.

CMake was chosen for the format because it allows complex
configuration, such as modal configuration and changing the
configuration based on which ZEPHYR_BASE repo is active.

The file location was chosen to be outside of the Zephyr repository to
avoid accidental git cleaning.

[0] zephyrproject-rtos#9578

Signed-off-by: Sebastian Bøe <[email protected]>
@ghost
Copy link

ghost commented Mar 28, 2019

Recreated the last issue in my initial description and solved it by deleting everything in the build/ folder.

This worked for me. All the system variables were setted correctly. My error was the following:
image

@stephanosio
Copy link
Member

This can be considered fixed with the release of new multi-platform Zephyr SDK:
https://github.com/zephyrproject-rtos/sdk-ng/releases/tag/v0.14.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

No branches or pull requests

3 participants