I recently switched to uVision 5 (from 4) and added a generic I/O pin class to a project I inherited, and then proceeded to use the class like I've done in many other projects. Unfortunately, when I build it I get this error.
project.axf: Warning: L6320W: Ignoring --keep command. Cannot find argument '--summary_stderr'. project.axf: Error: L6218E: Undefined symbol --summary_stderr (referred from anon$$obj.o).
The online help for L6320W is not much help, since I don't know what command is referencing --summary_stderr.
L6320W: Ignoring <cmd> command. Cannot find argument '<argname>'.
Eventually I used a guard to find a way to get the project to build (by not defining DOES_NOT_WORK), but using this approach will require lots of changes to existing code, so I don't want to take that route.
From just above int main(void)...
#define DOES_NOT_WORK #ifdef DOES_NOT_WORK iopin LED_HB(0, 17); // but works in many other projects #else iopin * LED_HB; #endif
and just below that in main()...
#ifdef DOES_NOT_WORK #else LED_HB = new iopin(0,17); #endif
Can anyone point me to a solution so that my build will succeed even when DOES_NOT_WORK is defined?
Thanks.
P.S. I am including the KEIL provided system and startup files.
Doh! The command referencing it is the --keep command.
After looking at the project options I found that the linker misc controls was set to this.
--cppinit
Removing that entry got rid of my problem. I'll have to find out why someone put that there.
From what I can deduce from the manual entry for --cppinit, if there's no equal sign and symbol following it, that might mean no C++ initialization is performed, so you can't instantiate class objects outside functions like you otherwise could.
Is that the cause of the issue I was experiencing?
You can read about that linker option here:
ARMLINK: function of option "--summary_stderr"
http://www.keil.com/support/docs/3711.htm
Thanks for the clarifying info.
Dave