Created
July 25, 2013 18:24
-
-
Save theterg/6082389 to your computer and use it in GitHub Desktop.
A script to convert a Makefile produced by Atmel Studio 6 for arm-none-eabi on a linux host.
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
| #!/bin/sh | |
| PROJECT_NAME=$1 | |
| if [ "$PROJECT_NAME" != "" ]; then | |
| # TARGET_DIR=${PROJECT_NAME}/${PROJECT_NAME}/Debug | |
| TARGET_DIR=${PROJECT_NAME} | |
| find ${TARGET_DIR} -iname "*.d" -type f -exec sed -i 's/c:\\.*\\bin\\//g' {} \; | |
| sed -i 's/cmd.exe/sh/g' ${TARGET_DIR}/Makefile | |
| sed -i 's/C:\\.*\\bin\\arm-none-eabi-gcc.exe/arm-none-eabi-gcc/g' ${TARGET_DIR}/Makefile | |
| sed -i 's/C:\\.*\\bin\\arm-none-eabi-objcopy.exe/arm-none-eabi-objcopy/g' ${TARGET_DIR}/Makefile | |
| sed -i 's/C:\\.*\\bin\\arm-none-eabi-size.exe/arm-none-eabi-size/g' ${TARGET_DIR}/Makefile | |
| sed -i 's/C:\\.*\\bin\\arm-none-eabi-objdump.exe/arm-none-eabi-objdump/g' ${TARGET_DIR}/Makefile | |
| sed -i 's/\/src\/ASF\//\/src\/asf\//g' ${TARGET_DIR}/Makefile | |
| else | |
| echo "Usage: studio6_linux_conversion.sh PROJECT_NAME (e.g. the project directory name)" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've update to atmel studio 7
https://gist.github.com/corsiferrao/329d71d36436cf7311a7