Hello
__declspec is an attribute, that allows you to specify storage class information for objects.
Please check ColdFire_Build_Tools_Reference.pdf in your CW for Coldfire V6.3 Help\PDF directory for more info on that attribute.
Basically you can use declspec to specify you want to place an object (variable, constant, function) in a specific section. You can also use it to specify a function is an interrupt function.
CodeWarrior for Coldfire provides 3 ways of defining an interrupt function:
__declspec(interrupt) void test_int(void)
{
counter++;
}
or
#pragma interrupt on
void test_int2(void)
{
counter++;
}
#pragma interrupt off
or
__interrupt__ void test_int3(void)
{
counter++;
}
You can use any of these notation as you prefer.
CrasyCat