sudar / Arduino-Makefile

Makefile for Arduino sketches. It defines the workflows for compiling code, flashing it to Arduino and even communicating through Serial.
http://hardwarefun.com/tutorials/compiling-arduino-sketches-using-makefile
GNU Lesser General Public License v2.1
2.02k stars 449 forks source link

problem with rules in Win7 #299

Open BobWorkman opened 9 years ago

BobWorkman commented 9 years ago

I am running under Win7 with Win-AVR (in system path) providing the required AVR utilities although I have defined AVR_TOOLS_DIR = c:/apps/Arduino-1.0/hardware/tools/avr

I seem to be having substitution problems. I have found work arounds but would like to get thinks working properly and understand why they are not working.

the major problem is the rule to make target `build-uno/Blink.o' from the blink.ino file. here is the output from the make

make

Arduino.mk Configuration:

  • [AUTODETECTED] CURRENT_OS = WINDOWS
  • [USER] ARDUINO_DIR = c:/apps/Arduino-1.0
  • [USER] ARDMK_DIR = ../../
  • [AUTODETECTED] ARDUINO_VERSION = 100
  • [DEFAULT] ARCHITECTURE =
  • [DEFAULT] VENDOR = arduino
  • [DEFAULT] ARDUINO_SKETCHBOOK = /sketchbook
  • [USER] AVR_TOOLS_DIR = c:/apps/Arduino-1.0/hardware/tools/avr
  • [COMPUTED] ARDUINO_LIB_PATH = c:/apps/Arduino-1.0/libraries (from ARDUINO_DIR)
  • [DEFAULT] ARDUINO_CORE_PATH = c:/apps/Arduino-1.0/hardware/arduino//cores/arduino
  • [COMPUTED] ARDUINO_VAR_PATH = c:/apps/Arduino-1.0/hardware/arduino//variants (from ARDUINO_DIR)
  • [COMPUTED] BOARDS_TXT = c:/apps/Arduino-1.0/hardware/arduino//boards.txt (from ARDUINO_DIR)
  • [DEFAULT] USER_LIB_PATH = /sketchbook/libraries (in user sketchbook)
  • [DEFAULT] PRE_BUILD_HOOK = pre-build-hook.sh
  • [USER] BOARD_TAG = uno
  • [COMPUTED] OBJDIR = build-uno (from BOARD_TAG) ../../Arduino.mk:732: display local sources initialization
  • [CONFIG DEBUG MSG] MAKEFILE_LIST = makefile ../../Arduino.mk ../../\Common.mk
  • [CONFIG DEBUG MSG] LOCAL_C_SRCS =
  • [CONFIG DEBUG MSG] LOCAL_CPP_SRCS =
  • [CONFIG DEBUG MSG] LOCAL_CC_SRCS =
  • [CONFIG DEBUG MSG] LOCAL_PDE_SRCS =
  • [CONFIG DEBUG MSG] LOCAL_INO_SRCS = Blink.ino
  • [CONFIG DEBUG MSG] LOCAL_AS_SRCS =
  • [CONFIG DEBUG MSG] LOCAL_SRCS = Blink.ino
  • [CONFIG DEBUG MSG] TARGET = Blink
  • [CONFIG DEBUG MSG] OBJDIR = build-uno
  • [CONFIG DEBUG MSG] LOCAL_OBJ_FILES = Blink.o
  • [CONFIG DEBUG MSG] LOCAL_OBJS = build-uno/Blink.o
  • [CONFIG DEBUG MSG] TEMP_DEBUG_VAR = Blink.o
  • [CONFIG DEBUG MSG] TEMP_DEBUG_VAR2 = Blink.o
  • [ASSUMED] MONITOR_BAUDRATE = 9600
  • [DEFAULT] OPTIMIZATION_LEVEL = s
  • [DEFAULT] MCU_FLAG_NAME = mmcu
  • [DEFAULT] CFLAGS_STD =
  • [DEFAULT] CXXFLAGS_STD =
  • [AUTODETECTED] DEVICE_PATH =
  • [AUTODETECTED] Size utility: AVR-aware for enhanced output
  • [COMPUTED] BOOTLOADER_PARENT = c:/apps/Arduino-1.0/hardware/arduino//bootloaders (from ARDUINO_DIR)
  • [COMPUTED] ARDMK_VERSION = 1.3.4 ../../Arduino.mk:1099: debug variable dump
  • [COMPUTED] CC_VERSION = 4.3.2 (avr-gcc)
  • [DEBUG MESSAGE] TARGET = Blink
  • [DEBUG Message] OBJDIR = build-uno
  • [DEBUG Message] TARGET_EEP = build-uno/Blink.eep
  • [DEBUG Message] TARGET_ELF = build-uno/Blink.elf
  • [DEBUG Message] TARGET_HEX = build-uno/Blink.hex
  • [DEBUG Message] LOCAL_OBJS = build-uno/Blink.o
  • [DEBUG Message] LIB_OBJS =
  • [DEBUG Message] PLATFORM_LIB_OBJS =
  • [DEBUG Message] USER_LIB_OBJS =
  • [DEBUG Message] OTHER_OBJS =

    - [DEBUG Message] COMMON_DEPS =

make: *\ No rule to make target build-uno/Blink.o', needed bybuild-uno/Blink.elf'. Stop.

$

In the arduino.mk file the following rule exists:

the ino -> o file

$(OBJDIR)/%.o: %.ino $(COMMON_DEPS) | $(OBJDIR) $(warning processing rule $(OBJDIR)/%.o ) @$(MKDIR) $(dir $@) $(CXX) -x c++ -include $(ARDUINO_HEADER) -MMD -c $(CPPFLAGS) $(CXXFLAGS) $< -o

$(OBJDIR)/%.o should match build-uno/Blink.o but does not.

if I add this rule build-uno/Blink.o: blink.ino $(COMMON_DEPS) | $(OBJDIR) everything compiles OK.

tuna-f1sh commented 9 years ago

What directory do you run it from? I'm also having difficulties with the passing of OBJDIR on both Mac and Windows systems.

On the Mac I've found that if the parent directory of the project has a space in the name you'll get the same error (this took a lot of trial and error to decipher!) . On Windows, running from cygwin home directory creates the problem but is fine from cygwin root. I assume this is a problem with 'cygdrive/c/' and '~/' not being understood.

sej7278 commented 9 years ago

yes funnily enough when we went around double-quoting everything to fix windows spaces in paths issues, it meant that variables like ~/ wouldn't get parsed, as they need single quotes.

so windows fix broke linux/osx.....

we should probably go back to single quotes and figure something else out for windows - like telling people not to put spaces in their directory names!

https://github.com/sudar/Arduino-Makefile/commit/7618da7f5fa9b0ff70f22fb3353cfed41ff33dc0 https://github.com/sudar/Arduino-Makefile/commit/d5c7ed15f73948d66fa32709e939d860f5e876d8

BobWorkman commented 9 years ago

I don't think it is a 'spaces' problem for 2 reasons;

  1. I created a directory C:/users/bob/home and in it I put the arduino-makefile distribution just to avoid the spaces in directories problem.
So OBJDIR becomes c:/users/bob/home/arduino-makefile/examples/blink/blink-uno
  1. if I create a fixed rule for the subsitution rule everything works

NOTE: Technically I am not running Cygwin although I think Win-Avr which provides all the tools is a variant as cygwin1.dll is in the path. Note no spaces in its path either.

BobWorkman commented 9 years ago

OOPS. Newbie error I closed this issue by error

sej7278 commented 9 years ago

on windows the paths have to be relative, maybe that's it. but still the double-quoting is breaking variables like ~/ on all platforms (well, maybe except windows!)

@BobWorkman edit: that is fixed in f946670f3d maybe try again and see if it fixes your issue too?

sudar commented 9 years ago

@BobWorkman Can you kindly check the latest version to see if this fixes your issue?

BobWorkman commented 9 years ago

I tried and no change.

I seem to be encountering several problems, all relating to substitution. Will try to find my notes and post them. I essentially abandoned this project as it was taking much more time than just reworking code to run under Atmel Studio. I liked many of the concepts but it failed me from the start, basic Makefile problems I think.

Bob

From: Sudar Sent: Tuesday, December 30, 2014 11:10 PM To: sudar/Arduino-Makefile Cc: BobWorkman Subject: Re: [Arduino-Makefile] problem with rules in Win7 (#299)

@BobWorkman Can you kindly check the latest version to see if this fixes your issue?

— Reply to this email directly or view it on GitHub.


No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.935 / Virus Database: 4253.1.1/8342 - Release Date: 12/31/14 02:01:00

sudar commented 9 years ago

Will try to find my notes and post them

The main reason why we don't have good support for Windows is because both me and most of the core developers don't have access to a Windows machine to test it.

If you could share your notes then it would be very useful.

BobWorkman commented 9 years ago

Okay I am trying to organize my ramblings into a coherent activity log. The 1st problem I am having is understanding why the arduinio.mk uses the $% variable in the rulers. e.g. $(OBJDIR)/%.eep: $(OBJDIR)/%.elf $(COMMON_DEPS)

My documentation says $% is the target of the rule, when the target is a archive member, and is empty when the target is not an archive member. My testing seems to bear this out, will do more testing but not being a ‘Makefile’ guru I thought I would pose the question to a UNIX person to see if it is perhaps a Windows/Unix difference.

Also is there a way to post a file or will I have to copy & paste my notes.

From: Sudar Sent: Sunday, January 04, 2015 11:19 PM To: sudar/Arduino-Makefile Cc: BobWorkman Subject: Re: [Arduino-Makefile] problem with rules in Win7 (#299)

Will try to find my notes and post them

The main reason why we don't have good support for Windows is because both me and most of the core developers don't have access to a Windows machine to test it.

If you could share your notes then it would be very useful.

— Reply to this email directly or view it on GitHub.


No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.935 / Virus Database: 4253.1.1/8365 - Release Date: 01/03/15 20:01:00

sudar commented 9 years ago

Okay I am trying to organize my ramblings into a coherent activity log. The 1st problem I am having is understanding why the arduinio.mk uses the $% variable in the rulers. e.g. $(OBJDIR)/%.eep: $(OBJDIR)/%.elf $(COMMON_DEPS)

Even I am not sure. May be @sej7278 will be able to answer that.

Also is there a way to post a file or will I have to copy & paste my notes.

You can copy & paste your notes or post them in gist.github.com and then post the link here.

sej7278 commented 9 years ago

% substitutes in the target name like Blink, not sure what the question is here.

i'd say try a proper cygwin environment and see if that works, as that's the only environment we've really seen before, plain windows opens you up to problems with the filesystem (e.g. blink.ino seems to becoming Blink.elf) as you aren't using cygdrive if you're just using cygwin.dll bundled with win-avr. kind of what @tuna-f1sh said above.

BobWorkman commented 9 years ago

Ok... I have tried cygwin and get exactly the same problem. According to section 10.5.3 in my makefile documentation $% only exists for a member of an archive, not globally so %.ino will not match to blink.ino I have made extensive use of show_config_variable to see what the variables are. In makefile I defined:

$(TARGET_EEP): DUMPM $(TARGET_ELF) $(COMMON_DEPS)

then

DUMPM:
    $(warning  [PROCESSING RULE] for target TARGET_EPP {$(TARGET_EEP)})
    $(call show_config_variable,$,[DEBUG])
    $(call show_config_variable,@,[DEBUG])

which yields:

Updating goal targets....
 File `all' does not exist.
   File `build-uno/Blink.eep' does not exist.
     File `DUMPM' does not exist.
    Must remake target `DUMPM'.
makefile:23: [PROCESSING RULE] for target TARGET_EPP {build-uno/Blink.eep}
- [DEBUG]               =
- [DEBUG]              @ = DUMPM
    Successfully remade target file `DUMPM'.
     File `build-uno/Blink.elf' does not exist.
       File `build-uno/Blink.o' does not exist.
      Must remake target `build-uno/Blink.o'.
MAKE: *** No rule to make target `build-uno/Blink.o', needed by `build-uno/Blink.elf'.  Stop.

NOTE % is empty.

Will continue testing and report back

sej7278 commented 9 years ago

could you use the github website rather than email as its messing with the formatting - i can't tell if a single-quote is being added to your filenames or if its the formatting, e.g. you have:

File all' does not exist
File DUMPM' does not exist.

would be useful if we could see your local Makefile too.

BobWorkman commented 9 years ago

I am replying in the website I think. Can use something other than the browser if it helps. URL=https://github.com/sudar/Arduino-Makefile/issues/299#issuecomment-69507619

BobWorkman commented 9 years ago

So here are some of my notes: 1st lets describe my environment. I am running Windows 7 Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.

the default path in the Command prompt window is:

PATH=
C:\Python27\;
c:\winavr-20100110\bin;
c:\winavr-20100110\utils\bin\;
C:\Program Files\Common Files\Microsoft Shared\Windows Live;
C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;
C:\Windows\system32;
C:\Windows;
C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;
C:\Program Files (x86)\Windows Live\Shared;
C:\Program Files (x86)\Atmel\Flip 3.4.7\bin;
C:\Windows\Microsoft.NET\Framework64\v4.0.30319

Winavr-20100110 contains all the utilities, compiler, linker etc, including the cygwin dll.

I have created some special directories to avoid the "spaces in file names" problem. none of the entries in any part of these directory trees are allowed to have spaces. They are:

C:\apps where the arduino IDE is installed C:\users\bob\home where I have the arduino-makefile installed

I do all my testing on the included example "blink"

NOTE: there is an egrep error which is not addressed yet because code it affects is not required for this level.

First step is to modify the makefile located in the examples\blink directory. I added the lines:

ARDUINO_DIR   =c:/apps/Arduino-1.0
AVR_TOOLS_DIR =c:/apps/Arduino-1.0/hardware/tools/avr
ARDMK_DIR     = ../../

running MAKE generates the following log.

$make --debug=b
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-pc-mingw32
Reading makefiles...

-------------------------
Arduino.mk Configuration:
- [AUTODETECTED]       CURRENT_OS = WINDOWS
- [USER]               ARDUINO_DIR = c:/apps/Arduino-1.0
Usage: egrep [OPTION]... PATTERN [FILE]...
Try `egrep --help' for more information.
- [USER]               ARDMK_DIR = ../../
- [AUTODETECTED]       ARDUINO_VERSION = 100
- [DEFAULT]            ARCHITECTURE =
- [DEFAULT]            VENDOR = arduino
- [DEFAULT]            ARDUINO_SKETCHBOOK = /sketchbook
- [USER]               AVR_TOOLS_DIR = c:/apps/Arduino-1.0/hardware/tools/avr
- [COMPUTED]           ARDUINO_LIB_PATH = c:/apps/Arduino-1.0/libraries (from ARDUINO_DIR)
- [COMPUTED]           ARDUINO_VAR_PATH = c:/apps/Arduino-1.0/hardware/arduino//variants (from ARDUINO_DIR)
- [COMPUTED]           BOARDS_TXT = c:/apps/Arduino-1.0/hardware/arduino//boards.txt (from ARDUINO_DIR)
- [DEFAULT]            USER_LIB_PATH = /sketchbook/libraries (in user sketchbook)
- [DEFAULT]            PRE_BUILD_HOOK = pre-build-hook.sh
- [USER]               BOARD_TAG = uno
- [COMPUTED]           CORE = arduino (from build.core)
- [COMPUTED]           OBJDIR = build-uno (from BOARD_TAG)
- [COMPUTED]           ARDUINO_CORE_PATH = c:/apps/Arduino-1.0/hardware/arduino//cores/arduino (from ARDUINO_DIR, BOARD_TAG and boards.txt)
Usage: egrep [OPTION]... PATTERN [FILE]...
Try `egrep --help' for more information.
- [ASSUMED]            MONITOR_BAUDRATE = 9600
- [DEFAULT]            OPTIMIZATION_LEVEL = s
- [DEFAULT]            MCU_FLAG_NAME = mmcu
- [DEFAULT]            CFLAGS_STD =
- [DEFAULT]            CXXFLAGS_STD =
- [AUTODETECTED]       DEVICE_PATH =
- [DEFAULT]            FORCE_MONITOR_PORT =
- [AUTODETECTED]       Size utility: AVR-aware for enhanced output
- [COMPUTED]           BOOTLOADER_PARENT = c:/apps/Arduino-1.0/hardware/arduino//bootloaders (from ARDUINO_DIR)
- [COMPUTED]           ARDMK_VERSION = 1.3.4
- [COMPUTED]           CC_VERSION = 4.3.2 (avr-gcc)
-------------------------
Updating goal targets....
 File `all' does not exist.
   File `build-uno/Blink.eep' does not exist.
  Must remake target `build-uno/Blink.eep'.
make: *** No rule to make target `build-uno/Blink.eep', needed by `all'.  Stop.

liberal use of debugging print statement "show_config_variable", "show_config_info" and $(warning text) staetments shows:

OBJDIR = build-uno
TARGET = Blink
TARGET_EEP = build-uno/Blink.eep

so rule $(OBJDIR)/%.eep: $(OBJDIR)/%.elf $(COMMON_DEPS) should match "build-uno/Blink.eep"

added following to makefile in blink directory before the include

.DEFAULT_GOAL := all

added to end of file:

## TARGET_EEP Explicit definition which clones the "$(OBJDIR)/%.eep:" rule
## note there is no variable substitution in this rule
$(TARGET_EEP): $(TARGET_ELF) $(COMMON_DEPS)
    $(MKDIR) $(dir $@)
    -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom='alloc,load' \
        --change-section-lma .eeprom=0 -O ihex $< $@

results in this log:

$make --debug=b
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-pc-mingw32
Reading makefiles...
-------------------------
Arduino.mk Configuration:
- [AUTODETECTED]       CURRENT_OS = WINDOWS
- [USER]               ARDUINO_DIR = c:/apps/Arduino-1.0
Usage: egrep [OPTION]... PATTERN [FILE]...
Try `egrep --help' for more information.
- [USER]               ARDMK_DIR = ../../
- [AUTODETECTED]       ARDUINO_VERSION = 100
- [DEFAULT]            ARCHITECTURE =
- [DEFAULT]            VENDOR = arduino
- [DEFAULT]            ARDUINO_SKETCHBOOK = /sketchbook
- [USER]               AVR_TOOLS_DIR = c:/apps/Arduino-1.0/hardware/tools/avr
- [COMPUTED]           ARDUINO_LIB_PATH = c:/apps/Arduino-1.0/libraries (from ARDUINO_DIR)
- [COMPUTED]           ARDUINO_VAR_PATH = c:/apps/Arduino-1.0/hardware/arduino//variants (from ARDUINO_DIR)
- [COMPUTED]           BOARDS_TXT = c:/apps/Arduino-1.0/hardware/arduino//boards.txt (from ARDUINO_DIR)
- [DEFAULT]            USER_LIB_PATH = /sketchbook/libraries (in user sketchbook)
- [DEFAULT]            PRE_BUILD_HOOK = pre-build-hook.sh
- [USER]               BOARD_TAG = uno
- [COMPUTED]           CORE = arduino (from build.core)
- [COMPUTED]           OBJDIR = build-uno (from BOARD_TAG)
- [COMPUTED]           ARDUINO_CORE_PATH = c:/apps/Arduino-1.0/hardware/arduino//cores/arduino (from ARDUINO_DIR, BOARD_TAG and boards.txt)
Usage: egrep [OPTION]... PATTERN [FILE]...
Try `egrep --help' for more information.
- [ASSUMED]            MONITOR_BAUDRATE = 9600
- [DEFAULT]            OPTIMIZATION_LEVEL = s
- [DEFAULT]            MCU_FLAG_NAME = mmcu
- [DEFAULT]            CFLAGS_STD =
- [DEFAULT]            CXXFLAGS_STD =
- [AUTODETECTED]       DEVICE_PATH =
- [DEFAULT]            FORCE_MONITOR_PORT =
- [AUTODETECTED]       Size utility: AVR-aware for enhanced output
- [COMPUTED]           BOOTLOADER_PARENT = c:/apps/Arduino-1.0/hardware/arduino//bootloaders (from ARDUINO_DIR)
- [COMPUTED]           ARDMK_VERSION = 1.3.4
- [COMPUTED]           CC_VERSION = 4.3.2 (avr-gcc)
-------------------------
Updating goal targets....
 File `all' does not exist.
   File `build-uno/Blink.eep' does not exist.
     File `build-uno/Blink.elf' does not exist.
       File `build-uno/Blink.o' does not exist.
      Must remake target `build-uno/Blink.o'.
make: *** No rule to make target `build-uno/Blink.o', needed by `build-uno/Blink.elf'.  Stop.

Again examination of code yields several rules which should match

BobWorkman commented 9 years ago

Here is local Makefile:

MAKEFILE_MOD =4

BOARD_TAG    = uno
ARDUINO_DIR   =c:/apps/Arduino-1.0
AVR_TOOLS_DIR =c:/apps/Arduino-1.0/hardware/tools/avr
ARDUINO_LIBS =
ARDMK_DIR     = ../../

.DEFAULT_GOAL := all
include ../../Arduino.mk

###################### test 2 ############# 
# debug print 

$(TARGET_EEP): DUMPM $(TARGET_ELF) $(COMMON_DEPS)

#   $(MKDIR) $(dir $@)
#   -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom='alloc,load' \
#       --change-section-lma .eeprom=0 -O ihex $< $@

DUMPM:
    $(warning  [PROCESSING RULE] for target TARGET_EPP {$(TARGET_EEP)})
    $(call show_config_variable,$,[DEBUG])
    $(call show_config_variable,@,[DEBUG])
BobWorkman commented 9 years ago

This is the console output:

$make --debug=b
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-pc-mingw32
Reading makefiles...
-------------------------
Arduino.mk Configuration:
- [DEBUG]              MAKEFILE_MOD = 4
- [AUTODETECTED]       CURRENT_OS = WINDOWS
- [USER]               ARDUINO_DIR = c:/apps/Arduino-1.0
Usage: egrep [OPTION]... PATTERN [FILE]...
Try `egrep --help' for more information.
- [USER]               ARDMK_DIR = ../../
- [AUTODETECTED]       ARDUINO_VERSION = 100
- [DEFAULT]            ARCHITECTURE =
- [DEFAULT]            VENDOR = arduino
- [DEFAULT]            ARDUINO_SKETCHBOOK = /sketchbook
- [USER]               AVR_TOOLS_DIR = c:/apps/Arduino-1.0/hardware/tools/avr
- [COMPUTED]           ARDUINO_LIB_PATH = c:/apps/Arduino-1.0/libraries (from ARDUINO_DIR)
- [COMPUTED]           ARDUINO_VAR_PATH = c:/apps/Arduino-1.0/hardware/arduino//variants (from ARDUINO_DIR)
- [COMPUTED]           BOARDS_TXT = c:/apps/Arduino-1.0/hardware/arduino//boards.txt (from ARDUINO_DIR)
- [DEFAULT]            USER_LIB_PATH = /sketchbook/libraries (in user sketchbook)
- [DEFAULT]            PRE_BUILD_HOOK = pre-build-hook.sh
- [USER]               BOARD_TAG = uno
- [COMPUTED]           CORE = arduino (from build.core)
- [COMPUTED]           OBJDIR = build-uno (from BOARD_TAG)
- [COMPUTED]           ARDUINO_CORE_PATH = c:/apps/Arduino-1.0/hardware/arduino//cores/arduino (from ARDUINO_DIR, BOARD_TAG and boards.txt)
Usage: egrep [OPTION]... PATTERN [FILE]...
Try `egrep --help' for more information.
- [ASSUMED]            MONITOR_BAUDRATE = 9600
- [DEFAULT]            OPTIMIZATION_LEVEL = s
- [DEFAULT]            MCU_FLAG_NAME = mmcu
- [DEFAULT]            CFLAGS_STD =
- [DEFAULT]            CXXFLAGS_STD =
- [AUTODETECTED]       DEVICE_PATH =
- [DEFAULT]            FORCE_MONITOR_PORT =
- [AUTODETECTED]       Size utility: AVR-aware for enhanced output
- [COMPUTED]           BOOTLOADER_PARENT = c:/apps/Arduino-1.0/hardware/arduino//bootloaders (from ARDUINO_DIR)
- [COMPUTED]           ARDMK_VERSION = 1.3.4
- [COMPUTED]           CC_VERSION = 4.3.2 (avr-gcc)
-------------------------
Updating goal targets....
 File `all' does not exist.
   File `build-uno/Blink.eep' does not exist.
     File `DUMPM' does not exist.
    Must remake target `DUMPM'.
makefile:23: [PROCESSING RULE] for target TARGET_EPP {build-uno/Blink.eep}
- [DEBUG]               =
- [DEBUG]              @ = DUMPM
    Successfully remade target file `DUMPM'.
     File `build-uno/Blink.elf' does not exist.
       File `build-uno/Blink.o' does not exist.
      Must remake target `build-uno/Blink.o'.
make: *** No rule to make target `build-uno/Blink.o', needed by `build-uno/Blink.elf'.  Stop.

$
sej7278 commented 9 years ago

ah maybe you need to add the triple backticks around the post to make it format correctly (see code section here)

it still doesn't look like you're using a proper cygwin environment, as your paths should all be relative to cygdrive like ARDUINO_DIR = /cygdrive/c/arduino-1.0.5, we totally don't support a non-cygwin windows environment - as you can see you're missing the egrep command too.

BobWorkman commented 9 years ago

will try change post technique.

I am familiar with this environment... would have to relearn to use cygwin. will try posting other logs with massive variable dumps to gist.github. all my variables seem to be fine it's the rule substiution that is failing. these tests where done with an earlier version of arduini.mk which I modified heavily to produce debug output. Will continue posting my test results.

However, right now I am off to my grandson's birthday party.

sudar commented 9 years ago

@BobWorkman

I edited all your comments to format them properly. You were using the quotes (') character to format, but you have to use the backtick (`) character (the one that is near to the esc character in most keyboards)

Thanks for posting your detailed log output. As @sej7278 mentioned we don't currently support non-cygwin environment in windows because a) It is way different b) none of us have access to a windows machine.

May be it would be possible for us to add support if we know what are the things that are broken in non-cygwin environment. That's why I asked you for detailed logs and your notes.

However, right now I am off to my grandson's birthday party.

Sure. Enjoy it :)

sej7278 commented 9 years ago

ARDUINO_DIR on windows is supposed to be a relative path e.g. ../../arduino/ not an absolute like c:/apps/Arduino-1.0 and the check for that is failing as egrep isn't installed.

basically without cygwin there's no way to run the various shell commands like egrep, uname, sed, awk, cat, echo, grep, which..... so there's no way this will work. you're probably better off running linux in a virtual machine or installing cygwin proper.

BobWorkman commented 9 years ago

Sudar: May be it would be possible for us to add support if we know what are the things that are broken in non-cygwin environment. That's why I asked you for detailed logs and your notes. This is the only reason I am re-activating my activity in this area. I have created a repository Bobworkman\sudar-299 into which (when I figure out how) I will post my code and notes.

sej7278: Au Contraire there are many non cgywin shells out there providing UNIX utilities in the window command console. one of these is included in WinAvr. I have other machines so I could actually install Linix and go through the whole learning curve, Acquire the utilities I need all over again ... etc,etc. Much easier just to port what I need to my existing very familiar environment. As noted above I am only pursuing this as a possible aide to others yet to come.

sej7278 commented 9 years ago

@BobWorkman cygwin.dll isn't enough, you need the filesystem and unix utilities. in theory you could just use windows binaries of the utilities mentioned above (plus python, make etc.) and win-avr and be very careful with case-sensitivity on the filesystem, i'd love to see a PR, but don't really see the point when there's cygwin, and win-avr has been dead for 5+ years now hasn't it?

on linux its a simple apt-get install arduino python-serial arduino-mk make to acquire the utilities, although i can see its a learning curve.