Skip to content
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

USB: add section name for USB data buffers #8

Merged
merged 1 commit into from
Jun 3, 2024
Merged
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
13 changes: 13 additions & 0 deletions .ci/USB/Device/RTE/USB/USBD_Config_0.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,19 @@
// <i>It should be at least as big as maximum packet size for Endpoint 0.
#define USBD0_EP0_BUF_SIZE 128

// <h>Data Buffers
// <e>Relocate
// <i>Specifies if the USB data buffers are located at a specific memory address
// <i>(via the linker script).
#define USBD0_BUF_MEM_RELOC 0

// <s.128>Section Name
// <i>Specifies the section name for the USB data buffers
// <i>(for positioning via the linker script).
#define USBD0_BUF_MEM_SECTION_NAME ".driver.usbd0"
// </e>
// </h>

// <h>OS Resources Settings
// <i>These settings are used to optimize usage of OS resources.
// <o>Core Thread Stack Size <64-65536>
Expand Down
13 changes: 13 additions & 0 deletions .ci/USB/Device/RTE/USB/USBD_Config_0.h.base@8.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,19 @@
// <i>It should be at least as big as maximum packet size for Endpoint 0.
#define USBD0_EP0_BUF_SIZE 128

// <h>Data Buffers
// <e>Relocate
// <i>Specifies if the USB data buffers are located at a specific memory address
// <i>(via the linker script).
#define USBD0_BUF_MEM_RELOC 0

// <s.128>Section Name
// <i>Specifies the section name for the USB data buffers
// <i>(for positioning via the linker script).
#define USBD0_BUF_MEM_SECTION_NAME ".driver.usbd0"
// </e>
// </h>

// <h>OS Resources Settings
// <i>These settings are used to optimize usage of OS resources.
// <o>Core Thread Stack Size <64-65536>
Expand Down
13 changes: 13 additions & 0 deletions .ci/USB/Device/RTE/USB/USBD_Config_1.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,19 @@
// <i>It should be at least as big as maximum packet size for Endpoint 0.
#define USBD1_EP0_BUF_SIZE 128

// <h>Data Buffers
// <e>Relocate
// <i>Specifies if the USB data buffers are located at a specific memory address
// <i>(via the linker script).
#define USBD1_BUF_MEM_RELOC 0

// <s.128>Section Name
// <i>Specifies the section name for the USB data buffers
// <i>(for positioning via the linker script).
#define USBD1_BUF_MEM_SECTION_NAME ".driver.usbd1"
// </e>
// </h>

// <h>OS Resources Settings
// <i>These settings are used to optimize usage of OS resources.
// <o>Core Thread Stack Size <64-65536>
Expand Down
13 changes: 13 additions & 0 deletions .ci/USB/Device/RTE/USB/USBD_Config_1.h.base@8.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,19 @@
// <i>It should be at least as big as maximum packet size for Endpoint 0.
#define USBD1_EP0_BUF_SIZE 128

// <h>Data Buffers
// <e>Relocate
// <i>Specifies if the USB data buffers are located at a specific memory address
// <i>(via the linker script).
#define USBD1_BUF_MEM_RELOC 0

// <s.128>Section Name
// <i>Specifies the section name for the USB data buffers
// <i>(for positioning via the linker script).
#define USBD1_BUF_MEM_SECTION_NAME ".driver.usbd1"
// </e>
// </h>

// <h>OS Resources Settings
// <i>These settings are used to optimize usage of OS resources.
// <o>Core Thread Stack Size <64-65536>
Expand Down
13 changes: 13 additions & 0 deletions .ci/USB/Device/RTE/USB/USBD_Config_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,19 @@
// <i>It should be at least as big as maximum packet size for Endpoint 0.
#define USBD2_EP0_BUF_SIZE 128

// <h>Data Buffers
// <e>Relocate
// <i>Specifies if the USB data buffers are located at a specific memory address
// <i>(via the linker script).
#define USBD2_BUF_MEM_RELOC 0

// <s.128>Section Name
// <i>Specifies the section name for the USB data buffers
// <i>(for positioning via the linker script).
#define USBD2_BUF_MEM_SECTION_NAME ".driver.usbd2"
// </e>
// </h>

// <h>OS Resources Settings
// <i>These settings are used to optimize usage of OS resources.
// <o>Core Thread Stack Size <64-65536>
Expand Down
13 changes: 13 additions & 0 deletions .ci/USB/Device/RTE/USB/USBD_Config_2.h.base@8.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,19 @@
// <i>It should be at least as big as maximum packet size for Endpoint 0.
#define USBD2_EP0_BUF_SIZE 128

// <h>Data Buffers
// <e>Relocate
// <i>Specifies if the USB data buffers are located at a specific memory address
// <i>(via the linker script).
#define USBD2_BUF_MEM_RELOC 0

// <s.128>Section Name
// <i>Specifies the section name for the USB data buffers
// <i>(for positioning via the linker script).
#define USBD2_BUF_MEM_SECTION_NAME ".driver.usbd2"
// </e>
// </h>

// <h>OS Resources Settings
// <i>These settings are used to optimize usage of OS resources.
// <o>Core Thread Stack Size <64-65536>
Expand Down
13 changes: 13 additions & 0 deletions .ci/USB/Device/RTE/USB/USBD_Config_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,19 @@
// <i>It should be at least as big as maximum packet size for Endpoint 0.
#define USBD3_EP0_BUF_SIZE 128

// <h>Data Buffers
// <e>Relocate
// <i>Specifies if the USB data buffers are located at a specific memory address
// <i>(via the linker script).
#define USBD3_BUF_MEM_RELOC 0

// <s.128>Section Name
// <i>Specifies the section name for the USB data buffers
// <i>(for positioning via the linker script).
#define USBD3_BUF_MEM_SECTION_NAME ".driver.usbd3"
// </e>
// </h>

// <h>OS Resources Settings
// <i>These settings are used to optimize usage of OS resources.
// <o>Core Thread Stack Size <64-65536>
Expand Down
13 changes: 13 additions & 0 deletions .ci/USB/Device/RTE/USB/USBD_Config_3.h.base@8.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,19 @@
// <i>It should be at least as big as maximum packet size for Endpoint 0.
#define USBD3_EP0_BUF_SIZE 128

// <h>Data Buffers
// <e>Relocate
// <i>Specifies if the USB data buffers are located at a specific memory address
// <i>(via the linker script).
#define USBD3_BUF_MEM_RELOC 0

// <s.128>Section Name
// <i>Specifies the section name for the USB data buffers
// <i>(for positioning via the linker script).
#define USBD3_BUF_MEM_SECTION_NAME ".driver.usbd3"
// </e>
// </h>

// <h>OS Resources Settings
// <i>These settings are used to optimize usage of OS resources.
// <o>Core Thread Stack Size <64-65536>
Expand Down
13 changes: 13 additions & 0 deletions Components/USB/Config/USBD_Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,19 @@
// <i>It should be at least as big as maximum packet size for Endpoint 0.
#define USBD%Instance%_EP0_BUF_SIZE 128

// <h>Data Buffers
// <e>Relocate
// <i>Specifies if the USB data buffers are located at a specific memory address
// <i>(via the linker script).
#define USBD%Instance%_BUF_MEM_RELOC 0

// <s.128>Section Name
// <i>Specifies the section name for the USB data buffers
// <i>(for positioning via the linker script).
#define USBD%Instance%_BUF_MEM_SECTION_NAME ".driver.usbd%Instance%"
// </e>
// </h>

// <h>OS Resources Settings
// <i>These settings are used to optimize usage of OS resources.
// <o>Core Thread Stack Size <64-65536>
Expand Down
2 changes: 1 addition & 1 deletion Components/USB/Script/Headers/usbd_config_def_x.h
Original file line number Diff line number Diff line change
Expand Up @@ -8209,4 +8209,4 @@
#error Device $x High-speed setting requires Maximum Endpoint 0 Packet Size of 64 bytes!
#endif

#endif // USBD_CONFIG_DEF_$x_H_
#endif // USBD_CONFIG_DEF_$x_H_
2 changes: 1 addition & 1 deletion Components/USB/Script/Headers/usbd_config_dev_x.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ uint8_t usbd$x_alt_setting [USBD$x_IF_CNT];
uint8_t usbd$x_alt_setting [USBD$x_IF_CNT];
extern
uint8_t usbd$x_ep0_buf [((USBD$x_EP0_BUF_SIZE+31)/32)*32];
uint8_t usbd$x_ep0_buf [((USBD$x_EP0_BUF_SIZE+31)/32)*32] __ALIGNED(32);
uint8_t usbd$x_ep0_buf [((USBD$x_EP0_BUF_SIZE+31)/32)*32] __ALIGNED(32) USBD$x_DEV_BUF_MEM_SECTION;
extern
usbd_data_t usbd$x_data;
usbd_data_t usbd$x_data;
Expand Down
12 changes: 12 additions & 0 deletions Components/USB/Source/usbd_compatibility.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
#ifndef USBD0_EP0_BUF_SIZE
#define USBD0_EP0_BUF_SIZE (USBD0_MAX_PACKET0)
#endif
#ifndef USBD0_BUF_MEM_RELOC
#define USBD0_BUF_MEM_RELOC (0)
#endif

#ifndef USBD1_CORE_THREAD_STACK_SIZE
#define USBD1_CORE_THREAD_STACK_SIZE (0U)
Expand All @@ -59,6 +62,9 @@
#ifndef USBD1_EP0_BUF_SIZE
#define USBD1_EP0_BUF_SIZE (USBD1_MAX_PACKET0)
#endif
#ifndef USBD1_BUF_MEM_RELOC
#define USBD1_BUF_MEM_RELOC (0)
#endif

#ifndef USBD2_CORE_THREAD_STACK_SIZE
#define USBD2_CORE_THREAD_STACK_SIZE (0U)
Expand All @@ -78,6 +84,9 @@
#ifndef USBD2_EP0_BUF_SIZE
#define USBD2_EP0_BUF_SIZE (USBD2_MAX_PACKET0)
#endif
#ifndef USBD2_BUF_MEM_RELOC
#define USBD2_BUF_MEM_RELOC (0)
#endif

#ifndef USBD3_CORE_THREAD_STACK_SIZE
#define USBD3_CORE_THREAD_STACK_SIZE (0U)
Expand All @@ -97,6 +106,9 @@
#ifndef USBD3_EP0_BUF_SIZE
#define USBD3_EP0_BUF_SIZE (USBD3_MAX_PACKET0)
#endif
#ifndef USBD3_BUF_MEM_RELOC
#define USBD3_BUF_MEM_RELOC (0)
#endif


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