Skip to content

Commit

Permalink
Initial import
Browse files Browse the repository at this point in the history
Signed-off-by: Thibaut VIARD <aethaniel@sam-geek.org>
  • Loading branch information
aethaniel committed Jan 8, 2016
1 parent d23c9dd commit 92a5d16
Show file tree
Hide file tree
Showing 1,040 changed files with 290,402 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.h linguist-language=C
76 changes: 76 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#
# ATMEL CMSIS headers Arduino IDE Module makefile.
#
# Copyright (c) 2015 Atmel Corp./Thibaut VIARD. All right reserved.
#
# 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 St, Fifth Floor, Boston, MA 02110-1301 USA
#

SHELL = /bin/sh

.SUFFIXES: .tar.bz2

ROOT_PATH := .

PACKAGE_NAME := $(basename $(notdir $(CURDIR)))
PACKAGE_VERSION := 1.0.0

# -----------------------------------------------------------------------------
# packaging specific
PACKAGE_FOLDER := module

ifeq (postpackaging,$(findstring $(MAKECMDGOALS),postpackaging))
PACKAGE_FILENAME=$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.bz2
PACKAGE_CHKSUM := $(firstword $(shell sha256sum "$(PACKAGE_FILENAME)"))
PACKAGE_SIZE := $(firstword $(shell wc -c "$(PACKAGE_FILENAME)"))
endif

# end of packaging specific
# -----------------------------------------------------------------------------

.PHONY: all clean print_info postpackaging

# Arduino module packaging:
# - exclude version control system files, here git files and folders .git, .gitattributes and .gitignore
# - exclude 'extras' folder
all: clean print_info
@echo ----------------------------------------------------------
@echo "Packaging module."
tar --transform "s|module|$(PACKAGE_NAME)-$(PACKAGE_VERSION)|g" --exclude=.gitattributes --exclude=.travis.yml --exclude-vcs -cjf "$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.bz2" "$(PACKAGE_FOLDER)"
$(MAKE) --no-builtin-rules postpackaging -C .
@echo ----------------------------------------------------------

clean:
@echo ----------------------------------------------------------
@echo Cleanup
-$(RM) $(PACKAGE_NAME)-*.tar.bz2 package_$(PACKAGE_NAME)_*.json test_package_$(PACKAGE_NAME)_*.json
@echo ----------------------------------------------------------

print_info:
@echo ----------------------------------------------------------
@echo Building $(PACKAGE_NAME) using
@echo "CURDIR = $(CURDIR)"
@echo "OS = $(OS)"
@echo "SHELL = $(SHELL)"
@echo "PACKAGE_VERSION = $(PACKAGE_VERSION)"
@echo "PACKAGE_NAME = $(PACKAGE_NAME)"

postpackaging:
@echo "PACKAGE_CHKSUM = $(PACKAGE_CHKSUM)"
@echo "PACKAGE_SIZE = $(PACKAGE_SIZE)"
@echo "PACKAGE_FILENAME = $(PACKAGE_FILENAME)"
cat extras/package_index.json.template | sed s/%%VERSION%%/$(PACKAGE_VERSION)/ | sed s/%%FILENAME%%/$(PACKAGE_FILENAME)/ | sed s/%%CHECKSUM%%/$(PACKAGE_CHKSUM)/ | sed s/%%SIZE%%/$(PACKAGE_SIZE)/ > package_$(PACKAGE_NAME)_$(PACKAGE_VERSION)_index.json
cp package_$(PACKAGE_NAME)_$(PACKAGE_VERSION)_index.json test_package_$(PACKAGE_NAME)_$(PACKAGE_VERSION)_index.json
@echo "package_$(PACKAGE_NAME)_$(PACKAGE_VERSION)_index.json created"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# ArduinoModule-CMSIS-Atmel
# Atmel CMSIS Arduino IDE package
Atmel Smart ARM devices CMSIS module for Arduino IDE
55 changes: 55 additions & 0 deletions extras/package_index.json.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"packages":
[
{
"name": "Atmel SAM CMSIS headers",
"maintainer": "Arduino",
"email": "packages@arduino.cc",
"tools":
[
{
"name": "Atmel SAM headers",
"version": "%%VERSION%%",
"systems":
[
{
"host": "i686-mingw32",
"url": "https://github.com/sam-geek/ArduinoModule-CMSIS-Atmel/releases/download/v%%VERSION%%/%%FILENAME%%",
"archiveFileName": "%%FILENAME%%",
"checksum": "SHA-256:%%CHECKSUM%%",
"size": "%%SIZE%%"
},
{
"host": "x86_64-apple-darwin",
"url": "https://github.com/sam-geek/ArduinoModule-CMSIS-Atmel/releases/download/v%%VERSION%%/%%FILENAME%%",
"archiveFileName": "%%FILENAME%%",
"checksum": "SHA-256:%%CHECKSUM%%",
"size": "%%SIZE%%"
},
{
"host": "x86_64-pc-linux-gnu",
"url": "https://github.com/sam-geek/ArduinoModule-CMSIS-Atmel/releases/download/v%%VERSION%%/%%FILENAME%%",
"archiveFileName": "%%FILENAME%%",
"checksum": "SHA-256:%%CHECKSUM%%",
"size": "%%SIZE%%"
},
{
"host": "i686-pc-linux-gnu",
"url": "https://github.com/sam-geek/ArduinoModule-CMSIS-Atmel/releases/download/v%%VERSION%%/%%FILENAME%%",
"archiveFileName": "%%FILENAME%%",
"checksum": "SHA-256:%%CHECKSUM%%",
"size": "%%SIZE%%"
},
{
"host": "all",
"url": "https://github.com/sam-geek/ArduinoModule-CMSIS-Atmel/releases/download/v%%VERSION%%/%%FILENAME%%",
"archiveFileName": "%%FILENAME%%",
"checksum": "SHA-256:%%CHECKSUM%%",
"size": "%%SIZE%%"
}
]
}
]
}
]
}
1 change: 1 addition & 0 deletions module/CMSIS/Device/ATMEL/sam-headers-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
based on 6.2.0.1131 20150720
Loading

0 comments on commit 92a5d16

Please sign in to comment.