Skip to content

Commit d272471

Browse files
committed
pbio/include/pbdrv/cache.h: Mark .dma section as ELF NOBITS
Otherwise the section attributes will default to PROGBITS and cause the entire .bss section to be filled with 0s *on disk*, thus bloating the firmware.elf file.
1 parent 537c2ce commit d272471

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pbio/include/pbdrv/cache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ void pbdrv_cache_prepare_after_dma(const void *buf, size_t sz);
3434
#define PBDRV_CACHE_LINE_SZ 32
3535

3636
// Align data to a cache line, which is needed for clean RX DMA
37-
#define PBDRV_DMA_BUF __attribute__((aligned(PBDRV_CACHE_LINE_SZ), section(".dma")))
37+
#define PBDRV_DMA_BUF __attribute__((aligned(PBDRV_CACHE_LINE_SZ), section(".dma,\"aw\",%nobits@")))
3838

3939
#endif

0 commit comments

Comments
 (0)