Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

"initialization code" psect size in pic16f1937

Status
Not open for further replies.

hamidmoallemi

Full Member level 2
Joined
Jan 28, 2010
Messages
148
Helped
41
Reputation
78
Reaction score
39
Trophy points
1,308
Activity points
2,135
Hi
I'm doing a project using PIC16f1936 and using Hi-tech C compiler on MPLAB. I have code size and limited flash problem and trying to optimize the code
when I build the code and check the "psect usage map" I see that I have a psect named "cinit" with a large size .
actually I don't understand what does it do and why it is so large?
Can I reduce its size ?
Thanks in advance

psect.jpg
 

cinit is runtime library initialization code, also containing constants to initialize variables. To understand why it's so large in your program, you need to inspect the code.
 
Thank you FvM ,
I am checking the code to reduce that section , do you have some hints for initializing code optimization or can you offer some documents e.g. application notes or so
 

Since cinit seems to end at 0xfff, I think it is only a problem in the table.
cinit is probably small and it is placed in a memory area that ends at 0xfff.
No section is placed after cinit, so it only looks like cinit occupies the rest of the available area.

If you put some more code in text1458 or one of the other sections before cinit, cinit will probably be listed as starting at a higher address but still ending at 0xfff.

You must look in the listing file to see the real size of cinit.
 
Look in the Hi-Tech C User Guide (http://www.if.p.lodz.pl/marek.izdebski/tc/pomocnicze/manual.pdf is the version I found) in Section 3.10.1.1 and you will see the descriptions of all of the generated psects, what they contain and how they are used.
In this case, I would be looking elsewhere to reduce the memory foot print (but without seeing the code it is hard to point you to where to start).
Susan
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top