# Realview C / C++

Details Message
Author
John Drew
Posted
5-Nov-2006 22:59 GMT
Toolset
ARM
Realview C / C++

Does someone know what advantage the C++ option brings to Realview. I see in the help it mentions the Rogue Wave C++ library.

I notice that there are a number of LIB folders. ie. ARM\LIB which contains CAL.lib and CALFP.lib, is this the library used by the legacy CARM compiler?

Then I see ARM\LIB\RV30\ARMLIB is this the library used by Realview compiler? Then I see ...RV30\CPPLIB which sounds like a C++ lib?

I am just curious as to what is available as the help section doesn't seem to spell it out, if the C++ library is there can I use it, if so how?

Author
Dave Sudolcan
Posted
6-Nov-2006 20:48 GMT
Toolset
ARM
RE: Realview C / C++

I believe the floating point math is supported with more bits of resolution for floats & doubles in the RealView tools than it was for prior CARM tools. That's why I made the (virtually painless) switch to RealView. The way things work in the IDE are not quite exactly the same as they did in CARM (such as not getting ROM/RAM usage statistics in the output window after a build), but it seems close enough to me to not be a problem.

Author
John Drew
Posted
6-Nov-2006 22:37 GMT
Toolset
ARM
RE: Realview C / C++

Hi, I barely used CARM before upgrading to Realview. But I did like the CARM ROM/RAM statistics in the output window. I cannot find how to enable it again.

But my main question was if anyone had tried the C++ compiler / library that seems to be available. I have read the user manual in more detail and C++ seems to be available. I am just curious how it compares to the C compiler. I was hoping someone had experimented with it a bit.

Author
Matthias Hertel
Posted
7-Nov-2006 15:01 GMT
Toolset
ARM
RE: Realview C / C++

... I did like the CARM ROM/RAM statistics in the output window. I cannot find how to enable it again.

There is no output like this at the moment, but if you have a look to the end of the linker map file, the RVCT shows you similar information here.

Author
John Drew
Posted
7-Nov-2006 17:39 GMT
Toolset
ARM
RE: Realview C / C++

Yes, thanks I knew about that. It's just a drag to go there and look.

Author
Patrick Noonan
Posted
10-Nov-2006 09:59 GMT
Toolset
ARM
RE: Realview C / C++

Hi John,

Here's a tip to get easy access to the statistics again. It works for me at least and may be useful for you too. You will need to have a copy of grep.

1. Create a batch file to grep the interesting lines from the MAP file.
2. Call this batch file at the end of the build process. (Select Run User Command in the output dialog).

The interesting lines from the MAP file will then appear in the build window after the build.

Batch file contents (update for your map file location)

grep "Total ROM" obj\output.map
grep "Total RO "   obj\ output.map
grep "Total RW"   obj\ output.map

Author
John Drew
Posted
10-Nov-2006 18:39 GMT
Toolset
ARM
RE: Realview C / C++

Thanks! I did it and it works fine. When you see the info it just feels like the compiler/linker has done something. Where as just getting 0 errors doesn't!

Author
John Drew
Posted
11-Nov-2006 01:58 GMT
Toolset
ARM
RE: Realview C / C++

I posted a bit to quickly. I downloaded a gnu grep from http://unxutils.sourceforge.net/

1. It works. I found that grep "Total R" pulls the 3x wanted lines with 1x grep call

2. But I have a problem if I use file names like "abc def.map" Grep wont work so I would have to change to single word file names or use underscore.

3. Main question. Is there a way to make the grep independent of a project folder? I cannot remember how to tell the batch file to take a path. ie put the batch and grep in say c:\grepit call it from Keil/arm/etc so that it operates on the required .map file. Otherwise I have to copy the tools to each project file path.

It works great though.

Author
Andy Neil
Posted
11-Nov-2006 14:15 GMT
Toolset
None
GREP

"2. But I have a problem if I use file names like "abc def.map" Grep wont work so I would have to change to single word file names or use underscore."

It should work if you enclose the filename in double quotes, or just say *.map

You might even find that abc*.map also works...

"Is there a way to make the grep independent of a project folder?"

Like any other External command, can't you just make sure it's in your PATH?

Author
Hans-Bernhard Broeker
Posted
11-Nov-2006 15:13 GMT
Toolset
ARM
RE: Realview C / C++

2. But I have a problem if I use file names like "abc def.map" Grep wont work so I would have to change to single word file names or use underscore.

Put quotes around it, or do the sane thing: stay clear of blanks in filenames: tey're a pest. People using strictly only GUI tools are mostly unaware of the side effects, but trust an old commandline jockey: blanks in filenames are really more trouble than they're worth.

3. Main question. Is there a way to make the grep independent of a project folder?

Any external tool can be invoked with a full path, unless I'm very much mistaken. I.e. you can make the call

d:\where\ever\it\is\grep.exe "Total R" project.map


Or put a directory holding your personal collection of such tools (including grep) in the PATH once and for good --- that's what it exists for.

Author
Andy Neil
Posted
11-Nov-2006 20:41 GMT
Toolset
ARM
blanks in filenames

"blanks in filenames are really more trouble than they're worth."

Absolutely!

Let's just have it again, one more time:

blanks in filenames are really more trouble than they're worth.

Author
John Drew
Posted
11-Nov-2006 23:08 GMT
Toolset
ARM
RE: blanks in filenames

Thanks, this worked for me

C:\tools\ grep.exe and grep.bat
grep.bat contains c:\tools\grep.exe "Total R" *.map

In Uvision output after make box c:\tools\Grep.bat

produces output like :-

User command #1: c:\tools\Grep.bat
C:\Program Files\Keil\ ARM\PROJECTS\Hello>c:\tools\grep.exe "Total R" *.map
Total RO Size  (Code + RO Data)          4936 (4.82kB)
Total RW Size  (RW Data + ZI Data)       1480 (1.45kB)
Total ROM Size (Code + RO Data + RW Data)4952 (4.84kB)
"Hello.axf" - 0 Error(s), 0 Warning(s).


I tried playing with XP's system variables but Path didn't seem to help (or I got it wrong). What happened to autoexec.bat? Wonder if there is there a way to get c:\tools\Grep.bat into run user program#1 by default?

Author
Leslie Viljoen
Posted
24-Nov-2006 14:15 GMT
Toolset
ARM
RE: blanks in filenames

Set the path:

Start->Control Panel->System->
"Environment Variables"

Author
Dave Sudolcan
Posted
27-Nov-2006 16:56 GMT
Toolset
ARM
RE: blanks in filenames

Hey... thanks for the GREP tips. I just realized that the uV3 IDE now supports executing user defined programs both BEFORE and AFTER doing the build. Now that's handy.

Thanks KEIL !!

Author
John Drew
Posted
29-Nov-2006 06:50 GMT
Toolset
ARM
RE: blanks in filenames

Leslie, are you replying to my question, or something else? - If so thanks!

Wonder if there is there a way to get c:\tools\Grep.bat into run user program#1 by default?

##### Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.