Skip to content

Commit cd76352

Browse files
committed
fix(boards.txt): remove warnings raised by arduino-lint
even if those pattern properties are present thanks other patterns to shorten some recipe lines. WARNING: recipe.c.o.pattern property value does not contain a {compiler.c.extra_flags} reference. This is necessary to allow the user to customize the compiler command. (Rule PF057) WARNING: recipe.S.o.pattern property value does not contain a {compiler.S.extra_flags} reference. This is necessary to allow the user to customize the compiler command. (Rule PF063) Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 429d64d commit cd76352

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

platform.txt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,6 @@ compiler.elf2hex.extra_flags=
7171
compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/Core/Include/" "-I{build.system.path}/Drivers/CMSIS/Device/ST/{build.series}/Include/" "-I{build.system.path}/Drivers/CMSIS/Device/ST/{build.series}/Source/Templates/gcc/" "-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Include" "-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/PrivateInclude"
7272
compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Lib/GCC/" -l{build.cmsis_lib_gcc}
7373

74-
# Groups some extra_flags properties to shorten recipe lines and allows arduino-cli to
75-
# override some standard Arduino build property with a custom value.
76-
build.g_extra_flags={build.st_extra_flags} {build.extra_flags}
77-
compiler.c.g_extra_flags={compiler.c.st_extra_flags} {compiler.c.extra_flags}
78-
compiler.S.g_extra_flags={compiler.S.st_extra_flags} {compiler.S.extra_flags}
79-
8074
# USB Flags
8175
# ---------
8276
build.usb_flags=-DUSBCON {build.usb_speed} -DUSBD_VID={build.vid} -DUSBD_PID={build.pid} -DHAL_PCD_MODULE_ENABLED
@@ -128,13 +122,13 @@ recipe.hooks.prebuild.1.pattern.windows="{runtime.tools.STM32Tools.path}/win/bus
128122
# ---------------------
129123

130124
## Compile c files
131-
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} {build.info.flags} {compiler.c.g_extra_flags} {build.g_extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
125+
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} {build.info.flags} {compiler.c.st_extra_flags} {compiler.c.extra_flags} {build.st_extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
132126

133127
## Compile c++ files
134-
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {build.info.flags} {compiler.cpp.extra_flags} {build.g_extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
128+
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {build.info.flags} {compiler.cpp.extra_flags} {build.st_extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
135129

136130
## Compile S files
137-
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} {build.info.flags} {compiler.S.g_extra_flags} {build.g_extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
131+
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} {build.info.flags} {compiler.S.st_extra_flags} {compiler.S.extra_flags} {build.st_extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
138132

139133
## Create archives
140134
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"

0 commit comments

Comments
 (0)