Commit c87607fe by Enrico Pozzobon

small fix to F7 template

parent 75eec6f5
...@@ -25,11 +25,14 @@ def build(algo_dir, template_dir, build_dir): ...@@ -25,11 +25,14 @@ def build(algo_dir, template_dir, build_dir):
# find all c and h files, since they will be added to the makefile # find all c and h files, since they will be added to the makefile
hfiles = [] hfiles = []
cfiles = [] cfiles = []
sfiles = []
for r, d, f in os.walk(build_dir): for r, d, f in os.walk(build_dir):
for file in f: for file in f:
if file.endswith(".c"): if file.lower().endswith(".c"):
cfiles.append(file) cfiles.append(file)
elif file.endswith(".h"): elif file.lower().endswith(".s"):
sfiles.append(file)
elif file.lower().endswith(".h"):
hfiles.append(file) hfiles.append(file)
# copy all the files from the template directory into the build directory # copy all the files from the template directory into the build directory
...@@ -46,6 +49,7 @@ def build(algo_dir, template_dir, build_dir): ...@@ -46,6 +49,7 @@ def build(algo_dir, template_dir, build_dir):
# prepare the environmental variables for the makefile # prepare the environmental variables for the makefile
env = os.environ env = os.environ
env['SRC_FILES'] = ' '.join(cfiles) env['SRC_FILES'] = ' '.join(cfiles)
env['ASM_FILES'] = ' '.join(sfiles)
env['HDR_FILES'] = ' '.join(hfiles) env['HDR_FILES'] = ' '.join(hfiles)
# enter the directory and execute the makefile # enter the directory and execute the makefile
......
...@@ -52,7 +52,8 @@ $(SRC_FILES) ...@@ -52,7 +52,8 @@ $(SRC_FILES)
# ASM sources # ASM sources
ASM_SOURCES = \ ASM_SOURCES = \
startup_stm32f746xx.s startup_stm32f746xx.s \
$(ASM_FILES)
####################################### #######################################
......
#!/bin/bash #!/bin/bash
# Rename all *.s to *.S
for f in *.s; do
mv -- "$f" "${f%.s}.S"
done
mv -n *.dat *.inc *.h Inc/ mv -n *.dat *.inc *.h Inc/
sed -i src/encrypt.c -e "s/\(\s\)init(/\1_init(/g" sed -i src/encrypt.c -e "s/\(\s\)init(/\1_init(/g"
mkdir -p /tmp/f7/Drivers mkdir -p /tmp/f7/Drivers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment