This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Why some functions got WARNING L15, while others not!

Hi,
I have several functions called in T0 isr. The outline of call tree like this:

void T0_isr() interrupt 1 {
    getkey();
}

void getkey() {
    char c;
    c = filterGetKeyCode();
}

char filterGetKeyCode() {
    char c;
    c = getKeyCode();
    return c;
}

char getKeyCode() {
    char c;
    char cd;
    // c be assigned somehow
    cd = encodeFlex(c);
    c = decode(cd);
    return c;
}

char encodeFlex(char c) {
    return encode(c);
}

char encode(char);

char decode(char);
Now linker reports (simplified):
Warning 15: multiple call to segment
segment: getKeyCode
caller1: T0_isr
caller2: c_c51stratup

Warning 15: multiple call to segment
segment: encodeFlex
caller1: T0_isr
caller2: c_c51startup

My question is: why getKeyCode and encodeFlex incur warnings, while others, like decode, passed by linker.
When I disoverlay getKeyCode, and declare encodeFlex with reentrant, the warnings all disappear. But I still worry about other functions called in isr. Is it safe now?

Thanks in advance.

d.curie

Parents
  • That "outline of a call tree" is crucially incomplete. It shows only one partial path through the tree. The missing part is where the other calls to the routines complained about by the linker are coming from.

    You get those warnings for exactly those functions that do end up being called from two unrelated regions of the call graph.

    Learn about the reason for these warnings by reading the Manual, and you'll understand whether not your modifications are safe.

Reply
  • That "outline of a call tree" is crucially incomplete. It shows only one partial path through the tree. The missing part is where the other calls to the routines complained about by the linker are coming from.

    You get those warnings for exactly those functions that do end up being called from two unrelated regions of the call graph.

    Learn about the reason for these warnings by reading the Manual, and you'll understand whether not your modifications are safe.

Children
No data