AnsweredAssumed Answered

How to change FlashX base address?

Question asked by Gavin Li on Jul 28, 2011
Latest reply on Jun 18, 2012 by Jaume Sellart

I am using TWRK60 + IAR6.1 + MQX3.7

 

I want to use flashx to save my data to a fixed location.

 

After I run this code, I get base_addr is 0x10800.

 

    flash_hdl = fopen("flashx:", NULL);
    /* Enable sector cache */
    _io_ioctl(flash_hdl, FLASH_IOCTL_ENABLE_SECTOR_CACHE, NULL);

    error_code = ioctl(flash_hdl, FLASH_IOCTL_GET_BASE_ADDRESS, &base_addr);

 

The flash start address in the linker script "C:\Program Files\Freescale\Freescale MQX 3.7\lib\twrk60n512.cw10\bsp\intflash.lcf" is 0x000000, why do I get 0x10800?

 

How can I set this base_addr to a fixed address? for example 0x20000.

 

 

Outcomes