-
-
Notifications
You must be signed in to change notification settings - Fork 48
Staging AVR toolchain 3.6.0 (with 328pb support files) #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 5 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
d71745d
Update to AVR toolchain 3.6.0
facchinm 1a6e09b
Avoid applying gcc patches
facchinm f9bd9e2
Automatically apply patches from atpack file (if present)
facchinm d0a2ebc
Copy whole ATPack directory if needed
facchinm 1db1ba2
Check for whole extra folder in its actual location
facchinm fe47b93
Don't show extra resources
facchinm 69fe575
Update to Release 3.6.1
facchinm 3a3682c
TEST: re-enable canadian cross for mingw
facchinm a7337ad
Fix toolchain crosscompilation with mingw
facchinm d6fcbba
Remove lto patch from gcc
facchinm 2b7072c
Revert "Remove lto patch from gcc"
facchinm 8107730
Fix lto-wrapper patch
facchinm 76cd6a9
exclude gcc patches (again)
facchinm fd426b8
Remove gdb patches
facchinm 57d8c67
Update to latest atpack
facchinm da641da
Add libwinpthread to precompiled dlls
facchinm 68e21e4
Change version to arduino1
facchinm bccf2d0
Remove Darwin specific LDFLAGS
facchinm 92fe4fd
Uniform build flags with atmel script
facchinm ab73f84
Restore gdb build
facchinm befa8cc
Try to cross compile everything
facchinm aee4cd7
Make sure OSX build uses bash 4+
facchinm 4496a9d
Slightly fix arm crosscompile export
facchinm 5249b87
Merge branch 'master' into staging
facchinm 9da5600
Update readme to 3.6.1
facchinm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
#!/bin/bash -ex | ||
# Copyright (c) 2017 Arduino LLC | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License | ||
# as published by the Free Software Foundation; either version 2 | ||
# of the License, or (at your option) any later version. | ||
# | ||
# 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. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
|
||
source build.conf | ||
|
||
mkdir -p atpack | ||
cd atpack | ||
rm -rf * | ||
mv ../*.atpack . | ||
|
||
mv ${ATMEL_ATMEGA_PACK_FILENAME}.atpack ${ATMEL_ATMEGA_PACK_FILENAME}.zip | ||
unzip ${ATMEL_ATMEGA_PACK_FILENAME}.zip | ||
|
||
ALL_FILES=`find ../objdir` | ||
|
||
#copy relevant files to the right folders | ||
# 1- copy includes definitions | ||
EXTRA_INCLUDES=`diff -q ../objdir/avr/include/avr ../atpack/include/avr | grep "Only in" | grep atpack | cut -f4 -d" "` | ||
for x in $EXTRA_INCLUDES; do | ||
cp include/avr/${x} ../objdir/avr/include/avr | ||
done | ||
|
||
# 2 - compact specs into a single folder | ||
SPECS_FOLDERS=`ls gcc/dev` | ||
mkdir temp | ||
for folder in $SPECS_FOLDERS; do | ||
cp -r gcc/dev/${folder}/* temp/ | ||
done | ||
|
||
# 3 - find different files (device-specs) | ||
EXTRA_SPECS=`diff -q ../objdir/lib/gcc/avr/${GCC_VERSION}/device-specs/ temp/device-specs | grep "Only in" | grep temp | cut -f4 -d" "` | ||
for x in $EXTRA_SPECS; do | ||
cp temp/device-specs/${x} ../objdir/lib/gcc/avr/${GCC_VERSION}/device-specs/ | ||
done | ||
|
||
#since https://github.com/gcc-mirror/gcc/commit/21a6b87b86defda10ac903a9cd49e34b1f8ce6fb a lot of devices has specs but avr-libc doesn't support them yet | ||
ALL_DEVICE_SPECS=`ls temp/device-specs` | ||
rm -rf temp/device-specs | ||
|
||
EXTRA_LIBS=`diff -r -q ../objdir/avr/lib temp/ | grep "Only in" | grep temp | cut -f4 -d" "` | ||
for x in $EXTRA_LIBS; do | ||
if [ ! -d temp/${x} ]; then | ||
cd temp | ||
LOCATION=`find . | grep ${x}` | ||
cd .. | ||
else | ||
LOCATION=${x} | ||
fi | ||
cp -r temp/${LOCATION} ../objdir/avr/lib/${LOCATION} | ||
done | ||
|
||
# 4 - extract the correct includes and add them to io.h | ||
# ARGH! difficult! | ||
for x in $ALL_DEVICE_SPECS; do | ||
DEFINITION=`cat ../objdir/lib/gcc/avr/${GCC_VERSION}/device-specs/${x} | grep __AVR_DEVICE_NAME__ | cut -f1 -d" " | cut -f2 -d"D"` | ||
FANCY_NAME=`cat ../objdir/lib/gcc/avr/${GCC_VERSION}/device-specs/${x} | grep __AVR_DEVICE_NAME__ | cut -f2 -d"="` | ||
LOWERCASE_DEFINITION="${DEFINITION,,}" | ||
HEADER_TEMP="${LOWERCASE_DEFINITION#__avr_atmega}" | ||
HEADER="${HEADER_TEMP%__}" | ||
_DEFINITION="#elif defined (${DEFINITION})" | ||
_HEADER="# include <avr/iom${HEADER}.h>" | ||
if [ "$(grep -c "${DEFINITION}" ../objdir/avr/include/avr/io.h)" == 0 ]; then | ||
NEWFILE=`awk '/iom3000.h/ { print; print "____DEFINITION____"; print "____HEADER____"; next }1' ../objdir/avr/include/avr/io.h | sed "s/____DEFINITION____/$_DEFINITION/g" | sed "s@____HEADER____@$_HEADER@g"` | ||
echo "$NEWFILE" > ../objdir/avr/include/avr/io.h | ||
fi | ||
done | ||
|
||
NEW_ALL_FILES=`find ../objdir` | ||
|
||
echo "NEW FILES ADDED: " | ||
diff <(echo "$ALL_FILES" ) <(echo "$NEW_ALL_FILES") | ||
|
||
cd .. | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest pack version is 1.2.150.