Browse Source

[bsp]Fix issue that dist cannot specify a directory

guozhanxin 3 years ago
parent
commit
b10761c09d

+ 1 - 1
bsp/lpc55sxx/lpc55s69_nxp_evk/rtconfig.py

@@ -158,5 +158,5 @@ def dist_handle(BSP_ROOT, dist_dir):
     cwd_path = os.getcwd()
     cwd_path = os.getcwd()
     sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
     sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
     from sdk_dist import dist_do_building
     from sdk_dist import dist_do_building
-    dist_do_building(BSP_ROOT)
+    dist_do_building(BSP_ROOT, dist_dir)
     
     

+ 3 - 3
bsp/lpc55sxx/lpc55s69_nxp_evk_ns/rtconfig.py

@@ -46,7 +46,7 @@ if PLATFORM == 'gcc':
     DEVICE = ' -mcpu=' + CPU + ' -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
     DEVICE = ' -mcpu=' + CPU + ' -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
     CFLAGS = DEVICE + ' -Wall -D__FPU_PRESENT -eentry'
     CFLAGS = DEVICE + ' -Wall -D__FPU_PRESENT -eentry'
     AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb -D__START=entry'
     AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb -D__START=entry'
-    LFLAGS = DEVICE + ' -lm -lgcc -lc' + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/LPC55S69_cm33_core0_flash.ld'
+    LFLAGS = DEVICE + ' -lm -lgcc -lc' + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T ../lpc55s69_nxp_evk/board/linker_scripts/LPC55S69_cm33_core0_flash.ld'
 
 
     CPATH = ''
     CPATH = ''
     LPATH = ''
     LPATH = ''
@@ -153,9 +153,9 @@ elif PLATFORM == 'iar':
     EXEC_PATH = EXEC_PATH + '/arm/bin/'
     EXEC_PATH = EXEC_PATH + '/arm/bin/'
     POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
     POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
 
 
-def dist_handle(BSP_ROOT):
+def dist_handle(BSP_ROOT, dist_dir):
     cwd_path = os.getcwd()
     cwd_path = os.getcwd()
     sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
     sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
     from sdk_dist import dist_do_building
     from sdk_dist import dist_do_building
-    dist_do_building(BSP_ROOT)
+    dist_do_building(BSP_ROOT, dist_dir)
     
     

+ 1 - 2
bsp/lpc55sxx/tools/sdk_dist.py

@@ -5,11 +5,10 @@ cwd_path = os.getcwd()
 sys.path.append(os.path.join(os.path.dirname(cwd_path), 'rt-thread', 'tools'))
 sys.path.append(os.path.join(os.path.dirname(cwd_path), 'rt-thread', 'tools'))
 
 
 # BSP dist function
 # BSP dist function
-def dist_do_building(BSP_ROOT):
+def dist_do_building(BSP_ROOT, dist_dir):
     from mkdist import bsp_copy_files
     from mkdist import bsp_copy_files
     import rtconfig
     import rtconfig
 
 
-    dist_dir  = os.path.join(BSP_ROOT, 'dist', os.path.basename(BSP_ROOT))
     library_path = os.path.join(os.path.dirname(BSP_ROOT), 'Libraries')
     library_path = os.path.join(os.path.dirname(BSP_ROOT), 'Libraries')
     library_dir  = os.path.join(dist_dir, 'Libraries')
     library_dir  = os.path.join(dist_dir, 'Libraries')
     print("=> copy bsp drivers")
     print("=> copy bsp drivers")