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

Multiple call to segment warning

I am seeing this warning when I try to compile my code

Warning L15: multiple call to segment
segment: ?pr?_nvmwrit?nvmem_cc
caller1: ?pr?spicommisr?spi_com_cc
caller2: ?c_c51startup

I looked through my code, I don't call nvmwrite in spicommisr routine. And what is this c51startup file?

thanks,
DG

Parents
  • When I reduce optimization level to level 1 (dead code elimination), the warning goes away. If I increase to level 2 (data overlaying), the warning comes back.

    and solution or I stuck with level 1 optimization?

    Is it safe to ignore the warning?
    Is changing nwmwrite to reentrant a safe option?

    thanks,

Reply
  • When I reduce optimization level to level 1 (dead code elimination), the warning goes away. If I increase to level 2 (data overlaying), the warning comes back.

    and solution or I stuck with level 1 optimization?

    Is it safe to ignore the warning?
    Is changing nwmwrite to reentrant a safe option?

    thanks,

Children
  • I stuck with level 1 optimization? no

    Is it safe to ignore the warning? no

    Is changing nwmwrite to reentrant a safe option? yes, but that is NOT fixing the problem, just hiding it

    do a global search on nwmwrite and get rid of the offending call.

    if you need it both in main and an ISR, make 2 (differently named) copies.

    if the function is called from anything with using 1, 2 or 3 it must have 'using' the same in its header

    Erik