23.3.4.27 Variables Allocated to L1 Cached Memory
For devices featuring an L1 data cache, data variables are now allocated to the KSEG0
data-memory region (kseg0_data_mem
) making it accessible through the L1
cache. Likewise, the linker-allocated heap and stack are allocated to the KSEG0 region.
The startup code initializes the L1 cache using symbols defining the base addresses in
the linker script.
Example:
EXTERN (__pic32_init_cache_program_base_addr)
PROVIDE (__pic32_init_cache_program_base_addr = 0x9D000000) ;
EXTERN (__pic32_init_cache_data_base_addr)
PROVIDE (__pic32_init_cache_data_base_addr = 0x80000000) ;