Daniel
As I mentioned before, now my functions are allocated on ROM.Ican see their address in the map files.
Before the use of ENTRIES , none of them was there, unless in the NOT USED list...
In the constructor below I tried to catch the address of one function, but it is returning 0x00...
// general pointer4 to function declaration
typedef uint8 (*state_handler_t)(void*,Event const*)
Keyboard::Keyboard():
// Super_class constructor
Active_object((state_handler_t)&Keyboard:
n_initial), // default state!!!
// timer(s) object(s) constructor(s)
main_timer(EVENT_KEYBOARD_MAIN_TIMER_TIMEOUT)
{
state_handler_t far a;
state_handler_t far d;
uint16 b;
uint8 c;
c=Keyboard:
n_initial(this); // it really runs on_initial() function...
b=(uint16)&Keyboard:
n_initial; // this result is zero.. ???
a=(state_handler_t)&(Keyboard:
n_ready); // this result is zero.. ???
d=(state_handler_t)&(Keyboard:
n_initial);// this result is zero.. ???
// dummy ...
if(a)
{
b++;
}
}
}
The map file shows:
Name Addr hSize dSize Ref Section RLIB
on_initial__8KeyboardFP8Keyboard 3254 15 21 1 .text
on_ready__8KeyboardFP8KeyboardPC5Event 3269 10 16 0 .text
The function is:
//
uint8 Keyboard:
n_initial(Keyboard *me)
{
(void)me;
return FSM_NEW_STATE_HANDLER(&Keyboard:
n_ready);
}
It is clean for you?
Very thanks for your attention Daniel ...