Skip to content

Commit f422b6a

Browse files
authored
[bsp/stm32] 修复linux下编译的可执行文件无法启动问题 (#10169)
1 parent e131a00 commit f422b6a

File tree

246 files changed

+591
-354
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

246 files changed

+591
-354
lines changed

bsp/stm32/stm32f072-st-nucleo/SConscript

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
# for module compiling
22
import os
33
Import('RTT_ROOT')
4+
Import('env')
45
from building import *
56

67
cwd = GetCurrentDir()
78
objs = []
89
list = os.listdir(cwd)
910

11+
# STM32F030x6 || STM32F030x8 || STM32F031x6
12+
# STM32F038xx || STM32F042x6 || STM32F048xx
13+
# STM32F070x6 || STM32F051x8 || STM32F058xx
14+
# STM32F071xB || STM32F072xB || STM32F078xx
15+
# STM32F070xB || STM32F091xC || STM32F098xx || STM32F030xC
16+
# You can select chips from the list above
17+
env.Append(CPPDEFINES = ['STM32F072xB'])
18+
1019
for d in list:
1120
path = os.path.join(cwd, d)
1221
if os.path.isfile(os.path.join(path, 'SConscript')):

bsp/stm32/stm32f072-st-nucleo/board/SConscript

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,7 @@ path = [cwd]
1313
path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
1414

1515

16-
# STM32F030x6 || STM32F030x8 || STM32F031x6
17-
# STM32F038xx || STM32F042x6 || STM32F048xx
18-
# STM32F070x6 || STM32F051x8 || STM32F058xx
19-
# STM32F071xB || STM32F072xB || STM32F078xx
20-
# STM32F070xB || STM32F091xC || STM32F098xx || STM32F030xC
21-
# You can select chips from the list above
22-
CPPDEFINES = ['STM32F072xB']
23-
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
16+
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
2417

2518
# if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):
2619
# group = group + SConscript(os.path.join("ports", 'SConscript'))

bsp/stm32/stm32f091-st-nucleo/SConscript

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
# for module compiling
22
import os
33
Import('RTT_ROOT')
4+
Import('env')
45
from building import *
56

67
cwd = GetCurrentDir()
78
objs = []
89
list = os.listdir(cwd)
910

11+
# STM32F030x6 || STM32F030x8 || STM32F031x6
12+
# STM32F038xx || STM32F042x6 || STM32F048xx
13+
# STM32F070x6 || STM32F051x8 || STM32F058xx
14+
# STM32F071xB || STM32F072xB || STM32F078xx
15+
# STM32F070xB || STM32F091xC || STM32F098xx || STM32F030xC
16+
# You can select chips from the list above
17+
env.Append(CPPDEFINES=['STM32F091xC'])
18+
1019
for d in list:
1120
path = os.path.join(cwd, d)
1221
if os.path.isfile(os.path.join(path, 'SConscript')):

bsp/stm32/stm32f091-st-nucleo/board/SConscript

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,7 @@ path = [cwd]
1313
path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
1414

1515

16-
# STM32F030x6 || STM32F030x8 || STM32F031x6
17-
# STM32F038xx || STM32F042x6 || STM32F048xx
18-
# STM32F070x6 || STM32F051x8 || STM32F058xx
19-
# STM32F071xB || STM32F072xB || STM32F078xx
20-
# STM32F070xB || STM32F091xC || STM32F098xx || STM32F030xC
21-
# You can select chips from the list above
22-
CPPDEFINES = ['STM32F091xC']
23-
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
16+
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
2417

2518
# if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):
2619
# group = group + SConscript(os.path.join("ports", 'SConscript'))

bsp/stm32/stm32f103-100ask-mini/SConscript

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
# for module compiling
22
import os
33
Import('RTT_ROOT')
4+
Import('env')
45
from building import *
56

67
cwd = GetCurrentDir()
78
objs = []
89
list = os.listdir(cwd)
910

11+
# STM32F100xB || STM32F100xE || STM32F101x6
12+
# STM32F101xB || STM32F101xE || STM32F101xG
13+
# STM32F102x6 || STM32F102xB || STM32F103x6
14+
# STM32F103xB || STM32F103xE || STM32F103xG
15+
# STM32F105xC || STM32F107xC)
16+
# You can select chips from the list above
17+
env.Append(CPPDEFINES = ['STM32F103xB'])
18+
1019
for d in list:
1120
path = os.path.join(cwd, d)
1221
if os.path.isfile(os.path.join(path, 'SConscript')):

bsp/stm32/stm32f103-100ask-mini/SConstruct

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ if rtconfig.PLATFORM in ['iccarm']:
3131
env.Replace(ARFLAGS = [''])
3232
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
3333

34+
Export('env')
3435
Export('RTT_ROOT')
3536
Export('rtconfig')
3637

bsp/stm32/stm32f103-100ask-mini/board/SConscript

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,5 @@ elif rtconfig.PLATFORM in ['armcc', 'armclang']:
2828
elif rtconfig.PLATFORM in ['iccarm']:
2929
src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xb.s']
3030

31-
# STM32F100xB || STM32F100xE || STM32F101x6
32-
# STM32F101xB || STM32F101xE || STM32F101xG
33-
# STM32F102x6 || STM32F102xB || STM32F103x6
34-
# STM32F103xB || STM32F103xE || STM32F103xG
35-
# STM32F105xC || STM32F107xC)
36-
# You can select chips from the list above
37-
CPPDEFINES = ['STM32F103xB']
38-
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
31+
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
3932
Return('group')

bsp/stm32/stm32f103-100ask-pro/SConscript

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
# for module compiling
22
import os
33
Import('RTT_ROOT')
4+
Import('env')
45
from building import *
56

67
cwd = GetCurrentDir()
78
objs = []
89
list = os.listdir(cwd)
910

11+
# STM32F100xB || STM32F100xE || STM32F101x6
12+
# STM32F101xB || STM32F101xE || STM32F101xG
13+
# STM32F102x6 || STM32F102xB || STM32F103x6
14+
# STM32F103xB || STM32F103xE || STM32F103xG
15+
# STM32F105xC || STM32F107xC)
16+
# You can select chips from the list above
17+
env.Append(CPPDEFINES = ['STM32F103xE'])
18+
1019
for d in list:
1120
path = os.path.join(cwd, d)
1221
if os.path.isfile(os.path.join(path, 'SConscript')):

bsp/stm32/stm32f103-100ask-pro/SConstruct

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ if rtconfig.PLATFORM in ['iccarm']:
3131
env.Replace(ARFLAGS = [''])
3232
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
3333

34+
Export('env')
3435
Export('RTT_ROOT')
3536
Export('rtconfig')
3637

bsp/stm32/stm32f103-100ask-pro/board/SConscript

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,5 @@ elif rtconfig.PLATFORM in ['armcc', 'armclang']:
3131
elif rtconfig.PLATFORM in ['iccarm']:
3232
src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xe.s']
3333

34-
# STM32F100xB || STM32F100xE || STM32F101x6
35-
# STM32F101xB || STM32F101xE || STM32F101xG
36-
# STM32F102x6 || STM32F102xB || STM32F103x6
37-
# STM32F103xB || STM32F103xE || STM32F103xG
38-
# STM32F105xC || STM32F107xC)
39-
# You can select chips from the list above
40-
CPPDEFINES = ['STM32F103xE']
41-
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
34+
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
4235
Return('group')

0 commit comments

Comments
 (0)