Skip to content

Commit 6fb9824

Browse files
authored
Merge pull request #3585 from luhuadong/develop
[BSP] optimize dist handle for stm32l412-nucleo according to #3582
2 parents 90fb832 + 921aa67 commit 6fb9824

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed
10.6 KB
Loading

bsp/stm32/stm32l412-st-nucleo/rtconfig.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR
1818
if CROSS_TOOL == 'gcc':
1919
PLATFORM = 'gcc'
20-
#EXEC_PATH = r'C:\Users\XXYYZZ'
21-
EXEC_PATH = r'/home/rudy/opt/gcc-arm-none-eabi-7-2017-q4-major/bin/'
20+
EXEC_PATH = r'C:\Users\XXYYZZ'
2221
elif CROSS_TOOL == 'keil':
2322
PLATFORM = 'armcc'
2423
EXEC_PATH = r'C:/Keil_v5'
@@ -58,7 +57,7 @@
5857
else:
5958
CFLAGS += ' -O2'
6059

61-
CXXFLAGS = CFLAGS
60+
CXXFLAGS = CFLAGS
6261

6362
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
6463

@@ -89,7 +88,7 @@
8988
else:
9089
CFLAGS += ' -O2'
9190

92-
CXXFLAGS = CFLAGS
91+
CXXFLAGS = CFLAGS
9392
CFLAGS += ' -std=c99'
9493

9594
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
@@ -139,6 +138,13 @@
139138
LFLAGS += ' --entry __iar_program_start'
140139

141140
CXXFLAGS = CFLAGS
142-
141+
143142
EXEC_PATH = EXEC_PATH + '/arm/bin/'
144143
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
144+
145+
def dist_handle(BSP_ROOT):
146+
import sys
147+
cwd_path = os.getcwd()
148+
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
149+
from sdk_dist import dist_do_building
150+
dist_do_building(BSP_ROOT)

0 commit comments

Comments
 (0)