Skip to content

Commit 7329e87

Browse files
committed
更新info信息生成
1 parent 4933876 commit 7329e87

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

generate-info.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const ARCHITECTURE_MAP = {
4848
'STMicroelectronics:stm32:GenL0': 'arm-cortex-m0',
4949
'STMicroelectronics:stm32:GenL4': 'arm-cortex-m4',
5050
'STMicroelectronics:stm32:GenC0': 'arm-cortex-m0',
51+
'STMicroelectronics:stm32:GenWB': 'arm-cortex-m4',
5152

5253
// RP2040
5354
'rp2040:rp2040': 'arm-cortex-m0+',
@@ -240,8 +241,9 @@ function getArchitecture(core, boardType) {
240241
*/
241242
function isSeriesBoard(dirName, pkg) {
242243
const name = dirName.toUpperCase();
243-
// STM32 系列通常目录名是 STM32Fx 格式
244+
// STM32 系列通常目录名是 STM32Fx 格式 或者STM32WB
244245
if (/^STM32[FGHLC]\d$/.test(name)) return true;
246+
if (/^STM32WB$/.test(name)) return true;
245247
return false;
246248
}
247249

@@ -370,7 +372,7 @@ function generateSeriesInfo(dirName, pkg, boardJson) {
370372

371373
const info = {
372374
$schema: 'board-info-schema',
373-
name: dirName.toLowerCase(),
375+
name: pkg.name?.replace('@aily-project/', '') || dirName, // dirName.toLowerCase(),
374376
displayName: pkg.nickname || `${dirName} Series`,
375377
brand: pkg.brand || '',
376378
type: 'series',

0 commit comments

Comments
 (0)