We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18967ca commit 883c1e9Copy full SHA for 883c1e9
mbed-os-to-arduino
@@ -141,6 +141,12 @@ generate_defines () {
141
echo -n "Generating defines..."
142
cut -f2 -d":" < "$BOARDNAME".macros.txt | tr ' ' '\n' | sed 's#\"#\\"#g' | sort > "$ARDUINOVARIANT"/defines.txt
143
echo "-DMBED_NO_GLOBAL_USING_DIRECTIVE=1" >> "$ARDUINOVARIANT"/defines.txt
144
+ MAJOR=$(echo $VERSION| cut -d'.' -f 1)
145
+ MINOR=$(echo $VERSION| cut -d'.' -f 2)
146
+ PATCH=$(echo $VERSION| cut -d'.' -f 3)
147
+ echo "-DCORE_MAJOR=$MAJOR" >> "$ARDUINOVARIANT"/defines.txt
148
+ echo "-DCORE_MINOR=$MINOR" >> "$ARDUINOVARIANT"/defines.txt
149
+ echo "-DCORE_PATCH=$PATCH" >> "$ARDUINOVARIANT"/defines.txt
150
if [ -f "$ARDUINOVARIANT"/variant.cpp ]; then
151
echo '-DUSE_ARDUINO_PINOUT' >> "$ARDUINOVARIANT"/defines.txt
152
fi
0 commit comments