Hi,
I am using code warrior for first time.
I am facing this error during my code compilation:
This points to my this function first line.
I am not able to understand what is this about?
Code
=========================================
void FlashEraseRestart(uint16 startAddr, uint16 size)
{
FlashOpStatus status = FLASH_OP_OK;
uint32 addr = startAddr;
if(addr >= FLASH_START_ADDRESS)
{
//Disable Interrupts. Access to flash during flash operations is not allowed
asm
{
SEI;
}
for(addr = startAddr; addr < (startAddr + size - 1UL); addr += FLASH_SECTOR_SIZE)
{
//Erase 1 sector at a time
status = u8Flash_Erase((uint16)addr);
if (FLASH_OP_OK != status)
{
break;
}
}
//Enable interrupts
asm
{
CLI;
}
}
else
{
status = FLASH_OP_ERROR;
}
return status;
}
Not sure which line you refer to with "first line", the function prototype?
Anyhow, for such errors I would recommend to generate a preprocessor listing and then compile that.
In the code below, I guess there are at least some macros hidden, maybe one more than you think due to a name collision.
Also if the error is on the function prototype, the error might be in the stuff before the shown function.
Daniel