Skip to content

Commit 7de1663

Browse files
authored
Merge branch 'master' into master
2 parents c5d2c82 + a592282 commit 7de1663

File tree

143 files changed

+5491
-193
lines changed

Some content is hidden

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

143 files changed

+5491
-193
lines changed

.github/workflows/build_aarch64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
matrix:
1919
family:
2020
# Alphabetical order
21-
- 'raspberrypi4'
21+
- 'broadcom_64bit'
2222
steps:
2323
- name: Setup Python
2424
uses: actions/setup-python@v2

.github/workflows/build_arm.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
matrix:
4040
family:
4141
# Alphabetical order
42+
- 'broadcom_32bit'
4243
- 'imxrt'
4344
- 'lpc15'
4445
- 'lpc18'
@@ -114,7 +115,7 @@ jobs:
114115
done
115116
116117
# ---------------------------------------
117-
# Build all no-family (opharned) boards
118+
# Build all no-family (orphaned) boards
118119
# ---------------------------------------
119120
build-board:
120121
runs-on: ubuntu-latest

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ cov-int
2626
# cppcheck build directories
2727
*-build-dir
2828
/_bin/
29+
__pycache__
30+

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@
124124
[submodule "hw/mcu/gd/nuclei-sdk"]
125125
path = hw/mcu/gd/nuclei-sdk
126126
url = https://github.com/Nuclei-Software/nuclei-sdk.git
127+
[submodule "hw/mcu/bridgetek/ft9xx/ft90x-sdk"]
128+
path = hw/mcu/bridgetek/ft9xx/ft90x-sdk
129+
url = https://github.com/BRTSG-FOSS/ft90x-sdk
127130
[submodule "hw/mcu/mindmotion/mm32sdk"]
128131
path = hw/mcu/mindmotion/mm32sdk
129132
url = https://github.com/hathach/mm32sdk.git

README.rst

Lines changed: 3 additions & 2 deletions

docs/reference/supported.rst

Lines changed: 1 addition & 1 deletion

examples/device/audio_4_channel_mic/.skip.MCU_SAMD11

Whitespace-only changes.

examples/device/audio_4_channel_mic/.skip.MCU_SAME5X

Whitespace-only changes.

examples/device/audio_4_channel_mic/.skip.MCU_SAMG

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
mcu:SAMD11
2+
mcu:SAME5X
3+
mcu:SAMG

examples/device/audio_test/.skip.MCU_SAMD11

Whitespace-only changes.

examples/device/audio_test/.skip.MCU_SAME5X

Whitespace-only changes.

examples/device/audio_test/.skip.MCU_SAMG

Whitespace-only changes.

examples/device/audio_test/skip.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
mcu:SAMD11
2+
mcu:SAME5X
3+
mcu:SAMG

examples/device/cdc_msc/.skip.MCU_SAMD11

Whitespace-only changes.

examples/device/cdc_msc/skip.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mcu:SAMD11

examples/device/cdc_msc/src/msc_disk.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ bool tud_msc_test_unit_ready_cb(uint8_t lun)
142142

143143
// RAM disk is ready until ejected
144144
if (ejected) {
145+
// Additional Sense 3A-00 is NOT_FOUND
145146
tud_msc_set_sense(lun, SCSI_SENSE_NOT_READY, 0x3a, 0x00);
146147
return false;
147148
}

examples/device/cdc_msc/src/tusb_config.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
// Default to Highspeed for MCU with internal HighSpeed PHY (can be port specific), otherwise FullSpeed
4949
#ifndef BOARD_DEVICE_RHPORT_SPEED
5050
#if TU_CHECK_MCU(OPT_MCU_LPC18XX, OPT_MCU_LPC43XX, OPT_MCU_MIMXRT10XX, OPT_MCU_NUC505) ||\
51-
TU_CHECK_MCU(OPT_MCU_CXD56, OPT_MCU_SAMX7X, OPT_MCU_BCM2711)
51+
TU_CHECK_MCU(OPT_MCU_CXD56, OPT_MCU_SAMX7X, OPT_MCU_BCM2711) ||\
52+
TU_CHECK_MCU(OPT_MCU_FT90X, OPT_MCU_FT93X)
5253
#define BOARD_DEVICE_RHPORT_SPEED OPT_MODE_HIGH_SPEED
5354
#else
5455
#define BOARD_DEVICE_RHPORT_SPEED OPT_MODE_FULL_SPEED

examples/device/cdc_msc/src/usb_descriptors.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,16 @@ enum
117117
#define EPNUM_MSC_OUT 0x05
118118
#define EPNUM_MSC_IN 0x84
119119

120+
#elif CFG_TUSB_MCU == OPT_MCU_FT90X || CFG_TUSB_MCU == OPT_MCU_FT93X
121+
// FT9XX doesn't support a same endpoint number with different direction IN and OUT
122+
// e.g EP1 OUT & EP1 IN cannot exist together
123+
#define EPNUM_CDC_NOTIF 0x81
124+
#define EPNUM_CDC_OUT 0x02
125+
#define EPNUM_CDC_IN 0x83
126+
127+
#define EPNUM_MSC_OUT 0x04
128+
#define EPNUM_MSC_IN 0x85
129+
120130
#else
121131
#define EPNUM_CDC_NOTIF 0x81
122132
#define EPNUM_CDC_OUT 0x02

examples/device/cdc_msc_freertos/.skip.MCU_BCM2711

Whitespace-only changes.

examples/device/cdc_msc_freertos/.skip.MCU_CXD56

Whitespace-only changes.

examples/device/cdc_msc_freertos/.skip.MCU_GD32VF103

Whitespace-only changes.

examples/device/cdc_msc_freertos/.skip.MCU_MKL25ZXX

Whitespace-only changes.

examples/device/cdc_msc_freertos/.skip.MCU_MSP430x5xx

Whitespace-only changes.

examples/device/cdc_msc_freertos/.skip.MCU_RP2040

Whitespace-only changes.

examples/device/cdc_msc_freertos/.skip.MCU_SAMD11

Whitespace-only changes.

examples/device/cdc_msc_freertos/.skip.MCU_SAMX7X

Whitespace-only changes.

examples/device/cdc_msc_freertos/.skip.MCU_VALENTYUSB_EPTRI

Whitespace-only changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
mcu:CXD56
2+
mcu:MSP430x5xx
3+
mcu:SAMD11
4+
mcu:VALENTYUSB_EPTRI
5+
mcu:MKL25ZXX
6+
mcu:RP2040
7+
mcu:SAMX7X
8+
mcu:GD32VF103
9+
family:broadcom_64bit
10+
family:broadcom_32bit

examples/device/dfu/.skip.MCU_TM4C123

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/device/dfu/skip.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mcu:TM4C123
2+
mcu:BCM2835

examples/device/dynamic_configuration/.skip.MCU_SAMD11

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mcu:SAMD11

examples/device/hid_boot_interface/src/tusb_config.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
// Default to Highspeed for MCU with internal HighSpeed PHY (can be port specific), otherwise FullSpeed
4949
#ifndef BOARD_DEVICE_RHPORT_SPEED
5050
#if (CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX || \
51-
CFG_TUSB_MCU == OPT_MCU_NUC505 || CFG_TUSB_MCU == OPT_MCU_CXD56 || CFG_TUSB_MCU == OPT_MCU_SAMX7X)
51+
CFG_TUSB_MCU == OPT_MCU_NUC505 || CFG_TUSB_MCU == OPT_MCU_CXD56 || CFG_TUSB_MCU == OPT_MCU_SAMX7X || \
52+
CFG_TUSB_MCU == OPT_MCU_FT90X || CFG_TUSB_MCU == OPT_MCU_FT93X)
5253
#define BOARD_DEVICE_RHPORT_SPEED OPT_MODE_HIGH_SPEED
5354
#else
5455
#define BOARD_DEVICE_RHPORT_SPEED OPT_MODE_FULL_SPEED

examples/device/hid_composite/src/tusb_config.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
// Default to Highspeed for MCU with internal HighSpeed PHY (can be port specific), otherwise FullSpeed
4949
#ifndef BOARD_DEVICE_RHPORT_SPEED
5050
#if TU_CHECK_MCU(OPT_MCU_LPC18XX, OPT_MCU_LPC43XX, OPT_MCU_MIMXRT10XX, OPT_MCU_NUC505) ||\
51-
TU_CHECK_MCU(OPT_MCU_CXD56, OPT_MCU_SAMX7X, OPT_MCU_BCM2711)
51+
TU_CHECK_MCU(OPT_MCU_CXD56, OPT_MCU_SAMX7X, OPT_MCU_BCM2711) ||\
52+
TU_CHECK_MCU(OPT_MCU_FT90X, OPT_MCU_FT93X)
5253
#define BOARD_DEVICE_RHPORT_SPEED OPT_MODE_HIGH_SPEED
5354
#else
5455
#define BOARD_DEVICE_RHPORT_SPEED OPT_MODE_FULL_SPEED

examples/device/hid_composite_freertos/.skip.MCU_BCM2711

Whitespace-only changes.

examples/device/hid_composite_freertos/.skip.MCU_CXD56

Whitespace-only changes.

examples/device/hid_composite_freertos/.skip.MCU_GD32VF103

Whitespace-only changes.

examples/device/hid_composite_freertos/.skip.MCU_MSP430x5xx

Whitespace-only changes.

examples/device/hid_composite_freertos/.skip.MCU_RP2040

Whitespace-only changes.

examples/device/hid_composite_freertos/.skip.MCU_SAMD11

Whitespace-only changes.

examples/device/hid_composite_freertos/.skip.MCU_SAMX7X

Whitespace-only changes.

examples/device/hid_composite_freertos/.skip.MCU_VALENTYUSB_EPTRI

Whitespace-only changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
mcu:CXD56
2+
mcu:MSP430x5xx
3+
mcu:SAMD11
4+
mcu:VALENTYUSB_EPTRI
5+
mcu:RP2040
6+
mcu:SAMX7X
7+
mcu:GD32VF103
8+
family:broadcom_64bit
9+
family:broadcom_32bit

examples/device/hid_multiple_interface/src/tusb_config.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
// Default to Highspeed for MCU with internal HighSpeed PHY (can be port specific), otherwise FullSpeed
4949
#ifndef BOARD_DEVICE_RHPORT_SPEED
5050
#if (CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX || \
51-
CFG_TUSB_MCU == OPT_MCU_NUC505 || CFG_TUSB_MCU == OPT_MCU_CXD56)
51+
CFG_TUSB_MCU == OPT_MCU_NUC505 || CFG_TUSB_MCU == OPT_MCU_CXD56 || \
52+
CFG_TUSB_MCU == OPT_MCU_FT90X || CFG_TUSB_MCU == OPT_MCU_FT93X)
5253
#define BOARD_DEVICE_RHPORT_SPEED OPT_MODE_HIGH_SPEED
5354
#else
5455
#define BOARD_DEVICE_RHPORT_SPEED OPT_MODE_FULL_SPEED

examples/device/midi_test/src/tusb_config.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
// Default to Highspeed for MCU with internal HighSpeed PHY (can be port specific), otherwise FullSpeed
4949
#ifndef BOARD_DEVICE_RHPORT_SPEED
5050
#if (CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX || \
51-
CFG_TUSB_MCU == OPT_MCU_NUC505 || CFG_TUSB_MCU == OPT_MCU_CXD56)
51+
CFG_TUSB_MCU == OPT_MCU_NUC505 || CFG_TUSB_MCU == OPT_MCU_CXD56 || \
52+
CFG_TUSB_MCU == OPT_MCU_FT90X || CFG_TUSB_MCU == OPT_MCU_FT93X)
5253
#define BOARD_DEVICE_RHPORT_SPEED OPT_MODE_HIGH_SPEED
5354
#else
5455
#define BOARD_DEVICE_RHPORT_SPEED OPT_MODE_FULL_SPEED

examples/device/midi_test/src/usb_descriptors.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,15 @@ enum
8383
#if CFG_TUSB_MCU == OPT_MCU_LPC175X_6X || CFG_TUSB_MCU == OPT_MCU_LPC177X_8X || CFG_TUSB_MCU == OPT_MCU_LPC40XX
8484
// LPC 17xx and 40xx endpoint type (bulk/interrupt/iso) are fixed by its number
8585
// 0 control, 1 In, 2 Bulk, 3 Iso, 4 In etc ...
86-
#define EPNUM_MIDI 0x02
86+
#define EPNUM_MIDI_OUT 0x02
87+
#define EPNUM_MIDI_IN 0x02
88+
#elif CFG_TUSB_MCU == OPT_MCU_FT90X || CFG_TUSB_MCU == OPT_MCU_FT93X
89+
// On Bridgetek FT9xx endpoint numbers must be unique...
90+
#define EPNUM_MIDI_OUT 0x02
91+
#define EPNUM_MIDI_IN 0x03
8792
#else
88-
#define EPNUM_MIDI 0x01
93+
#define EPNUM_MIDI_OUT 0x01
94+
#define EPNUM_MIDI_IN 0x01
8995
#endif
9096

9197
uint8_t const desc_fs_configuration[] =
@@ -94,7 +100,7 @@ uint8_t const desc_fs_configuration[] =
94100
TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, 0x00, 100),
95101

96102
// Interface number, string index, EP Out & EP In address, EP size
97-
TUD_MIDI_DESCRIPTOR(ITF_NUM_MIDI, 0, EPNUM_MIDI, 0x80 | EPNUM_MIDI, 64)
103+
TUD_MIDI_DESCRIPTOR(ITF_NUM_MIDI, 0, EPNUM_MIDI_OUT, (0x80 | EPNUM_MIDI_IN), 64)
98104
};
99105

100106
#if TUD_OPT_HIGH_SPEED
@@ -104,7 +110,7 @@ uint8_t const desc_hs_configuration[] =
104110
TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, 0x00, 100),
105111

106112
// Interface number, string index, EP Out & EP In address, EP size
107-
TUD_MIDI_DESCRIPTOR(ITF_NUM_MIDI, 0, EPNUM_MIDI, 0x80 | EPNUM_MIDI, 512)
113+
TUD_MIDI_DESCRIPTOR(ITF_NUM_MIDI, 0, EPNUM_MIDI_OUT, (0x80 | EPNUM_MIDI_IN), 512)
108114
};
109115
#endif
110116

examples/device/msc_dual_lun/.skip.MCU_MKL25ZXX

Whitespace-only changes.

examples/device/msc_dual_lun/.skip.MCU_SAMD11

Whitespace-only changes.

examples/device/msc_dual_lun/skip.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mcu:SAMD11
2+
mcu:MKL25ZXX

examples/device/net_lwip_webserver/.skip.MCU_BCM2711

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/device/net_lwip_webserver/.skip.MCU_LPC11UXX

Whitespace-only changes.

examples/device/net_lwip_webserver/.skip.MCU_LPC13XX

Whitespace-only changes.

examples/device/net_lwip_webserver/.skip.MCU_MKL25ZXX

Whitespace-only changes.

examples/device/net_lwip_webserver/.skip.MCU_MSP430x5xx

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/device/net_lwip_webserver/.skip.MCU_NUC121

Whitespace-only changes.

examples/device/net_lwip_webserver/.skip.MCU_SAMD11

Whitespace-only changes.

examples/device/net_lwip_webserver/.skip.MCU_STM32L0

Whitespace-only changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
mcu:LPC11UXX
2+
mcu:LPC13XX
3+
mcu:MSP430x5xx
4+
mcu:NUC121
5+
mcu:SAMD11
6+
mcu:STM32L0
7+
mcu:MKL25ZXX
8+
family:broadcom_64bit
9+
family:broadcom_32bit
10+
board:curiosity_nano

examples/device/uac2_headset/.skip.MCU_LPC11UXX

Whitespace-only changes.

examples/device/uac2_headset/.skip.MCU_LPC13XX

Whitespace-only changes.

examples/device/uac2_headset/.skip.MCU_NUC121

Whitespace-only changes.

examples/device/uac2_headset/.skip.MCU_SAMD11

Whitespace-only changes.

examples/device/uac2_headset/.skip.MCU_SAME5X

Whitespace-only changes.

examples/device/uac2_headset/.skip.MCU_SAMG

Whitespace-only changes.

examples/device/uac2_headset/skip.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
mcu:LPC11UXX
2+
mcu:LPC13XX
3+
mcu:NUC121
4+
mcu:SAMD11
5+
mcu:SAME5X
6+
mcu:SAMG

examples/device/usbtmc/skip.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mcu:BCM2835

examples/device/video_capture/.skip.MCU_MSP430x5xx

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/device/video_capture/.skip.MCU_SAMD11

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mcu:MSP430x5xx
2+
mcu:SAMD11

examples/device/video_capture/src/usb_descriptors.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ enum {
103103
TUD_VIDEO_DESC_CS_VS_FRM_UNCOMPR_CONT(/*bFrameIndex */1, 0, _width, _height, \
104104
_width * _height * 16, _width * _height * 16 * _fps, \
105105
_width * _height * 16, \
106-
(10000000/_fps), (10000000/_fps), 10000000, 100000), \
106+
(10000000/_fps), (10000000/_fps), (10000000/_fps)*_fps, (10000000/_fps)), \
107107
TUD_VIDEO_DESC_CS_VS_COLOR_MATCHING(VIDEO_COLOR_PRIMARIES_BT709, VIDEO_COLOR_XFER_CH_BT709, VIDEO_COLOR_COEF_SMPTE170M), \
108108
/* VS alt 1 */\
109109
TUD_VIDEO_DESC_STD_VS(1, 1, 1, 0), \

examples/host/cdc_msc_hid/.only.MCU_LPC175X_6X

Whitespace-only changes.

examples/host/cdc_msc_hid/.only.MCU_LPC177X_8X

Whitespace-only changes.

examples/host/cdc_msc_hid/.only.MCU_LPC18XX

Whitespace-only changes.

examples/host/cdc_msc_hid/.only.MCU_LPC40XX

Whitespace-only changes.

examples/host/cdc_msc_hid/.only.MCU_LPC43XX

Whitespace-only changes.

examples/host/cdc_msc_hid/.only.MCU_MIMXRT10XX

Whitespace-only changes.

examples/host/cdc_msc_hid/.only.MCU_MSP432E4

Whitespace-only changes.

examples/host/cdc_msc_hid/.only.MCU_RP2040

Whitespace-only changes.

examples/host/cdc_msc_hid/only.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
mcu:LPC175X_6X
2+
mcu:LPC177X_8X
3+
mcu:LPC18XX
4+
mcu:LPC40XX
5+
mcu:LPC43XX
6+
mcu:MIMXRT10XX
7+
mcu:RP2040
8+
mcu:MSP432E4
9+
mcu:RX65X

examples/host/hid_controller/.only.MCU_LPC175X_6X

Whitespace-only changes.

examples/host/hid_controller/.only.MCU_LPC177X_8X

Whitespace-only changes.

examples/host/hid_controller/.only.MCU_LPC18XX

Whitespace-only changes.

examples/host/hid_controller/.only.MCU_LPC40XX

Whitespace-only changes.

examples/host/hid_controller/.only.MCU_LPC43XX

Whitespace-only changes.

examples/host/hid_controller/.only.MCU_MIMXRT10XX

Whitespace-only changes.

examples/host/hid_controller/.only.MCU_MSP432E4

Whitespace-only changes.

examples/host/hid_controller/.only.MCU_RP2040

Whitespace-only changes.

examples/host/hid_controller/only.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
mcu:LPC175X_6X
2+
mcu:LPC177X_8X
3+
mcu:LPC18XX
4+
mcu:LPC40XX
5+
mcu:LPC43XX
6+
mcu:MIMXRT10XX
7+
mcu:RP2040
8+
mcu:MSP432E4
9+
mcu:RX65X

examples/make.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ endif
5454
#-------------- Cross Compiler ------------
5555
# Can be set by board, default to ARM GCC
5656
CROSS_COMPILE ?= arm-none-eabi-
57+
# Allow for -Os to be changed by board makefiles in case -Os is not allowed
58+
CFLAGS_OPTIMIZED ?= -Os
5759

5860
CC = $(CROSS_COMPILE)gcc
5961
CXX = $(CROSS_COMPILE)g++
@@ -112,7 +114,7 @@ CFLAGS += \
112114
ifeq ($(DEBUG), 1)
113115
CFLAGS += -Og
114116
else
115-
CFLAGS += -Os
117+
CFLAGS += $(CFLAGS_OPTIMIZED)
116118
endif
117119

118120
# Log level is mapped to TUSB DEBUG option

examples/rules.mk

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ ifeq (,$(findstring $(FAMILY),esp32s2 esp32s3 rp2040))
1212
# Compiler Flags
1313
# ---------------------------------------
1414

15+
LIBS_GCC ?= -lgcc -lm -lnosys
16+
1517
# libc
16-
LIBS += -lgcc -lm -lnosys
18+
LIBS += $(LIBS_GCC)
1719

1820
ifneq ($(BOARD), spresense)
1921
LIBS += -lc
@@ -49,7 +51,11 @@ ifeq ($(NO_LTO),1)
4951
CFLAGS := $(filter-out -flto,$(CFLAGS))
5052
endif
5153

52-
LDFLAGS += $(CFLAGS) -Wl,-T,$(TOP)/$(LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections
54+
ifneq ($(LD_FILE),)
55+
LDFLAGS_LD_FILE ?= -Wl,-T,$(TOP)/$(LD_FILE)
56+
endif
57+
58+
LDFLAGS += $(CFLAGS) $(LDFLAGS_LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections
5359
ifneq ($(SKIP_NANOLIB), 1)
5460
LDFLAGS += -specs=nosys.specs -specs=nano.specs
5561
endif

hw/bsp/board_mcu.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
//--------------------------------------------------------------------+
3434
// Low Level MCU header include. TinyUSB stack and example should be
35-
// platform independent and mostly doens't need to include this file.
35+
// platform independent and mostly doesn't need to include this file.
3636
// However there are still certain situation where this file is needed:
3737
// - FreeRTOSConfig.h to set up correct clock and NVIC interrupts for ARM Cortex
3838
// - SWO logging for Cortex M with ITM_SendChar() / ITM_ReceiveChar()
@@ -146,6 +146,9 @@
146146
#elif CFG_TUSB_MCU == OPT_MCU_TM4C123
147147
#include "TM4C123.h"
148148

149+
#elif TU_CHECK_MCU(OPT_MCU_BCM2711, OPT_MCU_BCM2835, OPT_MCU_BCM2837)
150+
// no header needed
151+
149152
#else
150153
#error "Missing MCU header"
151154
#endif
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CFLAGS += -mcpu=arm1176jzf-s \
2+
-DBCM_VERSION=2835 \
3+
-DCFG_TUSB_MCU=OPT_MCU_BCM2835
4+
5+
SUFFIX =

0 commit comments

Comments
 (0)