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

Realview V3.34 versus Carm problem

Started this morning on something. Then needed to add printf in simulator mode. So I added putchar() and printf. But then I found that the program didn't run. When I hit RST it is always sitting on line #252 SWI_Handler B Undef_Handler in startup.s

To double check I eventually ran the demo hello.c in program files\keil\arm\examples\hello\hello.c - this works fine.

But when I copy hello.c + serial.c to a new folder and start a new project it compiles fine - but does not run, again it stops on line #252 as above. When I check I find that the Realview compiler is selected and the Configure flash tools shows a tab with C/C++. The startup.s file mentions 2006-2006

On the original hello example it is using the CARM compiler and the configure flash tools shows a tab with just a C on it. The startup file mentions 2002-2004

So there are differences. The c files are identical but the startup.s files are not, the old examples work but compiling new versions with the newer startup.s and Realview don't.

Has anyone had similiar problems, can someone explain what is going on please.

Parents
  • Sorry, I should have added. I am using the Philips target only.

    In Program files\Keil\Arm\Startup\startup.s is the 2002-2004 headed file. (STARTUP.S: Generic ARM Startup file)

    In Program files\Keil\Arm\Startup\Philips\startup.s is the 2002-2005 headed file.(STARTUP.S: Startup file for Philips LPC2000)

    In Program files\Keil\Arm\RV30\Startup\Philips\startup.s is the 2005-2006 headed file.(STARTUP.S: Startup file for Philips LPC2000)

    It appears that I am somehow using the wrong startup files although by default the 2005-2006 one is the one selected, but not working.

Reply
  • Sorry, I should have added. I am using the Philips target only.

    In Program files\Keil\Arm\Startup\startup.s is the 2002-2004 headed file. (STARTUP.S: Generic ARM Startup file)

    In Program files\Keil\Arm\Startup\Philips\startup.s is the 2002-2005 headed file.(STARTUP.S: Startup file for Philips LPC2000)

    In Program files\Keil\Arm\RV30\Startup\Philips\startup.s is the 2005-2006 headed file.(STARTUP.S: Startup file for Philips LPC2000)

    It appears that I am somehow using the wrong startup files although by default the 2005-2006 one is the one selected, but not working.

Children
  • I have discovered the problem. The Hello.c version in Program Files\Keil\ARM\RV30\Examples\Hello works.

    This project does use the latest startup.s 2005-2006. But in addition I see two new files are included in the project these are RETARGET.C which iself includes RT_MISC.H

    So this is the solution. Does someone know why these files are now required to be included.

    It appears that I should rebuild older projects with this new profile, and maybe delete the earlier examples. But I would like to know the advantages / reasons for adding the RETARGET.C file. Maybe this is described somewhere?

    This cost me quite a few hours.... I hope this helps others.

    I do miss the linker line Program Size: data=xxx const=xxxx code=xxx, Realview does not provide this and I dont know how to enable it.

  • Please read C:\Keil\ARM\HLP\RVI.CHM. It explains it from an overview perspective.

  • Tell you what,

    suggest offloading some of your work to the other person, whatever could be possible i mean,
    is it healthy to take the whole thing on your head, plz reply,