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
Mayby it will help if you change the Code Optimation Level, try it.
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,
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
Maybe the following manual information will help.
http://www.keil.com/support/man/docs/c51/c51_xf_recursivecode.htm
Jon