Hi,
Is there a way, in GNU as, to allocate space for a buffer in .bss that is aligned to a 256-byte boundary?
I have tried using the .align directive, but for some reason ld throws the error 'avr-ld: region bss is full (test.elf section .bss)'.
This is how I am allocating space for the buffer:
.section .bss .align 256 .comm audio_buffer, 0x100
This is my linker script for the target device which is an ATmega168 (note that this project is 100% assembly, no C):
OUTPUT_FORMAT("elf32-avr","elf32-avr","elf32-avr") OUTPUT_ARCH(avr:5) MEMORY { text (rx): ORIGIN = 0, LENGTH = 0x4000 bss (!rx): ORIGIN = 0x800100, LENGTH = 0x400 } __stack = 0x800100 + 0x400 - 2; SECTIONS { .text : { *(.vectors) *(.init0) *(.audio_init) *(.main) *(.text) } > text .bss : { *(.bss) } > bss }