Merge pull request #66 from sej7278/d10066072f2df78432f0b577853d533215ca2773
Fix whitespace and add /dev/null redirection
This commit is contained in:
commit
206b96c85c
2 changed files with 28 additions and 28 deletions
|
@ -395,14 +395,14 @@ ifndef WAIT_CONNECTION_CMD
|
||||||
WAIT_CONNECTION_CMD = \
|
WAIT_CONNECTION_CMD = \
|
||||||
$(ARDMK_PATH)/wait-connection-leonardo $(call get_arduino_port)
|
$(ARDMK_PATH)/wait-connection-leonardo $(call get_arduino_port)
|
||||||
else
|
else
|
||||||
WAIT_CONNECTION_CMD =
|
WAIT_CONNECTION_CMD =
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(BOARD_TAG),leonardo)
|
ifeq ($(BOARD_TAG),leonardo)
|
||||||
ERROR_ON_LEONARDO = $(error On leonardo, raw_xxx operation is not supported)
|
ERROR_ON_LEONARDO = $(error On leonardo, raw_xxx operation is not supported)
|
||||||
else
|
else
|
||||||
ERROR_ON_LEONARDO =
|
ERROR_ON_LEONARDO =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -449,7 +449,7 @@ ifndef F_CPU
|
||||||
F_CPU = $(shell $(PARSE_BOARD_CMD) $(BOARD_TAG) build.f_cpu)
|
F_CPU = $(shell $(PARSE_BOARD_CMD) $(BOARD_TAG) build.f_cpu)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(VARIANT),leonardo)
|
ifeq ($(VARIANT),leonardo)
|
||||||
# USB IDs for the Leonardo
|
# USB IDs for the Leonardo
|
||||||
ifndef USB_VID
|
ifndef USB_VID
|
||||||
USB_VID = $(shell $(PARSE_BOARD_CMD) $(BOARD_TAG) build.vid 2>/dev/null)
|
USB_VID = $(shell $(PARSE_BOARD_CMD) $(BOARD_TAG) build.vid 2>/dev/null)
|
||||||
|
@ -653,7 +653,7 @@ CPPFLAGS += -mmcu=$(MCU) -DF_CPU=$(F_CPU) -DARDUINO=$(ARDUINO_VERSION) \
|
||||||
-ffunction-sections -fdata-sections
|
-ffunction-sections -fdata-sections
|
||||||
|
|
||||||
# USB IDs for the Leonardo
|
# USB IDs for the Leonardo
|
||||||
ifeq ($(VARIANT),leonardo)
|
ifeq ($(VARIANT),leonardo)
|
||||||
CPPFLAGS += -DUSB_VID=$(USB_VID) -DUSB_PID=$(USB_PID)
|
CPPFLAGS += -DUSB_VID=$(USB_VID) -DUSB_PID=$(USB_PID)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -887,10 +887,10 @@ reset:
|
||||||
# least. Perhaps it would be better to just do it in perl ?
|
# least. Perhaps it would be better to just do it in perl ?
|
||||||
reset_stty:
|
reset_stty:
|
||||||
for STTYF in 'stty -F' 'stty --file' 'stty -f' 'stty <' ; \
|
for STTYF in 'stty -F' 'stty --file' 'stty -f' 'stty <' ; \
|
||||||
do $$STTYF /dev/tty >/dev/null 2>/dev/null && break ; \
|
do $$STTYF /dev/tty >/dev/null 2>&1 && break ; \
|
||||||
done ;\
|
done ; \
|
||||||
$$STTYF $(call get_arduino_port) hupcl ;\
|
$$STTYF $(call get_arduino_port) hupcl ; \
|
||||||
(sleep 0.1 || sleep 1) ;\
|
(sleep 0.1 2>/dev/null || sleep 1) ; \
|
||||||
$$STTYF $(call get_arduino_port) -hupcl
|
$$STTYF $(call get_arduino_port) -hupcl
|
||||||
|
|
||||||
ispload: $(TARGET_EEP) $(TARGET_HEX) verify_size
|
ispload: $(TARGET_EEP) $(TARGET_HEX) verify_size
|
||||||
|
|
|
@ -7,10 +7,10 @@ use Getopt::Long;
|
||||||
use Pod::Usage;
|
use Pod::Usage;
|
||||||
use YAML;
|
use YAML;
|
||||||
|
|
||||||
# TODO: If you writing an installation script or a package for the makefile,
|
# TODO: If you writing an installation script or a package for the makefile,
|
||||||
# then you might want to replace the below path based on the environment.
|
# then you might want to replace the below path based on the environment.
|
||||||
# More discussion at https://github.com/sudar/Arduino-Makefile/issues/50
|
# More discussion at https://github.com/sudar/Arduino-Makefile/issues/50
|
||||||
my %Opt =
|
my %Opt =
|
||||||
(
|
(
|
||||||
boards_txt => '/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/boards.txt',
|
boards_txt => '/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/boards.txt',
|
||||||
);
|
);
|
||||||
|
@ -25,7 +25,7 @@ GetOptions(\%Opt,
|
||||||
"find!", # search for data
|
"find!", # search for data
|
||||||
"dump!", # dump the whole database
|
"dump!", # dump the whole database
|
||||||
"boards!", # dump a list of boards
|
"boards!", # dump a list of boards
|
||||||
"help!",
|
"help!",
|
||||||
"info!",
|
"info!",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -36,8 +36,8 @@ if ($Opt{help} || $Opt{info})
|
||||||
|
|
||||||
my $db = parse_boards($Opt{boards_txt});
|
my $db = parse_boards($Opt{boards_txt});
|
||||||
|
|
||||||
if ($Opt{dump})
|
if ($Opt{dump})
|
||||||
{
|
{
|
||||||
dump_data("$Opt{boards_txt} contains:", $db);
|
dump_data("$Opt{boards_txt} contains:", $db);
|
||||||
}
|
}
|
||||||
elsif ($Opt{find})
|
elsif ($Opt{find})
|
||||||
|
@ -52,7 +52,7 @@ elsif ($Opt{boards})
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
my $tag = shift @ARGV or usage();
|
my $tag = shift @ARGV or usage();
|
||||||
|
|
||||||
if (my $key = shift @ARGV)
|
if (my $key = shift @ARGV)
|
||||||
{
|
{
|
||||||
die "$key isn't defined for the $tag board, "
|
die "$key isn't defined for the $tag board, "
|
||||||
|
@ -71,7 +71,7 @@ else
|
||||||
|
|
||||||
## here endeth the main
|
## here endeth the main
|
||||||
|
|
||||||
sub usage
|
sub usage
|
||||||
{
|
{
|
||||||
pod2usage(-verbose => 2);
|
pod2usage(-verbose => 2);
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ sub parse_boards
|
||||||
|
|
||||||
my %b;
|
my %b;
|
||||||
|
|
||||||
open(my $fh, '<', $filename)
|
open(my $fh, '<', $filename)
|
||||||
or die "Can't open $filename, ";
|
or die "Can't open $filename, ";
|
||||||
|
|
||||||
while(<$fh>)
|
while(<$fh>)
|
||||||
|
@ -152,11 +152,11 @@ sub dump_data
|
||||||
__END__
|
__END__
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
ard-parse-boards - Read data from the Arduino boards.txt file
|
ard-parse-boards - Read data from the Arduino boards.txt file
|
||||||
|
|
||||||
=head1 USAGE
|
=head1 USAGE
|
||||||
|
|
||||||
Dump all the data in the file:
|
Dump all the data in the file:
|
||||||
$ ard-parse-boards --dump
|
$ ard-parse-boards --dump
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ ard-parse-boards - Read data from the Arduino boards.txt file
|
||||||
|
|
||||||
Extract a particular field:
|
Extract a particular field:
|
||||||
$ ard-parse-boards atmega328 build.f_cpu
|
$ ard-parse-boards atmega328 build.f_cpu
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
The Arduino software package ships with a boards.txt file which tells
|
The Arduino software package ships with a boards.txt file which tells
|
||||||
|
@ -201,12 +201,12 @@ names with the C<--boards> option.
|
||||||
Specify the full path to the boards.txt file.
|
Specify the full path to the boards.txt file.
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
The following options all disable the normal 'lookup' operation.
|
The following options all disable the normal 'lookup' operation.
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item --dump
|
=item --dump
|
||||||
|
|
||||||
Dump the complete database in YAML format.
|
Dump the complete database in YAML format.
|
||||||
|
|
||||||
|
@ -238,7 +238,7 @@ List data containing both 328 and due.
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=head1 BUGS AND LIMITATIONS
|
=head1 BUGS AND LIMITATIONS
|
||||||
|
|
||||||
There are no known bugs in this application.
|
There are no known bugs in this application.
|
||||||
|
@ -246,17 +246,17 @@ There are no known bugs in this application.
|
||||||
Please report problems to the author.
|
Please report problems to the author.
|
||||||
|
|
||||||
Patches are welcome.
|
Patches are welcome.
|
||||||
|
|
||||||
=head1 AUTHOR
|
=head1 AUTHOR
|
||||||
|
|
||||||
Martin Oldfield, ex-atelier@mjo.tc
|
Martin Oldfield, ex-atelier@mjo.tc
|
||||||
|
|
||||||
Thanks to Mark Sproul who suggested doing something like this to me ages ago.
|
Thanks to Mark Sproul who suggested doing something like this to me ages ago.
|
||||||
|
|
||||||
=head1 LICENCE AND COPYRIGHT
|
=head1 LICENCE AND COPYRIGHT
|
||||||
|
|
||||||
Copyright (c) 2011, Martin Oldfield. All rights reserved.
|
Copyright (c) 2011, Martin Oldfield. All rights reserved.
|
||||||
|
|
||||||
This file is free software; you can redistribute it and/or modify it
|
This file is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU Lesser General Public License as published
|
under the terms of the GNU Lesser General Public License as published
|
||||||
by the Free Software Foundation; either version 2.1 of the License, or
|
by the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
@ -264,6 +264,6 @@ by the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue