data partition sizing

Technical questions regarding the XTC tools and programming with XMOS.
Active Member
Posts: 37
Joined: Mon Sep 24, 2012 1:45 pm

data partition sizing

Post by aelder »

Using v14.4.1 of XMOS tools.

I'm observing inconsistent results when sizing the data partition on an XCORE200 Explorer board.

xflash --boot-partition-size 0x20000 --factory bin/app.xe


======flash info=====
data partition size: 917504
page size: 256
num data pages: 3584
num data sectors: 224
data sector size [0]: 4096
data sector size [1]: 4096
data sector size [2]: 4096
pages / sector [0]: 16

when the following code is run

Code: Select all

  debug_printf("======flash info=====\n");
  debug_printf("data partition size:  %d\n", fl_getDataPartitionSize());
  debug_printf("page size:            %d\n", fl_getPageSize());
  debug_printf("num data pages:       %d\n", fl_getNumDataPages());
  debug_printf("num data sectors:     %d\n", fl_getNumDataSectors());
  debug_printf("data sector size [0]: %d\n", fl_getDataSectorSize(0));
  debug_printf("data sector size [1]: %d\n", fl_getDataSectorSize(1));
  debug_printf("data sector size [2]: %d\n", fl_getDataSectorSize(2));
  debug_printf("pages / sector [0]:   %d\n", fl_getDataSectorSize(0)/fl_getPageSize());
The Explorer board has 4M bytes of flash, so the reported data partition size should be more than 3 Mbytes.

Is there a way to readback the data partition that xflash thinks it is programming? There seems to be an inconsistency here that I don't know how to resolve.

User avatar
XCore Expert
Posts: 897
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

What does fl_getFlashSize() return out of interest?