Skip to content

Commit 3ceaee0

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 546f6e5 commit 3ceaee0

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
@@ -40,7 +40,7 @@ void pbdrv_cache_prepare_after_dma(const void *buf, size_t sz);
4040
#define PBDRV_CACHE_LINE_SZ 32
4141

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

4545
// REVISIT: If other platforms need cache management,
4646
// the definitions bracketed by this #if need to be

0 commit comments

Comments
 (0)