10000 ci(wrapper): update to handle new CMSIS DSP files · stm32duino/Arduino_Core_STM32@f766ca4 · GitHub
[go: up one dir, main page]

Skip to content

Commit f766ca4

Browse files
committed
ci(wrapper): update to handle new CMSIS DSP files
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent af22bdf commit f766ca4

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

CI/update/stm32wrapper.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
all_ll_header_file_template = j2_env.get_template(all_ll_h_file)
5454
ll_h_file_template = j2_env.get_template(ll_h_file)
5555
c_file_template = j2_env.get_template(c_file)
56-
dsp_file_template = Template('#include "../Source/{{ dsp }}/{{ dsp }}.c"')
56+
dsp_file_template = Template('#include "../Source/{{ dsp_dir }}/{{ dsp_name }}"\n\n')
5757
stm32_def_build_template = j2_env.get_template(stm32_def_build_file)
5858
system_stm32_template = j2_env.get_template(system_stm32_file)
5959

@@ -279,19 +279,16 @@ def wrap(arg_core, arg_cmsis, log):
279279
else:
280280
# Delete all subfolders
281281
deleteFolder(CMSIS_DSP_outSrc_path / "*")
282-
dirlist = []
283282
for path_object in CMSIS_DSPSrc_path.glob("**/*"):
284283
if path_object.is_file():
285284
if path_object.name.endswith(".c"):
286-
dirlist.append(path_object.parent.name)
287-
dirlist = sorted(set(dirlist))
288-
for dn in dirlist:
289-
fdn = CMSIS_DSP_outSrc_path / dn
290-
if not fdn.is_dir():
291-
createFolder(fdn)
292-
out_file = open(fdn / (f"{dn}.c"), "w", newline="\n")
293-
all_ll_file.write(dsp_file_template.render(dsp_path=dn))
294-
out_file.close()
285+
dn = path_object.parent.name
286+
fn = path_object.name
287+
if dn in fn:
288+
fdn = CMSIS_DSP_outSrc_path / dn
289+
out_file = open(fdn / (f"{fn}"), "w", newline="\n")
290+
out_file.write(dsp_file_template.render(dsp_dir=dn, dsp_name=fn))
291+
out_file.close()
295292
return 0
296293

297294

0 commit comments

Comments
 (0)
0