View previous topic :: View next topic |
Author |
Message |
jeffg28CLY
Joined: 24 Apr 2025 Posts: 5
|
MPLAB-X v6.0 and PCWHD 5.075: +DM is not making a MAP file |
Posted: Mon May 05, 2025 7:08 am |
|
|
I'm trying to get a .map file out of this. I found a small number of posts on it, and one of them said to use +DM to generate a MAP file.
MPLAB confirms this as the command string it's running:
C:\PROGRA~2\PICC\CCSCON.exe" out="build/default/production\_ext\1472" ../file.c +FH +DF +CC +Y=9 +EA +DM +DF +LN +T +A +M +J +Z -P #__18F46K22=1
With or without the +DM argument, compiling generates exactly the same number of files.
Does some other option need to be enabled?
Or are some of the default options, like +DF, overriding +DM?
edit: What I'm attempting to do is see what the program memory usage looks like for a program's various parts, and don't fully know how to do that. I've also installed ELFViewer in MPLAB X, but it looks like CCS compiler also doesn't create an ELF file. |
|
 |
Ttelmah
Joined: 11 Mar 2010 Posts: 19819
|
|
Posted: Mon May 05, 2025 8:35 am |
|
|
It should do. If I select this, mine merrily generates a .map file. It is instead
of the COF file. Turn off +DF, and the +DM will work. I think you can only
have one debug file format selected at a time. |
|
 |
temtronic
Joined: 01 Jul 2010 Posts: 9466 Location: Greensville,Ontario
|
|
Posted: Mon May 05, 2025 8:47 am |
|
|
hmm, curious was I...
do my dino eyes see TWO '+DFs' ?? |
|
 |
Ttelmah
Joined: 11 Mar 2010 Posts: 19819
|
|
Posted: Mon May 05, 2025 8:53 am |
|
|
Yes.
In fact the compiler will always take the last +D option given. Hence his
first was ignored, and the second is selecting the standard COF format,
and was overriding the request for the MAP file.....  |
|
 |
jeffg28CLY
Joined: 24 Apr 2025 Posts: 5
|
|
Posted: Mon May 05, 2025 9:02 am |
|
|
temtronic wrote: | hmm, curious was I...
do my dino eyes see TWO '+DFs' ?? |
Interesting.
Yes indeed there are.
And there's apparently nothing I can do about that.
MPLAB has a string of command line arguments that it passes to cscon.exe, but the string can't be modified, and I'm not sure where it came from. Maybe it pulled that string in from the CCS compiler plugin? It also only has one +DF. Weird. So I don't know where that extra one is coming from.
The string that's allegedly being used:
+Y=9 +EA +DM +DF +LN +T +A +M +J +Z -P
Even the position of the +DM is not something I can control. When I make a selection to add an argument, MPLAB places it there and I can't seem to do anything about it.
However...: I opened the source file in CCS' own compiler and compiled it there, and found the Statistics button in the Compile section. That looks like it'll get me what I'm after: A listing of each function and the ROM it uses. I don't think I can export this list to CSV or anything, but it's more than nothing.
(There are some columns there, "Volume" and "Difficulty" that I'm not sure what they refer to, and the manual and help file don't mention this section of the software.) |
|
 |
Ttelmah
Joined: 11 Mar 2010 Posts: 19819
|
|
Posted: Mon May 05, 2025 10:18 am |
|
|
Actually, everything is settable in MPLAB, the problem is that the options
are all over the place. So (for example), you have the MPLAB tab, with things
addable here, then for the compiler tab, there are tick boxed under
'output files', that turn on certain options. Also in the top tab here there is
a pull down box to select the format of the list file. Then under the tab for
'General', there are the default options, and 'generated command line', it
shows what the tick boxes have generated, but not which tick box makes
them. You can also here add your own stuff to the line.
There are a total of about seven windows, ten tick boxes and about five
other imported bits that determine what is actually generated, without any
documentation as to what generates what....
The single +DF is the default. The other is coming from something
you have changed or added. |
|
 |
jeffg28CLY
Joined: 24 Apr 2025 Posts: 5
|
|
Posted: Mon May 05, 2025 10:33 am |
|
|
Ttelmah wrote: | Actually, everything is settable in MPLAB, the problem is that the options
are all over the place. .... |
If it's there, I can't find it. I've been through so many menus in that program by now. Yeah it's kind of got everything everywhere.
Either way, I've got what I need now.
I'm processing the .STA file myself in Excel. (And I submitted a suggestion to CCS to add CSV export to the Statistics section of their compiler, assuming it hasn't been added since v5.075.) |
|
 |
|