-
Set up
Describe the bug
Screenshots |
Beta Was this translation helpful? Give feedback.
Replies: 13 comments
-
I assume that your |
Beta Was this translation helpful? Give feedback.
-
Thanks for the suggestion but unfortunately, the path you mentioned i.e. /cygdrive/c/Users/Pranjal/ , was causing trouble initially, so I aliased it to /c/Users/Pranjal. You're right that these are not the best paths to put into Makefile, I figured out the issue to be the $(TOP) in the top.mk. (The other makefiles that work use relative paths). Currently, I am not even able to build it under /home. |
Beta Was this translation helpful? Give feedback.
-
Although I don't use windows, I guess WSL probably works better than cygwin. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the suggestion @hathach ! Can you tell me a preferred development environment if I wish to contribute to the stack? Shall I use Linux and ditch windows? |
Beta Was this translation helpful? Give feedback.
-
you should use any environment you feel comfortable with. It is not too important at all. |
Beta Was this translation helpful? Give feedback.
-
Alright. Thanks. One more question @hathach , a little unrelated to this topic. Is it absolutely necessary to use the vendor provided drivers as a BSP if I m porting it to a new MCU? |
Beta Was this translation helpful? Give feedback.
-
You could use any board you have, I tend to go for common/popular one since that is easier for people to get and test. |
Beta Was this translation helpful? Give feedback.
-
If you are okay with using a non-Cygwin system, examples can be built with msys2 or windows command prompt. I had confirmed at #590 I guess that arm gcc for windows was built with msys2. If gcc was built with cygwin, examples could be built by the gcc on cygwin. |
Beta Was this translation helpful? Give feedback.
-
I found the same issue on stackoverflow. |
Beta Was this translation helpful? Give feedback.
-
I suggest msys2 or command prompt for windows users, because WSL2 does not yet support USB devices. WSL2 can build samples, but it cannot flash them via J-Link. Docker for windows does the same. |
Beta Was this translation helpful? Give feedback.
-
Thanks for this @kkitayam . It helped! I tried building it on WSL as suggested by @hathach , it seems to build. But I haven't tried flashing it using J-Link or OpenOCD + ICDI yet. Although I'm able to get that done using cygwin, I can try accessing the same project from WSL & Cygwin for both the things as a ad-hoc solution for now. As far as command prompt is concerned, I tried installing make using choco pack manager, but the results were similar to that of cygwin. Can you please suggest some other make utility that works fine on command prompt/powershell. Regards |
Beta Was this translation helpful? Give feedback.
-
I guess that your PATH environment variable has
In my investigation is followings.
I guess @pran005 's environment shows following.
I tried to build cdc_msc example in above settings, then that failed.
The message indicates that sh.exe is invoked as a shell because of sh.exe exists on the PATH and not defined I tried to build with
|
Beta Was this translation helpful? Give feedback.
-
Thank You so much @kkitayam ! You're right! Specifying the shell explicitly does solve the problem! Thanks for the help! :) |
Beta Was this translation helpful? Give feedback.
I guess that your PATH environment variable has
C:\cygwin64\bin
for cygwin. The path for cygwin causes failure.make for windows treats SHELL environment variable as special. Please refer to Choosing-the-Shell
To avoid the issue, would you specify
SHELL=cmd.exe
on arguments like as following.In my investigation is followings.
We can check by
where
that which make is priority high on PATH environment.For example, following is in my environment.