I'm using the RL78/D1 series microcontroller and IAR RL78 4.10.1 IDE. My project builds and works fine when I use the default cstartup file(in the IAR directory). But when I add my own cstartup file into my project (I copied the default cstartup file from the IAR directory to my project directory and add it to my project) and complie the project, I get the duplication definition error as follow:
. . . Linking Error[Li006]: duplicate definitions for "@cend"; in "D:\General Basic Software\RL78\CICM16b1\Code\IAR\3- Workspace\Debug\Obj\cstartup.o", and "cstartup.o(dlrlfnf22n.a)" Error[Li006]: duplicate definitions for "@cstart"; in "D:\General Basic Software\RL78\CICM16b1\Code\IAR\3- Workspace\Debug\Obj\cstartup.o", and "cstartup.o(dlrlfnf22n.a)" Error[Li006]: duplicate definitions for "__INIT_WRKSEG"; in "D:\General Basic Software\RL78\CICM16b1\Code\IAR\3- Workspace\Debug\Obj\cstartup.o", and "cstartup.o(dlrlfnf22n.a)" Error[Li006]: duplicate definitions for "__iar_program_start"; in "D:\General Basic Software\RL78\CICM16b1\Code\IAR\3- Workspace\Debug\Obj\cstartup.o", and "cstartup.o(dlrlfnf22n.a)" Error[Li006]: duplicate definitions for "__program_end"; in "D:\General Basic Software\RL78\CICM16b1\Code\IAR\3- Workspace\Debug\Obj\cstartup.o", and "cstartup.o(dlrlfnf22n.a)" Error while running Linker . . .
I did what should I did as the IAR's help tells me, but the problem still exists.
Do you know how can I get rid of this problem?
Thanks
Hello Mark,
If you add a copy of the `cstartup.s` to your `.ewp`project, it should override the default one from the C Runtime Library.
Please note that there were significant changes on the startup code…
Hi Felipe,
This is a duplicate of the reply on another thread, but I wanted to post here for those that didn't find the other thread.
Duplicate definitions error when I adding my own cstartup file…