mirror of
https://github.com/RobotechLille/cdf2018-principal
synced 2024-12-22 05:30:37 +01:00
Plus d'actionneurs
This commit is contained in:
parent
935d1054a7
commit
595e8fa2a1
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -13,3 +13,6 @@
|
||||||
[submodule "Servo"]
|
[submodule "Servo"]
|
||||||
path = arduino/lib/Servo
|
path = arduino/lib/Servo
|
||||||
url = https://github.com/arduino-libraries/Servo.git
|
url = https://github.com/arduino-libraries/Servo.git
|
||||||
|
[submodule "arduino/Arduino-Makefile"]
|
||||||
|
path = arduino/Arduino-Makefile
|
||||||
|
url = https://github.com/sudar/Arduino-Makefile.git
|
||||||
|
|
1
arduino/Arduino-Makefile
Submodule
1
arduino/Arduino-Makefile
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 0809b5460617f2217d8b4b0f9a57758e220c429c
|
4
arduino/Arduino-Makefile/.gitignore
vendored
4
arduino/Arduino-Makefile/.gitignore
vendored
|
@ -1,4 +0,0 @@
|
||||||
*.o
|
|
||||||
build-cli
|
|
||||||
/.project
|
|
||||||
build-*
|
|
|
@ -1,5 +0,0 @@
|
||||||
language: c
|
|
||||||
compiler:
|
|
||||||
- gcc
|
|
||||||
script: tests/script/runtests.sh
|
|
||||||
before_install: tests/script/bootstrap.sh
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,36 +0,0 @@
|
||||||
# Contributing To Arduino Makefile
|
|
||||||
|
|
||||||
Community made patches, localizations, bug reports, documentation and contributions are always welcome and are crucial to the success of this project.
|
|
||||||
|
|
||||||
When contributing please ensure you follow the guidelines below so that we can keep on top of things.
|
|
||||||
|
|
||||||
## Getting Started
|
|
||||||
|
|
||||||
Submit a ticket for your issue, assuming one does not already exist.
|
|
||||||
|
|
||||||
- Raise it on our [Issue Tracker](https://github.com/sudar/Arduino-Makefile/issues)
|
|
||||||
- Clearly describe the issue including steps to reproduce the bug.
|
|
||||||
- Make sure you fill in the earliest version that you know has the issue as well as the following
|
|
||||||
- Your operating system (Mac, Linux/Unix, Windows)
|
|
||||||
- Your Arduino IDE version
|
|
||||||
- Snippet of your makefile
|
|
||||||
|
|
||||||
## Making Changes
|
|
||||||
|
|
||||||
- Fork the repository on GitHub
|
|
||||||
- Make the changes to your forked repository
|
|
||||||
- Update the [changelog file](HISTORY.md) and add a note about your change. If possible prefix it with either Fix, Tweak or New
|
|
||||||
- If you are adding or changing the behavior of any variable, then update the corresponding documentation in the [arduino-mk-vars.md](arduino-mk-vars.md) file as well
|
|
||||||
- When committing, reference your issue (if present) and include a note about the fix
|
|
||||||
- If possible (and if makes sense) do atomic commits
|
|
||||||
- Try to follow [this guideline](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) while choosing the git commit message
|
|
||||||
- If it makes sense then add a unit test case for the changes that you are making
|
|
||||||
- Push the changes to your fork and submit a pull request to the 'master' branch of the this repository
|
|
||||||
|
|
||||||
At this point you're waiting on us to merge your pull request. We'll review all pull requests, and make suggestions and changes if necessary.
|
|
||||||
|
|
||||||
# Additional Resources
|
|
||||||
|
|
||||||
- [General GitHub Documentation](http://help.github.com/)
|
|
||||||
- [GitHub Pull Request documentation](http://help.github.com/send-pull-requests/)
|
|
||||||
- [Guide about contributing code in GitHub](http://sudarmuthu.com/blog/contributing-to-project-hosted-in-github)
|
|
|
@ -1,87 +0,0 @@
|
||||||
# Useful functions
|
|
||||||
# Returns the first argument (typically a directory), if the file or directory
|
|
||||||
# named by concatenating the first and optionally second argument
|
|
||||||
# (directory and optional filename) exists
|
|
||||||
dir_if_exists = $(if $(wildcard $(1)$(2)),$(1))
|
|
||||||
|
|
||||||
# Run a shell script if it exists. Stops make on error.
|
|
||||||
runscript_if_exists = \
|
|
||||||
$(if $(wildcard $(1)), \
|
|
||||||
$(if $(findstring 0, \
|
|
||||||
$(lastword $(shell $(abspath $(wildcard $(1))); echo $$?))), \
|
|
||||||
$(info Info: $(1) success), \
|
|
||||||
$(error ERROR: $(1) failed)))
|
|
||||||
|
|
||||||
# For message printing: pad the right side of the first argument with spaces to
|
|
||||||
# the number of bytes indicated by the second argument.
|
|
||||||
space_pad_to = $(shell echo $(1) " " | head -c$(2))
|
|
||||||
|
|
||||||
# Call with some text, and a prefix tag if desired (like [AUTODETECTED]),
|
|
||||||
show_config_info = $(call arduino_output,- $(call space_pad_to,$(2),20) $(1))
|
|
||||||
|
|
||||||
# Call with the name of the variable, a prefix tag if desired (like [AUTODETECTED]),
|
|
||||||
# and an explanation if desired (like (found in $$PATH)
|
|
||||||
show_config_variable = $(call show_config_info,$(1) = $($(1)) $(3),$(2))
|
|
||||||
|
|
||||||
# Just a nice simple visual separator
|
|
||||||
show_separator = $(call arduino_output,-------------------------)
|
|
||||||
|
|
||||||
$(call show_separator)
|
|
||||||
$(call arduino_output,Arduino.mk Configuration:)
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
#
|
|
||||||
# Detect OS
|
|
||||||
ifeq ($(OS),Windows_NT)
|
|
||||||
CURRENT_OS = WINDOWS
|
|
||||||
else
|
|
||||||
UNAME_S := $(shell uname -s)
|
|
||||||
ifeq ($(UNAME_S),Linux)
|
|
||||||
CURRENT_OS = LINUX
|
|
||||||
endif
|
|
||||||
ifeq ($(UNAME_S),Darwin)
|
|
||||||
CURRENT_OS = MAC
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
$(call show_config_variable,CURRENT_OS,[AUTODETECTED])
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
#
|
|
||||||
# Travis-CI
|
|
||||||
ifneq ($(TEST),)
|
|
||||||
DEPENDENCIES_DIR = /var/tmp/Arduino-Makefile-testing-dependencies
|
|
||||||
|
|
||||||
DEPENDENCIES_MPIDE_DIR = $(DEPENDENCIES_DIR)/mpide-0023-linux64-20130817-test
|
|
||||||
ifeq ($(MPIDE_DIR),)
|
|
||||||
MPIDE_DIR = $(DEPENDENCIES_MPIDE_DIR)
|
|
||||||
endif
|
|
||||||
|
|
||||||
DEPENDENCIES_ARDUINO_DIR = $(DEPENDENCIES_DIR)/arduino-1.0.6
|
|
||||||
ifeq ($(ARDUINO_DIR),)
|
|
||||||
ARDUINO_DIR = $(DEPENDENCIES_ARDUINO_DIR)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
# Arduino Directory
|
|
||||||
|
|
||||||
ifndef ARDUINO_DIR
|
|
||||||
AUTO_ARDUINO_DIR := $(firstword \
|
|
||||||
$(call dir_if_exists,/usr/share/arduino) \
|
|
||||||
$(call dir_if_exists,/Applications/Arduino.app/Contents/Resources/Java) \
|
|
||||||
$(call dir_if_exists,/Applications/Arduino.app/Contents/Java) )
|
|
||||||
ifdef AUTO_ARDUINO_DIR
|
|
||||||
ARDUINO_DIR = $(AUTO_ARDUINO_DIR)
|
|
||||||
$(call show_config_variable,ARDUINO_DIR,[AUTODETECTED])
|
|
||||||
else
|
|
||||||
echo $(error "ARDUINO_DIR is not defined")
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
$(call show_config_variable,ARDUINO_DIR,[USER])
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CURRENT_OS),WINDOWS)
|
|
||||||
ifneq ($(shell echo $(ARDUINO_DIR) | egrep '^(/|[a-zA-Z]:\\)'),)
|
|
||||||
echo $(error On Windows, ARDUINO_DIR must be a relative path)
|
|
||||||
endif
|
|
||||||
endif
|
|
|
@ -1,323 +0,0 @@
|
||||||
A Makefile for Arduino Sketches
|
|
||||||
===============================
|
|
||||||
|
|
||||||
The following is the rough list of changes that went into different versions.
|
|
||||||
I tried to give credit whenever possible. If I have missed anyone, kindly add it to the list.
|
|
||||||
|
|
||||||
### In Development
|
|
||||||
- Fix: Do not include the Arduino header when calling generate_assembly on .cpp files. (https://github.com/Batchyx)
|
|
||||||
- Fix: Auto-detect F_CPU on Teensy from boards.txt (https://github.com/DaWelter)
|
|
||||||
- Fix: params typo in PuTTY section (issue #487) (https://github.com/ericdand)
|
|
||||||
- Fix: Fixed sed expression to properly format show_submenu (issue #488) (https://github.com/cbosdo)
|
|
||||||
- New: Add support for good old cu as monitor command (issue #492) (https://github.com/mwm)
|
|
||||||
|
|
||||||
### 1.5.2 (2017-01-11)
|
|
||||||
|
|
||||||
- New: Add LTO support for users with avr-gcc > 4.9 (issue #446 & #456) (https://github.com/sej7278)
|
|
||||||
- Tweak: Updated Linux instructions and sync documentation from the old blog(), README.md and Arduino.mk (https://github.com/az-z)
|
|
||||||
- Tweak: Documentation for Windows updated to include installation of PySerial (https://github.com/sovcik)
|
|
||||||
- Fix: Updated CXXFLAGS_STD to match upstream 1.6 (issue #424) (https://github.com/calvinli)
|
|
||||||
- Fix: Added support for attiny core's use of chip instead of cpu in submenus (https://github.com/straccio)
|
|
||||||
- Fix: ARDUINO_VERSION can cope with the longer 1.6.10 version string (issue #444) (https://github.com/sej7278)
|
|
||||||
- Fix: Changed PARSE_BOARD to handle colons in e.g. CORE or VARIANT (issue #461) (https://github.com/sej7278)
|
|
||||||
- Fix: Changed Teensy.mk to support Arduino 1.6.12 and Teensyduino 1.30 (issues #383 , #431) (https://github.com/georgeharker)
|
|
||||||
|
|
||||||
### 1.5.1 (Debian version: 1.5-3) (2016-02-22)
|
|
||||||
|
|
||||||
- New: Add show_submenu target (https://github.com/drewhutchison)
|
|
||||||
- New: Add AVR Dragon to list of ISP's without a port (https://github.com/mtnocean)
|
|
||||||
- New: Add more board examples to Blink demo (https://github.com/sej7278)
|
|
||||||
- New: Add option to split avrdude MCU from avr-gcc MCU (Issue #357) (https://github.com/hhgarnes)
|
|
||||||
- New: Add support for /dev/tty.wchusbserial* (comes with cheap clones - DCCduino) (https://github.com/biesiad)
|
|
||||||
- New: Add support for picocom as serial monitor (https://github.com/biesiad)
|
|
||||||
- Tweak: Add support for Adafruit trinket3/trinket5/protrinket3/protrinket5 by improved BOARDS_TXT parsing (Issue #393) (https://github/com/zabereer)
|
|
||||||
- Tweak: Looks for submenu items first when parsing BOARDS_TXT (Issue #347) (https://github.com/sej7278)
|
|
||||||
- Tweak: Various spelling/grammar/typo fixes (https://github.com/dcousens)
|
|
||||||
- Tweak: Clarified some 1.5+ issues in docs (Issue #352) (https://github.com/sej7278)
|
|
||||||
- Tweak: Added some more Continuous Integration tests (https://github.com/sej7278)
|
|
||||||
- Tweak: Updated Fedora instructions (https://github.com/sej7278)
|
|
||||||
- Fix: Preserve original extension for object files, support asm sources in core, fixes pulseInASM (Issue #255, #364) (https://github.com/sej7278)
|
|
||||||
- Fix: Make sure TARGET is set correctly when CURDIR contains spaces (https://github.com/svendahlstrand)
|
|
||||||
- Fix: Ensure AVRDUDE_CONF is set when AVR_TOOLS_DIR is, not just on Windows (Issue #381) (https://github.com/sej7278)
|
|
||||||
- Fix: Rename VENDOR to ARDMK_VENDOR to workaround tcsh issue (Issue #386) (https://github.com/sej7278)
|
|
||||||
- Fix: Document OSX 1.0/1.6 ARDUINO_DIR differences (https://github.com/thomaskilian)
|
|
||||||
- Fix: Fix regex to support BOARD_TAGs with hyphens e.g. attiny44-20 (https://github.com/sej7278)
|
|
||||||
- Fix: Remove check for BOOTLOADER_PATH, just check for BOOTLOADER_FILE (Issue #402) (https://github.com/sej7278)
|
|
||||||
- Fix: Port ard-reset-arduino to pyserial 3.0 (#407, #408) (https://github.com/gauteh)
|
|
||||||
|
|
||||||
### 1.5 (2015-04-07)
|
|
||||||
- New: Add support for new 1.5.x library layout (Issue #275) (https://github.com/lukasz-e)
|
|
||||||
- New: Add support for 1.5.x vendor/hardware architecture library location (Issue #276) (https://github.com/lukasz-e)
|
|
||||||
- New: Added test suite and integration with travis CI. (https://github.com/peplin)
|
|
||||||
- New: Add information about `Bare-Arduino–Project` in README. (https://github.com/ladislas)
|
|
||||||
- New: Add information about reporting bugs to the correct project (Issue #231). (https://github.com/sej7278)
|
|
||||||
- New: Add documentation about CFLAGS_STD and CXXFLAGS_STD (Issue #234) (https://github.com/ladislas)
|
|
||||||
- New: Allow "make clean" target to be extended (Issue #239). (https://github.com/sej7278)
|
|
||||||
- New: Add makefile and gcc version info to config output. (https://github.com/sej7278)
|
|
||||||
- New: Support for Teensy 3.x (https://github.com/stepcut)
|
|
||||||
- New: Support for PuTTY under Windows (https://github.com/PeterMosmans)
|
|
||||||
- New: Add support for installation using homebrew(https://github.com/ladislas)
|
|
||||||
- New: Add support and example for flashing on a remote RPi. (https://github.com/Gaboose)
|
|
||||||
- Tweak: Update Makefile-example.mk with STD flags (https://github.com/ladislas)
|
|
||||||
- Tweak: Allow remove of any OBJDIR with `$(REMOVE) $(OBJDIR)`. (https://github.com/ladislas)
|
|
||||||
- Tweak: Add cpp to extensions supported by "make generate_assembly". (https://github.com/sej7278)
|
|
||||||
- Tweak: Update travis-ci to test against Arduino 1.0.6. (https://github.com/sej7278)
|
|
||||||
- Tweak: Updated package instructions for Arch/Fedora/Raspbian. (https://github.com/sej7278)
|
|
||||||
- Tweak: Remove $(EXTRA_XXX) variables (Issue #234) (https://github.com/ladislas)
|
|
||||||
- Tweak: Moved location of avrdude for 1.5.8 on Linux (Issue #301) (https://github.com/sej7278)
|
|
||||||
- Tweak: Allow 'build.core' param as found in [arduino-tiny](https://code.google.com/p/arduino-tiny/) Prospective Boards.txt. (https://github.com/Gaboose)
|
|
||||||
- Tweak: Replace CXX_NAME with CXX as per the Emacs Flymake Wiki (Issue #309) (https://github.com/sej7278)
|
|
||||||
- Tweak: Ability to override `USB_TYPE` in Teensy.md (Issue #313) (https://github.com/Poofjunior)
|
|
||||||
- Tweak: Integration instructions for CodeBlocks IDE (Issue #321) (https://github.com/fbielejec)
|
|
||||||
- Tweak: Add BOARD_SUB to OBJDIR if defined in 1.5+ (https://github.com/sej7278)
|
|
||||||
- Tweak: Add = to PARSE_BOARD regex to make it less greedy and not match vid.0, vid.1 and vid (https://github.com/sej7278)
|
|
||||||
- Tweak: Added note about clock submenu's being used as F_CPU (https://github.com/sej7278)
|
|
||||||
- Tweak: Better autodetection of ARDUINO_SKETCHBOOK and ARDUINO_DIR on OSX (https://github.com/sej7278)
|
|
||||||
- Fix: Improved Windows (Cygwin/MSYS) support (https://github.com/PeterMosmans)
|
|
||||||
- Fix: Change "tinyladi" username to "ladislas" in HISTORY.md. (https://github.com/ladislas)
|
|
||||||
- Fix: Make avr-g++ use CXXFLAGS instead of CFLAGS. (https://github.com/sej7278)
|
|
||||||
- Fix: Allow the use of CFLAGS_STD and CXXFLAGS_STD and set defaults (Issue #234) (https://github.com/ladislas)
|
|
||||||
- Fix: Update "make show_boards" regex to work with the Due in 1.5. (https://github.com/sej7278)
|
|
||||||
- Fix: Allow user libaries/sketches to have the same name as system libs. (Issue #244, #229). (https://github.com/sej7278)
|
|
||||||
- Fix: Remove impact of travis-ci from regular users. (Issue #258). (https://github.com/sej7278)
|
|
||||||
- Fix: objcopy quoting issue on Windows. (Issue #272). (https://github.com/sej7278)
|
|
||||||
- Fix: Add "avrispmkii" to the list of isp that don't have a port. (Issue #279). (https://github.com/sej7278)
|
|
||||||
- Fix: Make CXX compile .cpp files instead of CC. (Issue #285). (https://github.com/sej7278)
|
|
||||||
- Fix: Changed IDE download URL *again* for Travis-CI. (https://github.com/sej7278)
|
|
||||||
- Fix: Allow avrdude to erase the chip before programming during ispload (https://github.com/tchebb)
|
|
||||||
- Fix: Fix speed regression. Thanks ladislas (Issue #280) (https://github.com/sej7278)
|
|
||||||
- Fix: Removed some double quotes that were breaking variable expansion. (https://github.com/sej7278)
|
|
||||||
- Fix: Fixed PLATFORM_LIB support for 1.5+ and removed duplicate libs (https://github.com/sej7278)
|
|
||||||
- Fix: Added ARCHITECTURE to ALTERNATE_CORE_PATH to support 1.5+ cores like arduino-tiny (https://github.com/sej7278)
|
|
||||||
- Fix: Can now find IDE 1.5+ preferences.txt on Linux and Mac (https://github.com/sej7278)
|
|
||||||
- Fix: Added support for VARIANT being a submenu item in 1.6 cores like attiny (https://github.com/sej7278)
|
|
||||||
- Fix: Replaced copyright symbol causing sed problems on OSX (Issue #335). (https://github.com/sej7278)
|
|
||||||
- Fix: Fix issues with resetting Leonardo and Micro boards(Issue #340) (https://github.com/calvinli)
|
|
||||||
|
|
||||||
### 1.3.4 (2014-07-12)
|
|
||||||
- Tweak: Allow spaces in "Serial.begin (....)". (Issue #190) (https://github.com/pdav)
|
|
||||||
- Add: Add support for compiling assembler code. (Issue #195) (https://github.com/hrobeers)
|
|
||||||
- Add: Try to guess port from wildcards if not specified. (Issue #197) (https://github.com/tuzz)
|
|
||||||
- Fix: Check that on windows ARDUINO_DIR (and MPIDE_DIR) is a relative path. (Issue #201 and #202) (https://github.com/sej7278)
|
|
||||||
- Add: List board name as well as tag in `make show_boards`. (Issue #204) (https://github.com/sej7278)
|
|
||||||
- Fix: Add missing newlines at end of some echo's (Issue #207) (https://github.com/sej7278)
|
|
||||||
- Fix: Add missing/reorder/reword targets in `make help` (https://github.com/sej7278)
|
|
||||||
- New: Arduino.mk is now compatible with Flymake mode (https://github.com/rbarzic)
|
|
||||||
- Fix: MONITOR_PORT detection (Issue #213, #215) (https://github.com/sej7278)
|
|
||||||
- Tweak: Audited regexes/quoting/wildcards (Issue #192) (https://github.com/sej7278)
|
|
||||||
- New: Build core objects in subdirectory (Issue #82) (https://github.com/sej7278)
|
|
||||||
|
|
||||||
### 1.3.3 (2014-04-12)
|
|
||||||
- Fix: Make a new manpage for ard-reset-arduino. Fixes issue #188 (https://github.com/sej7278)
|
|
||||||
|
|
||||||
### 1.3.2 (2014-04-11)
|
|
||||||
- Fix: Add arduino-mk-vars.md file to RPM SPECfile. (https://github.com/sej7278)
|
|
||||||
- Fix: Add avr-libc/malloc.c and realloc.c to included core files. Fixes issue #163 (https://github.com/sej7278)
|
|
||||||
- Fix: Add "gpio" to the list of isp that don't have a port. (Issue #165, #166) (https://github.com/sej7278)
|
|
||||||
- Fix: Add "-D__PROG_TYPES_COMPAT__" to the avr-g++ compiler flags to match IDE. (https://github.com/sej7278)
|
|
||||||
- New: Create `Makefile-example-mk`, a *real life* `Makefile` example, to be used as a reference. (https://github.com/ladislas)
|
|
||||||
- Tweak: Add `OBJDIR` to `arduino-mk-vars.md` (https://github.com/ladislas)
|
|
||||||
- Tweak: *Beautify* `arduino-mk-vars.md` with code blocks. (https://github.com/ladislas)
|
|
||||||
- Fix: AVR tools paths for chipKIT in Linux. (https://github.com/peplin)
|
|
||||||
- Fix: Consider usb or usb:... to be a valid ISP_PORT (https://github.com/geoffholden)
|
|
||||||
- Add: Add phony target to run pre-build hook script (https://github.com/jrid)
|
|
||||||
- Fix: Add BOOTLOADER_PARENT to `arduino-mk-vars.md` and fixed BOOTLOADER_PATH example. (https://github.com/sej7278)
|
|
||||||
- Tweak: Replace perl reset script with Python script. (https://github.com/sej7278)
|
|
||||||
- Tweak: Made choice of Python2/3 interpreter up to the OS. (https://github.com/peplin)
|
|
||||||
- Tweak: Simplified packaging dependencies. (https://github.com/sej7278)
|
|
||||||
- Tweak: Tweak AVRDUDE conf detection in windows. (https://github.com/EAGMnor)
|
|
||||||
|
|
||||||
### 1.3.1 (2014-02-04)
|
|
||||||
- Fix: BUNDLED_AVR_TOOLS_DIR is now set properly when using only arduino-core and not the whole arduino package. (https://github.com/sej7278)
|
|
||||||
- New: Document all variables that can be overridden. (https://github.com/sej7278)
|
|
||||||
- New: Add a new `help_vars` target to display information about variables that can be overridden.
|
|
||||||
|
|
||||||
### 1.3.0 (2014-01-29)
|
|
||||||
- Fix: Use more reliable serial device naming in Windows. Fix issue #139 and #155 (https://github.com/peplin)
|
|
||||||
- Fix: Document that ARDUINO_DIR must be a relative path in Windows. Fix issue #156 (https://github.com/peplin)
|
|
||||||
- Tweak: Don't hard code MONITOR_PORT in examples, for more flexible testing. (Issue #157) (https://github.com/peplin)
|
|
||||||
- Tweak: Silence the stderr output from call to `which`. (Issue #158) (https://github.com/peplin)
|
|
||||||
- Fix: Override complete compiler tool paths for chipKIT. (Issue #159) (https://github.com/peplin)
|
|
||||||
- New: The makefile is compatible with Windows
|
|
||||||
- New: Update `README.md` file about usage and Windows compatibility
|
|
||||||
|
|
||||||
### 1.2.0 (2014-01-14)
|
|
||||||
- Add: Add RPM SPECfile and new `package` directory to store package instructions and files (https://github.com/sej7278)
|
|
||||||
- Fix: Remove use of arduino-mk subdirectory in git. Fix issue #151, #152 and #147 (https://github.com/sej7278)
|
|
||||||
- Fix: Remove `arduino-mk` directory from all examples. Fix #154
|
|
||||||
|
|
||||||
### 1.1.0 (2013-12-26)
|
|
||||||
- Don't append port details to avrdude for usbasp. See #123
|
|
||||||
- Ignore commented lines while parsing boards.txt file. See #124
|
|
||||||
- In ISP mode, read baudrate and programmer from boards.txt. See #125
|
|
||||||
- Add `burn_bootloader` target. See #85
|
|
||||||
- Show correct path to `arduino.mk` file in help message. Fix #120
|
|
||||||
- Change echo for printf. Fix #129 (https://github.com/thomassigurdsen)
|
|
||||||
- Add support for ChipKiT 2013. Fix #136 (https://github.com/peplin)
|
|
||||||
- Auto detect and include libraries specified in `USER_LIB_PATH`. Fix #135 (https://github.com/ladislas)
|
|
||||||
- Use `MAKEFILE_LIST` to get the name of the make file. Fix #130 (https://github.com/cantora)
|
|
||||||
- New: Add option to set fuses without burning a bootloader. Fix #141 (https://github.com/sej7278)
|
|
||||||
- Tweak: Don't append port details to avrdude for usbtiny. Fix #140 and #138 (https://github.com/PPvG)
|
|
||||||
- Fix: Handle relative paths of bootloader file while burning bootloaders. Fix #126 and #142 (https://github.com/sej7278)
|
|
||||||
- New: Add `CONTRIBUTING.md` explaining how to contribute to the project.
|
|
||||||
- New: Force -Os optimization for SoftwareSerial. Add `OPTIMIZATION_FLAGS` and `DEBUG_FLAGS`. (https://github.com/mahoy)
|
|
||||||
- Fix: Use `ARDUINO_HEADER` variable instead of hardcoded file names. Fix #131
|
|
||||||
|
|
||||||
### 1.0.1 (2013-09-25)
|
|
||||||
- Unconditionally add -D in avrdude options. See #114
|
|
||||||
|
|
||||||
### 1.0.0 (2013-09-22)
|
|
||||||
- Add $OBJDIR to the list of configuration that gets printed. Fix issue #77
|
|
||||||
- Add support for specifying optimization level. Fix issue #81
|
|
||||||
- Add support for reseting "Micro" Arduino. Fix issue #80 (https://github.com/sej7278)
|
|
||||||
- Remove "utility" from example makefiles. Fix issue #84
|
|
||||||
- Auto detect alternate core path from sketchbook folder. Fix issue #86
|
|
||||||
- Remove redundant checks for ARDUINO_DIR
|
|
||||||
- Improve avrdude and avrdude.conf path auto detection. Fix issue #48
|
|
||||||
- Move binary sketch size verification logic inside makefile. Fix issue #54
|
|
||||||
- Remove dependency on wait-connection-leonardo shell script. Fix issue #95
|
|
||||||
- Add support for the Digilent chipKIT platform. (https://github.com/peplin)
|
|
||||||
- Implement ard-parse-boards with shell scripting instead of Perl (https://github.com/peplin)
|
|
||||||
- Compile with debugging symbols only when DEBUG=1 (https://github.com/peplin)
|
|
||||||
- Replace Leonardo detection with Caterina detection (https://github.com/sej7278)
|
|
||||||
- Autodetect baudrate only if either a .ino/.pde is present
|
|
||||||
- Allow building with Arduino core, without a .ino/.pde file
|
|
||||||
- Ability to support different Arduino cores (https://github.com/sej7278)
|
|
||||||
|
|
||||||
### 0.12.0 (2013-06-20)
|
|
||||||
- Fix "generated_assembly" target, which got broken earlier. Fix issue #76 (https://github.com/matthijskooijman)
|
|
||||||
- Deprecate "generated_assembly" target in favour of "generate_assembly". Fix issue #79
|
|
||||||
|
|
||||||
### 0.11.0 (2013-06-15)
|
|
||||||
- Replace hardcoded executables with variable
|
|
||||||
- Fix whitespace issues
|
|
||||||
- Add a warning when HEX_MAXIMUM_SIZE is not specified
|
|
||||||
- Add the ability to configure avrdude options. Fix issue #53
|
|
||||||
- Handle cases where certain fuse bits are not present. Fix issue #61
|
|
||||||
- Add support for compiling plain AVR C files. Fix issue #63
|
|
||||||
- Add an example to show how to compile AVR C files. Fix issue #73
|
|
||||||
|
|
||||||
### 0.10.6 (2013-06-14)
|
|
||||||
- Fix whitespace and add /dev/null redirection (https://github.com/sej7278)
|
|
||||||
- Change the way AUTO_ARDUINO_VERSION is computed (https://github.com/sej7278)
|
|
||||||
- Make serial monitor baudrate detection work in Mac as well(https://github.com/sej7278)
|
|
||||||
- Fix directory creation for library source files (https://github.com/matthijskooijman)
|
|
||||||
- Rewrite ard-leonardo-reset script in perl (https://github.com/sej7278)
|
|
||||||
|
|
||||||
### 0.10.5 (2013-06-11)
|
|
||||||
- Add USB_VID and USB_PID to CPPFLAGS only if the board is Leonardo.
|
|
||||||
- Allow adding extra common dependencies (COMMON_DEPS) (https://github.com/gaftech)
|
|
||||||
- Added ifndef ARDUINO_VAR_PATH for compiling for the attiny (https://github.com/danielesteban)
|
|
||||||
- Strip extra whitespace from the `BOARD_TAG` variable
|
|
||||||
- Enhanced support for programming using Arduino as ISP
|
|
||||||
- Added example to show how to program using Arduino as ISP
|
|
||||||
- Add support for Leonardo boards. Took code from (https://github.com/guicho271828)
|
|
||||||
|
|
||||||
### 0.10.4 (2013-05-31) @matthijskooijman
|
|
||||||
- Improved BAUD_RATE detection logic
|
|
||||||
- Added logic to check if there is only .ino or .pde file
|
|
||||||
- Compile .ino/.pde files directly
|
|
||||||
- Output configuration only once
|
|
||||||
- Try to read Version.txt file only if it is present
|
|
||||||
- Refactored dependency code
|
|
||||||
|
|
||||||
### 0.10.3 16.xii 2012 gaftech
|
|
||||||
- Enabling creation of EEPROM file (.eep)
|
|
||||||
- EEPROM upload: eeprom and raw_eeprom targets
|
|
||||||
- Auto EEPROM upload with isp mode: ISP_EEPROM option.
|
|
||||||
- Allow custom OBJDIR
|
|
||||||
|
|
||||||
### 0.10.2 15.xii.2012 Sudar
|
|
||||||
- Added sketch size verification. (https://github.com/fornellas)
|
|
||||||
- Show original line number for error messages (https://github.com/WizenedEE)
|
|
||||||
- Removed -w from CPPFLAGS to show warnings (https://github.com/gaftech)
|
|
||||||
- Changed shebang to use /usr/bin/env (https://github.com/anm)
|
|
||||||
- set USB_VID and USB_PID only for leonardo boards(https://github.com/alohr)
|
|
||||||
- Updated Readme (https://github.com/fr0sty1/)
|
|
||||||
|
|
||||||
### 0.10.1 15.xii.2012 Sudar
|
|
||||||
- Merged all changes from Upstream and the following changes from https://github.com/rpavlik
|
|
||||||
- Allow passing extra flags
|
|
||||||
- Make listing files more useful
|
|
||||||
- Add knowledge of device-specific assembler
|
|
||||||
- Use variables instead of hardcoded commands
|
|
||||||
- Make disasm more helpful
|
|
||||||
- Change .sym output
|
|
||||||
- Provide symbol_sizes and generated_assembly targets.
|
|
||||||
- Be able to silence configuration output
|
|
||||||
- Make everybody depend on the makefile, in case cflags are changed, etc.
|
|
||||||
- Make the makefile error if the arduino port is not present.
|
|
||||||
|
|
||||||
### 0.10 17.ix.12 M J Oldfield
|
|
||||||
- Added installation notes for Fedora (ex Rickard Lindberg).
|
|
||||||
- Changed size target so that it looks at the ELF object,
|
|
||||||
not the hexfile (ex Jared Szechy and Scott Howard).
|
|
||||||
- Fixed ARDUNIO typo in README.md (ex Kalin Kozhuharov).
|
|
||||||
- Tweaked OBJDIR handling (ex Matthias Urlichs and Scott Howard).
|
|
||||||
- Changed the name of the Debian/Ubuntu package (ex
|
|
||||||
Scott Howard).
|
|
||||||
- Only set AVRDUDE_CONF if it's not set (ex Tom Hall).
|
|
||||||
- Added support for USB_PID/VID used by the Leonardo (ex Dan
|
|
||||||
Villiom Podlaski Christiansen and Marc Plano-Lesay).
|
|
||||||
|
|
||||||
### 0.9.3.2 10.ix.2012 Sudar
|
|
||||||
- Fixed a typo in README. Issue reported at upstream (https://github.com/mjoldfield/Arduino-Makefile/issues/21)
|
|
||||||
|
|
||||||
### 0.9.3.1 18.viii.2012 jeffkowalski
|
|
||||||
|
|
||||||
- Autodetect ARDUINO_LIBS from includes in LOCAL_SRCS
|
|
||||||
- Autodetect ARDUINO_SKETCHBOOK from file set by Arduino IDE
|
|
||||||
- Autodetect ARDMK_DIR based on location of this file
|
|
||||||
- Added support for utility directory within SYS and USER libraries
|
|
||||||
|
|
||||||
### 0.9.3 13.vi.2012
|
|
||||||
|
|
||||||
- Auto detect ARDUINO_DIR, Arduino version (https://github.com/rpavlik/)
|
|
||||||
- Categorize libs into user and system (https://github.com/rpavlik/)
|
|
||||||
- Dump size at the end of the build (https://github.com/rpavlik/)
|
|
||||||
- Lots and lots of improvements (https://github.com/rpavlik/)
|
|
||||||
- Changed bytes option for the head shell command, so that it works in Mac as well
|
|
||||||
- Auto detect Serial Baud rate from sketch if possible
|
|
||||||
|
|
||||||
### 0.9.2 06.vi.2012
|
|
||||||
|
|
||||||
- Allow user to choose source files (LOCAL_*_SRCS flags) (https://github.com/Gaftech)
|
|
||||||
- Modified "make size" behavior: using --mcu option and targeting .elf file instead of .hex file.(https://github.com/Gaftech)
|
|
||||||
|
|
||||||
### 0.9.1 06.vi.2012
|
|
||||||
|
|
||||||
- Corrected the ubuntu package names
|
|
||||||
- Prevent the *file-not-found* error if the depends.mk file is not needed
|
|
||||||
- Delete the build-cli folder as well while doing make clean
|
|
||||||
- Added support for compiling .pde files in Arduino 1.0 environment
|
|
||||||
- Replaced = with += in CPPFLAGS assignment so that we can set CPPFLAGS per sketch if needed
|
|
||||||
- Changed AVRDUDE_CONF so it can be defined in per-project makefile (https://github.com/WizenedEE)
|
|
||||||
- Cleaner way to delete the build-cli directory when make clean is invoked
|
|
||||||
- The package name in Debian and Ubuntu is arduino-mk (https://github.com/maqifrnswa)
|
|
||||||
|
|
||||||
### 2012-02-12, version 0.8
|
|
||||||
- Patches for version 1.0 of the Arduino IDE. Older versions might still work, but I’ve not tested it.
|
|
||||||
- A change to the build process: rather than link all the system objects directly into the executable, bundle them in a library first. This should make the final executable smaller.
|
|
||||||
- If TARGET isn’t explicitly set, default to the current directory name. Thanks to Daniele Vergini for this patch.
|
|
||||||
- Add support for .c files in system libraries: Dirk-Willem van Gulik and Evan Goldenberg both reported this and provided patches in the same spirit.
|
|
||||||
- Added a size target as suggested by Alex Satrapa.
|
|
||||||
|
|
||||||
### Unreleased, version 0.7
|
|
||||||
- Added -lm to the linker options, and -F to stty.
|
|
||||||
|
|
||||||
### 2011-06-23, version 0.6
|
|
||||||
- Added ard-parse-boards. Mark Sproul suggested doing something like this ages ago, but I’ve only recently looked at it in detail.
|
|
||||||
- Fabien Le Lez reported that one needs to link with -lc to avoid [linker errors](http://forum.arduino.cc/index.php/topic,40215.0.html).
|
|
||||||
|
|
||||||
### 2011-06-23, version 0.5
|
|
||||||
- Imported changes from Debian/Ubuntu, which incorporate a patch from Stefan Tomanek so that libraries would be compiled too.
|
|
||||||
|
|
||||||
Note: Many other people sent me similar patches, but I didn't get around to using them. In the end, I took the patch from Debian and Ubuntu: there seems merit in not forking the code and using a tested version. So, thanks and apologies to Nick Andrew, Leandro Coletto Biazon, Thibaud Chupin, Craig Hollabaugh, Johannes H. Jensen, Fabien Le Lez, Craig Leres, and Mark Sproul.
|
|
||||||
|
|
||||||
### 2010-05-24, version 0.4
|
|
||||||
Tweaked rules for the reset target on Philip Hands’ advice.
|
|
||||||
|
|
||||||
### 2010-05-21, version 0.3
|
|
||||||
- Tidied up the licensing, making it clear that it’s released under LGPL 2.1.
|
|
||||||
- [Philip Hands](http://hands.com/~phil/) sent me some code to reset the Arduino by dropping DTR for 100ms, and I added it.
|
|
||||||
- Tweaked the Makefile to handle version 0018 of the Arduino software which now includes main.cpp. Accordingly we don’t need to—and indeed must not—add main.cxx to the .pde sketch file. The paths seem to have changed a bit too.
|
|
|
@ -1,415 +0,0 @@
|
||||||
# A Makefile for Arduino Sketches [![Build Status](https://travis-ci.org/sudar/Arduino-Makefile.svg)](https://travis-ci.org/sudar/Arduino-Makefile)
|
|
||||||
|
|
||||||
This is a very simple Makefile which knows how to build Arduino sketches. It defines entire workflows for compiling code, flashing it to Arduino and even communicating through Serial monitor. You don't need to change anything in the Arduino sketches.
|
|
||||||
|
|
||||||
## Features
|
|
||||||
|
|
||||||
- Very robust
|
|
||||||
- Highly customizable
|
|
||||||
- Supports all official AVR-based Arduino boards
|
|
||||||
- Supports chipKIT
|
|
||||||
- Supports Teensy 3.x (via Teensyduino)
|
|
||||||
- Works on all three major OS (Mac, Linux, Windows)
|
|
||||||
- Auto detects serial baud rate and libraries used
|
|
||||||
- Support for `*.ino` and `*.pde` sketches as well as raw `*.c` and `*.cpp`
|
|
||||||
- Support for Arduino Software versions 0.x, 1.0.x, 1.5.x and 1.6.x except 1.6.2.
|
|
||||||
We recommend 1.6.3 or above version of Arduino IDE.
|
|
||||||
- Automatic dependency tracking. Referred libraries are automatically included
|
|
||||||
in the build process. Changes in `*.h` files lead to recompilation of sources which include them
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
### Through package
|
|
||||||
|
|
||||||
#### Using apt-get (or aptitude)
|
|
||||||
|
|
||||||
If you're using FreeBSD, Debian, Raspbian or Ubuntu, you can find this in the `arduino-mk`
|
|
||||||
package which can be installed using `apt-get` or `aptitude`.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
sudo apt-get install arduino-mk
|
|
||||||
```
|
|
||||||
|
|
||||||
#### homebrew (or linuxbrew)
|
|
||||||
|
|
||||||
If you're using homebrew (or [linuxbrew](https://github.com/Homebrew/linuxbrew)) then you can find this in the
|
|
||||||
`arduino-mk` package which can be installed using the following commands.
|
|
||||||
|
|
||||||
Also make sure you have the necessary dependencies installed. Refer to the [Requirements](#requirements) section below to install the dependencies.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
# add tap
|
|
||||||
$ brew tap sudar/arduino-mk
|
|
||||||
|
|
||||||
# to install the last stable release
|
|
||||||
$ brew install arduino-mk
|
|
||||||
|
|
||||||
# to install the development version
|
|
||||||
$ brew install --HEAD arduino-mk
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Arch Linux
|
|
||||||
|
|
||||||
Arch Linux users can use the unofficial AUR package [arduino-mk](https://aur.archlinux.org/packages/arduino-mk/).
|
|
||||||
It can be installed using the following command.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
yaourt -S arduino-mk
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Fedora
|
|
||||||
|
|
||||||
Fedora Linux users can use our packaging instructions [here](https://github.com/sudar/Arduino-Makefile/tree/master/packaging/fedora)
|
|
||||||
to build an RPM.
|
|
||||||
|
|
||||||
### From source
|
|
||||||
|
|
||||||
- Download the latest release
|
|
||||||
- Or clone it from Github using the command `git clone git@github.com:sudar/Arduino-Makefile.git`
|
|
||||||
- Check the [usage section](https://github.com/sudar/Arduino-Makefile#usage) in this readme about setting usage options
|
|
||||||
|
|
||||||
## Requirements
|
|
||||||
|
|
||||||
### Arduino IDE
|
|
||||||
|
|
||||||
You need to have the Arduino IDE. You can either install it through the
|
|
||||||
installer or download the distribution zip file and extract it.
|
|
||||||
|
|
||||||
### pySerial
|
|
||||||
|
|
||||||
The Makefile also delegates resetting the board to a short Python program.
|
|
||||||
You'll need to install [`pySerial`](https://pypi.python.org/pypi/pyserial) to use it though.
|
|
||||||
|
|
||||||
On most systems you should be able to install it using either `pip` or `easy_install`.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
pip install pyserial
|
|
||||||
|
|
||||||
# or if you prefer easy_install
|
|
||||||
|
|
||||||
easy_install -U pyserial
|
|
||||||
```
|
|
||||||
|
|
||||||
If you prefer to install it as a package, then you can do that as well.
|
|
||||||
|
|
||||||
On Debian or Ubuntu:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
apt-get install python-serial
|
|
||||||
```
|
|
||||||
|
|
||||||
On Fedora:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
yum install pyserial
|
|
||||||
|
|
||||||
# or on Fedora 22+
|
|
||||||
|
|
||||||
dnf install pyserial
|
|
||||||
```
|
|
||||||
|
|
||||||
On openSUSE:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
zypper install python-serial
|
|
||||||
```
|
|
||||||
|
|
||||||
On Mac using MacPorts:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
sudo port install py27-serial
|
|
||||||
```
|
|
||||||
|
|
||||||
On Windows:
|
|
||||||
|
|
||||||
You need to install Cygwin and its packages for Make, Perl and the following Serial library.
|
|
||||||
|
|
||||||
Assuming you included Python in your Cygwin installation:
|
|
||||||
|
|
||||||
1. download PySerial source package from [https://pypi.python.org/pypi/pyserial](https://pypi.python.org/pypi/pyserial)
|
|
||||||
2. extract downloaded package running
|
|
||||||
```tar xvzf dowloaded_package_name.tar.gz```
|
|
||||||
3. navigate to extracted package folder
|
|
||||||
4. build and install Python module:
|
|
||||||
|
|
||||||
```
|
|
||||||
python setup.py build
|
|
||||||
python setup.py install
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Download a copy of this repo somewhere to your system or install it through a package by following the above installation instruction.
|
|
||||||
|
|
||||||
Sample makefiles are provided in the `examples/` directory. E.g. [Makefile-example](examples/MakefileExample/Makefile-example.mk) demonstrates some of the more advanced options,
|
|
||||||
whilst [Blink](examples/Blink/Makefile) demonstrates the minimal settings required for various boards like the Uno, Nano, Mega, Teensy, ATtiny etc.
|
|
||||||
|
|
||||||
MAC:
|
|
||||||
|
|
||||||
On the Mac with IDE 1.0 you might want to set:
|
|
||||||
|
|
||||||
```make
|
|
||||||
ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java
|
|
||||||
ARDMK_DIR = /usr/local
|
|
||||||
AVR_TOOLS_DIR = /usr
|
|
||||||
MONITOR_PORT = /dev/ttyACM0
|
|
||||||
BOARD_TAG = mega2560
|
|
||||||
```
|
|
||||||
|
|
||||||
On the Mac with IDE 1.5+ it's like above but with
|
|
||||||
|
|
||||||
```
|
|
||||||
ARDUINO_DIR = /Applications/Arduino.app/Contents/Java
|
|
||||||
```
|
|
||||||
LINUX:
|
|
||||||
|
|
||||||
You can either declare following variables in your project's makefile or set them as environmental variables.
|
|
||||||
|
|
||||||
ARDUINO_DIR – Directory where Arduino is installed
|
|
||||||
ARDMK_DIR – Directory where you have copied the makefile
|
|
||||||
AVR_TOOLS_DIR – Directory where avr tools are installed
|
|
||||||
|
|
||||||
Keep in mind, that Arduino 1.5.x+ comes with it's own copy of avr tools which you can leverage in your build process here.
|
|
||||||
|
|
||||||
Example of ~/.bashrc file:
|
|
||||||
|
|
||||||
export ARDUINO_DIR=/home/sudar/apps/arduino-1.0.5
|
|
||||||
export ARDMK_DIR=/home/sudar/Dropbox/code/Arduino-Makefile
|
|
||||||
export AVR_TOOLS_DIR=/usr/include
|
|
||||||
|
|
||||||
Example of the project's make file:
|
|
||||||
|
|
||||||
```make
|
|
||||||
BOARD_TAG = mega2560
|
|
||||||
MONITOR_PORT = /dev/ttyACM0
|
|
||||||
```
|
|
||||||
|
|
||||||
WINDOWS:
|
|
||||||
|
|
||||||
On Windows (using cygwin), you might want to set:
|
|
||||||
|
|
||||||
```make
|
|
||||||
ARDUINO_DIR = ../../arduino
|
|
||||||
ARDMK_DIR = path/to/mkfile
|
|
||||||
MONITOR_PORT = com3
|
|
||||||
BOARD_TAG = mega2560
|
|
||||||
```
|
|
||||||
|
|
||||||
On Windows (using MSYS and PuTTY), you might want to set the following extra parameters:
|
|
||||||
|
|
||||||
```make
|
|
||||||
MONITOR_CMD = putty
|
|
||||||
MONITOR_PARMS = 8,1,n,N
|
|
||||||
```
|
|
||||||
|
|
||||||
On Arduino 1.5+ installs, you should set the architecture to either `avr` or `sam` and if using a submenu CPU type, then also set that:
|
|
||||||
|
|
||||||
```make
|
|
||||||
ARCHITECTURE = avr
|
|
||||||
BOARD_TAG = atmegang
|
|
||||||
BOARD_SUB = atmega168
|
|
||||||
```
|
|
||||||
|
|
||||||
It is recommended in Windows that you create a symbolic link to avoid problems with file naming conventions on Windows. For example, if your your Arduino directory is in:
|
|
||||||
|
|
||||||
c:\Program Files (x86)\Arduino
|
|
||||||
|
|
||||||
You will get problems with the special characters on the directory name. More details about this can be found in [issue #94](https://github.com/sudar/Arduino-Makefile/issues/94)
|
|
||||||
|
|
||||||
To create a symbolic link, you can use the command “mklink” on Windows, e.g.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
mklink /d c:\Arduino c:\Program Files (x86)\Arduino
|
|
||||||
```
|
|
||||||
|
|
||||||
After which, the variables should be:
|
|
||||||
|
|
||||||
```make
|
|
||||||
ARDUINO_DIR=../../../../../Arduino
|
|
||||||
```
|
|
||||||
|
|
||||||
Instead of:
|
|
||||||
|
|
||||||
```make
|
|
||||||
ARDUINO_DIR=../../../../../Program\ Files\ \(x86\)/Arduino
|
|
||||||
```
|
|
||||||
|
|
||||||
Usefull Variables:
|
|
||||||
|
|
||||||
The list of all variables that can be overridden is available at [arduino-mk-vars.md](arduino-mk-vars.md) file.
|
|
||||||
|
|
||||||
- `BOARD_TAG` - Type of board, for a list see boards.txt or `make show_boards`
|
|
||||||
- `MONITOR_PORT` - The port where your Arduino is plugged in, usually `/dev/ttyACM0` or `/dev/ttyUSB0` in Linux or Mac OS X and `com3`, `com4`, etc. in Windows.
|
|
||||||
- `ARDUINO_DIR` - Path to Arduino installation. In Cygwin in Windows this path must be
|
|
||||||
relative, not absolute (e.g. "../../arduino" and not "/c/cygwin/Arduino").
|
|
||||||
- `ARDMK_DIR` - Path where the `*.mk` are present. If you installed the package, then it is usually `/usr/share/arduino`
|
|
||||||
- `AVR_TOOLS_DIR` - Path where the avr tools chain binaries are present. If you are going to use the binaries that came with Arduino installation, then you don't have to set it. Otherwise set it realtive and not absolute.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Including Libraries
|
|
||||||
|
|
||||||
You can specify space separated list of libraries that are needed for your sketch in the variable `ARDUINO_LIBS`.
|
|
||||||
|
|
||||||
```make
|
|
||||||
ARDUINO_LIBS = Wire SoftwareSerial
|
|
||||||
```
|
|
||||||
|
|
||||||
The libraries will be searched for in the following places in the following order.
|
|
||||||
|
|
||||||
- `/libraries` directory inside your sketchbook directory. Sketchbook directory will be auto detected from your Arduino preference file. You can also manually set it through `ARDUINO_SKETCHBOOK`.
|
|
||||||
- `/libraries` directory inside your Arduino directory, which is read from `ARDUINO_DIR`.
|
|
||||||
|
|
||||||
The libraries inside user directories will take precedence over libraries present in Arduino core directory.
|
|
||||||
|
|
||||||
The makefile can autodetect the libraries that are included from your sketch and can include them automatically. But it can't detect libraries that are included from other libraries. (see [issue #93](https://github.com/sudar/Arduino-Makefile/issues/93))
|
|
||||||
|
|
||||||
## avrdude
|
|
||||||
|
|
||||||
To upload compiled files, `avrdude` is used. This Makefile tries to find `avrdude` and it's config (`avrdude.conf`) below `ARDUINO_DIR`. If you like to use the one installed on your system instead of the one which came with Arduino, you can try to set the variables `AVRDUDE` and `AVRDUDE_CONF`. On a typical Linux system these could be set to
|
|
||||||
|
|
||||||
```make
|
|
||||||
AVRDUDE = /usr/bin/avrdude
|
|
||||||
AVRDUDE_CONF = /etc/avrdude.conf
|
|
||||||
```
|
|
||||||
|
|
||||||
## Teensy 3.x
|
|
||||||
|
|
||||||
For Teensy 3.x support you must first install [Teensyduino](http://www.pjrc.com/teensy/teensyduino.html).
|
|
||||||
|
|
||||||
See examples/BlinkTeensy for example usage.
|
|
||||||
|
|
||||||
## Versioning
|
|
||||||
|
|
||||||
The current version of the makefile is `1.5.2`. You can find the full history in the [HISTORY.md](HISTORY.md) file
|
|
||||||
|
|
||||||
This project adheres to Semantic [Versioning 2.0](http://semver.org/).
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
This makefile and the related documentation and examples are free software; you can redistribute it and/or modify it
|
|
||||||
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 (at your option) any later version.
|
|
||||||
|
|
||||||
## Contribution
|
|
||||||
|
|
||||||
All contributions (even documentation) are welcome :) Open a pull request and I would be happy to merge them.
|
|
||||||
Also checkout the [contribution guide](CONTRIBUTING.md) for more details.
|
|
||||||
|
|
||||||
If you are looking for ideas to work on, then check out the following TODO items or the [issue tracker](https://github.com/sudar/Arduino-Makefile/issues/).
|
|
||||||
|
|
||||||
## Limitations / Know Issues / TODO's
|
|
||||||
|
|
||||||
- Doesn't support SAM boards yet.
|
|
||||||
- Since it doesn't do any pre processing like Arduino IDE, you have to declare all methods before you use them ([issue #59](https://github.com/sudar/Arduino-Makefile/issues/59))
|
|
||||||
- More than one .ino or .pde file is not supported yet ([issue #49](https://github.com/sudar/Arduino-Makefile/issues/49))
|
|
||||||
- When you compile for the first time, it builds all libs inside Arduino directory even if it is not needed. But while linking only the relevant files are linked. ([issue #29](https://github.com/sudar/Arduino-Makefile/issues/29)). Even Arduino IDE does the same thing though.
|
|
||||||
- This makefile doesn't support boards or IDE from Arduino.org.
|
|
||||||
|
|
||||||
If you find an issue or have an idea for a feature then log them in the [issue tracker](https://github.com/sudar/Arduino-Makefile/issues/)
|
|
||||||
|
|
||||||
## Interfacing with other projects/frameworks/IDE's
|
|
||||||
|
|
||||||
### Colorgcc
|
|
||||||
|
|
||||||
It is possible to use [`colorgcc`](https://github.com/colorgcc/colorgcc) with this makefile. Check out [this comment](http://hardwarefun.com/tutorials/compiling-arduino-sketches-using-makefile#comment-1408) to find usage instructions.
|
|
||||||
|
|
||||||
### Emacs/Flymake support
|
|
||||||
|
|
||||||
On-the-fly syntax checking in Emacs using the [Flymake](http://www.emacswiki.org/emacs/FlyMake) minor mode is now possible.
|
|
||||||
|
|
||||||
First, the flymake mode must be configured to recognize ino files :
|
|
||||||
|
|
||||||
Edit the flymake configuration :
|
|
||||||
|
|
||||||
```
|
|
||||||
M-x customize-option RET
|
|
||||||
flymake-allowed-file-name-masks RET
|
|
||||||
```
|
|
||||||
|
|
||||||
Add the line :
|
|
||||||
|
|
||||||
```
|
|
||||||
("\\.ino\\'" flymake-simple-make-init)
|
|
||||||
```
|
|
||||||
|
|
||||||
Then click on "Apply and Save" button
|
|
||||||
|
|
||||||
Then, the following line must be added to the project Makefile :
|
|
||||||
|
|
||||||
```make
|
|
||||||
check-syntax:
|
|
||||||
$(CXX) -c -include Arduino.h -x c++ $(CXXFLAGS) $(CPPFLAGS) -fsyntax-only $(CHK_SOURCES)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Code:Blocks integration
|
|
||||||
|
|
||||||
In Code:Blocks open Project -> Properties -> Project settings tab -> check "This is custom Makefile".
|
|
||||||
|
|
||||||
Now go to Settings -> Environment -> Environment variables -> Add
|
|
||||||
|
|
||||||
Add three keys with paths as values, using full paths (!):
|
|
||||||
|
|
||||||
```make
|
|
||||||
ARDUINO_DIR=/full/path/to/arduino-1.0.6
|
|
||||||
ARDMK_DIR=/full/path/to/sketchbook
|
|
||||||
AVR_TOOLS_DIR=/usr
|
|
||||||
```
|
|
||||||
|
|
||||||
Now to set DEBUG target (this will compile the project) go to Build options -> Debug -> "Make" commands
|
|
||||||
|
|
||||||
In Build Project/Target remove $target:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$make -f $makefile
|
|
||||||
```
|
|
||||||
|
|
||||||
In Clean Project/Target remove $target:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$make -f $makefile clean
|
|
||||||
```
|
|
||||||
|
|
||||||
To set the RELEASE target (which will compile and upload) go to Build options -> Release -> "Make" commands
|
|
||||||
|
|
||||||
In Build Project/Target put:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$make -f $makefile upload
|
|
||||||
```
|
|
||||||
|
|
||||||
In Clean Project/Target remove $target:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$make -f $makefile clean
|
|
||||||
```
|
|
||||||
|
|
||||||
## Test Suite
|
|
||||||
|
|
||||||
This project includes a suite of example Makefiles and small Arduino and chipKIT
|
|
||||||
programs to assist the maintainers of the Makefile. Run
|
|
||||||
`tests/script/bootstrap.sh` to attempt to automatically install the dependencies
|
|
||||||
(Arduino IDE, MPIDE, etc.). Run `tests/script/runtests.sh` to attempt to compile
|
|
||||||
all of the examples. The bootstrap script is primarily intended for use by a
|
|
||||||
continuous integration server, specifically Travis CI. It is not intended for
|
|
||||||
normal users.
|
|
||||||
|
|
||||||
### Bare-Arduino–Project
|
|
||||||
|
|
||||||
If you are planning on using this makefile in a larger/professional project, you might want to take a look at the [Bare-Arduino–Project](https://github.com/WeAreLeka/Bare-Arduino-Project) framework.
|
|
||||||
|
|
||||||
Similar to HTML frameworks, [Bare-Arduino–Project](https://github.com/WeAreLeka/Bare-Arduino-Project) aims at providing a basic `tree` organization, `Makefile` configurations for both OS X and Linux and a handful of instruction on how to get started with a robust Arduino project architecture.
|
|
||||||
|
|
||||||
Further information are available in the [README.md](https://github.com/WeAreLeka/Bare-Arduino-Project/blob/master/README.md) as well as in the [use/installation procedure](https://github.com/WeAreLeka/Bare-Arduino-Project/blob/master/INSTALL.md).
|
|
||||||
|
|
||||||
Please be sure to report issues to [Bare-Arduino–Project](https://github.com/WeAreLeka/Bare-Arduino-Project/issues) if you use it instead of this project.
|
|
||||||
|
|
||||||
## Credits
|
|
||||||
|
|
||||||
This makefile was originally created by [Martin Oldfield](http://mjo.tc/atelier/2009/02/arduino-cli.html) and he maintained it till v0.10.2.
|
|
||||||
From May 2013, it is maintained by [Sudar Muthu](http://hardwarefun.com/tutorials/compiling-arduino-sketches-using-makefile) and [Simon John](https://github.com/sej7278) with the help of [40+ contributors](https://github.com/sudar/Arduino-Makefile/graphs/contributors).
|
|
||||||
|
|
||||||
## Similar works
|
|
||||||
- It's not a derivative of this, but Alan Burlison has written a [similar thing](http://bleaklow.com/2010/06/04/a_makefile_for_arduino_sketches.html).
|
|
||||||
- Alan's Makefile was used in a [Pragmatic Programmer's article](http://pragprog.com/magazines/2011-04/advanced-arduino-hacking).
|
|
||||||
- Rei Vilo wrote to tell me that he's using the Makefile ina Xcode 4 template called [embedXcode](http://embedxcode.weebly.com/). Apparently it supports many platforms and boards, including AVR-based Arduino, AVR-based Wiring, PIC32-based chipKIT, MSP430-based LaunchPad and ARM3-based Maple.
|
|
|
@ -1,213 +0,0 @@
|
||||||
########################################################################
|
|
||||||
#
|
|
||||||
# Support for Teensy 3.x boards
|
|
||||||
#
|
|
||||||
# https://www.pjrc.com/teensy/
|
|
||||||
#
|
|
||||||
# You must install teensyduino for this Makefile to work:
|
|
||||||
#
|
|
||||||
# http://www.pjrc.com/teensy/teensyduino.html
|
|
||||||
#
|
|
||||||
# Copyright (C) 2014 Jeremy Shaw <jeremy@n-heptane.com> based on
|
|
||||||
# work that is copyright Sudar, Nicholas Zambetti, David A. Mellis
|
|
||||||
# & Hernando Barragan.
|
|
||||||
#
|
|
||||||
# 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 by the Free Software Foundation; either version 2.1 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# Adapted from Arduino 0011 Makefile by M J Oldfield
|
|
||||||
#
|
|
||||||
# Original Arduino adaptation by mellis, eighthave, oli.keller
|
|
||||||
#
|
|
||||||
# Refer to HISTORY.md file for complete history of changes
|
|
||||||
#
|
|
||||||
########################################################################
|
|
||||||
|
|
||||||
|
|
||||||
ifndef ARDMK_DIR
|
|
||||||
ARDMK_DIR := $(realpath $(dir $(realpath $(lastword $(MAKEFILE_LIST)))))
|
|
||||||
endif
|
|
||||||
|
|
||||||
# include Common.mk now we know where it is
|
|
||||||
include $(ARDMK_DIR)/Common.mk
|
|
||||||
|
|
||||||
ARDMK_VENDOR = teensy
|
|
||||||
ARDUINO_CORE_PATH = $(ARDUINO_DIR)/hardware/teensy/avr/cores/teensy3
|
|
||||||
BOARDS_TXT = $(ARDUINO_DIR)/hardware/$(ARDMK_VENDOR)/avr/boards.txt
|
|
||||||
|
|
||||||
|
|
||||||
ifndef PARSE_TEENSY
|
|
||||||
# result = $(call READ_BOARD_TXT, 'boardname', 'parameter')
|
|
||||||
PARSE_TEENSY = $(shell grep -v "^\#" "$(BOARDS_TXT)" | grep $(1).$(2) | cut -d = -f 2- )
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
ifndef F_CPU
|
|
||||||
ifndef BOARD_SUB
|
|
||||||
SPEEDS := $(call PARSE_TEENSY,"$(BOARD_TAG),menu.speed.*.build.fcpu") # Obtain sequence of supported frequencies.
|
|
||||||
SPEEDS := $(shell printf "%d\n" $(SPEEDS) | sort -g) # Sort it, just in case. Printf to re-append newlines so that sort works.
|
|
||||||
F_CPU := $(lastword $(SPEEDS)) # List is sorted in ascending order. Take the fastest speed.
|
|
||||||
#$(info "speeds is " $(SPEEDS)) # Good for debugging
|
|
||||||
else
|
|
||||||
F_CPU := $(call PARSE_TEENSY,$(BOARD_TAG),menu.speed.$(BOARD_SUB).build.fcpu)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# if boards.txt gets modified, look there, else hard code it
|
|
||||||
ARCHITECTURE = $(call PARSE_TEENSY,$(BOARD_TAG),build.architecture)
|
|
||||||
ifeq ($(strip $(ARCHITECTURE)),)
|
|
||||||
ARCHITECTURE = arm
|
|
||||||
endif
|
|
||||||
|
|
||||||
AVR_TOOLS_DIR = $(call dir_if_exists,$(ARDUINO_DIR)/hardware/tools/$(ARCHITECTURE))
|
|
||||||
|
|
||||||
# define plaform lib dir ignoring teensy's oversight on putting it all in avr
|
|
||||||
ifndef ARDUINO_PLATFORM_LIB_PATH
|
|
||||||
ARDUINO_PLATFORM_LIB_PATH = $(ARDUINO_DIR)/hardware/$(ARDMK_VENDOR)/avr/libraries
|
|
||||||
$(call show_config_variable,ARDUINO_PLATFORM_LIB_PATH,[COMPUTED],(from ARDUINO_DIR))
|
|
||||||
endif
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
# command names
|
|
||||||
|
|
||||||
ifndef CC_NAME
|
|
||||||
CC_NAME := $(call PARSE_TEENSY,$(BOARD_TAG),build.command.gcc)
|
|
||||||
ifndef CC_NAME
|
|
||||||
CC_NAME := arm-none-eabi-gcc
|
|
||||||
else
|
|
||||||
$(call show_config_variable,CC_NAME,[COMPUTED])
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef CXX_NAME
|
|
||||||
CXX_NAME := $(call PARSE_TEENSY,$(BOARD_TAG),build.command.g++)
|
|
||||||
ifndef CXX_NAME
|
|
||||||
CXX_NAME := arm-none-eabi-g++
|
|
||||||
else
|
|
||||||
$(call show_config_variable,CXX_NAME,[COMPUTED])
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef AS_NAME
|
|
||||||
AS_NAME := $(call PARSE_TEENSY,$(BOARD_TAG),build.command.as)
|
|
||||||
ifndef AS_NAME
|
|
||||||
AS_NAME := arm-none-eabi-gcc-as
|
|
||||||
else
|
|
||||||
$(call show_config_variable,AS_NAME,[COMPUTED])
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef OBJCOPY_NAME
|
|
||||||
OBJCOPY_NAME := $(call PARSE_TEENSY,$(BOARD_TAG),build.command.objcopy)
|
|
||||||
ifndef OBJCOPY_NAME
|
|
||||||
OBJCOPY_NAME := arm-none-eabi-objcopy
|
|
||||||
else
|
|
||||||
$(call show_config_variable,OBJCOPY_NAME,[COMPUTED])
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef OBJDUMP_NAME
|
|
||||||
OBJDUMP_NAME := $(call PARSE_TEENSY,$(BOARD_TAG),build.command.objdump)
|
|
||||||
ifndef OBJDUMP_NAME
|
|
||||||
OBJDUMP_NAME := arm-none-eabi-objdump
|
|
||||||
else
|
|
||||||
$(call show_config_variable,OBJDUMP_NAME,[COMPUTED])
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef AR_NAME
|
|
||||||
AR_NAME := $(call PARSE_TEENSY,$(BOARD_TAG),build.command.ar)
|
|
||||||
ifndef AR_NAME
|
|
||||||
AR_NAME := arm-none-eabi-ar
|
|
||||||
else
|
|
||||||
$(call show_config_variable,AR_NAME,[COMPUTED])
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef SIZE_NAME
|
|
||||||
SIZE_NAME := $(call PARSE_TEENSY,$(BOARD_TAG),build.command.size)
|
|
||||||
ifndef SIZE_NAME
|
|
||||||
SIZE_NAME := arm-none-eabi-size
|
|
||||||
else
|
|
||||||
$(call show_config_variable,SIZE_NAME,[COMPUTED])
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef NM_NAME
|
|
||||||
NM_NAME := $(call PARSE_TEENSY,$(BOARD_TAG),build.command.nm)
|
|
||||||
ifndef NM_NAME
|
|
||||||
NM_NAME := arm-none-eabi-gcc-nm
|
|
||||||
else
|
|
||||||
$(call show_config_variable,NM_NAME,[COMPUTED])
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# processor stuff
|
|
||||||
ifndef MCU
|
|
||||||
MCU := $(call PARSE_TEENSY,$(BOARD_TAG),build.cpu)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef MCU_FLAG_NAME
|
|
||||||
MCU_FLAG_NAME=mcpu
|
|
||||||
endif
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
# FLAGS
|
|
||||||
ifndef USB_TYPE
|
|
||||||
USB_TYPE = USB_SERIAL
|
|
||||||
endif
|
|
||||||
|
|
||||||
CPPFLAGS += -DLAYOUT_US_ENGLISH -D$(USB_TYPE)
|
|
||||||
|
|
||||||
CPPFLAGS += $(call PARSE_TEENSY,$(BOARD_TAG),build.option)
|
|
||||||
|
|
||||||
CXXFLAGS += $(call PARSE_TEENSY,$(BOARD_TAG),build.cppoption)
|
|
||||||
ifeq ("$(call PARSE_TEENSY,$(BOARD_TAG),build.gnu0x)","true")
|
|
||||||
CXXFLAGS_STD += -std=gnu++0x
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ("$(call PARSE_TEENSY,$(BOARD_TAG),build.elide_constructors)", "true")
|
|
||||||
CXXFLAGS += -felide-constructors
|
|
||||||
endif
|
|
||||||
|
|
||||||
CXXFLAGS += $(call PARSE_TEENSY,$(BOARD_TAG),build.flags.common)
|
|
||||||
CXXFLAGS += $(call PARSE_TEENSY,$(BOARD_TAG),build.flags.cpu)
|
|
||||||
CXXFLAGS += $(call PARSE_TEENSY,$(BOARD_TAG),build.flags.defs)
|
|
||||||
CXXFLAGS += $(call PARSE_TEENSY,$(BOARD_TAG),build.flags.cpp)
|
|
||||||
|
|
||||||
CFLAGS += $(call PARSE_TEENSY,$(BOARD_TAG),build.flags.common)
|
|
||||||
CFLAGS += $(call PARSE_TEENSY,$(BOARD_TAG),build.flags.cpu)
|
|
||||||
CFLAGS += $(call PARSE_TEENSY,$(BOARD_TAG),build.flags.defs)
|
|
||||||
|
|
||||||
ASFLAGS += $(call PARSE_TEENSY,$(BOARD_TAG),build.flags.common)
|
|
||||||
ASFLAGS += $(call PARSE_TEENSY,$(BOARD_TAG),build.flags.cpu)
|
|
||||||
ASFLAGS += $(call PARSE_TEENSY,$(BOARD_TAG),build.flags.defs)
|
|
||||||
ASFLAGS += $(call PARSE_TEENSY,$(BOARD_TAG),build.flags.S)
|
|
||||||
|
|
||||||
LDFLAGS += $(call PARSE_TEENSY,$(BOARD_TAG),build.flags.cpu)
|
|
||||||
|
|
||||||
AMCU := $(call PARSE_TEENSY,$(BOARD_TAG),build.mcu)
|
|
||||||
LDFLAGS += -Wl,--gc-sections,--relax
|
|
||||||
LINKER_SCRIPTS = -T${ARDUINO_CORE_PATH}/${AMCU}.ld
|
|
||||||
OTHER_LIBS = $(call PARSE_TEENSY,$(BOARD_TAG),build.flags.libs)
|
|
||||||
|
|
||||||
CPUFLAGS = $(call PARSE_TEENSY,$(BOARD_TAG),build.flags.cpu)
|
|
||||||
# usually defined as per teensy31.build.mcu=mk20dx256 but that isn't valid switch
|
|
||||||
MCU := $(shell echo ${CPUFLAGS} | sed -n -e 's/.*-mcpu=\([a-zA-Z0-9_-]*\).*/\1/p')
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
# some fairly odd settings so that 'make upload' works
|
|
||||||
#
|
|
||||||
# may require additional patches for Windows support
|
|
||||||
|
|
||||||
do_upload: override get_monitor_port=""
|
|
||||||
AVRDUDE=@true
|
|
||||||
RESET_CMD = nohup $(ARDUINO_DIR)/hardware/tools/teensy_post_compile -board=$(BOARD_TAG) -tools=$(abspath $(ARDUINO_DIR)/hardware/tools) -path=$(abspath $(OBJDIR)) -file=$(TARGET) > /dev/null ; $(ARDUINO_DIR)/hardware/tools/teensy_reboot
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
# automatially include Arduino.mk for the user
|
|
||||||
|
|
||||||
include $(ARDMK_DIR)/Arduino.mk
|
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
.TH ARD-RESET-ARDUINO "1" "January 2017" "ard-reset-arduino 1.5.2" "Arduino CLI Reset"
|
|
||||||
|
|
||||||
.SH NAME
|
|
||||||
ard-reset-arduino - Reset Arduino board
|
|
||||||
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.B ard-reset-arduino
|
|
||||||
[OPTION]... [PORT]
|
|
||||||
|
|
||||||
.SH DESCRIPTION
|
|
||||||
To reset Arduinos, we either pulse the DTR line or open the USB port
|
|
||||||
at 1200 baud and close it again.
|
|
||||||
|
|
||||||
.SH OPTIONS
|
|
||||||
.B \-\-verbose
|
|
||||||
Watch what's going on on STDERR.
|
|
||||||
|
|
||||||
.B \-\-period
|
|
||||||
Specify the DTR pulse width in seconds.
|
|
||||||
|
|
||||||
.B \-\-caterina
|
|
||||||
Reset a Leonardo, Micro, Robot, LilyPadUSB or similar 32u4-based device.
|
|
||||||
|
|
||||||
.SH EXAMPLES
|
|
||||||
ard-reset-arduino /dev/ttyACM0
|
|
||||||
.PP
|
|
||||||
ard-reset-arduino \-\-verbose \-\-period=0.1 /dev/cu.usb*
|
|
||||||
.PP
|
|
||||||
ard-reset-arduino \-\-verbose \-\-caterina /dev/ttyUSB0
|
|
||||||
|
|
||||||
.SH BUGS
|
|
||||||
There are no known bugs in this application. Please report problems
|
|
||||||
to the author. Patches are welcome.
|
|
||||||
|
|
||||||
.SH AUTHOR
|
|
||||||
Simon John, git@the-jedi.co.uk
|
|
||||||
|
|
||||||
.SH LICENSE
|
|
||||||
Copyright (c) 2014, Simon John. All rights reserved.
|
|
||||||
.PP
|
|
||||||
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
|
|
||||||
by the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
.PP
|
|
||||||
This program is distributed in the hope that it will be useful, but
|
|
||||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,49 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
import serial
|
|
||||||
import os.path
|
|
||||||
import argparse
|
|
||||||
from time import sleep
|
|
||||||
|
|
||||||
pyserial_version = None
|
|
||||||
try:
|
|
||||||
pyserial_version = int(serial.VERSION[0])
|
|
||||||
except:
|
|
||||||
pyserial_version = 2 # less than 2.3
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description='Reset an Arduino')
|
|
||||||
parser.add_argument('--caterina', action='store_true', help='Reset a Leonardo, Micro, Robot or LilyPadUSB.')
|
|
||||||
parser.add_argument('--verbose', action='store_true', help="Watch what's going on on STDERR.")
|
|
||||||
parser.add_argument('--period', default=0.1, help='Specify the DTR pulse width in seconds.')
|
|
||||||
parser.add_argument('port', nargs=1, help='Serial device e.g. /dev/ttyACM0')
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
if args.caterina:
|
|
||||||
if args.verbose: print('Forcing reset using 1200bps open/close on port %s' % args.port[0])
|
|
||||||
ser = serial.Serial(args.port[0], 57600)
|
|
||||||
ser.close()
|
|
||||||
|
|
||||||
if pyserial_version < 3:
|
|
||||||
ser.setBaudrate (1200)
|
|
||||||
else:
|
|
||||||
ser.baudrate = 1200
|
|
||||||
|
|
||||||
ser.open()
|
|
||||||
ser.setRTS(True) # RTS line needs to be held high and DTR low
|
|
||||||
ser.setDTR(False) # (see Arduino IDE source code)
|
|
||||||
ser.close()
|
|
||||||
sleep(1)
|
|
||||||
|
|
||||||
while not os.path.exists(args.port[0]):
|
|
||||||
if args.verbose: print('Waiting for %s to come back' % args.port[0])
|
|
||||||
sleep(1)
|
|
||||||
|
|
||||||
if args.verbose: print('%s has come back after reset' % args.port[0])
|
|
||||||
else:
|
|
||||||
if args.verbose: print('Setting DTR high on %s for %ss' % (args.port[0],args.period))
|
|
||||||
ser = serial.Serial(args.port[0], 115200)
|
|
||||||
ser.setDTR(False)
|
|
||||||
sleep(args.period)
|
|
||||||
ser.setDTR(True)
|
|
||||||
ser.close()
|
|
|
@ -1,121 +0,0 @@
|
||||||
#
|
|
||||||
# chipKIT extensions for Arduino Makefile
|
|
||||||
# System part (i.e. project independent)
|
|
||||||
#
|
|
||||||
# Copyright (C) 2011, 2012, 2013 Christopher Peplin
|
|
||||||
# <chris.peplin@rhubarbtech.com>, based on work that is Copyright Martin
|
|
||||||
# Oldfield
|
|
||||||
#
|
|
||||||
# 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 by the Free Software Foundation; either version 2.1 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# Modified by John Wallbank for Visual Studio
|
|
||||||
#
|
|
||||||
# Development changes, John Wallbank,
|
|
||||||
#
|
|
||||||
# - made inclusion of WProgram.h optional so that
|
|
||||||
# including it in the source doesn't mess up compile error line numbers
|
|
||||||
# - parameterised the routine used to reset the serial port
|
|
||||||
#
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
# Makefile distribution path
|
|
||||||
#
|
|
||||||
|
|
||||||
# The show_config_variable is unavailable before we include the common makefile,
|
|
||||||
# so we defer logging the ARDMK_DIR info until it happens in Arduino.mk
|
|
||||||
ifndef ARDMK_DIR
|
|
||||||
# presume it's the same path to our own file
|
|
||||||
ARDMK_DIR := $(realpath $(dir $(realpath $(lastword $(MAKEFILE_LIST)))))
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(ARDMK_DIR)/Common.mk
|
|
||||||
|
|
||||||
ifndef MPIDE_DIR
|
|
||||||
AUTO_MPIDE_DIR := $(firstword \
|
|
||||||
$(call dir_if_exists,/usr/share/mpide) \
|
|
||||||
$(call dir_if_exists,/Applications/Mpide.app/Contents/Resources/Java) )
|
|
||||||
ifdef AUTO_MPIDE_DIR
|
|
||||||
MPIDE_DIR = $(AUTO_MPIDE_DIR)
|
|
||||||
$(call show_config_variable,MPIDE_DIR,[autodetected])
|
|
||||||
else
|
|
||||||
echo $(error "mpide_dir is not defined")
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
$(call show_config_variable,MPIDE_DIR,[USER])
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CURRENT_OS),WINDOWS)
|
|
||||||
ifneq ($(shell echo $(ARDUINO_DIR) | egrep '^(/|[a-zA-Z]:\\)'),)
|
|
||||||
echo $(error On Windows, MPIDE_DIR must be a relative path)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef MPIDE_PREFERENCES_PATH
|
|
||||||
AUTO_MPIDE_PREFERENCES_PATH := $(firstword \
|
|
||||||
$(call dir_if_exists,$(HOME)/.mpide/preferences.txt) \
|
|
||||||
$(call dir_if_exists,$(HOME)/Library/Mpide/preferences.txt) )
|
|
||||||
ifdef AUTO_MPIDE_PREFERENCES_PATH
|
|
||||||
MPIDE_PREFERENCES_PATH = $(AUTO_MPIDE_PREFERENCES_PATH)
|
|
||||||
$(call show_config_variable,MPIDE_PREFERENCES_PATH,[autodetected])
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# The same as in Arduino, the Linux distribution contains avrdude and #
|
|
||||||
# avrdude.conf in a different location, but for chipKIT it's even slightly
|
|
||||||
# different than the Linux paths for Arduino, so we have to "double override".
|
|
||||||
ifeq ($(CURRENT_OS),LINUX)
|
|
||||||
AVRDUDE_DIR = $(ARDUINO_DIR)/hardware/tools
|
|
||||||
AVRDUDE = $(AVRDUDE_DIR)/avrdude
|
|
||||||
AVRDUDE_CONF = $(AVRDUDE_DIR)/avrdude.conf
|
|
||||||
endif
|
|
||||||
|
|
||||||
PIC32_TOOLS_DIR = $(ARDUINO_DIR)/hardware/pic32/compiler/pic32-tools
|
|
||||||
PIC32_TOOLS_PATH = $(PIC32_TOOLS_DIR)/bin
|
|
||||||
|
|
||||||
ALTERNATE_CORE = pic32
|
|
||||||
ALTERNATE_CORE_PATH = $(MPIDE_DIR)/hardware/pic32
|
|
||||||
ARDUINO_CORE_PATH = $(ALTERNATE_CORE_PATH)/cores/$(ALTERNATE_CORE)
|
|
||||||
ARDUINO_PREFERENCES_PATH = $(MPIDE_PREFERENCES_PATH)
|
|
||||||
ARDUINO_DIR = $(MPIDE_DIR)
|
|
||||||
|
|
||||||
CORE_AS_SRCS = $(ARDUINO_CORE_PATH)/vector_table.S \
|
|
||||||
$(ARDUINO_CORE_PATH)/cpp-startup.S \
|
|
||||||
$(ARDUINO_CORE_PATH)/crti.S \
|
|
||||||
$(ARDUINO_CORE_PATH)/crtn.S \
|
|
||||||
$(ARDUINO_CORE_PATH)/pic32_software_reset.S
|
|
||||||
|
|
||||||
ARDUINO_VERSION = 23
|
|
||||||
|
|
||||||
CC_NAME = pic32-gcc
|
|
||||||
CXX_NAME = pic32-g++
|
|
||||||
AR_NAME = pic32-ar
|
|
||||||
OBJDUMP_NAME = pic32-objdump
|
|
||||||
OBJCOPY_NAME = pic32-objcopy
|
|
||||||
SIZE_NAME = pic32-size
|
|
||||||
NM_NAME = pic32-nm
|
|
||||||
|
|
||||||
OVERRIDE_EXECUTABLES = 1
|
|
||||||
CC = $(PIC32_TOOLS_PATH)/$(CC_NAME)
|
|
||||||
CXX = $(PIC32_TOOLS_PATH)/$(CXX_NAME)
|
|
||||||
AS = $(PIC32_TOOLS_PATH)/$(AS_NAME)
|
|
||||||
OBJCOPY = $(PIC32_TOOLS_PATH)/$(OBJCOPY_NAME)
|
|
||||||
OBJDUMP = $(PIC32_TOOLS_PATH)/$(OBJDUMP_NAME)
|
|
||||||
AR = $(PIC32_TOOLS_PATH)/$(AR_NAME)
|
|
||||||
SIZE = $(PIC32_TOOLS_PATH)/$(SIZE_NAME)
|
|
||||||
NM = $(PIC32_TOOLS_PATH)/$(NM_NAME)
|
|
||||||
|
|
||||||
LDSCRIPT = $(call PARSE_BOARD,$(BOARD_TAG),ldscript)
|
|
||||||
LDSCRIPT_FILE = $(ARDUINO_CORE_PATH)/$(LDSCRIPT)
|
|
||||||
|
|
||||||
MCU_FLAG_NAME=mprocessor
|
|
||||||
LDFLAGS += -mdebugger -mno-peripheral-libs -nostartfiles -Wl,--gc-sections
|
|
||||||
LINKER_SCRIPTS += -T $(ARDUINO_CORE_PATH)/$(LDSCRIPT)
|
|
||||||
LINKER_SCRIPTS += -T $(ARDUINO_CORE_PATH)/chipKIT-application-COMMON.ld
|
|
||||||
CPPFLAGS += -mno-smart-io -fno-short-double -fframe-base-loclist \
|
|
||||||
-g3 -Wcast-align -D_BOARD_MEGA_
|
|
||||||
CFLAGS_STD =
|
|
||||||
|
|
||||||
include $(ARDMK_DIR)/Arduino.mk
|
|
1
arduino/Arduino-Makefile/examples/.gitignore
vendored
1
arduino/Arduino-Makefile/examples/.gitignore
vendored
|
@ -1 +0,0 @@
|
||||||
build-*
|
|
|
@ -1,23 +0,0 @@
|
||||||
/*
|
|
||||||
Blink
|
|
||||||
Turns on an LED on for one second, then off for one second, repeatedly.
|
|
||||||
|
|
||||||
This example code is in the public domain.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Connect a LED to Pin 3. It might be different in different ATtiny micro controllers
|
|
||||||
int led = 3;
|
|
||||||
|
|
||||||
// the setup routine runs once when you press reset:
|
|
||||||
void setup() {
|
|
||||||
// initialize the digital pin as an output.
|
|
||||||
pinMode(led, OUTPUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
// the loop routine runs over and over again forever:
|
|
||||||
void loop() {
|
|
||||||
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
|
|
||||||
delay(1000); // wait for a second
|
|
||||||
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
|
|
||||||
delay(1000); // wait for a second
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
# Arduino Make file. Refer to https://github.com/sudar/Arduino-Makefile
|
|
||||||
|
|
||||||
# if you have placed the alternate core in your sketchbook directory, then you can just mention the core name alone.
|
|
||||||
ALTERNATE_CORE = attiny
|
|
||||||
# If not, you might have to include the full path.
|
|
||||||
#ALTERNATE_CORE_PATH = /home/sudar/Dropbox/code/arduino-sketches/hardware/attiny/
|
|
||||||
|
|
||||||
BOARD_TAG = attiny85-8
|
|
||||||
ISP_PORT = /dev/ttyACM*
|
|
||||||
|
|
||||||
include $(ARDMK_DIR)/Arduino.mk
|
|
||||||
|
|
||||||
# !!! Important. You have to use make ispload to upload when using ISP programmer
|
|
|
@ -1,53 +0,0 @@
|
||||||
/*
|
|
||||||
Analog input, analog output, serial output
|
|
||||||
|
|
||||||
Reads an analog input pin, maps the result to a range from 0 to 255
|
|
||||||
and uses the result to set the pulsewidth modulation (PWM) of an output pin.
|
|
||||||
Also prints the results to the serial monitor.
|
|
||||||
|
|
||||||
The circuit:
|
|
||||||
* potentiometer connected to analog pin 0.
|
|
||||||
Center pin of the potentiometer goes to the analog pin.
|
|
||||||
side pins of the potentiometer go to +5V and ground
|
|
||||||
* LED connected from digital pin 9 to ground
|
|
||||||
|
|
||||||
created 29 Dec. 2008
|
|
||||||
modified 30 Aug 2011
|
|
||||||
by Tom Igoe
|
|
||||||
|
|
||||||
This example code is in the public domain.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
// These constants won't change. They're used to give names
|
|
||||||
// to the pins used:
|
|
||||||
const int analogInPin = A0; // Analog input pin that the potentiometer is attached to
|
|
||||||
const int analogOutPin = 9; // Analog output pin that the LED is attached to
|
|
||||||
|
|
||||||
int sensorValue = 0; // value read from the pot
|
|
||||||
int outputValue = 0; // value output to the PWM (analog out)
|
|
||||||
|
|
||||||
void setup() {
|
|
||||||
// initialize serial communications at 9600 bps:
|
|
||||||
Serial.begin(9600);
|
|
||||||
}
|
|
||||||
|
|
||||||
void loop() {
|
|
||||||
// read the analog in value:
|
|
||||||
sensorValue = analogRead(analogInPin);
|
|
||||||
// map it to the range of the analog out:
|
|
||||||
outputValue = map(sensorValue, 0, 1023, 0, 255);
|
|
||||||
// change the analog out value:
|
|
||||||
analogWrite(analogOutPin, outputValue);
|
|
||||||
|
|
||||||
// print the results to the serial monitor:
|
|
||||||
Serial.print("sensor = " );
|
|
||||||
Serial.print(sensorValue);
|
|
||||||
Serial.print("\t output = ");
|
|
||||||
Serial.println(outputValue);
|
|
||||||
|
|
||||||
// wait 10 milliseconds before the next loop
|
|
||||||
// for the analog-to-digital converter to settle
|
|
||||||
// after the last reading:
|
|
||||||
delay(10);
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
BOARD_TAG = uno
|
|
||||||
ARDUINO_LIBS =
|
|
||||||
|
|
||||||
include ../../Arduino.mk
|
|
|
@ -1,18 +0,0 @@
|
||||||
/*
|
|
||||||
Blink
|
|
||||||
Turns on an LED on for one second, then off for one second, repeatedly.
|
|
||||||
This example code is in the public domain.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void setup() {
|
|
||||||
// initialize the digital pin as an output.
|
|
||||||
// Pin 13 has an LED connected on most Arduino boards:
|
|
||||||
pinMode(13, OUTPUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
void loop() {
|
|
||||||
digitalWrite(13, HIGH); // set the LED on
|
|
||||||
delay(1000); // wait for a second
|
|
||||||
digitalWrite(13, LOW); // set the LED off
|
|
||||||
delay(1000); // wait for a second
|
|
||||||
}
|
|
|
@ -1,130 +0,0 @@
|
||||||
# Arduino Make file. Refer to https://github.com/sudar/Arduino-Makefile
|
|
||||||
|
|
||||||
BOARD_TAG = uno
|
|
||||||
include ../../Arduino.mk
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# --- leonardo (or pro micro w/leo bootloader)
|
|
||||||
#BOARD_TAG = leonardo
|
|
||||||
#MONITOR_PORT = /dev/ttyACM0
|
|
||||||
#include /usr/share/arduino/Arduino.mk
|
|
||||||
|
|
||||||
# --- mega2560 ide 1.0
|
|
||||||
#BOARD_TAG = mega2560
|
|
||||||
#ARDUINO_PORT = /dev/ttyACM0
|
|
||||||
#include /usr/share/arduino/Arduino.mk
|
|
||||||
|
|
||||||
# --- mega2560 ide 1.6
|
|
||||||
#BOARD_TAG = mega
|
|
||||||
#BOARD_SUB = atmega2560
|
|
||||||
#MONITOR_PORT = /dev/ttyACM0
|
|
||||||
#ARDUINO_DIR = /where/you/installed/arduino-1.6.5
|
|
||||||
#include /usr/share/arduino/Arduino.mk
|
|
||||||
|
|
||||||
# --- nano ide 1.0
|
|
||||||
#BOARD_TAG = nano328
|
|
||||||
#MONITOR_PORT = /dev/ttyUSB0
|
|
||||||
#include /usr/share/arduino/Arduino.mk
|
|
||||||
|
|
||||||
# --- nano ide 1.6
|
|
||||||
#BOARD_TAG = nano
|
|
||||||
#BOARD_SUB = atmega328
|
|
||||||
#ARDUINO_DIR = /where/you/installed/arduino-1.6.5
|
|
||||||
#include /usr/share/arduino/Arduino.mk
|
|
||||||
|
|
||||||
# --- pro mini
|
|
||||||
#BOARD_TAG = pro5v328
|
|
||||||
#MONITOR_PORT = /dev/ttyUSB0
|
|
||||||
#include /usr/share/arduino/Arduino.mk
|
|
||||||
|
|
||||||
# --- sparkfun pro micro
|
|
||||||
#BOARD_TAG = promicro16
|
|
||||||
#ALTERNATE_CORE = promicro
|
|
||||||
#BOARDS_TXT = $(HOME)/arduino/hardware/promicro/boards.txt
|
|
||||||
#BOOTLOADER_PARENT = $(HOME)/arduino/hardware/promicro/bootloaders
|
|
||||||
#BOOTLOADER_PATH = caterina
|
|
||||||
#BOOTLOADER_FILE = Caterina-promicro16.hex
|
|
||||||
#ISP_PROG = usbasp
|
|
||||||
#AVRDUDE_OPTS = -v
|
|
||||||
#include /usr/share/arduino/Arduino.mk
|
|
||||||
|
|
||||||
# --- chipkit
|
|
||||||
#BOARD_TAG = mega_pic32
|
|
||||||
#MPIDE_DIR = /where/you/installed/mpide-0023-linux64-20130817-test
|
|
||||||
#include /usr/share/arduino/chipKIT.mk
|
|
||||||
|
|
||||||
# --- pinoccio
|
|
||||||
#BOARD_TAG = pinoccio256
|
|
||||||
#ALTERNATE_CORE = pinoccio
|
|
||||||
#BOOTLOADER_PARENT = $(HOME)/arduino/hardware/pinoccio/bootloaders
|
|
||||||
#BOOTLOADER_PATH = STK500RFR2/release_0.51
|
|
||||||
#BOOTLOADER_FILE = boot_pinoccio.hex
|
|
||||||
#CFLAGS_STD = -std=gnu99
|
|
||||||
#CXXFLAGS_STD = -std=gnu++11
|
|
||||||
#include /usr/share/arduino/Arduino.mk
|
|
||||||
|
|
||||||
# --- fio
|
|
||||||
#BOARD_TAG = fio
|
|
||||||
#include /usr/share/arduino/Arduino.mk
|
|
||||||
|
|
||||||
# --- atmega-ng ide 1.6
|
|
||||||
#BOARD_TAG = atmegang
|
|
||||||
#BOARD_SUB = atmega168
|
|
||||||
#MONITOR_PORT = /dev/ttyACM0
|
|
||||||
#ARDUINO_DIR = /where/you/installed/arduino-1.6.5
|
|
||||||
#include /usr/share/arduino/Arduino.mk
|
|
||||||
|
|
||||||
# --- arduino-tiny ide 1.0
|
|
||||||
#ISP_PROG = usbasp
|
|
||||||
#BOARD_TAG = attiny85at8
|
|
||||||
#ALTERNATE_CORE = tiny
|
|
||||||
#ARDUINO_VAR_PATH = $(HOME)/arduino/hardware/tiny/cores/tiny
|
|
||||||
#ARDUINO_CORE_PATH = $(HOME)/arduino/hardware/tiny/cores/tiny
|
|
||||||
#AVRDUDE_OPTS = -v
|
|
||||||
#include /usr/share/arduino/Arduino.mk
|
|
||||||
|
|
||||||
# --- arduino-tiny ide 1.6
|
|
||||||
#ISP_PROG = usbasp
|
|
||||||
#BOARD_TAG = attiny85at8
|
|
||||||
#ALTERNATE_CORE = tiny
|
|
||||||
#ARDUINO_DIR = /where/you/installed/arduino-1.6.5
|
|
||||||
#include /usr/share/arduino/Arduino.mk
|
|
||||||
|
|
||||||
# --- damellis attiny ide 1.0
|
|
||||||
#ISP_PROG = usbasp
|
|
||||||
#BOARD_TAG = attiny85
|
|
||||||
#ALTERNATE_CORE = attiny-master
|
|
||||||
#AVRDUDE_OPTS = -v
|
|
||||||
#include /usr/share/arduino/Arduino.mk
|
|
||||||
|
|
||||||
# --- damellis attiny ide 1.6
|
|
||||||
#ISP_PROG = usbasp
|
|
||||||
#BOARD_TAG = attiny
|
|
||||||
#BOARD_SUB = attiny85
|
|
||||||
#ALTERNATE_CORE = attiny
|
|
||||||
#F_CPU = 16000000L
|
|
||||||
#ARDUINO_DIR = /where/you/installed/arduino-1.6.5
|
|
||||||
#include /usr/share/arduino/Arduino.mk
|
|
||||||
|
|
||||||
# --- teensy3
|
|
||||||
#BOARD_TAG = teensy31
|
|
||||||
#ARDUINO_DIR = /where/you/installed/the/patched/teensy/arduino-1.0.6
|
|
||||||
#include /usr/share/arduino/Teensy.mk
|
|
||||||
|
|
||||||
# --- mighty 1284p
|
|
||||||
#BOARD_TAG = mighty_opt
|
|
||||||
#BOARDS_TXT = $(HOME)/arduino/hardware/mighty-1284p/boards.txt
|
|
||||||
#BOOTLOADER_PARENT = $(HOME)/arduino/hardware/mighty-1284p/bootloaders
|
|
||||||
#BOOTLOADER_PATH = optiboot
|
|
||||||
#BOOTLOADER_FILE = optiboot_atmega1284p.hex
|
|
||||||
#ISP_PROG = usbasp
|
|
||||||
#AVRDUDE_OPTS = -v
|
|
||||||
#include /usr/share/arduino/Arduino.mk
|
|
||||||
|
|
||||||
# --- atmega328p on breadboard
|
|
||||||
#BOARD_TAG = atmega328bb
|
|
||||||
#ISP_PROG = usbasp
|
|
||||||
#AVRDUDE_OPTS = -v
|
|
||||||
#BOARDS_TXT = $(HOME)/arduino/hardware/breadboard/boards.txt
|
|
||||||
#include /usr/share/arduino/Arduino.mk
|
|
|
@ -1,19 +0,0 @@
|
||||||
/*
|
|
||||||
Blink
|
|
||||||
Turns on an LED on for one second, then off for one second, repeatedly.
|
|
||||||
|
|
||||||
This example code is in the public domain.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void setup() {
|
|
||||||
// initialize the digital pin as an output.
|
|
||||||
// Pin 13 has an LED connected on most Arduino boards:
|
|
||||||
pinMode(13, OUTPUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
void loop() {
|
|
||||||
digitalWrite(13, HIGH); // set the LED on
|
|
||||||
delay(1000); // wait for a second
|
|
||||||
digitalWrite(13, LOW); // set the LED off
|
|
||||||
delay(1000); // wait for a second
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
BOARD_TAG = mega_pic32
|
|
||||||
ARDUINO_LIBS =
|
|
||||||
|
|
||||||
include ../../chipKIT.mk
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
# This sample Makefile, explains how you can compile plain AVR C file.
|
|
||||||
#
|
|
||||||
# Arduino Make file. Refer to https://github.com/sudar/Arduino-Makefile
|
|
||||||
|
|
||||||
NO_CORE = Yes
|
|
||||||
|
|
||||||
BOARD_TAG = atmega16
|
|
||||||
MCU = atmega16
|
|
||||||
F_CPU = 8000000L
|
|
||||||
|
|
||||||
ISP_PROG = stk500v1
|
|
||||||
AVRDUDE_ISP_BAUDRATE = 19200
|
|
||||||
|
|
||||||
include ../../Arduino.mk
|
|
||||||
|
|
||||||
# !!! Important. You have to use make ispload to upload when using ISP programmer
|
|
|
@ -1,38 +0,0 @@
|
||||||
/*
|
|
||||||
* (c) Anil Kumar Pugalia, 2010. Email: email@sarika-pugs.com
|
|
||||||
*
|
|
||||||
* ATmega48/88/168, ATmega16/32
|
|
||||||
*
|
|
||||||
* Example Blink. Toggles all IO pins at 1Hz
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <avr/io.h>
|
|
||||||
#include <util/delay.h>
|
|
||||||
|
|
||||||
void init_io(void)
|
|
||||||
{
|
|
||||||
// 1 = output, 0 = input
|
|
||||||
DDRB = 0b11111111; // All outputs
|
|
||||||
DDRC = 0b11111111; // All outputs
|
|
||||||
DDRD = 0b11111110; // PORTD (RX on PD0). Just for demo
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
init_io();
|
|
||||||
|
|
||||||
while (1)
|
|
||||||
{
|
|
||||||
PORTC = 0xFF;
|
|
||||||
PORTB = 0xFF;
|
|
||||||
PORTD = 0xFF;
|
|
||||||
_delay_ms(500);
|
|
||||||
|
|
||||||
PORTC = 0x00;
|
|
||||||
PORTB = 0x00;
|
|
||||||
PORTD = 0x00;
|
|
||||||
_delay_ms(500);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
/*
|
|
||||||
Blink
|
|
||||||
Turns on an LED on for one second, then off for one second, repeatedly.
|
|
||||||
|
|
||||||
This example code is in the public domain.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Connect a LED to Pin 3. It might be different in different ATtiny micro controllers
|
|
||||||
int led = 3;
|
|
||||||
|
|
||||||
// the setup routine runs once when you press reset:
|
|
||||||
void setup() {
|
|
||||||
// initialize the digital pin as an output.
|
|
||||||
pinMode(led, OUTPUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
// the loop routine runs over and over again forever:
|
|
||||||
void loop() {
|
|
||||||
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
|
|
||||||
delay(1000); // wait for a second
|
|
||||||
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
|
|
||||||
delay(1000); // wait for a second
|
|
||||||
}
|
|
|
@ -1,46 +0,0 @@
|
||||||
# Arduino Make file. Refer to https://github.com/sudar/Arduino-Makefile
|
|
||||||
|
|
||||||
# Tested and working with a linuxspi programmer on a remote Raspberry Pi
|
|
||||||
# Refer to https://github.com/kcuzner/avrdude for linuxspi.
|
|
||||||
# Should work with ISP as well if you replace $(AVRDUDE_ARD_OPTS) with
|
|
||||||
# $(AVRDUDE_ISP_OPTS) in the net_set_fuses rule.
|
|
||||||
|
|
||||||
# Alternate core from https://code.google.com/p/arduino-tiny
|
|
||||||
ALTERNATE_CORE = tiny
|
|
||||||
BOARD_TAG = attiny85at8
|
|
||||||
|
|
||||||
# Avrdude config path on the remote Raspberry Pi
|
|
||||||
AVRDUDE_CONF=/usr/local/etc/avrdude.conf
|
|
||||||
|
|
||||||
# Skip the monitor port existance check since it's not on our machine.
|
|
||||||
FORCE_MONITOR_PORT=true
|
|
||||||
MONITOR_PORT=/dev/spidev0.0
|
|
||||||
|
|
||||||
include ../../Arduino.mk
|
|
||||||
|
|
||||||
|
|
||||||
# Additional rules to use a remote Raspberry Pi programmer
|
|
||||||
|
|
||||||
# Note that it's recommended not to use root for this task,
|
|
||||||
# but to setup spidev access on a normal user instead.
|
|
||||||
HOST = root@alarmpi
|
|
||||||
SSH_AVRDUDE = ssh $(HOST) /usr/local/bin/avrdude
|
|
||||||
|
|
||||||
CAT_HEX = cat $(TARGET_HEX)
|
|
||||||
AVRDUDE_UPLOAD_PIPE = -U flash:w:-:i
|
|
||||||
|
|
||||||
.PHONY: net_upload net_set_fuses
|
|
||||||
|
|
||||||
net_upload: $(TARGET_HEX) verify_size
|
|
||||||
$(CAT_HEX) | $(SSH_AVRDUDE) $(AVRDUDE_COM_OPTS) $(AVRDUDE_ARD_OPTS) \
|
|
||||||
$(AVRDUDE_UPLOAD_PIPE)
|
|
||||||
|
|
||||||
net_set_fuses:
|
|
||||||
ifneq ($(strip $(AVRDUDE_ISP_FUSES_PRE)),)
|
|
||||||
$(SSH_AVRDUDE) $(AVRDUDE_COM_OPTS) $(AVRDUDE_ARD_OPTS) -e \
|
|
||||||
$(AVRDUDE_ISP_FUSES_PRE)
|
|
||||||
endif
|
|
||||||
ifneq ($(strip $(AVRDUDE_ISP_FUSES_POST)),)
|
|
||||||
$(SSH_AVRDUDE) $(AVRDUDE_COM_OPTS) $(AVRDUDE_ARD_OPTS) \
|
|
||||||
$(AVRDUDE_ISP_FUSES_POST)
|
|
||||||
endif
|
|
|
@ -1,19 +0,0 @@
|
||||||
/*
|
|
||||||
Blink
|
|
||||||
Turns on an LED on for one second, then off for one second, repeatedly.
|
|
||||||
|
|
||||||
This example code is in the public domain.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void setup() {
|
|
||||||
// initialize the digital pin as an output.
|
|
||||||
// Pin 13 has an LED connected on most Arduino boards:
|
|
||||||
pinMode(13, OUTPUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
void loop() {
|
|
||||||
digitalWrite(13, HIGH); // set the LED on
|
|
||||||
delay(1000); // wait for a second
|
|
||||||
digitalWrite(13, LOW); // set the LED off
|
|
||||||
delay(1000); // wait for a second
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
BOARD_TAG = teensy31
|
|
||||||
ARDUINO_LIBS =
|
|
||||||
|
|
||||||
include ../../Teensy.mk
|
|
|
@ -1,65 +0,0 @@
|
||||||
/* Blink without Delay
|
|
||||||
|
|
||||||
Turns on and off a light emitting diode(LED) connected to a digital
|
|
||||||
pin, without using the delay() function. This means that other code
|
|
||||||
can run at the same time without being interrupted by the LED code.
|
|
||||||
|
|
||||||
The circuit:
|
|
||||||
* LED attached from pin 13 to ground.
|
|
||||||
* Note: on most Arduinos, there is already an LED on the board
|
|
||||||
that's attached to pin 13, so no hardware is needed for this example.
|
|
||||||
|
|
||||||
|
|
||||||
created 2005
|
|
||||||
by David A. Mellis
|
|
||||||
modified 8 Feb 2010
|
|
||||||
by Paul Stoffregen
|
|
||||||
|
|
||||||
This example code is in the public domain.
|
|
||||||
|
|
||||||
|
|
||||||
http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay
|
|
||||||
*/
|
|
||||||
|
|
||||||
// constants won't change. Used here to
|
|
||||||
// set pin numbers:
|
|
||||||
const int ledPin = 13; // the number of the LED pin
|
|
||||||
|
|
||||||
// Variables will change:
|
|
||||||
int ledState = LOW; // ledState used to set the LED
|
|
||||||
long previousMillis = 0; // will store last time LED was updated
|
|
||||||
|
|
||||||
// the follow variables is a long because the time, measured in miliseconds,
|
|
||||||
// will quickly become a bigger number than can be stored in an int.
|
|
||||||
long interval = 1000; // interval at which to blink (milliseconds)
|
|
||||||
|
|
||||||
void setup() {
|
|
||||||
// set the digital pin as output:
|
|
||||||
pinMode(ledPin, OUTPUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
void loop()
|
|
||||||
{
|
|
||||||
// here is where you'd put code that needs to be running all the time.
|
|
||||||
|
|
||||||
// check to see if it's time to blink the LED; that is, if the
|
|
||||||
// difference between the current time and last time you blinked
|
|
||||||
// the LED is bigger than the interval at which you want to
|
|
||||||
// blink the LED.
|
|
||||||
unsigned long currentMillis = millis();
|
|
||||||
|
|
||||||
if(currentMillis - previousMillis > interval) {
|
|
||||||
// save the last time you blinked the LED
|
|
||||||
previousMillis = currentMillis;
|
|
||||||
|
|
||||||
// if the LED is off turn it on and vice-versa:
|
|
||||||
if (ledState == LOW)
|
|
||||||
ledState = HIGH;
|
|
||||||
else
|
|
||||||
ledState = LOW;
|
|
||||||
|
|
||||||
// set the LED with the ledState of the variable:
|
|
||||||
digitalWrite(ledPin, ledState);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
BOARD_TAG = uno
|
|
||||||
ARDUINO_LIBS =
|
|
||||||
|
|
||||||
include ../../Arduino.mk
|
|
|
@ -1,31 +0,0 @@
|
||||||
/*
|
|
||||||
Fade
|
|
||||||
|
|
||||||
This example shows how to fade an LED on pin 9
|
|
||||||
using the analogWrite() function.
|
|
||||||
|
|
||||||
This example code is in the public domain.
|
|
||||||
|
|
||||||
*/
|
|
||||||
int brightness = 0; // how bright the LED is
|
|
||||||
int fadeAmount = 5; // how many points to fade the LED by
|
|
||||||
|
|
||||||
void setup() {
|
|
||||||
// declare pin 9 to be an output:
|
|
||||||
pinMode(9, OUTPUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
void loop() {
|
|
||||||
// set the brightness of pin 9:
|
|
||||||
analogWrite(9, brightness);
|
|
||||||
|
|
||||||
// change the brightness for next time through the loop:
|
|
||||||
brightness = brightness + fadeAmount;
|
|
||||||
|
|
||||||
// reverse the direction of the fading at the ends of the fade:
|
|
||||||
if (brightness == 0 || brightness == 255) {
|
|
||||||
fadeAmount = -fadeAmount ;
|
|
||||||
}
|
|
||||||
// wait for 30 milliseconds to see the dimming effect
|
|
||||||
delay(30);
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
BOARD_TAG = uno
|
|
||||||
ARDUINO_LIBS =
|
|
||||||
|
|
||||||
include ../../Arduino.mk
|
|
|
@ -1,58 +0,0 @@
|
||||||
/*
|
|
||||||
LiquidCrystal Library - Hello World
|
|
||||||
|
|
||||||
Demonstrates the use a 16x2 LCD display. The LiquidCrystal
|
|
||||||
library works with all LCD displays that are compatible with the
|
|
||||||
Hitachi HD44780 driver. There are many of them out there, and you
|
|
||||||
can usually tell them by the 16-pin interface.
|
|
||||||
|
|
||||||
This sketch prints "Hello World!" to the LCD
|
|
||||||
and shows the time.
|
|
||||||
|
|
||||||
The circuit:
|
|
||||||
* LCD RS pin to digital pin 12
|
|
||||||
* LCD Enable pin to digital pin 11
|
|
||||||
* LCD D4 pin to digital pin 5
|
|
||||||
* LCD D5 pin to digital pin 4
|
|
||||||
* LCD D6 pin to digital pin 3
|
|
||||||
* LCD D7 pin to digital pin 2
|
|
||||||
* LCD R/W pin to ground
|
|
||||||
* 10K resistor:
|
|
||||||
* ends to +5V and ground
|
|
||||||
* wiper to LCD VO pin (pin 3)
|
|
||||||
|
|
||||||
Library originally added 18 Apr 2008
|
|
||||||
by David A. Mellis
|
|
||||||
library modified 5 Jul 2009
|
|
||||||
by Limor Fried (http://www.ladyada.net)
|
|
||||||
example added 9 Jul 2009
|
|
||||||
by Tom Igoe
|
|
||||||
modified 22 Nov 2010
|
|
||||||
by Tom Igoe
|
|
||||||
|
|
||||||
This example code is in the public domain.
|
|
||||||
|
|
||||||
http://www.arduino.cc/en/Tutorial/LiquidCrystal
|
|
||||||
*/
|
|
||||||
|
|
||||||
// include the library code:
|
|
||||||
#include <LiquidCrystal.h>
|
|
||||||
|
|
||||||
// initialize the library with the numbers of the interface pins
|
|
||||||
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
|
|
||||||
|
|
||||||
void setup() {
|
|
||||||
// set up the LCD's number of columns and rows:
|
|
||||||
lcd.begin(16, 2);
|
|
||||||
// Print a message to the LCD.
|
|
||||||
lcd.print("hello, world!");
|
|
||||||
}
|
|
||||||
|
|
||||||
void loop() {
|
|
||||||
// set the cursor to column 0, line 1
|
|
||||||
// (note: line 1 is the second row, since counting begins with 0):
|
|
||||||
lcd.setCursor(0, 1);
|
|
||||||
// print the number of seconds since reset:
|
|
||||||
lcd.print(millis()/1000);
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
BOARD_TAG = uno
|
|
||||||
ARDUINO_LIBS = LiquidCrystal
|
|
||||||
|
|
||||||
include ../../Arduino.mk
|
|
|
@ -1,74 +0,0 @@
|
||||||
### DISCLAIMER
|
|
||||||
### This is an example Makefile and it MUST be configured to suit your needs.
|
|
||||||
### For detailed explanations about all of the available options, please refer
|
|
||||||
### to https://github.com/sudar/Arduino-Makefile/blob/master/arduino-mk-vars.md
|
|
||||||
### Original project where this Makefile comes from: https://github.com/WeAreLeka/Bare-Arduino-Project
|
|
||||||
|
|
||||||
### PROJECT_DIR
|
|
||||||
### This is the path to where you have created/cloned your project
|
|
||||||
PROJECT_DIR = /Users/MyUserName/path/to/my/Project
|
|
||||||
|
|
||||||
### ARDMK_DIR
|
|
||||||
### Path to the Arduino-Makefile directory.
|
|
||||||
ARDMK_DIR = $(PROJECT_DIR)/Arduino-Makefile
|
|
||||||
|
|
||||||
### ARDUINO_DIR
|
|
||||||
### Path to the Arduino application and resources directory.
|
|
||||||
### On OS X:
|
|
||||||
ARDUINO_DIR = /Applications/Arduino.app/Contents/Java
|
|
||||||
### or on Linux: (remove the one you don't want)
|
|
||||||
ARDUINO_DIR = /usr/share/arduino
|
|
||||||
|
|
||||||
### USER_LIB_PATH
|
|
||||||
### Path to where the your project's libraries are stored.
|
|
||||||
USER_LIB_PATH := $(PROJECT_DIR)/lib
|
|
||||||
|
|
||||||
### BOARD_TAG
|
|
||||||
### It must be set to the board you are currently using. (i.e uno, mega2560, etc.)
|
|
||||||
BOARD_TAG = uno
|
|
||||||
|
|
||||||
### MONITOR_BAUDRATE
|
|
||||||
### It must be set to Serial baudrate value you are using.
|
|
||||||
MONITOR_BAUDRATE = 115200
|
|
||||||
|
|
||||||
### AVR_TOOLS_DIR
|
|
||||||
### Path to the AVR tools directory such as avr-gcc, avr-g++, etc.
|
|
||||||
### On OS X with `homebrew`:
|
|
||||||
AVR_TOOLS_DIR = /usr/local
|
|
||||||
### or on Linux: (remove the one you don't want)
|
|
||||||
AVR_TOOLS_DIR = /usr
|
|
||||||
|
|
||||||
### AVRDUDE
|
|
||||||
### Path to avrdude directory.
|
|
||||||
### On OS X with `homebrew`:
|
|
||||||
AVRDUDE = /usr/local/bin/avrdude
|
|
||||||
### or on Linux: (remove the one you don't want)
|
|
||||||
AVRDUDE = /usr/bin/avrdude
|
|
||||||
|
|
||||||
### CFLAGS_STD
|
|
||||||
### Set the C standard to be used during compilation. Documentation (https://github.com/WeAreLeka/Arduino-Makefile/blob/std-flags/arduino-mk-vars.md#cflags_std)
|
|
||||||
CFLAGS_STD = -std=gnu11
|
|
||||||
|
|
||||||
### CXXFLAGS_STD
|
|
||||||
### Set the C++ standard to be used during compilation. Documentation (https://github.com/WeAreLeka/Arduino-Makefile/blob/std-flags/arduino-mk-vars.md#cxxflags_std)
|
|
||||||
CXXFLAGS_STD = -std=gnu++11
|
|
||||||
|
|
||||||
### CXXFLAGS
|
|
||||||
### Flags you might want to set for debugging purpose. Comment to stop.
|
|
||||||
CXXFLAGS += -pedantic -Wall -Wextra
|
|
||||||
|
|
||||||
### MONITOR_PORT
|
|
||||||
### The port your board is connected to. Using an '*' tries all the ports and finds the right one.
|
|
||||||
MONITOR_PORT = /dev/tty.usbmodem*
|
|
||||||
|
|
||||||
### CURRENT_DIR
|
|
||||||
### Do not touch - used for binaries path
|
|
||||||
CURRENT_DIR = $(shell basename $(CURDIR))
|
|
||||||
|
|
||||||
### OBJDIR
|
|
||||||
### This is where you put the binaries you just compile using 'make'
|
|
||||||
OBJDIR = $(PROJECT_DIR)/bin/$(BOARD_TAG)/$(CURRENT_DIR)
|
|
||||||
|
|
||||||
### Do not touch - the path to Arduino.mk, inside the ARDMK_DIR
|
|
||||||
include $(ARDMK_DIR)/Arduino.mk
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
This folder contains the list of example Arduino sketches and makefile showing
|
|
||||||
the different usage patterns
|
|
||||||
|
|
||||||
- BlinkInAVRC - Shows how to use plain AVR C code
|
|
||||||
- ATtinyBlink - Shows how to use different cores like ATtiny
|
|
||||||
- Blink - Shows normal usage
|
|
||||||
- HelloWorld - Shows how to include Arduino libraries
|
|
||||||
- SerialPrint - Shows how serial monitor can be used
|
|
||||||
- BlinkChipKIT - Shows how to use ChipKIT
|
|
|
@ -1,5 +0,0 @@
|
||||||
# Arduino Make file. Refer to https://github.com/sudar/Arduino-Makefile
|
|
||||||
|
|
||||||
BOARD_TAG = uno
|
|
||||||
|
|
||||||
include ../../Arduino.mk
|
|
|
@ -1,10 +0,0 @@
|
||||||
void setup() {
|
|
||||||
Serial.begin(9600);
|
|
||||||
Serial.print("Press any key: ");
|
|
||||||
}
|
|
||||||
|
|
||||||
void loop() {
|
|
||||||
if (Serial.available()) {
|
|
||||||
Serial.println(Serial.read());
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
# Arduino Make file. Refer to https://github.com/sudar/Arduino-Makefile
|
|
||||||
|
|
||||||
# if you have placed the alternate core in your sketchbook directory, then you can just mention the core name alone.
|
|
||||||
ALTERNATE_CORE = attiny
|
|
||||||
# If not, you might have to include the full path.
|
|
||||||
#ALTERNATE_CORE_PATH = /home/sudar/Dropbox/code/arduino-sketches/hardware/attiny/
|
|
||||||
|
|
||||||
# !!! Important. You have to use "make ispload" to upload when using ISP programmer
|
|
||||||
ISP_PROG = usbasp
|
|
||||||
|
|
||||||
# 1.5+ example of submenu cpu
|
|
||||||
BOARD_TAG = attiny
|
|
||||||
BOARD_SUB = attiny85
|
|
||||||
|
|
||||||
# clock is a submenu too
|
|
||||||
F_CPU = 16000000L
|
|
||||||
|
|
||||||
ARDUINO_LIBS = SoftwareSerial
|
|
||||||
|
|
||||||
include /usr/share/arduino/Arduino.mk
|
|
|
@ -1,12 +0,0 @@
|
||||||
#include <SoftwareSerial.h>
|
|
||||||
|
|
||||||
SoftwareSerial mySerial(3, 4); // RX, TX
|
|
||||||
|
|
||||||
void setup() {
|
|
||||||
mySerial.begin(9600);
|
|
||||||
}
|
|
||||||
|
|
||||||
void loop() {
|
|
||||||
mySerial.println(millis());
|
|
||||||
delay(1000);
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
# Arduino Make file. Refer to https://github.com/sudar/Arduino-Makefile
|
|
||||||
|
|
||||||
BOARD_TAG = uno
|
|
||||||
ARDUINO_LIBS = Ethernet SPI
|
|
||||||
|
|
||||||
include ../../Arduino.mk
|
|
|
@ -1,82 +0,0 @@
|
||||||
/*
|
|
||||||
Web Server
|
|
||||||
|
|
||||||
A simple web server that shows the value of the analog input pins.
|
|
||||||
using an Arduino Wiznet Ethernet shield.
|
|
||||||
|
|
||||||
Circuit:
|
|
||||||
* Ethernet shield attached to pins 10, 11, 12, 13
|
|
||||||
* Analog inputs attached to pins A0 through A5 (optional)
|
|
||||||
|
|
||||||
created 18 Dec 2009
|
|
||||||
by David A. Mellis
|
|
||||||
modified 4 Sep 2010
|
|
||||||
by Tom Igoe
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <SPI.h>
|
|
||||||
#include <Ethernet.h>
|
|
||||||
|
|
||||||
// Enter a MAC address and IP address for your controller below.
|
|
||||||
// The IP address will be dependent on your local network:
|
|
||||||
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
|
|
||||||
IPAddress ip(192,168,1, 178);
|
|
||||||
|
|
||||||
// Initialize the Ethernet server library
|
|
||||||
// with the IP address and port you want to use
|
|
||||||
// (port 80 is default for HTTP):
|
|
||||||
EthernetServer server(80);
|
|
||||||
|
|
||||||
void setup()
|
|
||||||
{
|
|
||||||
// start the Ethernet connection and the server:
|
|
||||||
Ethernet.begin(mac, ip);
|
|
||||||
server.begin();
|
|
||||||
}
|
|
||||||
|
|
||||||
void loop()
|
|
||||||
{
|
|
||||||
// listen for incoming clients
|
|
||||||
EthernetClient client = server.available();
|
|
||||||
if (client) {
|
|
||||||
// an http request ends with a blank line
|
|
||||||
boolean currentLineIsBlank = true;
|
|
||||||
while (client.connected()) {
|
|
||||||
if (client.available()) {
|
|
||||||
char c = client.read();
|
|
||||||
// if you've gotten to the end of the line (received a newline
|
|
||||||
// character) and the line is blank, the http request has ended,
|
|
||||||
// so you can send a reply
|
|
||||||
if (c == '\n' && currentLineIsBlank) {
|
|
||||||
// send a standard http response header
|
|
||||||
client.println("HTTP/1.1 200 OK");
|
|
||||||
client.println("Content-Type: text/html");
|
|
||||||
client.println();
|
|
||||||
|
|
||||||
// output the value of each analog input pin
|
|
||||||
for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
|
|
||||||
client.print("analog input ");
|
|
||||||
client.print(analogChannel);
|
|
||||||
client.print(" is ");
|
|
||||||
client.print(analogRead(analogChannel));
|
|
||||||
client.println("<br />");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (c == '\n') {
|
|
||||||
// you're starting a new line
|
|
||||||
currentLineIsBlank = true;
|
|
||||||
}
|
|
||||||
else if (c != '\r') {
|
|
||||||
// you've gotten a character on the current line
|
|
||||||
currentLineIsBlank = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// give the web browser time to receive the data
|
|
||||||
delay(1);
|
|
||||||
// close the connection:
|
|
||||||
client.stop();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
# Arduino Make file. Refer to https://github.com/sudar/Arduino-Makefile
|
|
||||||
|
|
||||||
BOARD_TAG = uno
|
|
||||||
ARDUINO_LIBS = Wire
|
|
||||||
|
|
||||||
include ../../Arduino.mk
|
|
|
@ -1,32 +0,0 @@
|
||||||
// Wire Master Reader
|
|
||||||
// by Nicholas Zambetti <http://www.zambetti.com>
|
|
||||||
|
|
||||||
// Demonstrates use of the Wire library
|
|
||||||
// Reads data from an I2C/TWI slave device
|
|
||||||
// Refer to the "Wire Slave Sender" example for use with this
|
|
||||||
|
|
||||||
// Created 29 March 2006
|
|
||||||
|
|
||||||
// This example code is in the public domain.
|
|
||||||
|
|
||||||
|
|
||||||
#include <Wire.h>
|
|
||||||
|
|
||||||
void setup()
|
|
||||||
{
|
|
||||||
Wire.begin(); // join i2c bus (address optional for master)
|
|
||||||
Serial.begin(9600); // start serial for output
|
|
||||||
}
|
|
||||||
|
|
||||||
void loop()
|
|
||||||
{
|
|
||||||
Wire.requestFrom(2, 6); // request 6 bytes from slave device #2
|
|
||||||
|
|
||||||
while(Wire.available()) // slave may send less than requested
|
|
||||||
{
|
|
||||||
char c = Wire.read(); // receive a byte as character
|
|
||||||
Serial.print(c); // print the character
|
|
||||||
}
|
|
||||||
|
|
||||||
delay(500);
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
BOARD_TAG = uno
|
|
||||||
ARDUINO_LIBS =
|
|
||||||
|
|
||||||
include ../../Arduino.mk
|
|
|
@ -1,95 +0,0 @@
|
||||||
/*************************************************
|
|
||||||
* Public Constants
|
|
||||||
*************************************************/
|
|
||||||
|
|
||||||
#define NOTE_B0 31
|
|
||||||
#define NOTE_C1 33
|
|
||||||
#define NOTE_CS1 35
|
|
||||||
#define NOTE_D1 37
|
|
||||||
#define NOTE_DS1 39
|
|
||||||
#define NOTE_E1 41
|
|
||||||
#define NOTE_F1 44
|
|
||||||
#define NOTE_FS1 46
|
|
||||||
#define NOTE_G1 49
|
|
||||||
#define NOTE_GS1 52
|
|
||||||
#define NOTE_A1 55
|
|
||||||
#define NOTE_AS1 58
|
|
||||||
#define NOTE_B1 62
|
|
||||||
#define NOTE_C2 65
|
|
||||||
#define NOTE_CS2 69
|
|
||||||
#define NOTE_D2 73
|
|
||||||
#define NOTE_DS2 78
|
|
||||||
#define NOTE_E2 82
|
|
||||||
#define NOTE_F2 87
|
|
||||||
#define NOTE_FS2 93
|
|
||||||
#define NOTE_G2 98
|
|
||||||
#define NOTE_GS2 104
|
|
||||||
#define NOTE_A2 110
|
|
||||||
#define NOTE_AS2 117
|
|
||||||
#define NOTE_B2 123
|
|
||||||
#define NOTE_C3 131
|
|
||||||
#define NOTE_CS3 139
|
|
||||||
#define NOTE_D3 147
|
|
||||||
#define NOTE_DS3 156
|
|
||||||
#define NOTE_E3 165
|
|
||||||
#define NOTE_F3 175
|
|
||||||
#define NOTE_FS3 185
|
|
||||||
#define NOTE_G3 196
|
|
||||||
#define NOTE_GS3 208
|
|
||||||
#define NOTE_A3 220
|
|
||||||
#define NOTE_AS3 233
|
|
||||||
#define NOTE_B3 247
|
|
||||||
#define NOTE_C4 262
|
|
||||||
#define NOTE_CS4 277
|
|
||||||
#define NOTE_D4 294
|
|
||||||
#define NOTE_DS4 311
|
|
||||||
#define NOTE_E4 330
|
|
||||||
#define NOTE_F4 349
|
|
||||||
#define NOTE_FS4 370
|
|
||||||
#define NOTE_G4 392
|
|
||||||
#define NOTE_GS4 415
|
|
||||||
#define NOTE_A4 440
|
|
||||||
#define NOTE_AS4 466
|
|
||||||
#define NOTE_B4 494
|
|
||||||
#define NOTE_C5 523
|
|
||||||
#define NOTE_CS5 554
|
|
||||||
#define NOTE_D5 587
|
|
||||||
#define NOTE_DS5 622
|
|
||||||
#define NOTE_E5 659
|
|
||||||
#define NOTE_F5 698
|
|
||||||
#define NOTE_FS5 740
|
|
||||||
#define NOTE_G5 784
|
|
||||||
#define NOTE_GS5 831
|
|
||||||
#define NOTE_A5 880
|
|
||||||
#define NOTE_AS5 932
|
|
||||||
#define NOTE_B5 988
|
|
||||||
#define NOTE_C6 1047
|
|
||||||
#define NOTE_CS6 1109
|
|
||||||
#define NOTE_D6 1175
|
|
||||||
#define NOTE_DS6 1245
|
|
||||||
#define NOTE_E6 1319
|
|
||||||
#define NOTE_F6 1397
|
|
||||||
#define NOTE_FS6 1480
|
|
||||||
#define NOTE_G6 1568
|
|
||||||
#define NOTE_GS6 1661
|
|
||||||
#define NOTE_A6 1760
|
|
||||||
#define NOTE_AS6 1865
|
|
||||||
#define NOTE_B6 1976
|
|
||||||
#define NOTE_C7 2093
|
|
||||||
#define NOTE_CS7 2217
|
|
||||||
#define NOTE_D7 2349
|
|
||||||
#define NOTE_DS7 2489
|
|
||||||
#define NOTE_E7 2637
|
|
||||||
#define NOTE_F7 2794
|
|
||||||
#define NOTE_FS7 2960
|
|
||||||
#define NOTE_G7 3136
|
|
||||||
#define NOTE_GS7 3322
|
|
||||||
#define NOTE_A7 3520
|
|
||||||
#define NOTE_AS7 3729
|
|
||||||
#define NOTE_B7 3951
|
|
||||||
#define NOTE_C8 4186
|
|
||||||
#define NOTE_CS8 4435
|
|
||||||
#define NOTE_D8 4699
|
|
||||||
#define NOTE_DS8 4978
|
|
||||||
|
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
/*
|
|
||||||
Melody
|
|
||||||
|
|
||||||
Plays a melody
|
|
||||||
|
|
||||||
circuit:
|
|
||||||
* 8-ohm speaker on digital pin 8
|
|
||||||
|
|
||||||
created 21 Jan 2010
|
|
||||||
modified 30 Aug 2011
|
|
||||||
by Tom Igoe
|
|
||||||
|
|
||||||
This example code is in the public domain.
|
|
||||||
|
|
||||||
http://arduino.cc/en/Tutorial/Tone
|
|
||||||
|
|
||||||
*/
|
|
||||||
#include "pitches.h"
|
|
||||||
|
|
||||||
// notes in the melody:
|
|
||||||
int melody[] = {
|
|
||||||
NOTE_C4, NOTE_G3,NOTE_G3, NOTE_A3, NOTE_G3,0, NOTE_B3, NOTE_C4};
|
|
||||||
|
|
||||||
// note durations: 4 = quarter note, 8 = eighth note, etc.:
|
|
||||||
int noteDurations[] = {
|
|
||||||
4, 8, 8, 4,4,4,4,4 };
|
|
||||||
|
|
||||||
void setup() {
|
|
||||||
// iterate over the notes of the melody:
|
|
||||||
for (int thisNote = 0; thisNote < 8; thisNote++) {
|
|
||||||
|
|
||||||
// to calculate the note duration, take one second
|
|
||||||
// divided by the note type.
|
|
||||||
//e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc.
|
|
||||||
int noteDuration = 1000/noteDurations[thisNote];
|
|
||||||
tone(8, melody[thisNote],noteDuration);
|
|
||||||
|
|
||||||
// to distinguish the notes, set a minimum time between them.
|
|
||||||
// the note's duration + 30% seems to work well:
|
|
||||||
int pauseBetweenNotes = noteDuration * 1.30;
|
|
||||||
delay(pauseBetweenNotes);
|
|
||||||
// stop the tone playing:
|
|
||||||
noTone(8);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void loop() {
|
|
||||||
// no need to repeat the melody.
|
|
||||||
}
|
|
|
@ -1,502 +0,0 @@
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
|
||||||
Version 2.1, February 1999
|
|
||||||
|
|
||||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
[This is the first released version of the Lesser GPL. It also counts
|
|
||||||
as the successor of the GNU Library Public License, version 2, hence
|
|
||||||
the version number 2.1.]
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
|
||||||
Licenses are intended to guarantee your freedom to share and change
|
|
||||||
free software--to make sure the software is free for all its users.
|
|
||||||
|
|
||||||
This license, the Lesser General Public License, applies to some
|
|
||||||
specially designated software packages--typically libraries--of the
|
|
||||||
Free Software Foundation and other authors who decide to use it. You
|
|
||||||
can use it too, but we suggest you first think carefully about whether
|
|
||||||
this license or the ordinary General Public License is the better
|
|
||||||
strategy to use in any particular case, based on the explanations below.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom of use,
|
|
||||||
not price. Our General Public Licenses are designed to make sure that
|
|
||||||
you have the freedom to distribute copies of free software (and charge
|
|
||||||
for this service if you wish); that you receive source code or can get
|
|
||||||
it if you want it; that you can change the software and use pieces of
|
|
||||||
it in new free programs; and that you are informed that you can do
|
|
||||||
these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
|
||||||
distributors to deny you these rights or to ask you to surrender these
|
|
||||||
rights. These restrictions translate to certain responsibilities for
|
|
||||||
you if you distribute copies of the library or if you modify it.
|
|
||||||
|
|
||||||
For example, if you distribute copies of the library, whether gratis
|
|
||||||
or for a fee, you must give the recipients all the rights that we gave
|
|
||||||
you. You must make sure that they, too, receive or can get the source
|
|
||||||
code. If you link other code with the library, you must provide
|
|
||||||
complete object files to the recipients, so that they can relink them
|
|
||||||
with the library after making changes to the library and recompiling
|
|
||||||
it. And you must show them these terms so they know their rights.
|
|
||||||
|
|
||||||
We protect your rights with a two-step method: (1) we copyright the
|
|
||||||
library, and (2) we offer you this license, which gives you legal
|
|
||||||
permission to copy, distribute and/or modify the library.
|
|
||||||
|
|
||||||
To protect each distributor, we want to make it very clear that
|
|
||||||
there is no warranty for the free library. Also, if the library is
|
|
||||||
modified by someone else and passed on, the recipients should know
|
|
||||||
that what they have is not the original version, so that the original
|
|
||||||
author's reputation will not be affected by problems that might be
|
|
||||||
introduced by others.
|
|
||||||
|
|
||||||
Finally, software patents pose a constant threat to the existence of
|
|
||||||
any free program. We wish to make sure that a company cannot
|
|
||||||
effectively restrict the users of a free program by obtaining a
|
|
||||||
restrictive license from a patent holder. Therefore, we insist that
|
|
||||||
any patent license obtained for a version of the library must be
|
|
||||||
consistent with the full freedom of use specified in this license.
|
|
||||||
|
|
||||||
Most GNU software, including some libraries, is covered by the
|
|
||||||
ordinary GNU General Public License. This license, the GNU Lesser
|
|
||||||
General Public License, applies to certain designated libraries, and
|
|
||||||
is quite different from the ordinary General Public License. We use
|
|
||||||
this license for certain libraries in order to permit linking those
|
|
||||||
libraries into non-free programs.
|
|
||||||
|
|
||||||
When a program is linked with a library, whether statically or using
|
|
||||||
a shared library, the combination of the two is legally speaking a
|
|
||||||
combined work, a derivative of the original library. The ordinary
|
|
||||||
General Public License therefore permits such linking only if the
|
|
||||||
entire combination fits its criteria of freedom. The Lesser General
|
|
||||||
Public License permits more lax criteria for linking other code with
|
|
||||||
the library.
|
|
||||||
|
|
||||||
We call this license the "Lesser" General Public License because it
|
|
||||||
does Less to protect the user's freedom than the ordinary General
|
|
||||||
Public License. It also provides other free software developers Less
|
|
||||||
of an advantage over competing non-free programs. These disadvantages
|
|
||||||
are the reason we use the ordinary General Public License for many
|
|
||||||
libraries. However, the Lesser license provides advantages in certain
|
|
||||||
special circumstances.
|
|
||||||
|
|
||||||
For example, on rare occasions, there may be a special need to
|
|
||||||
encourage the widest possible use of a certain library, so that it becomes
|
|
||||||
a de-facto standard. To achieve this, non-free programs must be
|
|
||||||
allowed to use the library. A more frequent case is that a free
|
|
||||||
library does the same job as widely used non-free libraries. In this
|
|
||||||
case, there is little to gain by limiting the free library to free
|
|
||||||
software only, so we use the Lesser General Public License.
|
|
||||||
|
|
||||||
In other cases, permission to use a particular library in non-free
|
|
||||||
programs enables a greater number of people to use a large body of
|
|
||||||
free software. For example, permission to use the GNU C Library in
|
|
||||||
non-free programs enables many more people to use the whole GNU
|
|
||||||
operating system, as well as its variant, the GNU/Linux operating
|
|
||||||
system.
|
|
||||||
|
|
||||||
Although the Lesser General Public License is Less protective of the
|
|
||||||
users' freedom, it does ensure that the user of a program that is
|
|
||||||
linked with the Library has the freedom and the wherewithal to run
|
|
||||||
that program using a modified version of the Library.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow. Pay close attention to the difference between a
|
|
||||||
"work based on the library" and a "work that uses the library". The
|
|
||||||
former contains code derived from the library, whereas the latter must
|
|
||||||
be combined with the library in order to run.
|
|
||||||
|
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. This License Agreement applies to any software library or other
|
|
||||||
program which contains a notice placed by the copyright holder or
|
|
||||||
other authorized party saying it may be distributed under the terms of
|
|
||||||
this Lesser General Public License (also called "this License").
|
|
||||||
Each licensee is addressed as "you".
|
|
||||||
|
|
||||||
A "library" means a collection of software functions and/or data
|
|
||||||
prepared so as to be conveniently linked with application programs
|
|
||||||
(which use some of those functions and data) to form executables.
|
|
||||||
|
|
||||||
The "Library", below, refers to any such software library or work
|
|
||||||
which has been distributed under these terms. A "work based on the
|
|
||||||
Library" means either the Library or any derivative work under
|
|
||||||
copyright law: that is to say, a work containing the Library or a
|
|
||||||
portion of it, either verbatim or with modifications and/or translated
|
|
||||||
straightforwardly into another language. (Hereinafter, translation is
|
|
||||||
included without limitation in the term "modification".)
|
|
||||||
|
|
||||||
"Source code" for a work means the preferred form of the work for
|
|
||||||
making modifications to it. For a library, complete source code means
|
|
||||||
all the source code for all modules it contains, plus any associated
|
|
||||||
interface definition files, plus the scripts used to control compilation
|
|
||||||
and installation of the library.
|
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
|
||||||
covered by this License; they are outside its scope. The act of
|
|
||||||
running a program using the Library is not restricted, and output from
|
|
||||||
such a program is covered only if its contents constitute a work based
|
|
||||||
on the Library (independent of the use of the Library in a tool for
|
|
||||||
writing it). Whether that is true depends on what the Library does
|
|
||||||
and what the program that uses the Library does.
|
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Library's
|
|
||||||
complete source code as you receive it, in any medium, provided that
|
|
||||||
you conspicuously and appropriately publish on each copy an
|
|
||||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
|
||||||
all the notices that refer to this License and to the absence of any
|
|
||||||
warranty; and distribute a copy of this License along with the
|
|
||||||
Library.
|
|
||||||
|
|
||||||
You may charge a fee for the physical act of transferring a copy,
|
|
||||||
and you may at your option offer warranty protection in exchange for a
|
|
||||||
fee.
|
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Library or any portion
|
|
||||||
of it, thus forming a work based on the Library, and copy and
|
|
||||||
distribute such modifications or work under the terms of Section 1
|
|
||||||
above, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The modified work must itself be a software library.
|
|
||||||
|
|
||||||
b) You must cause the files modified to carry prominent notices
|
|
||||||
stating that you changed the files and the date of any change.
|
|
||||||
|
|
||||||
c) You must cause the whole of the work to be licensed at no
|
|
||||||
charge to all third parties under the terms of this License.
|
|
||||||
|
|
||||||
d) If a facility in the modified Library refers to a function or a
|
|
||||||
table of data to be supplied by an application program that uses
|
|
||||||
the facility, other than as an argument passed when the facility
|
|
||||||
is invoked, then you must make a good faith effort to ensure that,
|
|
||||||
in the event an application does not supply such function or
|
|
||||||
table, the facility still operates, and performs whatever part of
|
|
||||||
its purpose remains meaningful.
|
|
||||||
|
|
||||||
(For example, a function in a library to compute square roots has
|
|
||||||
a purpose that is entirely well-defined independent of the
|
|
||||||
application. Therefore, Subsection 2d requires that any
|
|
||||||
application-supplied function or table used by this function must
|
|
||||||
be optional: if the application does not supply it, the square
|
|
||||||
root function must still compute square roots.)
|
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
|
||||||
identifiable sections of that work are not derived from the Library,
|
|
||||||
and can be reasonably considered independent and separate works in
|
|
||||||
themselves, then this License, and its terms, do not apply to those
|
|
||||||
sections when you distribute them as separate works. But when you
|
|
||||||
distribute the same sections as part of a whole which is a work based
|
|
||||||
on the Library, the distribution of the whole must be on the terms of
|
|
||||||
this License, whose permissions for other licensees extend to the
|
|
||||||
entire whole, and thus to each and every part regardless of who wrote
|
|
||||||
it.
|
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
|
||||||
exercise the right to control the distribution of derivative or
|
|
||||||
collective works based on the Library.
|
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Library
|
|
||||||
with the Library (or with a work based on the Library) on a volume of
|
|
||||||
a storage or distribution medium does not bring the other work under
|
|
||||||
the scope of this License.
|
|
||||||
|
|
||||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
|
||||||
License instead of this License to a given copy of the Library. To do
|
|
||||||
this, you must alter all the notices that refer to this License, so
|
|
||||||
that they refer to the ordinary GNU General Public License, version 2,
|
|
||||||
instead of to this License. (If a newer version than version 2 of the
|
|
||||||
ordinary GNU General Public License has appeared, then you can specify
|
|
||||||
that version instead if you wish.) Do not make any other change in
|
|
||||||
these notices.
|
|
||||||
|
|
||||||
Once this change is made in a given copy, it is irreversible for
|
|
||||||
that copy, so the ordinary GNU General Public License applies to all
|
|
||||||
subsequent copies and derivative works made from that copy.
|
|
||||||
|
|
||||||
This option is useful when you wish to copy part of the code of
|
|
||||||
the Library into a program that is not a library.
|
|
||||||
|
|
||||||
4. You may copy and distribute the Library (or a portion or
|
|
||||||
derivative of it, under Section 2) in object code or executable form
|
|
||||||
under the terms of Sections 1 and 2 above provided that you accompany
|
|
||||||
it with the complete corresponding machine-readable source code, which
|
|
||||||
must be distributed under the terms of Sections 1 and 2 above on a
|
|
||||||
medium customarily used for software interchange.
|
|
||||||
|
|
||||||
If distribution of object code is made by offering access to copy
|
|
||||||
from a designated place, then offering equivalent access to copy the
|
|
||||||
source code from the same place satisfies the requirement to
|
|
||||||
distribute the source code, even though third parties are not
|
|
||||||
compelled to copy the source along with the object code.
|
|
||||||
|
|
||||||
5. A program that contains no derivative of any portion of the
|
|
||||||
Library, but is designed to work with the Library by being compiled or
|
|
||||||
linked with it, is called a "work that uses the Library". Such a
|
|
||||||
work, in isolation, is not a derivative work of the Library, and
|
|
||||||
therefore falls outside the scope of this License.
|
|
||||||
|
|
||||||
However, linking a "work that uses the Library" with the Library
|
|
||||||
creates an executable that is a derivative of the Library (because it
|
|
||||||
contains portions of the Library), rather than a "work that uses the
|
|
||||||
library". The executable is therefore covered by this License.
|
|
||||||
Section 6 states terms for distribution of such executables.
|
|
||||||
|
|
||||||
When a "work that uses the Library" uses material from a header file
|
|
||||||
that is part of the Library, the object code for the work may be a
|
|
||||||
derivative work of the Library even though the source code is not.
|
|
||||||
Whether this is true is especially significant if the work can be
|
|
||||||
linked without the Library, or if the work is itself a library. The
|
|
||||||
threshold for this to be true is not precisely defined by law.
|
|
||||||
|
|
||||||
If such an object file uses only numerical parameters, data
|
|
||||||
structure layouts and accessors, and small macros and small inline
|
|
||||||
functions (ten lines or less in length), then the use of the object
|
|
||||||
file is unrestricted, regardless of whether it is legally a derivative
|
|
||||||
work. (Executables containing this object code plus portions of the
|
|
||||||
Library will still fall under Section 6.)
|
|
||||||
|
|
||||||
Otherwise, if the work is a derivative of the Library, you may
|
|
||||||
distribute the object code for the work under the terms of Section 6.
|
|
||||||
Any executables containing that work also fall under Section 6,
|
|
||||||
whether or not they are linked directly with the Library itself.
|
|
||||||
|
|
||||||
6. As an exception to the Sections above, you may also combine or
|
|
||||||
link a "work that uses the Library" with the Library to produce a
|
|
||||||
work containing portions of the Library, and distribute that work
|
|
||||||
under terms of your choice, provided that the terms permit
|
|
||||||
modification of the work for the customer's own use and reverse
|
|
||||||
engineering for debugging such modifications.
|
|
||||||
|
|
||||||
You must give prominent notice with each copy of the work that the
|
|
||||||
Library is used in it and that the Library and its use are covered by
|
|
||||||
this License. You must supply a copy of this License. If the work
|
|
||||||
during execution displays copyright notices, you must include the
|
|
||||||
copyright notice for the Library among them, as well as a reference
|
|
||||||
directing the user to the copy of this License. Also, you must do one
|
|
||||||
of these things:
|
|
||||||
|
|
||||||
a) Accompany the work with the complete corresponding
|
|
||||||
machine-readable source code for the Library including whatever
|
|
||||||
changes were used in the work (which must be distributed under
|
|
||||||
Sections 1 and 2 above); and, if the work is an executable linked
|
|
||||||
with the Library, with the complete machine-readable "work that
|
|
||||||
uses the Library", as object code and/or source code, so that the
|
|
||||||
user can modify the Library and then relink to produce a modified
|
|
||||||
executable containing the modified Library. (It is understood
|
|
||||||
that the user who changes the contents of definitions files in the
|
|
||||||
Library will not necessarily be able to recompile the application
|
|
||||||
to use the modified definitions.)
|
|
||||||
|
|
||||||
b) Use a suitable shared library mechanism for linking with the
|
|
||||||
Library. A suitable mechanism is one that (1) uses at run time a
|
|
||||||
copy of the library already present on the user's computer system,
|
|
||||||
rather than copying library functions into the executable, and (2)
|
|
||||||
will operate properly with a modified version of the library, if
|
|
||||||
the user installs one, as long as the modified version is
|
|
||||||
interface-compatible with the version that the work was made with.
|
|
||||||
|
|
||||||
c) Accompany the work with a written offer, valid for at
|
|
||||||
least three years, to give the same user the materials
|
|
||||||
specified in Subsection 6a, above, for a charge no more
|
|
||||||
than the cost of performing this distribution.
|
|
||||||
|
|
||||||
d) If distribution of the work is made by offering access to copy
|
|
||||||
from a designated place, offer equivalent access to copy the above
|
|
||||||
specified materials from the same place.
|
|
||||||
|
|
||||||
e) Verify that the user has already received a copy of these
|
|
||||||
materials or that you have already sent this user a copy.
|
|
||||||
|
|
||||||
For an executable, the required form of the "work that uses the
|
|
||||||
Library" must include any data and utility programs needed for
|
|
||||||
reproducing the executable from it. However, as a special exception,
|
|
||||||
the materials to be distributed need not include anything that is
|
|
||||||
normally distributed (in either source or binary form) with the major
|
|
||||||
components (compiler, kernel, and so on) of the operating system on
|
|
||||||
which the executable runs, unless that component itself accompanies
|
|
||||||
the executable.
|
|
||||||
|
|
||||||
It may happen that this requirement contradicts the license
|
|
||||||
restrictions of other proprietary libraries that do not normally
|
|
||||||
accompany the operating system. Such a contradiction means you cannot
|
|
||||||
use both them and the Library together in an executable that you
|
|
||||||
distribute.
|
|
||||||
|
|
||||||
7. You may place library facilities that are a work based on the
|
|
||||||
Library side-by-side in a single library together with other library
|
|
||||||
facilities not covered by this License, and distribute such a combined
|
|
||||||
library, provided that the separate distribution of the work based on
|
|
||||||
the Library and of the other library facilities is otherwise
|
|
||||||
permitted, and provided that you do these two things:
|
|
||||||
|
|
||||||
a) Accompany the combined library with a copy of the same work
|
|
||||||
based on the Library, uncombined with any other library
|
|
||||||
facilities. This must be distributed under the terms of the
|
|
||||||
Sections above.
|
|
||||||
|
|
||||||
b) Give prominent notice with the combined library of the fact
|
|
||||||
that part of it is a work based on the Library, and explaining
|
|
||||||
where to find the accompanying uncombined form of the same work.
|
|
||||||
|
|
||||||
8. You may not copy, modify, sublicense, link with, or distribute
|
|
||||||
the Library except as expressly provided under this License. Any
|
|
||||||
attempt otherwise to copy, modify, sublicense, link with, or
|
|
||||||
distribute the Library is void, and will automatically terminate your
|
|
||||||
rights under this License. However, parties who have received copies,
|
|
||||||
or rights, from you under this License will not have their licenses
|
|
||||||
terminated so long as such parties remain in full compliance.
|
|
||||||
|
|
||||||
9. You are not required to accept this License, since you have not
|
|
||||||
signed it. However, nothing else grants you permission to modify or
|
|
||||||
distribute the Library or its derivative works. These actions are
|
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
|
||||||
modifying or distributing the Library (or any work based on the
|
|
||||||
Library), you indicate your acceptance of this License to do so, and
|
|
||||||
all its terms and conditions for copying, distributing or modifying
|
|
||||||
the Library or works based on it.
|
|
||||||
|
|
||||||
10. Each time you redistribute the Library (or any work based on the
|
|
||||||
Library), the recipient automatically receives a license from the
|
|
||||||
original licensor to copy, distribute, link with or modify the Library
|
|
||||||
subject to these terms and conditions. You may not impose any further
|
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
|
||||||
You are not responsible for enforcing compliance by third parties with
|
|
||||||
this License.
|
|
||||||
|
|
||||||
11. If, as a consequence of a court judgment or allegation of patent
|
|
||||||
infringement or for any other reason (not limited to patent issues),
|
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot
|
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you
|
|
||||||
may not distribute the Library at all. For example, if a patent
|
|
||||||
license would not permit royalty-free redistribution of the Library by
|
|
||||||
all those who receive copies directly or indirectly through you, then
|
|
||||||
the only way you could satisfy both it and this License would be to
|
|
||||||
refrain entirely from distribution of the Library.
|
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under any
|
|
||||||
particular circumstance, the balance of the section is intended to apply,
|
|
||||||
and the section as a whole is intended to apply in other circumstances.
|
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
|
||||||
patents or other property right claims or to contest validity of any
|
|
||||||
such claims; this section has the sole purpose of protecting the
|
|
||||||
integrity of the free software distribution system which is
|
|
||||||
implemented by public license practices. Many people have made
|
|
||||||
generous contributions to the wide range of software distributed
|
|
||||||
through that system in reliance on consistent application of that
|
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
|
||||||
to distribute software through any other system and a licensee cannot
|
|
||||||
impose that choice.
|
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
|
||||||
be a consequence of the rest of this License.
|
|
||||||
|
|
||||||
12. If the distribution and/or use of the Library is restricted in
|
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
|
||||||
original copyright holder who places the Library under this License may add
|
|
||||||
an explicit geographical distribution limitation excluding those countries,
|
|
||||||
so that distribution is permitted only in or among countries not thus
|
|
||||||
excluded. In such case, this License incorporates the limitation as if
|
|
||||||
written in the body of this License.
|
|
||||||
|
|
||||||
13. The Free Software Foundation may publish revised and/or new
|
|
||||||
versions of the Lesser General Public License from time to time.
|
|
||||||
Such new versions will be similar in spirit to the present version,
|
|
||||||
but may differ in detail to address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Library
|
|
||||||
specifies a version number of this License which applies to it and
|
|
||||||
"any later version", you have the option of following the terms and
|
|
||||||
conditions either of that version or of any later version published by
|
|
||||||
the Free Software Foundation. If the Library does not specify a
|
|
||||||
license version number, you may choose any version ever published by
|
|
||||||
the Free Software Foundation.
|
|
||||||
|
|
||||||
14. If you wish to incorporate parts of the Library into other free
|
|
||||||
programs whose distribution conditions are incompatible with these,
|
|
||||||
write to the author to ask for permission. For software which is
|
|
||||||
copyrighted by the Free Software Foundation, write to the Free
|
|
||||||
Software Foundation; we sometimes make exceptions for this. Our
|
|
||||||
decision will be guided by the two goals of preserving the free status
|
|
||||||
of all derivatives of our free software and of promoting the sharing
|
|
||||||
and reuse of software generally.
|
|
||||||
|
|
||||||
NO WARRANTY
|
|
||||||
|
|
||||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
|
||||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
|
||||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
|
||||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
|
||||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
|
||||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
|
||||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
|
||||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
|
||||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
|
||||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
|
||||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
|
||||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
|
||||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
|
||||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
|
||||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
||||||
DAMAGES.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Libraries
|
|
||||||
|
|
||||||
If you develop a new library, and you want it to be of the greatest
|
|
||||||
possible use to the public, we recommend making it free software that
|
|
||||||
everyone can redistribute and change. You can do so by permitting
|
|
||||||
redistribution under these terms (or, alternatively, under the terms of the
|
|
||||||
ordinary General Public License).
|
|
||||||
|
|
||||||
To apply these terms, attach the following notices to the library. It is
|
|
||||||
safest to attach them to the start of each source file to most effectively
|
|
||||||
convey the exclusion of warranty; and each file should have at least the
|
|
||||||
"copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the library's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it 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 (at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with this library; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or your
|
|
||||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
|
||||||
necessary. Here is a sample; alter the names:
|
|
||||||
|
|
||||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
|
||||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
|
||||||
|
|
||||||
<signature of Ty Coon>, 1 April 1990
|
|
||||||
Ty Coon, President of Vice
|
|
||||||
|
|
||||||
That's all there is to it!
|
|
|
@ -1,23 +0,0 @@
|
||||||
# How to compile a Deb package
|
|
||||||
|
|
||||||
Use these instructions to build your own Deb package from your local sources.
|
|
||||||
For the latest official packages go to [Debian](http://packages.debian.org/arduino-mk)
|
|
||||||
or [Ubuntu](https://launchpad.net/ubuntu/+source/arduino-mk) or use apt.
|
|
||||||
|
|
||||||
First install the dependencies as root:
|
|
||||||
|
|
||||||
apt-get build-dep arduino-mk
|
|
||||||
apt-get install arduino-core build-essential dpkg-dev fakeroot devscripts
|
|
||||||
|
|
||||||
Fetch the Debian source:
|
|
||||||
|
|
||||||
apt-get source arduino-mk
|
|
||||||
|
|
||||||
Make any local changes to want within the arduino-mk-* directory and update the package version:
|
|
||||||
|
|
||||||
cd arduino-mk-*
|
|
||||||
dch -i
|
|
||||||
|
|
||||||
Then compile. This will create a binary Deb:
|
|
||||||
|
|
||||||
dpkg-buildpackage -b
|
|
|
@ -1,45 +0,0 @@
|
||||||
# How to compile an RPM
|
|
||||||
|
|
||||||
First install the dependencies as root:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
yum install arduino-core rpm-build
|
|
||||||
|
|
||||||
# or on Fedora 22+
|
|
||||||
|
|
||||||
dnf install arduino-core rpmdevtools
|
|
||||||
```
|
|
||||||
|
|
||||||
From the top-level Arduino-Makefile directory you've checked out of github, run the following (as unprivileged user) to create a compressed tarball using the naming conventions required by rpmbuild:
|
|
||||||
|
|
||||||
git archive HEAD --prefix=arduino-mk-1.5/ -o ../arduino-mk-1.5.tar.gz
|
|
||||||
|
|
||||||
If you don't already have a rpmbuild setup (e.g. you've not installed the SRPM) you will need to create the directories:
|
|
||||||
|
|
||||||
mkdir -p ~/rpmbuild/{SOURCES,SPECS}
|
|
||||||
|
|
||||||
Then copy the tarball and specfile into those directories:
|
|
||||||
|
|
||||||
cp ../arduino-mk-1.5.tar.gz ~/rpmbuild/SOURCES/
|
|
||||||
cp packaging/fedora/arduino-mk.spec ~/rpmbuild/SPECS/
|
|
||||||
|
|
||||||
Then compile. This will create a binary and source RPM:
|
|
||||||
|
|
||||||
cd ~/rpmbuild/SPECS/
|
|
||||||
rpmbuild -ba arduino-mk.spec
|
|
||||||
|
|
||||||
Fedora's AVR compilers use ccache, so you may have to override some of the paths to the AVR tools in your sketch's Makefile, for example:
|
|
||||||
|
|
||||||
```Makefile
|
|
||||||
OVERRIDE_EXECUTABLES = 1
|
|
||||||
CC = /usr/lib64/ccache/$(CC_NAME)
|
|
||||||
CXX = /usr/lib64/ccache/$(CXX_NAME)
|
|
||||||
AS = /usr/bin/$(AS_NAME)
|
|
||||||
OBJCOPY = /usr/bin/$(OBJCOPY_NAME)
|
|
||||||
OBJDUMP = /usr/bin/$(OBJDUMP_NAME)
|
|
||||||
AR = /usr/bin/$(AR_NAME)
|
|
||||||
SIZE = /usr/bin/$(SIZE_NAME)
|
|
||||||
NM = /usr/bin/$(NM_NAME)
|
|
||||||
```
|
|
||||||
|
|
||||||
Or if you don't want to use ccache, then just set ```AVR_TOOLS_PATH=/usr``` and none of the above will be necessary.
|
|
|
@ -1,70 +0,0 @@
|
||||||
Name: arduino-mk
|
|
||||||
Version: 1.5.2
|
|
||||||
Release: 1%{dist}
|
|
||||||
Summary: Program your Arduino from the command line
|
|
||||||
Packager: Simon John <git@the-jedi.co.uk>
|
|
||||||
URL: https://github.com/sudar/Arduino-Makefile
|
|
||||||
Source: %{name}-%{version}.tar.gz
|
|
||||||
Group: Development/Tools
|
|
||||||
License: LGPLv2+
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
||||||
BuildArch: noarch
|
|
||||||
Requires: arduino-core pyserial
|
|
||||||
BuildRequires: arduino-core
|
|
||||||
|
|
||||||
%description
|
|
||||||
Arduino is an open-source electronics prototyping platform based on
|
|
||||||
flexible, easy-to-use hardware and software. It's intended for artists,
|
|
||||||
designers, hobbyists, and anyone interested in creating interactive
|
|
||||||
objects or environments.
|
|
||||||
|
|
||||||
This package will install a Makefile to allow for CLI programming of the
|
|
||||||
Arduino platform.
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%setup -q
|
|
||||||
|
|
||||||
%install
|
|
||||||
mkdir -p %{buildroot}/%{_datadir}/arduino
|
|
||||||
mkdir -p %{buildroot}/%{_bindir}
|
|
||||||
mkdir -p %{buildroot}/%{_mandir}/man1
|
|
||||||
mkdir -p %{buildroot}/%{_docdir}/%{name}/examples
|
|
||||||
install -m 755 -d %{buildroot}/%{_docdir}/%{name}
|
|
||||||
install -m 755 -d %{buildroot}/%{_docdir}/%{name}/examples
|
|
||||||
for dir in `find examples -type d` ; do install -m 755 -d %{buildroot}/%{_docdir}/%{name}/$dir ; done
|
|
||||||
for file in `find examples -type f ! -name .gitignore` ; do install -m 644 $file %{buildroot}/%{_docdir}/%{name}/$file ; done
|
|
||||||
install -m 644 *.mk arduino-mk-vars.md %{buildroot}/%{_datadir}/arduino
|
|
||||||
install -m 644 licence.txt %{buildroot}/%{_docdir}/%{name}
|
|
||||||
install -m 755 bin/ard-reset-arduino %{buildroot}/%{_bindir}/ard-reset-arduino
|
|
||||||
install -m 644 ard-reset-arduino.1 %{buildroot}/%{_mandir}/man1
|
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf %{buildroot}
|
|
||||||
|
|
||||||
%files
|
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_bindir}/ard-reset-arduino
|
|
||||||
%{_mandir}/man1/ard-reset-arduino.1*
|
|
||||||
%{_datadir}/arduino/*.mk
|
|
||||||
%{_datadir}/arduino/arduino-mk-vars.md
|
|
||||||
%doc %{_docdir}/%{name}/licence.txt
|
|
||||||
%docdir %{_docdir}/%{name}/examples
|
|
||||||
%{_docdir}/%{name}/examples
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Sat Apr 12 2014 Simon John <git@the-jedi.co.uk>
|
|
||||||
- Put manpage back.
|
|
||||||
* Fri Apr 04 2014 Simon John <git@the-jedi.co.uk>
|
|
||||||
- Removed BuildRequires of python3/pyserial.
|
|
||||||
* Wed Apr 02 2014 Simon John <git@the-jedi.co.uk>
|
|
||||||
- Added BuildRequires of python3-pyserial. Need to look into Requires.
|
|
||||||
* Mon Mar 24 2014 Simon John <git@the-jedi.co.uk>
|
|
||||||
- Replaced perl/help2man with pyserial for reset script.
|
|
||||||
* Tue Feb 04 2014 Simon John <git@the-jedi.co.uk>
|
|
||||||
- Added arduino-mk-vars.md to the files to be installed/packaged.
|
|
||||||
* Sat Feb 01 2014 Simon John <git@the-jedi.co.uk>
|
|
||||||
- Updated version.
|
|
||||||
* Mon Jan 13 2014 Simon John <git@the-jedi.co.uk>
|
|
||||||
- Removed arduino-mk subdirectory
|
|
||||||
* Mon Dec 30 2013 Simon John <git@the-jedi.co.uk>
|
|
||||||
- Initial release.
|
|
|
@ -1,9 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
pushd $SCRIPTS_DIR/..
|
|
||||||
|
|
||||||
source $SCRIPTS_DIR/bootstrap/chipkit.sh
|
|
||||||
source $SCRIPTS_DIR/bootstrap/arduino.sh
|
|
|
@ -1,44 +0,0 @@
|
||||||
set -e
|
|
||||||
BOOTSTRAP_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
source $BOOTSTRAP_DIR/common.sh
|
|
||||||
|
|
||||||
echo "Installing dependencies for building for the Arduino"
|
|
||||||
|
|
||||||
if [ -z "$ARDUINO_DIR" ] || ! test -e $ARDUINO_DIR || [ $OS == "cygwin" ]; then
|
|
||||||
|
|
||||||
echo "Installing Arduino..."
|
|
||||||
|
|
||||||
ARDUINO_BASENAME="arduino-1.0.6"
|
|
||||||
if [ $OS == "cygwin" ]; then
|
|
||||||
ARDUINO_FILE="$ARDUINO_BASENAME-windows".zip
|
|
||||||
EXTRACT_COMMAND="unzip -q"
|
|
||||||
elif [ $OS == "mac" ]; then
|
|
||||||
ARDUINO_FILE="$ARDUINO_BASENAME-macosx".zip
|
|
||||||
EXTRACT_COMMAND="unzip -q"
|
|
||||||
else
|
|
||||||
ARDUINO_FILE="$ARDUINO_BASENAME-linux64".tgz
|
|
||||||
EXTRACT_COMMAND="tar -xzf"
|
|
||||||
fi
|
|
||||||
|
|
||||||
ARDUINO_URL=http://arduino.cc/download.php?f=/$ARDUINO_FILE
|
|
||||||
|
|
||||||
_pushd $DEPENDENCIES_FOLDER
|
|
||||||
if ! test -e $ARDUINO_FILE
|
|
||||||
then
|
|
||||||
echo "Downloading Arduino IDE..."
|
|
||||||
download $ARDUINO_URL $ARDUINO_FILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! test -d $ARDUINO_BASENAME
|
|
||||||
then
|
|
||||||
echo "Installing Arduino to local folder..."
|
|
||||||
$EXTRACT_COMMAND $ARDUINO_FILE
|
|
||||||
echo "Arduino installed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
_popd
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "${bldgreen}Arduino dependencies installed.$txtrst"
|
|
|
@ -1,61 +0,0 @@
|
||||||
set -e
|
|
||||||
BOOTSTRAP_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
source $BOOTSTRAP_DIR/common.sh
|
|
||||||
|
|
||||||
echo "Installing dependencies for building for the chipKIT"
|
|
||||||
|
|
||||||
|
|
||||||
if [ -z "$MPIDE_DIR" ] || ! test -e $MPIDE_DIR || [ $OS == "cygwin" ]; then
|
|
||||||
|
|
||||||
echo "Installing MPIDE..."
|
|
||||||
|
|
||||||
if [ $OS == "cygwin" ]; then
|
|
||||||
MPIDE_BASENAME="mpide-0023-windows-20130715"
|
|
||||||
MPIDE_FILE="$MPIDE_BASENAME".zip
|
|
||||||
EXTRACT_COMMAND="unzip -q"
|
|
||||||
if ! command -v unzip >/dev/null 2>&1; then
|
|
||||||
_cygwin_error "unzip"
|
|
||||||
fi
|
|
||||||
elif [ $OS == "mac" ]; then
|
|
||||||
MPIDE_BASENAME=mpide-0023-macosx-20130715
|
|
||||||
MPIDE_FILE="$MPIDE_BASENAME".dmg
|
|
||||||
else
|
|
||||||
MPIDE_BASENAME=mpide-0023-linux64-20130817-test
|
|
||||||
MPIDE_FILE="$MPIDE_BASENAME".tgz
|
|
||||||
EXTRACT_COMMAND="tar -xzf"
|
|
||||||
fi
|
|
||||||
|
|
||||||
MPIDE_URL=http://chipkit.s3.amazonaws.com/builds/$MPIDE_FILE
|
|
||||||
|
|
||||||
_pushd $DEPENDENCIES_FOLDER
|
|
||||||
if ! test -e $MPIDE_FILE
|
|
||||||
then
|
|
||||||
echo "Downloading MPIDE..."
|
|
||||||
download $MPIDE_URL $MPIDE_FILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! test -d $MPIDE_BASENAME
|
|
||||||
then
|
|
||||||
echo "Installing MPIDE to local folder..."
|
|
||||||
if [ $OS == "mac" ]; then
|
|
||||||
hdiutil attach $MPIDE_FILE
|
|
||||||
cp -R /Volumes/Mpide/Mpide.app/Contents/Resources/Java $MPIDE_BASENAME
|
|
||||||
hdiutil detach /Volumes/Mpide
|
|
||||||
else
|
|
||||||
$EXTRACT_COMMAND $MPIDE_FILE
|
|
||||||
fi
|
|
||||||
echo "MPIDE installed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $OS == "cygwin" ]; then
|
|
||||||
chmod a+x mpide/hardware/pic32/compiler/pic32-tools/bin/*
|
|
||||||
chmod a+x -R mpide/hardware/pic32/compiler/pic32-tools/pic32mx/
|
|
||||||
chmod a+x mpide/*.dll
|
|
||||||
chmod a+x mpide/hardware/tools/avr/bin/*
|
|
||||||
fi
|
|
||||||
_popd
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "${bldgreen}chipKIT dependencies installed.$txtrst"
|
|
|
@ -1,190 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
BOOTSTRAP_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
if [ -z $COMMON_SOURCED ]; then
|
|
||||||
|
|
||||||
# TODO this is kind of a hacky way of determining if root is required -
|
|
||||||
# ideally we wouuld set up a little virtualenv in the dependencies folder
|
|
||||||
SUDO_CMD=
|
|
||||||
if command -v sudo >/dev/null 2>&1; then
|
|
||||||
SUDO_CMD="sudo -E"
|
|
||||||
|
|
||||||
if [ -z $CI ] && [ -z $VAGRANT ]; then
|
|
||||||
echo "The bootstrap script needs to install a few packages to your system as an admin, and we will use the 'sudo' command - enter your password to continue"
|
|
||||||
$SUDO_CMD ls > /dev/null
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
KERNEL=`uname`
|
|
||||||
ARCH=`uname -m`
|
|
||||||
if [ ${KERNEL:0:7} == "MINGW32" ]; then
|
|
||||||
OS="windows"
|
|
||||||
elif [ ${KERNEL:0:6} == "CYGWIN" ]; then
|
|
||||||
OS="cygwin"
|
|
||||||
elif [ $KERNEL == "Darwin" ]; then
|
|
||||||
OS="mac"
|
|
||||||
else
|
|
||||||
OS="linux"
|
|
||||||
if ! command -v lsb_release >/dev/null 2>&1; then
|
|
||||||
# Arch Linux
|
|
||||||
if command -v pacman>/dev/null 2>&1; then
|
|
||||||
$SUDO_CMD pacman -S lsb-release
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
DISTRO=`lsb_release -si`
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
die() {
|
|
||||||
echo >&2 "${bldred}$@${txtrst}"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
_cygwin_error() {
|
|
||||||
echo
|
|
||||||
echo "${bldred}Missing \"$1\"${txtrst} - run the Cygwin installer again and select the base package set:"
|
|
||||||
echo " $CYGWIN_PACKAGES"
|
|
||||||
echo "After installing the packages, re-run this bootstrap script."
|
|
||||||
die
|
|
||||||
}
|
|
||||||
|
|
||||||
if ! command -v tput >/dev/null 2>&1; then
|
|
||||||
if [ $OS == "cygwin" ]; then
|
|
||||||
echo "OPTIONAL: Install the \"ncurses\" package in Cygwin to get colored shell output"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
set +e
|
|
||||||
# These exit with 1 when provisioning in a Vagrant box...?
|
|
||||||
txtrst=$(tput sgr0) # reset
|
|
||||||
bldred=${txtbld}$(tput setaf 1)
|
|
||||||
bldgreen=${txtbld}$(tput setaf 2)
|
|
||||||
set -e
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
_pushd() {
|
|
||||||
pushd $1 > /dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
_popd() {
|
|
||||||
popd > /dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
_wait() {
|
|
||||||
if [ -z $CI ] && [ -z $VAGRANT ]; then
|
|
||||||
echo "Press Enter when done"
|
|
||||||
read
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
_install() {
|
|
||||||
if [ $OS == "cygwin" ]; then
|
|
||||||
_cygwin_error $1
|
|
||||||
elif [ $OS == "mac" ]; then
|
|
||||||
# brew exists with 1 if it's already installed
|
|
||||||
set +e
|
|
||||||
brew install $1
|
|
||||||
set -e
|
|
||||||
else
|
|
||||||
if [ -z $DISTRO ]; then
|
|
||||||
echo
|
|
||||||
echo "Missing $1 - install it using your distro's package manager or build from source"
|
|
||||||
_wait
|
|
||||||
else
|
|
||||||
if [ $DISTRO == "arch" ]; then
|
|
||||||
$SUDO_CMD pacman -S $1
|
|
||||||
elif [ $DISTRO == "Ubuntu" ]; then
|
|
||||||
$SUDO_CMD apt-get update -qq
|
|
||||||
$SUDO_CMD apt-get install $1 -y
|
|
||||||
else
|
|
||||||
echo
|
|
||||||
echo "Missing $1 - install it using your distro's package manager or build from source"
|
|
||||||
_wait
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
download() {
|
|
||||||
url=$1
|
|
||||||
filename=$2
|
|
||||||
curl $url -L -o $filename
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ `id -u` == 0 ]; then
|
|
||||||
die "Error: running as root - don't use 'sudo' with this script"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! command -v unzip >/dev/null 2>&1; then
|
|
||||||
_install "unzip"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! command -v curl >/dev/null 2>&1; then
|
|
||||||
if [ $OS == "cygwin" ]; then
|
|
||||||
_cygwin_error "curl"
|
|
||||||
else
|
|
||||||
_install curl
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Storing all downloaded dependencies in the \"dependencies\" folder"
|
|
||||||
|
|
||||||
DEPENDENCIES_FOLDER="/var/tmp/Arduino-Makefile-testing-dependencies"
|
|
||||||
mkdir -p $DEPENDENCIES_FOLDER
|
|
||||||
|
|
||||||
if ! command -v make >/dev/null 2>&1; then
|
|
||||||
if [ $OS == "cygwin" ]; then
|
|
||||||
_cygwin_error "make"
|
|
||||||
elif [ $OS == "mac" ]; then
|
|
||||||
die "Missing 'make' - install the Xcode CLI tools"
|
|
||||||
else
|
|
||||||
if [ $DISTRO == "arch" ]; then
|
|
||||||
_install "base-devel"
|
|
||||||
elif [ $DISTRO == "Ubuntu" ]; then
|
|
||||||
_install "build-essential"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $DISTRO == "Ubuntu" ] && [ $ARCH == "x86_64" ]; then
|
|
||||||
_install "libc6-i386"
|
|
||||||
_install "lib32gcc1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! command -v g++ >/dev/null 2>&1; then
|
|
||||||
if [ $DISTRO == "Ubuntu" ]; then
|
|
||||||
_install "g++"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! command -v python >/dev/null 2>&1; then
|
|
||||||
echo "Installing Python..."
|
|
||||||
_install "python"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! command -v pip >/dev/null 2>&1; then
|
|
||||||
echo "Installing Pip..."
|
|
||||||
if ! command -v easy_install >/dev/null 2>&1; then
|
|
||||||
_install "python-setuptools"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! command -v easy_install >/dev/null 2>&1; then
|
|
||||||
die "easy_install not available, can't install pip"
|
|
||||||
fi
|
|
||||||
|
|
||||||
$SUDO_CMD easy_install pip
|
|
||||||
fi
|
|
||||||
|
|
||||||
PIP_SUDO_CMD=
|
|
||||||
if [ -z $VIRTUAL_ENV ]; then
|
|
||||||
# Only use sudo if the user doesn't have an active virtualenv
|
|
||||||
PIP_SUDO_CMD=$SUDO_CMD
|
|
||||||
fi
|
|
||||||
|
|
||||||
$PIP_SUDO_CMD pip install --src dependencies --pre -Ur $BOOTSTRAP_DIR/pip-requirements.txt
|
|
||||||
|
|
||||||
COMMON_SOURCED=1
|
|
||||||
fi
|
|
|
@ -1 +0,0 @@
|
||||||
pyserial==2.7
|
|
|
@ -1,67 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
TESTS_DIR=examples
|
|
||||||
|
|
||||||
failures=()
|
|
||||||
|
|
||||||
# These examples cannot be tested easily at the moment as they require
|
|
||||||
# alternate cores. The MakefileExample doesn't actually contain any source code
|
|
||||||
# to compile.
|
|
||||||
NON_TESTABLE_EXAMPLES=(ATtinyBlink MakefileExample TinySoftWareSerial BlinkTeensy BlinkNetworkRPi BlinkInAVRC)
|
|
||||||
|
|
||||||
for dir in $TESTS_DIR/*/
|
|
||||||
do
|
|
||||||
dir=${dir%*/}
|
|
||||||
example=${dir##*/}
|
|
||||||
example_is_testable=true
|
|
||||||
for non_testable_example in "${NON_TESTABLE_EXAMPLES[@]}"; do
|
|
||||||
if [[ $example == $non_testable_example ]]; then
|
|
||||||
example_is_testable=false
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if ! $example_is_testable; then
|
|
||||||
echo "Skipping non-testable example $example..."
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
pushd $dir
|
|
||||||
echo "Compiling $example..."
|
|
||||||
make_output=`make clean TEST=1`
|
|
||||||
make_output=`make TEST=1`
|
|
||||||
if [[ $? -ne 0 ]]; then
|
|
||||||
failures+=("$example")
|
|
||||||
echo "Example $example failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
make_output=`make disasm TEST=1`
|
|
||||||
if [[ $? -ne 0 ]]; then
|
|
||||||
failures+=("$example disasm")
|
|
||||||
echo "Example $example disasm failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
make_output=`make generate_assembly TEST=1`
|
|
||||||
if [[ $? -ne 0 ]]; then
|
|
||||||
failures+=("$example generate_assembly")
|
|
||||||
echo "Example $example generate_assembly failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
make_output=`make symbol_sizes TEST=1`
|
|
||||||
if [[ $? -ne 0 ]]; then
|
|
||||||
failures+=("$example symbol_sizes")
|
|
||||||
echo "Example $example symbol_sizes failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
popd
|
|
||||||
done
|
|
||||||
|
|
||||||
for failure in "${failures[@]}"; do
|
|
||||||
echo "Example $failure failed"
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ ${#failures[@]} -eq 0 ]]; then
|
|
||||||
echo "All tests passed."
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
|
@ -66,9 +66,11 @@ void loop()
|
||||||
switch (lettre) {
|
switch (lettre) {
|
||||||
case 'L': // Ouverture loquet
|
case 'L': // Ouverture loquet
|
||||||
servoLoquet.write(100);
|
servoLoquet.write(100);
|
||||||
|
delay(500);
|
||||||
break;
|
break;
|
||||||
case 'F': // Fermeture loquet
|
case 'F': // Fermeture loquet
|
||||||
servoLoquet.write(0);
|
servoLoquet.write(0);
|
||||||
|
delay(500);
|
||||||
break;
|
break;
|
||||||
case 'A': // Position attente balle
|
case 'A': // Position attente balle
|
||||||
servoPositionBalle.write(70);
|
servoPositionBalle.write(70);
|
||||||
|
@ -120,3 +122,4 @@ void loop()
|
||||||
Serial.write(lettre);
|
Serial.write(lettre);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ void configureActionneurs()
|
||||||
{
|
{
|
||||||
pthread_mutex_init(&receptionActionMutex, NULL);
|
pthread_mutex_init(&receptionActionMutex, NULL);
|
||||||
pthread_cond_init(&receptionActionCond, NULL);
|
pthread_cond_init(&receptionActionCond, NULL);
|
||||||
|
resetActionneurs();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setLoquet(bool state)
|
void setLoquet(bool state)
|
||||||
|
@ -66,8 +67,10 @@ void setPropulsion(bool state)
|
||||||
|
|
||||||
void resetActionneurs()
|
void resetActionneurs()
|
||||||
{
|
{
|
||||||
setPropulsion(false);
|
setLoquet(false);
|
||||||
barilletReset();
|
barilletReset();
|
||||||
|
setPositionBalle(attente);
|
||||||
|
setPropulsion(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void stopActionneurs()
|
void stopActionneurs()
|
||||||
|
|
|
@ -159,15 +159,15 @@ void runDiagnostics()
|
||||||
i = 3;
|
i = 3;
|
||||||
execDiagnostic("Mot+Cod R AR", diagCodeuse, &i);
|
execDiagnostic("Mot+Cod R AR", diagCodeuse, &i);
|
||||||
|
|
||||||
execDiagnostic("Ouverture loquet", diagJustRun, &diagSetLoquetOuvert);
|
|
||||||
execDiagnostic("Fermeture loquet", diagJustRun, &diagSetLoquetFerme);
|
execDiagnostic("Fermeture loquet", diagJustRun, &diagSetLoquetFerme);
|
||||||
|
execDiagnostic("Ouverture loquet", diagJustRun, &diagSetLoquetOuvert);
|
||||||
execDiagnostic("Reset barillet", diagJustRun, &barilletReset);
|
execDiagnostic("Reset barillet", diagJustRun, &barilletReset);
|
||||||
execDiagnostic("T+1 barillet", diagJustRun, &barilletSuivant);
|
execDiagnostic("T+1 barillet", diagJustRun, &barilletSuivant);
|
||||||
execDiagnostic("T+2 barillet", diagJustRun, &barilletSkip);
|
execDiagnostic("T+2 barillet", diagJustRun, &barilletSkip);
|
||||||
execDiagnostic("Pousser balle", diagJustRun, &pousserBalle);
|
execDiagnostic("Pousser balle", diagJustRun, &pousserBalle);
|
||||||
execDiagnostic("Pos. attente", diagJustRun, &diagSetPositionBalleAttente);
|
|
||||||
execDiagnostic("Pos. ejection", diagJustRun, &diagSetPositionBalleEjection);
|
execDiagnostic("Pos. ejection", diagJustRun, &diagSetPositionBalleEjection);
|
||||||
execDiagnostic("Pos. evacuation", diagJustRun, &diagSetPositionBalleEvacuation);
|
execDiagnostic("Pos. evacuation", diagJustRun, &diagSetPositionBalleEvacuation);
|
||||||
execDiagnostic("Propulsion off", diagJustRun, &diagSetPropulsionOn);
|
execDiagnostic("Pos. attente", diagJustRun, &diagSetPositionBalleAttente);
|
||||||
execDiagnostic("Propulsion on", diagJustRun, &diagSetPropulsionOff);
|
execDiagnostic("Propulsion on", diagJustRun, &diagSetPropulsionOff);
|
||||||
|
execDiagnostic("Propulsion off", diagJustRun, &diagSetPropulsionOn);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
printf "Starting hardware handling: "
|
printf "Starting hardware handling: "
|
||||||
|
modprobe cdc_acm # Arduino
|
||||||
modprobe pl2303 # USB↔Serial cable
|
modprobe pl2303 # USB↔Serial cable
|
||||||
# I2C
|
# I2C
|
||||||
modprobe i2c-bcm2708 # RPi2
|
modprobe i2c-bcm2708 # RPi2
|
||||||
|
|
Loading…
Reference in a new issue