arduino makefile for windows

Hi Guys, I have been seraching for a makefile that can compile my sketch, i want one that works with windows. I searched the web and i founf plenty out there for Linux buntu, but only few for windows and the one for windows don't work. The one I am currently using it give an erro message..

PS C:\Users\bghobreal\Documents\Arduino\Arduino-Makefile-master\examples\BlinkWithoutDelay> make all
BlinkWithoutDelay -d output || mkdir output
      0 [main] sh 4236 sync_with_child: child 18400(0x204) died before initialization with status code 0xC0000142
    183 [main] sh 4236 sync_with_child: *** child state waiting for longjmp
/usr/bin/sh: fork: Resource temporarily unavailable
make: *** [output/BlinkWithoutDelay.cpp] Error 128

FYI:- project name is BlinkWithoutDelay

I am not sure if that becuase the way I call my com port, here is how i do that

MCU 			= atmega32u4


UPLOAD_RATE 	= 57600
AVRDUDE_PROTOCOL = stk500v1
COM 			= 5

ARDUINO_VERSION	= 21
PROJECT_NAME 	= BlinkWithoutDelay
PROJECT_DIR 	= C:\Users\bghobreal\Documents\Arduino\Arduino-Makefile-master\examples\BlinkWithoutDelay
ARDUINO_DIR 	= C:\Arduino
ARDUINO_CORE 	= $(ARDUINO_DIR)/hardware/arduino/avr/cores/arduino
ARDUINO_AVR 	= $(ARDUINO_DIR)/hardware/tools/avr/avr/include/avr
ARDUINO_LIB 	= $(ARDUINO_DIR)/libraries
AVR_TOOLS_PATH 	= $(ARDUINO_DIR)/hardware/tools/avr/bin
AVRDUDECONFIG_PATH = $(ARDUINO_DIR)/hardware/tools/avr/etc
PORT 			= COM5
F_CPU 			= 16000000
OPT 			= 0   # optimize levels 0,1,2,3,s

Any help please ?

The one I am currently using

Which one would that be, exactly?
Interest in "makefile for arduino" died down since the time the Arduino IDE got a command-line interface, back around version1.5 (Arduino/build/shared/manpage.adoc at master · arduino/Arduino · GitHub)

I dont know which version i am using, wait is version 1.5 works tho?
I need to find a way to compile my sketch without using the IDE

Like westfw told, from 1.5 onward the IDE supports command line input. So if you're just running 1.8.5 you can use that no problem :slight_smile:

Yes but I don't want to use Arduino.exe I want to use averdud gc++

Any reason you want to use all the Arduino magic but not the "Arduino magic box"? Bit like reinventing the wheel...

septillion:
Any reason you want to use all the Arduino magic but not the "Arduino magic box"? Bit like reinventing the wheel...

Some kind of versioning, I think. OP had a thread about that. When using the IDE and using DATE and TIME for versioning, one does not want to recompile just to do a upload.

Windows Subsystem for Linux is working.

It is not a GUI (use Windows for that), but the command line interface is what you want for builds anyway. Install the flavor of Linux desired and then the packages for building AVR projects. On the Ubuntu flavor, I use the following.

sudo apt-get install make git gcc-avr binutils-avr gdb-avr avr-libc avrdude

No more worrying about dependencies. Those packages work on Mac (with homebrew), Raspberry Pi, and Windows (with WSL).