Comments (1)
I had a similar issue several months ago. They didn't really make their makefile very Windows-friendly. There are some key differences in the Windows versions of mkdir
and echo
that are causing these errors to occur.
(1) mkdir
in windows doesn't use the "-p" option, and also it wants all slashes to be "\" rather than "/" like in Linux.
(2) echo
doesn't seem like it wants to escape double-quotes.
Here is what I have done to fix the issues:
(1) In order to make the BUILD_PATH variable more Windows friendly, I decided to create a 2nd variable in my makefile called BUILD_PATH_WINDOWS.
In the original makefile, you should see a line that looks like this (roughly around line 48 or so?):
BUILD_PATH=build/$(BOARD)
I changed it to read like this:
BUILD_PATH=build/$(BOARD)
BUILD_PATH_WINDOWS=build\$(BOARD)
Now that you have created a BUILD_PATH_WINDOWS
variable, find the line in the makefile that is dirs:
It should be around line 156 or so. It reads like this:
dirs:
@echo "Building $(BOARD)"
-@mkdir -p $(BUILD_PATH)
To make it work nicely on Windows, I changed it to read like this:
dirs:
@echo "Building $(BOARD)"
-@mkdir $(BUILD_PATH_WINDOWS)
Finally, you will want to change the commands sitting around line 169 of the makefile, which originally read like this:
$(BUILD_PATH)/uf2_version.h: Makefile
echo "#define UF2_VERSION_BASE \"$(UF2_VERSION_BASE)\""> $@
For me, I changed them to read like this:
$(BUILD_PATH)/uf2_version.h: Makefile
echo #define UF2_VERSION_BASE "$(UF2_VERSION_BASE)"> $@
This is because of how the "echo" command behaves in Windows compared to Unix.
After making these changes you should have a working makefile.
There is one possible other change you may need to make. On lines 177 and 187 of the makefile, they run some Python scripts. This means you need Python 3 installed (which they don't make clear in the "Requirements" section of the "Readme" for this repository. In the makefile, they specifically use the command "python3". This may be an issue depending on how you've installed Python.
For me, my installation of Python is through Miniconda, and when it installed Python on my computer, it just called it "python.exe" rather than "python3.exe". So I had to change the makefile to use the python
command rather than the python3
command, since there is not uniformity in how Python installations name the main Python executable. Make sure that your Python executable is in your Windows path so that the makefile can find it.
from uf2-samdx1.
Related Issues (20)
- SAMD21 Clock Config HOT 5
- NeoKey Trinkey update files missing HOT 3
- SAME51 update for Adafruit Feather M4 CAN? HOT 2
- Compiling for the SAMDA1G16B HOT 5
- reset into bootloader from user code? HOT 4
- circuit playground express 3.14 macos Monterey HOT 4
- Having an issue with USB device disappearing if the programmer is not connected HOT 1
- Makefile issues HOT 4
- macOS 13.0 (Ventura) Finder gives error when uploading UF2 files HOT 4
- Linking issue HOT 1
- Custom pin mapping for ATSAMD21G18A HOT 1
- Reading logs - how???? HOT 3
- MKR Vidor 4000 Arduino Sketch Upload halts at around 50% only when loaded via uf2 bootloader
- Building an "unlocked" (no flash write protection) bootloader? HOT 1
- Change the filesystem be changed to FAT or FAT32 ? HOT 1
- Double definition of WDT for SAMD51
- Adding a timeout to the bootloader HOT 12
- Add Wire Mux HOT 1
- Flash corruptioin on SAMD51 HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uf2-samdx1.