PDA

View Full Version : Memory View



Art
- 17th October 2013, 04:15
Hi Guys,
MPASM seems to be compiling my stuff ok,
but I think it was PM that spat out the total memory count on your program
ie. 1024 Words used (if you filled up a 1K 16F84).

Is there an easy way to see something like that from MPLAB without opening pic programming software?
The reason is MPLAB can program with PicKitII instantly,
so I wouldn't have to use separate pic programming software if I could see the pic's memory map somewhere else.

There are also those cases where maybe you used a lookup table close to the end of a code page,
and PBP used an org statement to move it to the beginning of the next code page
(to prevent the lookup table crossing the page).

Then you have a little pocket of program memory you want to know about because
you can still write a little bit before the lookup table.

If you've got a good method of handling this, what are you doing?
I thought MPLAB had a real pic programmer style view of program memory once,
and maybe I just don't see it this time.

Acetronics2
- 17th October 2013, 08:20
Hi, Art

you can use the mikroprog suite from Mikroelektronika .... possible to open the program window and the EEPROM window and see content and location ...

I think it will be the best "standalone" and up to date application ...

Alain

Art
- 17th October 2013, 10:00
Thanks,
I started a silly trick of putting rubbish code at the bottom of the page that is never called,
so I know when program memory is low.

It was probably only asm projects that can display program memory in MPLAB.
PBP wouldn't know what the program memory map looks like before it compiles it.
For an asm project, it would probably be a simple process for MPLAB to figure it
out on the fly.


Hi, Art

you can use the mikroprog suite from Mikroelektronika .... possible to open the program window and the EEPROM window and see content and location ...

I think it will be the best "standalone" and up to date application ...

Alain

Acetronics2
- 17th October 2013, 12:17
PBP wouldn't know what the program memory map looks like before it compiles it.


Obvious ... PBP Basic to ASM ( then HEX ) "translation" depends on what you have programmed ( syntax, options ... )

so, totally impossible to get memory usage before compilation as you did with interpreted Basics ( like Parallax chips that memorize basic program and translate it to HEX at runtime )

Just "try and trim" method available here ...
Alain

Art
- 19th October 2013, 01:12
I think it might be asm projects I'm mistaken it with (but it might have only showed eeprom maps).

For the asm project, the compiler shouldn't need to be much more than a lookup table for op codes,
and the thing to translate the Human friendly names of labels,variables, and registers to real locations.

The actual count at compile time, I'm not getting though.
It's like you need a script to look at how long the string of empty data is at the end of the hex file.

Art
- 2nd November 2013, 12:34
It Microchip C30 that lets you see a disassembly at any time.
Don't know how they do it.
Also, there's a program and data memory meter.
It only works if the project is C30 though. Thos options are gone if you
open a PBP (or RISC for that matter) project.