Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit930184b

Browse files
committed
[gen_wrapper.sh] Update preproc indent
Remove "*_template.c" fiel which are uselessSigned-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parentcffb347 commit930184b

File tree

6 files changed

+25
-160
lines changed

6 files changed

+25
-160
lines changed

‎CI/utils/gen_wrapper.sh

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ all_LL_file=stm32yyxx_ll.h
2929

3030
# Create the file
3131
print_C_header() {
32-
if [[$1=*"template"* ]];then
33-
echo"#if 0">"$1"
34-
else
35-
touch"$1"
36-
fi
32+
# if [[ $1 = *"template"* ]]; then
33+
# echo "#if 0" > "$1"
34+
# else
35+
# touch "$1"
36+
# fi
37+
touch"$1"
3738
}
3839

3940
# Add some pragma to ll header files to avoid several warnings
@@ -57,11 +58,11 @@ print_CMSIS_Startup_header() {
5758
}
5859

5960
print_CMSIS_Startup_footer() {
60-
echo"#else
61-
#error UNKNOWN CHIP
62-
#endif
61+
echo"#else
62+
#error UNKNOWN CHIP
63+
#endif
6364
#else
64-
#warning\"No CMSIS startup file defined, custom one should be used\"
65+
#warning\"No CMSIS startup file defined, custom one should be used\"
6566
#endif /* !CMSIS_STARTUP_FILE && !CUSTOM_STARTUP_FILE */
6667
#endif /* _STM32_DEF_BUILD_ */">>$CMSIS_Startupfile
6768
}
@@ -73,17 +74,17 @@ print_CMSIS_Startup_list() {
7374
local upper
7475
f=$(echo"${list[0]}"| awk -F/'{print $NF}')
7576
upper=$(echo"$f"| awk -F'[_.]''{print toupper($2)}'| tr X x)
76-
echo"#if defined($upper)
77-
#define CMSIS_STARTUP_FILE\"$f\"">>$CMSIS_Startupfile
77+
echo"#if defined($upper)
78+
#define CMSIS_STARTUP_FILE\"$f\"">>$CMSIS_Startupfile
7879

7980
if [${#list[@]}-gt 1 ];then
8081
forfpin"${list[@]:1}";do
8182
# File name
8283
f=$(echo"$fp"| awk -F/'{print $NF}')
8384
upper=$(echo"$f"| awk -F'[_.]''{print toupper($2)}'| tr X x)
8485
upper="${upper//MP15xx/MP1xx}"
85-
echo"#elif defined($upper)
86-
#define CMSIS_STARTUP_FILE\"$f\"">>$CMSIS_Startupfile
86+
echo"#elif defined($upper)
87+
#define CMSIS_STARTUP_FILE\"$f\"">>$CMSIS_Startupfile
8788
done
8889
fi
8990
}
@@ -108,6 +109,10 @@ for serie in "${series[@]}"; do
108109
# Generate stm32yyxx_[hal|ll]*.c file
109110
filelist=($(find$HALDrivers_path/STM32"${serie}"xx_HAL_Driver/Src -maxdepth 1 -name"stm32${lower}xx_*.c"))
110111
forfpin"${filelist[@]}";do
112+
# No need for template
113+
if [[$fp=*"template"* ]];then
114+
continue
115+
fi
111116
outp=$HALoutSrc_path
112117
# File name
113118
f=$(echo"$fp"| awk -F/'{print $NF}')
@@ -122,7 +127,7 @@ for serie in "${series[@]}"; do
122127
# Amend file name under serie switch
123128
{
124129
echo"#ifdef STM32${serie}xx"
125-
echo"#include\"$f\""
130+
echo"#include\"$f\""
126131
echo"#endif"
127132
}>>$outp/"$g"
128133
done
@@ -143,7 +148,7 @@ for serie in "${series[@]}"; do
143148
# Amend file name under serie switch
144149
{
145150
echo"#ifdef STM32${serie}xx"
146-
echo"#include\"$f\""
151+
echo"#include\"$f\""
147152
echo"#endif"
148153
}>>$LLoutInc_path/"$g"
149154
done
@@ -160,10 +165,10 @@ sort -u $LLoutInc_path/${all_LL_file}.tmp >> $LLoutInc_path/${all_LL_file}
160165
rm -f$LLoutInc_path/${all_LL_file}.tmp
161166

162167
# Search all template file to end "#if 0"
163-
filelist=($(find$HALoutSrc_path -maxdepth 1 -name"stm32*_template.c"))
164-
forfpin"${filelist[@]}";do
165-
echo"#endif /* 0 */">>"$fp"
166-
done
168+
#filelist=($(find $HALoutSrc_path -maxdepth 1 -name "stm32*_template.c"))
169+
#for fp in "${filelist[@]}"; do
170+
# echo "#endif /* 0 */" >> "$fp"
171+
#done
167172

168173
# Search all LL header files to end guard
169174
filelist=($(find$LLoutInc_path -maxdepth 1 -name"stm32yyxx_ll*.h"))

‎cores/arduino/stm32/LL/stm32yyxx_ll.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
#include"stm32yyxx_ll_crs.h"
1717
#include"stm32yyxx_ll_dac.h"
1818
#include"stm32yyxx_ll_delayblock.h"
19-
#include"stm32yyxx_ll_dma2d.h"
2019
#include"stm32yyxx_ll_dma.h"
20+
#include"stm32yyxx_ll_dma2d.h"
2121
#include"stm32yyxx_ll_dmamux.h"
2222
#include"stm32yyxx_ll_exti.h"
2323
#include"stm32yyxx_ll_fmac.h"

‎libraries/SrcWrapper/src/HAL/stm32yyxx_hal_msp_template.c

Lines changed: 0 additions & 44 deletions
This file was deleted.

‎libraries/SrcWrapper/src/HAL/stm32yyxx_hal_timebase_rtc_alarm_template.c

Lines changed: 0 additions & 29 deletions
This file was deleted.

‎libraries/SrcWrapper/src/HAL/stm32yyxx_hal_timebase_rtc_wakeup_template.c

Lines changed: 0 additions & 26 deletions
This file was deleted.

‎libraries/SrcWrapper/src/HAL/stm32yyxx_hal_timebase_tim_template.c

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp