Skip to content

Commit 52c82be

Browse files
committed
modified to automatically change the makefile in order to exclude a folder from the build (generated by e2studio) clean it and then rebuild all
1 parent 57952ac commit 52c82be

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

extras/e2studioProjects/Santiago/fsp_to_arduino.sh

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@
33
CORE_PATH=$(pwd -P)
44
TARGET=SANTIAGO
55

6+
# this part changes the makefile generated by e2studio (removing ra_gen from the build)
7+
# then it cleans the build and re-build all again
8+
9+
if ! grep -q "#\-include ra_gen\/subdir.mk" ./Debug/makefile; then
10+
sed -i 's/-include ra_gen\/subdir.mk/#-include ra_gen\/subdir.mk/g' ./Debug/makefile
11+
echo "not commented"
12+
else
13+
echo "already commented!"
14+
fi
15+
16+
cd Debug
17+
make clean
18+
make
19+
cd ..
20+
echo `pwd`
21+
22+
623
LIBRARY=`find . | grep "\.a$"`
724

825
echo Copying ${LIBRARY} to ${CORE_PATH}/../../../variants/${TARGET}/libs/libfsp.a
@@ -16,14 +33,21 @@ LINKER_SCRIPTS=`find . | grep "\.ld$"`
1633
# cp ${LINKER_SCRIPTS} ${CORE_PATH}/../../../variants/${TARGET}/
1734

1835
#-----------------------------------------------------------------------
19-
# TEMPORARY CHANGE - TO BE REMOVED
36+
# TEMPORARY CHANGE - TO BE REMOVED - used to copy temporary some genrated files
37+
# those are the files that have been removed from the build at the beginning
38+
# and now are copied to a temporary path (so that we can continue to build)
2039
#------------------------------------------------------------------------
2140
if [ ! -d ${CORE_PATH}/../../../variants/${TARGET}/tmp_gen_c_files ]
2241
then
2342
mkdir ${CORE_PATH}/../../../variants/${TARGET}/tmp_gen_c_files
2443
fi
2544

2645
cp ./ra_gen/*.c ${CORE_PATH}/../../../variants/${TARGET}/tmp_gen_c_files/
46+
# no more need of the following file
47+
if test -f "${CORE_PATH}/../../../variants/${TARGET}/tmp_gen_c_files/vector_table.c"; then
48+
echo "removed"
49+
rm ${CORE_PATH}/../../../variants/${TARGET}/tmp_gen_c_files/vector_table.c
50+
fi
2751
#-------------------------------------------------------------------------
2852

2953

0 commit comments

Comments
 (0)