I have a combined C and AS application. I have to use AS because of the
time restraints.
I have a 256 byte buffer that is accessed with two pointers, head and tail.
In the AS code, I want to only save the low order byte of the pointer.
This is do-able, if the buffer is aligned at 0x0100.
In the C file,
char buf[256] __attribute__ ((aligned (256)));
In the AS file,
.global buf
Looking at the map file, I see
0x0000000000800100 tx_buf_head_ptr
0x0000000000800200 buf
0x0000000000800300 rx_buf_tail_ptr
0x0000000000800302 tx_buf_tail_ptr
There is a gap of 254 bytes.
How do I avoid this gap? What determines the linker allocation order?
Tom Dean
_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list