I am attempting to insert all of the TMS570 start-up code into C files. But I have a problem with writing sys_intvecs.asm. The assemler does not like the following:
#include "sys_intvecs.h"
void sys_intvecs(void)
{
/*-------------------------------------------------------------------------------*/
/*; sys_intvecs.asm*/
/*;*/
/*;-------------------------------------------------------------------------------*/
/*; import reference for interrupt routines*/
asm(".ref _c_int00");
asm(".ref _undefined");
asm(".ref _svc");
asm(".ref _prefetchAbort");
asm(".ref _dataAbort");
/*;-------------------------------------------------------------------------------*/
/*; interrupt vectors*/
asm(".sect '.intvecs'");
asm(" b _c_int00");
asm(" b _undefined");
asm(" b _svc");
asm(" b _prefetchAbort");
asm(" b _dataAbort");
asm(" b #-8");
asm(" ldr pc,[pc,#-0x1b0]");
asm(" ldr pc,[pc,#-0x1b0]");
/*;-------------------------------------------------------------------------------*/
}
I get errors of the following type:
Illegal mnemonic specified
.ref _c_int00
Symbol .ref has already been defined
.ref _undefined
Illegal mnemonic specified
.ref _undefined
Symbol .ref has already been defined
.ref _svc
Is there a way to get around this problem?
Regards,
Dave