You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 1, 2022. It is now read-only.
Remove workaround in compile-examples action for platforms that don't fully report sizes
The issue of RAM use by global variables not being reported and flash being incorrectly reported by the Arduino SAMD Boards platform has been fixed in the 1.8.6 release. The issue remains for the Arduino SAM Boards platform, but it's not worth the added complexity just to improve size reporting for the Due.
@@ -91,50 +76,13 @@ function compile_example_get_size_from_output() {
91
76
fi
92
77
done<<<"$compilationOutput"
93
78
94
-
# Some hardware cores aren't configured to output RAM usage by global variables, but the flash usage should at least be in the output
79
+
# Some platforms aren't configured to output RAM usage by global variables (e.g., Arduino SAM Boards), but the flash usage should at least be in the output
95
80
if [[ "$FLASH_SIZE"==""&&"$RAM_SIZE"=="" ]];then
96
81
echo"::error::Something went wrong while while determining memory usage of the size-report-sketch"
97
82
exit 1
98
83
fi
99
84
}
100
85
101
-
# Parse the compiler size command to determine memory usage
102
-
functionget_size_from_size_output() {
103
-
local -r sizeOutput="$1"
104
-
local -r sizeRegex="$2"
105
-
106
-
local -r sizeOutputLines="$(echo "$sizeOutput"| grep --perl-regexp --regex="$sizeRegex")"
107
-
108
-
local totalSize=0
109
-
whileread -r -a replyArray;do
110
-
local replyValue="${replyArray[1]}"
111
-
totalSize="$((totalSize + replyValue))"
112
-
done<<<"$sizeOutputLines"
113
-
114
-
if [[ "$totalSize"=="" ]];then
115
-
echo"::error::Something went wrong while while determining memory usage of the size-report-sketch"
116
-
exit 1
117
-
fi
118
-
119
-
echo"$totalSize"
120
-
}
121
-
122
-
# Use the compiler size command to determine memory usage
# arduino-cli doesn't report RAM usage for Arduino SAM Boards or Arduino SAMD Boards and doesn't include the data section in the flash usage report, so it's necessary to determine the sizes independently
0 commit comments