Thank you for your help.
With the option “Debug information” friends it works it does not work if this option is unchecked.
The problem is that the file is too big with a few lines of code.
with code:
int Init(unsigned int *generalArray, void **args, unsigned int argsCount, unsigned int *argSize)
{
return 123;
}
Work Ok :
**** No section assigned to this execution region ****
Execution Region ER_ZI (Base: 0xa1000000, Size: 0x00000128, Max: 0xffffffff, ABSOLUTE)
Base Addr Size Type Attr Idx E Section Name Object
0xa1000000 0x00000060 Zero RW 242 .bss c_5.l(libspace.o)
0xa1000060 0x00000000 Zero RW 2 HEAP sam9x35.o
0xa1000060 0x000000c8 Zero RW 1 STACK sam9x35.o
==============================================================================
Image component sizes
Code (inc. data) RO Data RW Data ZI Data Debug Object Name
20 0 0 0 0 2148 rlplaser.o
32 12 0 0 200 216 sam9x35.o
----------------------------------------------------------------------
52 12 16 0 200 2364 Object Totals
0 0 16 0 0 0 (incl. Generated)
0 0 0 0 0 0 (incl. Padding)
----------------------------------------------------------------------
Not Work:
**** No section assigned to this execution region ****
Execution Region ER_ZI (Base: 0xa1000000, Size: 0x00000128, Max: 0xffffffff, ABSOLUTE)
Base Addr Size Type Attr Idx E Section Name Object
0xa1000000 0x00000060 Zero RW 64 .bss c_5.l(libspace.o)
0xa1000060 0x00000000 Zero RW 2 HEAP sam9x35.o
0xa1000060 0x000000c8 Zero RW 1 STACK sam9x35.o
==============================================================================
Image component sizes
Code (inc. data) RO Data RW Data ZI Data Debug Object Name
20 0 0 0 0 0 rlplaser.o
32 12 0 0 200 0 sam9x35.o
----------------------------------------------------------------------
52 12 16 0 200 0 Object Totals
0 0 16 0 0 0 (incl. Generated)
0 0 0 0 0 0 (incl. Padding)
----------------------------------------------------------------------
axf file too large
static Twid twid;
/** Page buffer.*/
static uint8_t pData[PAGE_SIZE];
/**
* \brief TWI interrupt handler. Forwards the interrupt to the TWI driver handler.
*/
static void TWI1_IrqHandler( void )
{
TWID_Handler( &twid ) ;
}
int Init(unsigned int *generalArray, void **args, unsigned int argsCount, unsigned int *argSize)
{
/* Configure TWI pins. */
PIO_Configure(pins, PIO_LISTSIZE(pins));
/* Enable TWI peripheral clock */
PMC_EnablePeripheral(ID_TWI0);
/* Configure TWI */
TWI_ConfigureMaster(BOARD_BASE_TWI_EEPROM, TWCK, BOARD_MCK);
TWID_Initialize(&twid, BOARD_BASE_TWI_EEPROM);
/* Configure TWI interrupts */
IRQ_ConfigureIT(BOARD_ID_TWI_EEPROM, 0, TWI1_IrqHandler);
IRQ_EnableIT(BOARD_ID_TWI_EEPROM);
/* Erase page #0 and #1 */
//memset(pData, 0, PAGE_SIZE);
//printf("-I- Filling page #0 with zeroes ...\n\r");
TWID_Write(&twid, AT24C_ADDRESS, 0x0000, 2, pData, PAGE_SIZE, 0);
return 123;
}
Map File :
Execution Region ER_ZI (Base: 0xa1000008, Size: 0x000001a8, Max: 0xffffffff, ABSOLUTE)
Base Addr Size Type Attr Idx E Section Name Object
0xa1000008 0x00000080 Zero RW 12 .bss rlplaser.o
0xa1000088 0x00000060 Zero RW 246 .bss c_5.l(libspace.o)
0xa10000e8 0x00000000 Zero RW 2 HEAP sam9x35.o
0xa10000e8 0x000000c8 Zero RW 1 STACK sam9x35.o
==============================================================================
Image component sizes
Code (inc. data) RO Data RW Data ZI Data Debug Object Name
88 0 0 0 0 322669 aic.o
0 0 0 0 0 364 async.o
1064 12 0 0 0 4996 pio.o
316 20 0 0 0 1136 pmc.o
196 28 24 8 128 332220 rlplaser.o
32 12 0 0 200 216 sam9x35.o
1472 228 0 0 0 3988 twi.o
1488 144 0 0 0 3452 twid.o