rake_embedded 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +14 -0
- data/Gemfile +5 -0
- data/LICENSE +621 -0
- data/README.md +150 -0
- data/Rakefile +2 -0
- data/machine_conf/8051/8051.rb +23 -0
- data/machine_conf/8051/C8051FXXX.rb +22 -0
- data/machine_conf/8051/nrf24le1_24.rb +25 -0
- data/machine_conf/8051/nrf24le1_32.rb +24 -0
- data/machine_conf/8051/nrf24le1_48.rb +24 -0
- data/machine_conf/arm/arm.rb +24 -0
- data/machine_conf/arm/stm32f1.rb +24 -0
- data/machine_conf/arm/stm32f3.rb +28 -0
- data/machine_conf/arm/stm32f4.rb +28 -0
- data/machine_conf/avr/atmega168.rb +24 -0
- data/machine_conf/avr/avr.rb +25 -0
- data/machine_conf/mips/PIC32.rb +24 -0
- data/machine_conf/mips/pic32mx2.rb +24 -0
- data/machine_conf/mips/pic32mz2048.rb +24 -0
- data/machine_conf/native/linux.rb +24 -0
- data/machine_conf/native/native.rb +24 -0
- data/rake_embedded/version.rb +3 -0
- data/rake_embedded.gemspec +28 -0
- data/rem +34 -0
- data/rem.png +0 -0
- data/rem_core.rb +446 -0
- data/rem_path.rb +23 -0
- data/scripts/build_functions/package_build_functions.rb +121 -0
- data/scripts/compile_tasks/common/gcc_LinkPrepare.rb +35 -0
- data/scripts/compile_tasks/common/sdcc_LinkPrepare.rb +30 -0
- data/scripts/compile_tasks/gcc_tasks/DefaultTasks.rb +77 -0
- data/scripts/compile_tasks/make_tasks/MakeTasks.rb +86 -0
- data/scripts/compile_tasks/sdcc_tasks/DefaultTasks.rb +80 -0
- data/scripts/dependency_functions/dependency_graph.rb +68 -0
- data/scripts/dependency_functions/dependency_tasks.rb +67 -0
- data/scripts/download_tasks/DefaultTasks.rb +44 -0
- data/scripts/global_config/config_helper/check_env.rb +57 -0
- data/scripts/global_config/config_helper/config.rb +27 -0
- data/scripts/global_config/global_config.rb +230 -0
- data/scripts/misc/helper.rb +122 -0
- data/scripts/misc/helper_string_parse.rb +40 -0
- data/scripts/misc/print_functions.rb +53 -0
- data/scripts/package.rb +343 -0
- data/scripts/patch_tasks/DefaultTasks.rb +33 -0
- data/scripts/prepare_tasks/DefaultTasks.rb +74 -0
- data/scripts/recipe_handling/recipes.rb +151 -0
- data/scripts/remfile_functions/remfile_gen.rb +39 -0
- data/shell_scripts/check_deps.sh +214 -0
- data/shell_scripts/comment_unused_functions_cppcheck.sh +44 -0
- data/shell_scripts/find_func_and_comment.sh +61 -0
- data/tests/docker/dockerfile_debian_8.dockertest +18 -0
- data/tests/docker/dockerfile_ubuntu_14_04.dockertest +20 -0
- data/tests/run_all_rem_tests.sh +26 -0
- data/tests/run_docker_test.sh +5 -0
- data/tests/run_docker_tests.sh +26 -0
- data/tests/tests/TEST_append_features.sh +15 -0
- data/tests/tests/TEST_build_test_project.sh +28 -0
- data/tests/tests/TEST_check_deps_test_project.sh +16 -0
- data/tests/tests/TEST_remove_unused_functions.sh +17 -0
- metadata +149 -0
@@ -0,0 +1,214 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
#
|
3
|
+
# Copyright (C) 2016 Franz Flasch <franz.flasch@gmx.at>
|
4
|
+
# This file is part of REM - Rake for EMbedded Systems and Microcontrollers.
|
5
|
+
# REM is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
# REM is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
# You should have received a copy of the GNU General Public License
|
14
|
+
# along with REM. If not, see <http://www.gnu.org/licenses/>.
|
15
|
+
#
|
16
|
+
|
17
|
+
# This script will perform the following tests:
|
18
|
+
# At first a recursive "compile test" build with the complete package dependency chain will be done.
|
19
|
+
# In each round one specific dependency will be disabled and checked if the build is still successful.
|
20
|
+
# If one build is successful, the disabled dependency comes to the list of "suspicious" packages.
|
21
|
+
#
|
22
|
+
# The second part is the link test.
|
23
|
+
# As it cannot be guaranteed that every package on the "suspicous" compile test list is 100% a wrong dependency setting
|
24
|
+
# an additional link test will be done.
|
25
|
+
#
|
26
|
+
# Consider the following scenario:
|
27
|
+
# The compile test could expose that the dependency ATMEGA168 from the package heatingctrl is suspocious.
|
28
|
+
# However this does not mean, that the dependency setup is wrong! If there are generic headers used with different implementations,
|
29
|
+
# then this cannot be detected by the compile test alone!
|
30
|
+
# In this case the script checks if more packages with the same dependency exists and are "suspicious"
|
31
|
+
# If all packages with the suspicous dependency are in the "suspicious" list then they are considered for doing a link test.
|
32
|
+
# The link test will start linking without the given packages which were chosen before for doing this test. If one link build succeeds
|
33
|
+
# without the given dependency then the probability for a wrong dependency setup is plausible and they also come to the link dependency list.
|
34
|
+
# If some packages are contained in both lists, then these packages can be considered as nearly 100% wrong configured!
|
35
|
+
#
|
36
|
+
# If one package (from the complete dependency chain) with the given suspicous dependency is not in the "suspicious" compiletest list,
|
37
|
+
# then this would mean, that at least one compilation failed, and therefore the dependency setting for this one package is correct,
|
38
|
+
# it also means that it is not necessary to do a link test then, as this will fail for sure
|
39
|
+
|
40
|
+
if [ -z "$PACKAGE_NAME" ]; then
|
41
|
+
echo "PACKAGE_NAME not set!"
|
42
|
+
exit 1
|
43
|
+
fi
|
44
|
+
|
45
|
+
# Do a normal build at first to check if everything is OK
|
46
|
+
rem package:$PACKAGE_NAME:link
|
47
|
+
if [ "$?" != 0 ]; then
|
48
|
+
echo "Not able to do a normal build! Check if you can build normally before doing a dependency test!"
|
49
|
+
exit 2
|
50
|
+
fi
|
51
|
+
|
52
|
+
|
53
|
+
# Helper functions
|
54
|
+
function add_to_array_if_not_contained()
|
55
|
+
{
|
56
|
+
array_ref=$1
|
57
|
+
text_to_append=$2
|
58
|
+
eval "array=\${$array_ref[*]}"
|
59
|
+
|
60
|
+
if [[ "${array[@]}" =~ "${text_to_append}" ]]; then
|
61
|
+
echo "ARRAY ALREADY CONTAINS $text_to_append!"
|
62
|
+
return
|
63
|
+
else
|
64
|
+
array+=("$text_to_append")
|
65
|
+
fi
|
66
|
+
|
67
|
+
eval "$array_ref+=($text_to_append)"
|
68
|
+
}
|
69
|
+
|
70
|
+
|
71
|
+
# Get the complete dependency of the package, the last sed command removes the color from the output
|
72
|
+
DEPENDENCY_CHAIN=`rem package:$PACKAGE_NAME:depends_chain_print | awk '/DEPENDENCY-CHAIN:/{y=1;next}y' | awk '{print $1}' | sed 's/\x1b\[[0-9;]*m//g'`
|
73
|
+
|
74
|
+
COMPILE_TEST_RESULT=()
|
75
|
+
DEP_LIST_ARRAY=()
|
76
|
+
|
77
|
+
# Now build each package from the dependencylist while removing a single dependency in each iteration
|
78
|
+
# If one of the build iterations is successful, then there's probably something wrong in the dependency settings
|
79
|
+
for pkg in $DEPENDENCY_CHAIN
|
80
|
+
do
|
81
|
+
echo ""
|
82
|
+
echo "Checking package $pkg"
|
83
|
+
deps_for_package=`rem package:$pkg:depends_chain_print | grep "$pkg -->"`
|
84
|
+
if [ "$?" != 0 ]; then
|
85
|
+
echo "No deps for package $pkg! Continuing..."
|
86
|
+
continue
|
87
|
+
fi
|
88
|
+
|
89
|
+
deps_for_package=`echo $deps_for_package | awk '{$1=$2="";$0=$0;$1=$1}1' | sed 's/\x1b\[[0-9;]*m//g'`
|
90
|
+
echo "$pkg has the following dependencies: $deps_for_package"
|
91
|
+
|
92
|
+
DEP_LIST_ARRAY+=("$pkg : $deps_for_package")
|
93
|
+
|
94
|
+
|
95
|
+
for dep in $deps_for_package
|
96
|
+
do
|
97
|
+
echo "Trying to build $pkg without $dep"
|
98
|
+
rem package:$pkg:clean[compile]
|
99
|
+
rem package:$pkg:check_deps[$dep,"compile",$PACKAGE_NAME]
|
100
|
+
if [ "$?" != 0 ]; then
|
101
|
+
echo "Error when building $pkg without $dep"
|
102
|
+
else
|
103
|
+
echo "Build without $dep possible! Please check deps for package $pkg!!"
|
104
|
+
COMPILE_TEST_RESULT+=("$pkg : $dep")
|
105
|
+
fi
|
106
|
+
done
|
107
|
+
done
|
108
|
+
|
109
|
+
|
110
|
+
# COMPILE_TEST_RESULT=()
|
111
|
+
# COMPILE_TEST_RESULT+=("heatingctrl : ATMEGA168")
|
112
|
+
# COMPILE_TEST_RESULT+=("heatingctrl : crc")
|
113
|
+
# COMPILE_TEST_RESULT+=("msglib : crc")
|
114
|
+
# COMPILE_TEST_RESULT+=("soft_spi : spi_common")
|
115
|
+
# COMPILE_TEST_RESULT+=("ATMEGA168 : spi_common")
|
116
|
+
|
117
|
+
LINK_REMOVE_ARRAY=()
|
118
|
+
CANDIDATE_DEP_COUNT_ARRAY=()
|
119
|
+
for each in "${COMPILE_TEST_RESULT[@]}"
|
120
|
+
do
|
121
|
+
canditate=`echo $each | awk '{print $3}'`
|
122
|
+
|
123
|
+
canditate_count=0
|
124
|
+
for each in "${COMPILE_TEST_RESULT[@]}"
|
125
|
+
do
|
126
|
+
canditate_tmp=`echo $each | awk '{print $3}'`
|
127
|
+
if [ "$canditate" == "$canditate_tmp" ]; then
|
128
|
+
canditate_count=$(( $canditate_count + 1))
|
129
|
+
fi
|
130
|
+
done
|
131
|
+
#echo "$canditate occurences in result: $canditate_count"
|
132
|
+
|
133
|
+
dep_count=0
|
134
|
+
for each in "${DEP_LIST_ARRAY[@]}"
|
135
|
+
do
|
136
|
+
dep=`echo $each | awk '{print $1}'`
|
137
|
+
if [ "$canditate" == "$dep" ]; then
|
138
|
+
# ignore this package as it is the one we are currently checking
|
139
|
+
continue
|
140
|
+
fi
|
141
|
+
dep_count=$(( $dep_count +`echo "$each" | grep -o "$canditate" | wc -l` ))
|
142
|
+
done
|
143
|
+
#echo "Count $canditate : $dep_count"
|
144
|
+
|
145
|
+
if [ $canditate_count -eq $dep_count ]; then
|
146
|
+
echo "$canditate has same occurences in dep_list as in the result list! Candidate for link test!"
|
147
|
+
add_to_array_if_not_contained "LINK_REMOVE_ARRAY" "$canditate"
|
148
|
+
add_to_array_if_not_contained "CANDIDATE_DEP_COUNT_ARRAY" "$canditate\ -\ occurences\ deplist:\ $dep_count,\ occurences\ compile\ testresult:\ $canditate_count"
|
149
|
+
fi
|
150
|
+
done
|
151
|
+
|
152
|
+
|
153
|
+
# Do final link test here:
|
154
|
+
LINK_TEST_RESULT=()
|
155
|
+
for each in "${LINK_REMOVE_ARRAY[@]}"
|
156
|
+
do
|
157
|
+
rem package:$PACKAGE_NAME:clean["link"]
|
158
|
+
rem package:$PACKAGE_NAME:check_deps[$each,"link",$PACKAGE_NAME]
|
159
|
+
if [ "$?" != 0 ]; then
|
160
|
+
echo "Error when linking $PACKAGE_NAME without $each"
|
161
|
+
else
|
162
|
+
echo "Linking without $each possible! Please check if $each is really necessary in your deps!"
|
163
|
+
LINK_TEST_RESULT+=("$each")
|
164
|
+
fi
|
165
|
+
done
|
166
|
+
|
167
|
+
|
168
|
+
echo ""
|
169
|
+
echo ""
|
170
|
+
echo "==============================================="
|
171
|
+
echo "Dependency analysis results:"
|
172
|
+
echo "==============================================="
|
173
|
+
echo ""
|
174
|
+
echo "The result of this script contains testresults of compiling and linking packages without specific dependencies."
|
175
|
+
echo " - If the result of the compile test is empty, then the probability of a correct dependency setup is ~100%"
|
176
|
+
echo " - If the result of the compile test not empty, but the result of the link test is empty then the probability of a correct dependency setup is high but not 100%"
|
177
|
+
echo " in this case the results of the compile test should be checked for correctness"
|
178
|
+
echo " - If the compile test is not empty and also the link test is not empty, then the packages which are on both lists are practically 100% wrong"
|
179
|
+
echo " - If the compile test is empty but the link test is not, then there is something seriously wrong. This should not happen."
|
180
|
+
echo ""
|
181
|
+
echo "Compile test result:"
|
182
|
+
echo "suspicious packages:"
|
183
|
+
if [ -n "$COMPILE_TEST_RESULT" ]; then
|
184
|
+
for each in "${COMPILE_TEST_RESULT[@]}"
|
185
|
+
do
|
186
|
+
echo "$each"
|
187
|
+
done
|
188
|
+
else
|
189
|
+
echo "NONE"
|
190
|
+
fi
|
191
|
+
|
192
|
+
echo ""
|
193
|
+
echo ""
|
194
|
+
echo "Candidates chosen for link test:"
|
195
|
+
if [ -n "$CANDIDATE_DEP_COUNT_ARRAY" ]; then
|
196
|
+
for each in "${CANDIDATE_DEP_COUNT_ARRAY[@]}"
|
197
|
+
do
|
198
|
+
echo "$each"
|
199
|
+
done
|
200
|
+
else
|
201
|
+
echo "NONE"
|
202
|
+
fi
|
203
|
+
|
204
|
+
echo ""
|
205
|
+
echo "Link test result:"
|
206
|
+
echo "suspicious packages:"
|
207
|
+
if [ -n "$LINK_TEST_RESULT" ]; then
|
208
|
+
for each in "${LINK_TEST_RESULT[@]}"
|
209
|
+
do
|
210
|
+
echo "$each"
|
211
|
+
done
|
212
|
+
else
|
213
|
+
echo "NONE"
|
214
|
+
fi
|
@@ -0,0 +1,44 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
#
|
3
|
+
# Copyright (C) 2016 Franz Flasch <franz.flasch@gmx.at>
|
4
|
+
# This file is part of REM - Rake for EMbedded Systems and Microcontrollers.
|
5
|
+
# REM is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
# REM is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
# You should have received a copy of the GNU General Public License
|
14
|
+
# along with REM. If not, see <http://www.gnu.org/licenses/>.
|
15
|
+
#
|
16
|
+
|
17
|
+
folder_to_check=$1
|
18
|
+
folders_to_exclude=($2)
|
19
|
+
|
20
|
+
excluded=()
|
21
|
+
for var in "${folders_to_exclude[@]}"
|
22
|
+
do
|
23
|
+
excluded+=("-i$var ")
|
24
|
+
done
|
25
|
+
|
26
|
+
# output will be put to stderr so we need to redirect to stdout with 2>&1
|
27
|
+
cpp_output=(`cppcheck --template='{file} {line}' -q ${excluded[@]} --enable=unusedFunction $folder_to_check 2>&1`)
|
28
|
+
#echo ${cpp_output[@]}
|
29
|
+
|
30
|
+
cpp_output_len=${#cpp_output[@]}
|
31
|
+
|
32
|
+
echo "Found unused functions in the following files:"
|
33
|
+
for (( i=0; i<$(( cpp_output_len )); i+=2 ))
|
34
|
+
do
|
35
|
+
echo ${cpp_output[i]}
|
36
|
+
done
|
37
|
+
|
38
|
+
for (( i=0; i<$(( cpp_output_len )); i+=2 ))
|
39
|
+
do
|
40
|
+
file_name=${cpp_output[i]}
|
41
|
+
line_number=${cpp_output[i+1]}
|
42
|
+
#echo $file_name $line_number
|
43
|
+
find_func_and_comment.sh $file_name $line_number
|
44
|
+
done
|
@@ -0,0 +1,61 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
#
|
3
|
+
# Copyright (C) 2016 Franz Flasch <franz.flasch@gmx.at>
|
4
|
+
# This file is part of REM - Rake for EMbedded Systems and Microcontrollers.
|
5
|
+
# REM is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU General Public License as published by
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
# REM is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
# You should have received a copy of the GNU General Public License
|
14
|
+
# along with REM. If not, see <http://www.gnu.org/licenses/>.
|
15
|
+
#
|
16
|
+
|
17
|
+
file_name=$1
|
18
|
+
begin_of_function=$2
|
19
|
+
|
20
|
+
opened=0
|
21
|
+
closed=0
|
22
|
+
number_of_lines=`wc -l < $file_name`
|
23
|
+
|
24
|
+
#echo "NUMBER of lines: $number_of_lines"
|
25
|
+
|
26
|
+
line_number=$begin_of_function
|
27
|
+
while true
|
28
|
+
do
|
29
|
+
var_open=`head -$line_number $file_name | tail -1 | grep -oh "{" | wc -w`
|
30
|
+
var_closed=`head -$line_number $file_name | tail -1 | grep -oh "}" | wc -w`
|
31
|
+
|
32
|
+
#tmp_opened=`head -$line_number $file_name | tail -1 | grep -oh "{"`
|
33
|
+
#tmp_closed=`head -$line_number $file_name | tail -1 | grep -oh "}"`
|
34
|
+
#echo "opened $tmp_opened"
|
35
|
+
#echo "closed $tmp_closed"
|
36
|
+
|
37
|
+
opened=$(($opened + $var_open))
|
38
|
+
#echo "opened:" $opened
|
39
|
+
|
40
|
+
closed=$(($closed + $var_closed))
|
41
|
+
#echo "closed:" $closed
|
42
|
+
#echo ""
|
43
|
+
|
44
|
+
if [ $opened == $closed ] && [ $opened -ne 0 ]; then
|
45
|
+
echo "Commenting file $file_name from linenumber $begin_of_function to linenumber $line_number"
|
46
|
+
#echo "Function end: linenumber: $line_number"
|
47
|
+
sed -i $begin_of_function's/.*/#if 0 /' $file_name
|
48
|
+
# append after the bracket
|
49
|
+
#sed -i $line_number's/$/ #endif/' $file_name
|
50
|
+
# replace the bracket
|
51
|
+
sed -i $line_number's/.*/#endif/' $file_name
|
52
|
+
exit 0
|
53
|
+
fi
|
54
|
+
|
55
|
+
if [ $line_number -ge $number_of_lines ]; then
|
56
|
+
echo "ERROR: End of file, could not find end of function!"
|
57
|
+
exit 1
|
58
|
+
fi
|
59
|
+
|
60
|
+
line_number=$(($line_number + 1))
|
61
|
+
done
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#
|
2
|
+
# Super simple example of a Dockerfile
|
3
|
+
#
|
4
|
+
FROM debian:jessie
|
5
|
+
|
6
|
+
WORKDIR /home/rem_build
|
7
|
+
|
8
|
+
RUN apt-get update -y
|
9
|
+
RUN apt-get install -y rake gcc-arm-none-eabi gcc-avr avr-libc git subversion unzip wget make python sdcc sdcc-libraries cppcheck
|
10
|
+
|
11
|
+
# Install mips toolchain manually, as there is no apt-get package available:
|
12
|
+
RUN wget https://community.imgtec.com/?do-download=linux-x64-mti-bare-metal-2016-05-03 -O mips_toolchain.tar.gz
|
13
|
+
RUN tar xvf mips_toolchain.tar.gz
|
14
|
+
ENV PATH /home/rem_build/mips-mti-elf/2016.05-03/bin/:$PATH
|
15
|
+
|
16
|
+
RUN git clone https://github.com/franzflasch/REM.git
|
17
|
+
|
18
|
+
RUN /bin/bash -c "/home/rem_build/REM/tests/run_all_rem_tests.sh /home/rem_build/REM"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Super simple example of a Dockerfile
|
3
|
+
#
|
4
|
+
FROM ubuntu:trusty
|
5
|
+
|
6
|
+
WORKDIR /home/rem_build
|
7
|
+
|
8
|
+
ENV DEBIAN_FRONTEND noninteractive
|
9
|
+
|
10
|
+
RUN apt-get update -y
|
11
|
+
RUN apt-get install -y rake gcc-arm-none-eabi gcc-avr avr-libc git subversion unzip wget make python sdcc sdcc-libraries cppcheck
|
12
|
+
|
13
|
+
# Install mips toolchain manually, as there is no apt-get package available:
|
14
|
+
RUN wget https://community.imgtec.com/?do-download=linux-x64-mti-bare-metal-2016-05-03 -O mips_toolchain.tar.gz
|
15
|
+
RUN tar xvf mips_toolchain.tar.gz
|
16
|
+
ENV PATH /home/rem_build/mips-mti-elf/2016.05-03/bin/:$PATH
|
17
|
+
|
18
|
+
RUN git clone https://github.com/franzflasch/REM.git
|
19
|
+
|
20
|
+
RUN /bin/bash -c "/home/rem_build/REM/tests/run_all_rem_tests.sh /home/rem_build/REM"
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
BASEDIR=$(dirname "$0")
|
4
|
+
REM_PATH=$1
|
5
|
+
|
6
|
+
BUILD_ITEM_NAME=()
|
7
|
+
BUILD_ITEM_RESULT=()
|
8
|
+
|
9
|
+
for f in $BASEDIR/tests/TEST_*.sh ;
|
10
|
+
do
|
11
|
+
$f $REM_PATH
|
12
|
+
BUILD_ITEM_RESULT+=("$?")
|
13
|
+
BUILD_ITEM_NAME+=("$f")
|
14
|
+
done
|
15
|
+
|
16
|
+
for ((i=0; i < ${#BUILD_ITEM_RESULT[@]}; i++))
|
17
|
+
do
|
18
|
+
if [[ ${BUILD_ITEM_RESULT[$i]} != 0 ]]; then
|
19
|
+
echo "${BUILD_ITEM_NAME[$i]} not passed!"
|
20
|
+
exit 1
|
21
|
+
else
|
22
|
+
echo "${BUILD_ITEM_NAME[$i]} passed!"
|
23
|
+
fi
|
24
|
+
done
|
25
|
+
|
26
|
+
exit 0
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
BASEDIR=$(dirname "$0")
|
4
|
+
|
5
|
+
BUILD_ITEM_NAME=()
|
6
|
+
BUILD_ITEM_RESULT=()
|
7
|
+
|
8
|
+
for f in $BASEDIR/docker/*.dockertest ;
|
9
|
+
do
|
10
|
+
docker build -f "$f" .
|
11
|
+
BUILD_ITEM_RESULT+=("$?")
|
12
|
+
BUILD_ITEM_NAME+=("$f")
|
13
|
+
docker rmi --force $(sudo docker images --filter "dangling=true" -q --no-trunc)
|
14
|
+
done
|
15
|
+
|
16
|
+
for ((i=0; i < ${#BUILD_ITEM_RESULT[@]}; i++))
|
17
|
+
do
|
18
|
+
if [[ ${BUILD_ITEM_RESULT[$i]} != 0 ]]; then
|
19
|
+
echo "${BUILD_ITEM_NAME[$i]} not passed!"
|
20
|
+
exit 1
|
21
|
+
else
|
22
|
+
echo "${BUILD_ITEM_NAME[$i]} passed!"
|
23
|
+
fi
|
24
|
+
done
|
25
|
+
|
26
|
+
exit 0
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
REM_PATH=$1
|
4
|
+
|
5
|
+
echo REMPATH $REM_PATH
|
6
|
+
export PATH=$REM_PATH:$PATH
|
7
|
+
|
8
|
+
git clone https://github.com/franzflasch/rem_packages.git
|
9
|
+
git clone https://github.com/franzflasch/rem_recipe_testing.git
|
10
|
+
|
11
|
+
rem ARCH=avr MACH=atmega168 PROJECT_FOLDER=rem_packages,rem_recipe_testing/avr_append_test,rem_recipe_testing/common -m -j4 package:test_project:image[hex] VERBOSE=1 && echo OK || exit 5
|
12
|
+
rm -rf rem_workdir
|
13
|
+
|
14
|
+
rm -rf rem_packages
|
15
|
+
rm -rf rem_recipe_testing
|
@@ -0,0 +1,28 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
REM_PATH=$1
|
4
|
+
|
5
|
+
echo REMPATH $REM_PATH
|
6
|
+
export PATH=$REM_PATH:$PATH
|
7
|
+
|
8
|
+
git clone https://github.com/franzflasch/rem_packages.git
|
9
|
+
git clone https://github.com/franzflasch/rem_test_project.git
|
10
|
+
git clone https://github.com/franzflasch/rem_libopenpic32.git
|
11
|
+
|
12
|
+
rem ARCH=avr MACH=atmega168 PROJECT_FOLDER=rem_packages,rem_test_project -m -j4 package:test_project:image[hex] VERBOSE=1 && echo OK || exit 1
|
13
|
+
rm -rf rem_workdir
|
14
|
+
rem ARCH=arm MACH=stm32f1 PROJECT_FOLDER=rem_packages,rem_test_project -m -j4 package:test_project:image[bin] VERBOSE=1 && echo OK || exit 2
|
15
|
+
rm -rf rem_workdir
|
16
|
+
rem ARCH=arm MACH=stm32f3 PROJECT_FOLDER=rem_packages,rem_test_project -m -j4 package:test_project:image[bin] VERBOSE=1 && echo OK || exit 3
|
17
|
+
rm -rf rem_workdir
|
18
|
+
rem ARCH=arm MACH=stm32f4 PROJECT_FOLDER=rem_packages,rem_test_project -m -j4 package:test_project:image[bin] VERBOSE=1 && echo OK || exit 4
|
19
|
+
rm -rf rem_workdir
|
20
|
+
rem ARCH=8051 MACH=nrf24le1_32 PROJECT_FOLDER=rem_packages,rem_test_project -m -j4 package:test_project:image[bin] VERBOSE=1 && echo OK || exit 5
|
21
|
+
rm -rf rem_workdir
|
22
|
+
rem ARCH=mips MACH=pic32mx2 PROJECT_FOLDER=rem_test_project,rem_libopenpic32,rem_packages package:test_project:image[srec] VERBOSE=1 && echo OK || exit 5
|
23
|
+
rm -rf rem_workdir
|
24
|
+
rem ARCH=mips MACH=pic32mz2048 PROJECT_FOLDER=rem_test_project,rem_libopenpic32,rem_packages package:test_project:image[srec] VERBOSE=1 && echo OK || exit 5
|
25
|
+
rm -rf rem_workdir
|
26
|
+
|
27
|
+
rm -rf rem_packages
|
28
|
+
rm -rf rem_test_project
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
REM_PATH=$1
|
4
|
+
|
5
|
+
echo REMPATH $REM_PATH
|
6
|
+
export PATH=$REM_PATH:$PATH
|
7
|
+
export PATH=$REM_PATH/shell_scripts:$PATH
|
8
|
+
|
9
|
+
git clone https://github.com/franzflasch/rem_packages.git
|
10
|
+
git clone https://github.com/franzflasch/rem_test_project.git
|
11
|
+
|
12
|
+
ARCH=avr MACH=atmega168 PROJECT_FOLDER=rem_packages,rem_test_project PACKAGE_NAME=test_project check_deps.sh && echo OK || exit 1
|
13
|
+
rm -rf rem_workdir
|
14
|
+
|
15
|
+
rm -rf rem_packages
|
16
|
+
rm -rf rem_test_project
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
REM_PATH=$1
|
4
|
+
|
5
|
+
echo REMPATH $REM_PATH
|
6
|
+
export PATH=$REM_PATH:$PATH
|
7
|
+
export PATH=$REM_PATH/shell_scripts:$PATH
|
8
|
+
|
9
|
+
git clone https://github.com/franzflasch/rem_packages.git
|
10
|
+
git clone https://github.com/franzflasch/rem_test_project.git
|
11
|
+
|
12
|
+
rem ARCH=8051 MACH=nrf24le1_32 PROJECT_FOLDER=rem_packages,rem_test_project -m -j4 package:test_project:image[bin] VERBOSE=1 && echo OK || exit 1
|
13
|
+
comment_unused_functions_cppcheck.sh rem_workdir/8051_nrf24le1_32/build "rem_workdir/8051_nrf24le1_32/build/nrf24le1_sdk_nohash/" && echo OK || exit 2
|
14
|
+
rm -rf rem_workdir
|
15
|
+
|
16
|
+
rm -rf rem_packages
|
17
|
+
rm -rf rem_test_project
|
metadata
ADDED
@@ -0,0 +1,149 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rake_embedded
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Franz Flasch
|
8
|
+
autorequire:
|
9
|
+
bindir: "."
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-02-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '12.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '12.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.14'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.14'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '12.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '12.0'
|
55
|
+
description: REM is a Yocto like buildsystem primarily intended for microcontrollers.
|
56
|
+
It is based on ruby rake.
|
57
|
+
email:
|
58
|
+
- franz.flasch@gmx.at
|
59
|
+
executables:
|
60
|
+
- rem
|
61
|
+
extensions: []
|
62
|
+
extra_rdoc_files: []
|
63
|
+
files:
|
64
|
+
- "./rem"
|
65
|
+
- ".gitignore"
|
66
|
+
- ".travis.yml"
|
67
|
+
- Gemfile
|
68
|
+
- LICENSE
|
69
|
+
- README.md
|
70
|
+
- Rakefile
|
71
|
+
- machine_conf/8051/8051.rb
|
72
|
+
- machine_conf/8051/C8051FXXX.rb
|
73
|
+
- machine_conf/8051/nrf24le1_24.rb
|
74
|
+
- machine_conf/8051/nrf24le1_32.rb
|
75
|
+
- machine_conf/8051/nrf24le1_48.rb
|
76
|
+
- machine_conf/arm/arm.rb
|
77
|
+
- machine_conf/arm/stm32f1.rb
|
78
|
+
- machine_conf/arm/stm32f3.rb
|
79
|
+
- machine_conf/arm/stm32f4.rb
|
80
|
+
- machine_conf/avr/atmega168.rb
|
81
|
+
- machine_conf/avr/avr.rb
|
82
|
+
- machine_conf/mips/PIC32.rb
|
83
|
+
- machine_conf/mips/pic32mx2.rb
|
84
|
+
- machine_conf/mips/pic32mz2048.rb
|
85
|
+
- machine_conf/native/linux.rb
|
86
|
+
- machine_conf/native/native.rb
|
87
|
+
- rake_embedded.gemspec
|
88
|
+
- rake_embedded/version.rb
|
89
|
+
- rem
|
90
|
+
- rem.png
|
91
|
+
- rem_core.rb
|
92
|
+
- rem_path.rb
|
93
|
+
- scripts/build_functions/package_build_functions.rb
|
94
|
+
- scripts/compile_tasks/common/gcc_LinkPrepare.rb
|
95
|
+
- scripts/compile_tasks/common/sdcc_LinkPrepare.rb
|
96
|
+
- scripts/compile_tasks/gcc_tasks/DefaultTasks.rb
|
97
|
+
- scripts/compile_tasks/make_tasks/MakeTasks.rb
|
98
|
+
- scripts/compile_tasks/sdcc_tasks/DefaultTasks.rb
|
99
|
+
- scripts/dependency_functions/dependency_graph.rb
|
100
|
+
- scripts/dependency_functions/dependency_tasks.rb
|
101
|
+
- scripts/download_tasks/DefaultTasks.rb
|
102
|
+
- scripts/global_config/config_helper/check_env.rb
|
103
|
+
- scripts/global_config/config_helper/config.rb
|
104
|
+
- scripts/global_config/global_config.rb
|
105
|
+
- scripts/misc/helper.rb
|
106
|
+
- scripts/misc/helper_string_parse.rb
|
107
|
+
- scripts/misc/print_functions.rb
|
108
|
+
- scripts/package.rb
|
109
|
+
- scripts/patch_tasks/DefaultTasks.rb
|
110
|
+
- scripts/prepare_tasks/DefaultTasks.rb
|
111
|
+
- scripts/recipe_handling/recipes.rb
|
112
|
+
- scripts/remfile_functions/remfile_gen.rb
|
113
|
+
- shell_scripts/check_deps.sh
|
114
|
+
- shell_scripts/comment_unused_functions_cppcheck.sh
|
115
|
+
- shell_scripts/find_func_and_comment.sh
|
116
|
+
- tests/docker/dockerfile_debian_8.dockertest
|
117
|
+
- tests/docker/dockerfile_ubuntu_14_04.dockertest
|
118
|
+
- tests/run_all_rem_tests.sh
|
119
|
+
- tests/run_docker_test.sh
|
120
|
+
- tests/run_docker_tests.sh
|
121
|
+
- tests/tests/TEST_append_features.sh
|
122
|
+
- tests/tests/TEST_build_test_project.sh
|
123
|
+
- tests/tests/TEST_check_deps_test_project.sh
|
124
|
+
- tests/tests/TEST_remove_unused_functions.sh
|
125
|
+
homepage: https://github.com/franzflasch/REM
|
126
|
+
licenses:
|
127
|
+
- GPL-3.0
|
128
|
+
metadata: {}
|
129
|
+
post_install_message:
|
130
|
+
rdoc_options: []
|
131
|
+
require_paths:
|
132
|
+
- "."
|
133
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
|
+
requirements:
|
140
|
+
- - ">="
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '0'
|
143
|
+
requirements: []
|
144
|
+
rubyforge_project:
|
145
|
+
rubygems_version: 2.5.2
|
146
|
+
signing_key:
|
147
|
+
specification_version: 4
|
148
|
+
summary: Embedded C buildsystem for microcontrollers
|
149
|
+
test_files: []
|