OK, it is not needed to build with PICO_NO_RAM_VECTOR_TABLE to get this 128K aligned section working, I just saw that in the source as an example that ROM probably does not care about where the vector table is.
UPDATE: Unfortunately with PICO_NO_RAM_VECTOR_TABLE=1, it boots, but then goes straight in panic mode. Caught in debugger, both on RP2040 and RP2350.
Anyway, I tried it and it seems to work. Modified linker script like
Code:
.uninitialized_dma_buffer (NOLOAD): { . = ALIGN(4); *(.uninitialized_dma_buffer*) } > RAM .ram_vector_table (NOLOAD): { . = ALIGN(256); *(.ram_vector_table) } > RAM
Code:
uint8_t volatile dma_buffer[0x20000] __attribute__ ((section (".uninitialized_dma_buffer")));......int main() { memset((void*)dma_buffer,255,sizeof(dma_buffer)); int rc = pico_led_init();......
Code:
4 .uninitialized_dma_buffer 00020000 20000000 20000000 00004000 2**2 ALLOC 5 .ram_vector_table 000000c0 20020000 20020000 00004000 2**2 ALLOC
Statistics: Posted by fanoush — Tue Oct 15, 2024 10:59 pm