Hello Martin/Maurizio,
Thank you for your help. Apparently, now works fine but I have a doubt after to read the postRe: _mem_extend usage: Is it necessary to modify linker file or not? According to this post I shouldn't to modify the linker file and I should to extend the memory pool with _mem_extend() after to configure the flexbus. However, I have modified my .tcl and .mem files as follows. Is it correct?:
".tcl" File:
MEMORY
{
vectorrom (RX): ORIGIN = 0x00000000, LENGTH = 0x00000400
cfmprotrom (R): ORIGIN = 0x00000400, LENGTH = 0x00000020
rom (RX): ORIGIN = 0x00000420, LENGTH = 0x000FFBE0 # Code + Const data
ram (RW): ORIGIN = 0x70000000, LENGTH = 0x08000000 # DDR2 - RW data
fpga (RW): ORIGIN = 0xA0000000, LENGTH = 0x00010000 # fpga (64 KB)
sram (RW): ORIGIN = 0x1FFF0000, LENGTH = 0x00020000 # SRAM - RW data
# kernel space starts after RAM variables (Location of MQX Kernel data + MQX heap)
end_of_kd (RW): ORIGIN = 0x77FFFFF0, LENGTH = 0x00000000
# Boot stack reused by MQX Kernel data
bstack (RW): ORIGIN = 0x2000FA00, LENGTH = 0x00000200 # Boot stack
end_bstack (RW): ORIGIN = 0x2000FC00, LENGTH = 0x00000000
}
KEEP_SECTION { .vectors_rom, .vectors_ram, .cfmconfig }
SECTIONS
{
__INTERNAL_SRAM_BASE = 0x1FFF0000;
__INTERNAL_SRAM_SIZE = 0x00020000;
__INTERNAL_FLASH_BASE = 0x00000000;
__INTERNAL_FLASH_SIZE = 0x00100000;
__INTERNAL_FLEXNVM_BASE = 0;
__INTERNAL_FLEXNVM_SIZE = 0;
__UNCACHED_DATA_END = 0x2000FFF0;
__EXTERNAL_FPGA_BASE = 0xA0000000;
__EXTERNAL_FPGA_SIZE = 0x00010000;
__EXTERNAL_MRAM_BASE = 0x60000000;
__EXTERNAL_MRAM_SIZE = 0x00080000;
__EXTERNAL_MRAM_ROM_BASE = 0x60000000;
__EXTERNAL_MRAM_ROM_SIZE = 0x00000000;
__EXTERNAL_MRAM_RAM_BASE = 0x60000000;
__EXTERNAL_MRAM_RAM_SIZE = 0x00080000;
__EXTERNAL_DDR2_RAM_BASE = 0x70000000;
__EXTERNAL_DDR2_RAM_SIZE = 0x08000000;
__EXTERNAL_LCD_BASE = 0x60000000;
__EXTERNAL_LCD_SIZE = 0x1FFFF;
__EXTERNAL_LCD_DC_BASE = 0x60010000;
[...]
".mem" File:
[...]
usederivative "MK70F15"
// Memory Map:
// ----------------------------------------------------------------------
range 0x00000000 0x000FFFFF 4 ReadWrite // 1024KB Code Flash
reserved 0x00100000 0x13FFFFFF
range 0x14000000 0x14003FFF 4 ReadWrite // 16KB Programming accelleration RAM
reserved 0x14004000 0x1FFEFFFF
range 0x1FFF0000 0x1FFFFFFF 4 ReadWrite // 64KB On chip SRAM (TCML)
range 0x20000000 0x2000FFFF 4 ReadWrite // 64KB On chip SRAM (TCMU)
reserved 0x20010000 0x21FFFFFF
range 0x22000000 0x221FFFFF 4 ReadWrite // Aliased to TCMU SRAM bitband
reserved 0x22200000 0x3FFFFFFF
reserved 0x60000000 0x6FFFFFFF
range 0x70000000 0x77FFFFFF 4 ReadWrite // DDR2
range 0xA0000000 0xA000FFFF 4 ReadWrite // Flexbus for FPGA
reserved 0xE0100000 0xFFFFFFFF
Thank you for your help in advance!
Ángel G.