Skip to content
This repository was archived by the owner on Jan 29, 2024. It is now read-only.

Commit a7d18ba

Browse files
committed
improve Clang 13 behavior (override its misguided inclination to always inline)
1 parent c6bc3f0 commit a7d18ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bootloader.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static uint32_t udc_ctrl_out_buf[16];
7070
/*- Implementations ---------------------------------------------------------*/
7171

7272
//-----------------------------------------------------------------------------
73-
static void udc_control_send(const uint32_t *data, uint32_t size)
73+
static void __attribute__((noinline)) udc_control_send(const uint32_t *data, uint32_t size)
7474
{
7575
/* USB peripheral *only* reads valid data from 32-bit aligned RAM locations */
7676
udc_mem[0].in.ADDR.reg = (uint32_t)data;
@@ -84,13 +84,13 @@ static void udc_control_send(const uint32_t *data, uint32_t size)
8484
}
8585

8686
//-----------------------------------------------------------------------------
87-
static void udc_control_send_zlp(void)
87+
static void __attribute__((noinline)) udc_control_send_zlp(void)
8888
{
8989
udc_control_send(NULL, 0); /* peripheral can't read from NULL address, but size is zero and this value takes less space to compile */
9090
}
9191

9292
//-----------------------------------------------------------------------------
93-
static void USB_Service(void)
93+
static void __attribute__((noinline)) USB_Service(void)
9494
{
9595
static uint32_t dfu_addr;
9696

0 commit comments

Comments
 (0)