Skip to content

Add DWC2 cache maintenance routines for STM32 #2963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@ latex
.settings/
.vscode/
.gdb_history
/examples/*/*/build*
test_old/
tests_obsolete/
_build
/examples/*/*/ses
/examples/*/*/ozone
/examples/obsolete
hw/bsp/**/cubemx/*/
.mxproject
Expand All @@ -38,3 +35,8 @@ sdkconfig
.PVS-Studio
.vscode/
build/
# example build directories
/examples/device/*/*/
/examples/dual/*/*/
/examples/host/*/*/
/examples/typec/*/*/
1 change: 1 addition & 0 deletions docs/reference/boards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ stm32h743nucleo STM32 H743 Nucleo stm32h7 https://www.st
stm32h745disco STM32 H745 Discovery stm32h7 https://www.st.com/en/evaluation-tools/stm32h745i-disco.html
stm32h750_weact STM32 H750 WeAct stm32h7 https://www.adafruit.com/product/5032
stm32h750bdk STM32 H750b Discovery Kit stm32h7 https://www.st.com/en/evaluation-tools/stm32h750b-dk.html
stm32h7s3nucleo STM32 H7S3 Nucleo stm32h7rs https://www.st.com/en/evaluation-tools/nucleo-h7s3l8.html
waveshare_openh743i Waveshare Open H743i stm32h7 https://www.waveshare.com/openh743i-c-standard.htm
stm32l052dap52 STM32 L052 DAP stm32l0 n/a
stm32l0538disco STM32 L0538 Discovery stm32l0 https://www.st.com/en/evaluation-tools/32l0538discovery.html
Expand Down
136 changes: 69 additions & 67 deletions docs/reference/dependencies.rst

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions examples/device/audio_4_channel_mic/src/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ extern "C" {
* Tinyusb use follows macros to declare transferring memory so that they can be put
* into those specific section.
* e.g
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
* - CFG_TUSB_MEM_ALIGN : 4
*/
#ifndef CFG_TUSB_MEM_SECTION
#define CFG_TUSB_MEM_SECTION
#endif

#ifndef CFG_TUSB_MEM_ALIGN
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#define CFG_TUSB_MEM_ALIGN 4
#endif

//--------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ extern "C" {
* Tinyusb use follows macros to declare transferring memory so that they can be put
* into those specific section.
* e.g
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
* - CFG_TUSB_MEM_ALIGN : 4
*/
#ifndef CFG_TUSB_MEM_SECTION
#define CFG_TUSB_MEM_SECTION
#endif

#ifndef CFG_TUSB_MEM_ALIGN
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#define CFG_TUSB_MEM_ALIGN 4
#endif

//--------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions examples/device/audio_test/src/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ extern "C" {
* Tinyusb use follows macros to declare transferring memory so that they can be put
* into those specific section.
* e.g
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
* - CFG_TUSB_MEM_ALIGN : 4
*/
#ifndef CFG_TUSB_MEM_SECTION
#define CFG_TUSB_MEM_SECTION
#endif

#ifndef CFG_TUSB_MEM_ALIGN
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#define CFG_TUSB_MEM_ALIGN 4
#endif

//--------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions examples/device/audio_test_freertos/src/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ extern "C" {
* Tinyusb use follows macros to declare transferring memory so that they can be put
* into those specific section.
* e.g
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
* - CFG_TUSB_MEM_ALIGN : 4
*/
#ifndef CFG_TUSB_MEM_SECTION
#define CFG_TUSB_MEM_SECTION
#endif

#ifndef CFG_TUSB_MEM_ALIGN
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#define CFG_TUSB_MEM_ALIGN 4
#endif

//--------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions examples/device/audio_test_multi_rate/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,8 @@ static const uint8_t bytesPerSampleAltList[CFG_TUD_AUDIO_FUNC_1_N_FORMATS] =

audio_control_range_2_n_t(1) volumeRng[CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX+1]; // Volume range state


// Audio test data
CFG_TUD_MEM_ALIGN uint8_t test_buffer_audio[CFG_TUD_AUDIO_FUNC_1_EP_IN_SZ_MAX];
TU_ATTR_ALIGNED(4) uint8_t test_buffer_audio[CFG_TUD_AUDIO_FUNC_1_EP_IN_SZ_MAX];
uint16_t startVal = 0;

void led_blinking_task(void);
Expand Down
6 changes: 3 additions & 3 deletions examples/device/audio_test_multi_rate/src/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ extern "C" {
* Tinyusb use follows macros to declare transferring memory so that they can be put
* into those specific section.
* e.g
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
* - CFG_TUSB_MEM_ALIGN : 4
*/
#ifndef CFG_TUSB_MEM_SECTION
#define CFG_TUSB_MEM_SECTION
#endif

#ifndef CFG_TUSB_MEM_ALIGN
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#define CFG_TUSB_MEM_ALIGN 4
#endif

//--------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions examples/device/board_test/src/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@
* Tinyusb use follows macros to declare transferring memory so that they can be put
* into those specific section.
* e.g
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
* - CFG_TUSB_MEM_ALIGN : 4
*/
#ifndef CFG_TUSB_MEM_SECTION
#define CFG_TUSB_MEM_SECTION
#endif

#ifndef CFG_TUSB_MEM_ALIGN
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#define CFG_TUSB_MEM_ALIGN 4
#endif

#ifdef __cplusplus
Expand Down
6 changes: 3 additions & 3 deletions examples/device/cdc_dual_ports/src/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@
* Tinyusb use follows macros to declare transferring memory so that they can be put
* into those specific section.
* e.g
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
* - CFG_TUSB_MEM_ALIGN : 4
*/
#ifndef CFG_TUSB_MEM_SECTION
#define CFG_TUSB_MEM_SECTION
#endif

#ifndef CFG_TUSB_MEM_ALIGN
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#define CFG_TUSB_MEM_ALIGN 4
#endif

//--------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions examples/device/cdc_msc/src/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@
* Tinyusb use follows macros to declare transferring memory so that they can be put
* into those specific section.
* e.g
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
* - CFG_TUSB_MEM_ALIGN : 4
*/
#ifndef CFG_TUSB_MEM_SECTION
#define CFG_TUSB_MEM_SECTION
#endif

#ifndef CFG_TUSB_MEM_ALIGN
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#define CFG_TUSB_MEM_ALIGN 4
#endif

//--------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions examples/device/cdc_msc_freertos/src/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@
* Tinyusb use follows macros to declare transferring memory so that they can be put
* into those specific section.
* e.g
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
* - CFG_TUSB_MEM_ALIGN : 4
*/
#ifndef CFG_TUSB_MEM_SECTION
#define CFG_TUSB_MEM_SECTION
#endif

#ifndef CFG_TUSB_MEM_ALIGN
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#define CFG_TUSB_MEM_ALIGN 4
#endif

//--------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions examples/device/cdc_uac2/src/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ extern "C" {
* Tinyusb use follows macros to declare transferring memory so that they can be put
* into those specific section.
* e.g
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
* - CFG_TUSB_MEM_ALIGN : 4
*/
#ifndef CFG_TUSB_MEM_SECTION
#define CFG_TUSB_MEM_SECTION
#endif

#ifndef CFG_TUSB_MEM_ALIGN
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#define CFG_TUSB_MEM_ALIGN 4
#endif

//--------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions examples/device/dfu/src/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@
* Tinyusb use follows macros to declare transferring memory so that they can be put
* into those specific section.
* e.g
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
* - CFG_TUSB_MEM_ALIGN : 4
*/
#ifndef CFG_TUSB_MEM_SECTION
#define CFG_TUSB_MEM_SECTION
#endif

#ifndef CFG_TUSB_MEM_ALIGN
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#define CFG_TUSB_MEM_ALIGN 4
#endif

//--------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions examples/device/dfu_runtime/src/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@
* Tinyusb use follows macros to declare transferring memory so that they can be put
* into those specific section.
* e.g
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
* - CFG_TUSB_MEM_ALIGN : 4
*/
#ifndef CFG_TUSB_MEM_SECTION
#define CFG_TUSB_MEM_SECTION
#endif

#ifndef CFG_TUSB_MEM_ALIGN
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#define CFG_TUSB_MEM_ALIGN 4
#endif

//--------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions examples/device/dynamic_configuration/src/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@
* Tinyusb use follows macros to declare transferring memory so that they can be put
* into those specific section.
* e.g
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
* - CFG_TUSB_MEM_ALIGN : 4
*/
#ifndef CFG_TUSB_MEM_SECTION
#define CFG_TUSB_MEM_SECTION
#endif

#ifndef CFG_TUSB_MEM_ALIGN
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#define CFG_TUSB_MEM_ALIGN 4
#endif

//--------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions examples/device/hid_boot_interface/src/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@
* Tinyusb use follows macros to declare transferring memory so that they can be put
* into those specific section.
* e.g
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
* - CFG_TUSB_MEM_ALIGN : 4
*/
#ifndef CFG_TUSB_MEM_SECTION
#define CFG_TUSB_MEM_SECTION
#endif

#ifndef CFG_TUSB_MEM_ALIGN
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#define CFG_TUSB_MEM_ALIGN 4
#endif

//--------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions examples/device/hid_composite/src/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@
* Tinyusb use follows macros to declare transferring memory so that they can be put
* into those specific section.
* e.g
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
* - CFG_TUSB_MEM_ALIGN : 4
*/
#ifndef CFG_TUSB_MEM_SECTION
#define CFG_TUSB_MEM_SECTION
#endif

#ifndef CFG_TUSB_MEM_ALIGN
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#define CFG_TUSB_MEM_ALIGN 4
#endif

//--------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions examples/device/hid_composite_freertos/src/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@
* Tinyusb use follows macros to declare transferring memory so that they can be put
* into those specific section.
* e.g
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
* - CFG_TUSB_MEM_ALIGN : 4
*/
#ifndef CFG_TUSB_MEM_SECTION
#define CFG_TUSB_MEM_SECTION
#endif

#ifndef CFG_TUSB_MEM_ALIGN
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#define CFG_TUSB_MEM_ALIGN 4
#endif

//--------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions examples/device/hid_generic_inout/src/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@
* Tinyusb use follows macros to declare transferring memory so that they can be put
* into those specific section.
* e.g
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
* - CFG_TUSB_MEM_ALIGN : 4
*/
#ifndef CFG_TUSB_MEM_SECTION
#define CFG_TUSB_MEM_SECTION
#endif

#ifndef CFG_TUSB_MEM_ALIGN
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#define CFG_TUSB_MEM_ALIGN 4
#endif

//--------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions examples/device/hid_multiple_interface/src/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@
* Tinyusb use follows macros to declare transferring memory so that they can be put
* into those specific section.
* e.g
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
* - CFG_TUSB_MEM_ALIGN : 4
*/
#ifndef CFG_TUSB_MEM_SECTION
#define CFG_TUSB_MEM_SECTION
#endif

#ifndef CFG_TUSB_MEM_ALIGN
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#define CFG_TUSB_MEM_ALIGN 4
#endif

//--------------------------------------------------------------------
Expand Down
Loading