[bsp][ht32] 修复编译问题

修复scons编译问题并添加ci
This commit is contained in:
CYFS 2024-08-29 06:31:59 +08:00 committed by GitHub
parent 53b894c46c
commit 4f10d05a5b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 60 additions and 29 deletions

View File

@ -49,7 +49,7 @@ jobs:
RTT_TOOL_CHAIN: "sourcery-arm"
SUB_RTT_BSP:
- "raspberry-pico"
- RTT_BSP: "others_at32_hc32"
- RTT_BSP: "others_at32_hc32_ht32"
RTT_TOOL_CHAIN: "sourcery-arm"
SUB_RTT_BSP:
- "qemu-vexpress-a9"
@ -96,6 +96,8 @@ jobs:
- "acm32/acm32f0x0-nucleo"
- "acm32/acm32f4xx-nucleo"
- "rm48x50"
- "ht32/ht32f52352"
- "ht32/ht32f12366"
- RTT_BSP: "stm32l4_f0_f1"
RTT_TOOL_CHAIN: "sourcery-arm"
SUB_RTT_BSP:

View File

@ -48,7 +48,7 @@ if PLATFORM == 'gcc':
CFLAGS = DEVICE + ' -Dgcc'
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
CFLAGS += ' -D USE_HT32F12365_66'
CPATH = ''
LPATH = ''

View File

@ -48,7 +48,7 @@ if PLATFORM == 'gcc':
CFLAGS = DEVICE + ' -Dgcc'
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
CFLAGS += ' -D USE_HT32F52342_52'
CPATH = ''
LPATH = ''

View File

@ -2,11 +2,37 @@ import os
import sys
import rtconfig
from building import *
def get_source(ic_model, file_path, system_path, base_path):
source_path = []
files_list = []
readafter = 0
if not os.path.isfile(file_path):
return
with open(file_path, 'r') as file:
# content = file.read()
for line in file:
if readafter == 2 and line.find('>') != -1:
break
if readafter == 2:
files_list.append(line.strip())
if line.find(ic_model) != -1:
readafter = 1
if readafter == 1 and line.find('<') != -1:
readafter = 2
for line in files_list:
if line.find('system') != -1:
source_path.append(os.path.join(system_path, line.strip()))
else:
source_path.append(os.path.join(base_path, line.strip()))
return source_path
Import('rtconfig')
tools_path = os.path.normpath(os.getcwd() + '../../..' + '/tools')
sys.path.append(tools_path)
from sdk_dist import get_source
source_file_path = os.path.join(os.getcwd(), 'Source_file')
base_path = 'library/HT32F1xxxx_Driver/src/'

View File

@ -2,11 +2,38 @@ import os
import sys
import rtconfig
from building import *
def get_source(ic_model, file_path, system_path, base_path):
source_path = []
files_list = []
readafter = 0
if not os.path.isfile(file_path):
return
with open(file_path, 'r') as file:
# content = file.read()
for line in file:
if readafter == 2 and line.find('>') != -1:
break
if readafter == 2:
files_list.append(line.strip())
if line.find(ic_model) != -1:
readafter = 1
if readafter == 1 and line.find('<') != -1:
readafter = 2
for line in files_list:
if line.find('system') != -1:
source_path.append(os.path.join(system_path, line.strip()))
else:
source_path.append(os.path.join(base_path, line.strip()))
return source_path
Import('rtconfig')
tools_path = os.path.normpath(os.getcwd() + '../../..' + '/tools')
sys.path.append(tools_path)
from sdk_dist import get_source
source_file_path = os.path.join(os.getcwd(), 'Source_file')
base_path = 'library/HT32F5xxxx_Driver/src/'

View File

@ -37,27 +37,3 @@ def dist_do_building(BSP_ROOT, dist_dir):
bsp_update_kconfig_library(dist_dir)
def get_source(ic_model, file_path, system_path, base_path):
source_path = []
files_list = []
readafter = 0
if not os.path.isfile(file_path):
return
with open(file_path, 'r') as file:
# content = file.read()
for line in file:
if readafter == 2 and line.find('>') != -1:
break
if readafter == 2:
files_list.append(line.strip())
if line.find(ic_model) != -1:
readafter = 1
if readafter == 1 and line.find('<') != -1:
readafter = 2
for line in files_list:
if line.find('system') != -1:
source_path.append(os.path.join(system_path, line.strip()))
else:
source_path.append(os.path.join(base_path, line.strip()))
return source_path