Skip to content

Commit d4d6f60

Browse files
authored
Merge pull request hathach#1962 from hathach/update-bsp
Update bsp
2 parents 779149e + f58da31 commit d4d6f60

File tree

63 files changed

+444
-916
lines changed

Some content is hidden

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

63 files changed

+444
-916
lines changed

.codespell/ignore-words.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ te
99
attch
1010
endianess
1111
pris
12+
busses

.github/workflows/build_arm.yml

Lines changed: 18 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,20 @@ jobs:
3535
- 'broadcom_32bit'
3636
- 'imxrt'
3737
- 'kinetis_k32 kinetis_kl'
38-
- 'lpc15 lpc18'
39-
- 'lpc54 lpc55'
38+
- 'lpc11 lpc13 lpc15 lpc17 lpc18'
39+
- 'lpc51 lpc54 lpc55'
4040
- 'mm32 msp432e4'
4141
- 'nrf'
4242
- 'ra'
4343
- 'rp2040'
44-
- 'samd11'
45-
- 'samd21'
46-
- 'samd51'
44+
- 'samd11 samd21'
45+
- 'samd51 same5x'
4746
- 'saml2x'
48-
- 'stm32f0 stm32f1'
47+
- 'stm32f0 stm32f1 stm32f2 stm32f3'
4948
- 'stm32f4'
5049
- 'stm32f7'
51-
- 'stm32g4 stm32wb'
52-
- 'stm32h7'
53-
- 'stm32l4'
50+
- 'stm32g4 stm32h7'
51+
- 'stm32l0 stm32l4 stm32u5 stm32wb'
5452
- 'tm4c123 xmc4000'
5553
steps:
5654
- name: Setup Python
@@ -96,55 +94,28 @@ jobs:
9694
# Upload binaries for rp2040/stm32l412nucleo hardware test with self-hosted
9795

9896
- name: Prepare rp2040 Artifacts
99-
if: matrix.family == 'rp2040' && github.repository_owner == 'hathach'
97+
if: contains(matrix.family, 'rp2040') && github.repository_owner == 'hathach'
10098
run: find examples/ -name "*.elf" -exec mv {} . \;
10199

102100
- name: Prepare stm32l412nucleo Artifacts
103-
if: matrix.family == 'stm32l4'
101+
if: contains(matrix.family, 'stm32l4')
104102
run: find examples/ -path "*stm32l412nucleo/*.elf" -exec mv {} . \;
105103

106-
- name: Upload Artifacts for hardware testing
107-
if: matrix.family == 'stm32l4' || (matrix.family == 'rp2040' && github.repository_owner == 'hathach')
104+
- name: Upload Artifacts for rp2040
105+
if: contains(matrix.family,'rp2040') && github.repository_owner == 'hathach'
108106
uses: actions/upload-artifact@v3
109107
with:
110-
name: ${{ matrix.family }}
108+
name: rp2040
111109
path: |
112110
*.elf
113111
114-
# ---------------------------------------
115-
# Build all no-family (orphaned) boards
116-
# disable this workflow since it is often failed randomly
117-
# ---------------------------------------
118-
build-board:
119-
runs-on: ubuntu-latest
120-
if: false
121-
strategy:
122-
fail-fast: false
123-
matrix:
124-
example:
125-
# Alphabetical order, a group of 4
126-
- 'device/audio_test device/board_test device/cdc_dual_ports device/cdc_msc'
127-
- 'device/cdc_msc_freertos device/dfu_runtime device/hid_composite device/hid_composite_freertos'
128-
- 'device/hid_generic_inout device/hid_multiple_interface device/midi_test device/msc_dual_lun'
129-
- 'device/net_lwip_webserver'
130-
- 'device/uac2_headset device/usbtmc device/webusb_serial host/cdc_msc_hid'
131-
132-
steps:
133-
- name: Setup Python
134-
uses: actions/setup-python@v4
135-
with:
136-
python-version: '3.x'
137-
138-
- name: Install ARM GCC
139-
uses: carlosperate/arm-none-eabi-gcc-action@v1
112+
- name: Upload Artifacts for stm32l412nucleo
113+
if: contains(matrix.family, 'stm32l4') && github.repository_owner == 'hathach'
114+
uses: actions/upload-artifact@v3
140115
with:
141-
release: '11.2-2022.02'
142-
143-
- name: Checkout TinyUSB
144-
uses: actions/checkout@v3
145-
146-
- name: Build
147-
run: python3 tools/build_board.py ${{ matrix.example }}
116+
name: stm32l4
117+
path: |
118+
*.elf
148119
149120
# ---------------------------------------
150121
# Hardware in the loop (HIL)

examples/rules.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ ifeq ($(NO_LTO),1)
6666
CFLAGS := $(filter-out -flto,$(CFLAGS))
6767
endif
6868

69+
ifneq ($(CFLAGS_SKIP),)
70+
CFLAGS := $(filter-out $(CFLAGS_SKIP),$(CFLAGS))
71+
endif
72+
6973
LDFLAGS += $(CFLAGS) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections
7074

7175
ifdef LD_FILE

hw/bsp/d5035_01/board.mk

Lines changed: 0 additions & 61 deletions
This file was deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
MCU = 11uxx
2+
MCU_DRV = 11xx
3+
4+
CFLAGS += \
5+
-DCORE_M0 \
6+
-DCFG_EXAMPLE_MSC_READONLY \
7+
-DCFG_EXAMPLE_VIDEO_READONLY \
8+
-DCFG_TUSB_MEM_SECTION='__attribute__((section(".data.$$RAM2")))'
9+
10+
# mcu driver cause following warnings
11+
CFLAGS += \
12+
-Wno-error=strict-prototypes \
13+
-Wno-error=unused-parameter \
14+
-Wno-error=redundant-decls
15+
16+
# All source paths should be relative to the top level.
17+
LD_FILE = $(BOARD_PATH)/lpc11u37.ld
18+
19+
# For flash-jlink target
20+
JLINK_DEVICE = LPC11U37/401
21+
PYOCD_TARGET = lpc11u37
22+
23+
# flash using pyocd
24+
flash: flash-pyocd

hw/bsp/lpcxpresso11u37/lpcxpresso11u37.c renamed to hw/bsp/lpc11/boards/lpcxpresso11u37/lpcxpresso11u37.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*/
2626

2727
#include "chip.h"
28-
#include "../board.h"
28+
#include "bsp/board.h"
2929

3030
//--------------------------------------------------------------------+
3131
// Forward USB interrupt events to TinyUSB IRQ Handler
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
MCU = 11u6x
2+
MCU_DRV = 11u6x
3+
4+
CFLAGS += \
5+
-DCORE_M0PLUS \
6+
-D__VTOR_PRESENT=0 \
7+
-DCFG_TUSB_MEM_SECTION='__attribute__((section(".data.$$RAM3")))' \
8+
-DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))'
9+
10+
# All source paths should be relative to the top level.
11+
LD_FILE = $(BOARD_PATH)/lpc11u68.ld
12+
13+
# For flash-jlink target
14+
JLINK_DEVICE = LPC11U68
15+
PYOCD_TARGET = lpc11u68
16+
17+
# flash using pyocd
18+
flash: flash-pyocd

hw/bsp/lpcxpresso11u68/lpcxpresso11u68.c renamed to hw/bsp/lpc11/boards/lpcxpresso11u68/lpcxpresso11u68.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*/
2626

2727
#include "chip.h"
28-
#include "../board.h"
28+
#include "bsp/board.h"
2929

3030
//--------------------------------------------------------------------+
3131
// Forward USB interrupt events to TinyUSB IRQ Handler

0 commit comments

Comments
 (0)