V5 needs a lot of memory with PIC12F675

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
Jörg Güldner
Posts: 77
Joined: Wed Jun 22, 2011 3:32 pm
Has thanked: 17 times
Been thanked: 11 times
Contact:

V5 needs a lot of memory with PIC12F675

Post by Jörg Güldner »

Hi to all who read this topic,
I tried a project with the 12F675, but at least the memory was to smal. A empty project in flowcode needs 35bytes of ram. The chip himself comes up with 64byte. For my program I could only use 29bytes. Could anyone told me, if its possible to reduce the hunger of flowcode?

Best regards
Jörg

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: V5 needs a lot of memory with PIC12F675

Post by Benj »

Hello,

Please could you post your Flowcode project .FCF file so we can have a look.

Flowcode should be fairly lean as far as bloat goes but it could be the compiler or something else such as a component which is consuming memory.

Jörg Güldner
Posts: 77
Joined: Wed Jun 22, 2011 3:32 pm
Has thanked: 17 times
Been thanked: 11 times
Contact:

Re: V5 needs a lot of memory with PIC12F675

Post by Jörg Güldner »

I`ved attached the empty fcd and the compiler message.............................
Pic version is 5521.


Best regards
Jörg
Attachments
PIC12F675_Empty Project.msg.txt
(3.84 KiB) Downloaded 203 times
PIC12F675_Empty Project.fcf
(5 KiB) Downloaded 202 times

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: V5 needs a lot of memory with PIC12F675

Post by jgu1 »

Hi!

A supplementary question, what does this mean. coming up during compiling.:

"Warning unreferenced functions removed:" :?:

I've seen it many times when compile (or maybe every time) Is it something you are doing wrong.

Hope it´s ok that I add this to Jôrg.

Thank´s in advance

Jorgen.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V5 needs a lot of memory with PIC12F675

Post by medelec35 »

Hi Jorden,
I have posted about that here:
http://www.matrixmultimedia.com/mmforum ... 01&#p47301

Martin
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: V5 needs a lot of memory with PIC12F675

Post by Benj »

Hello Jörg,

I will have a play and see if removing any of the libraries help to reduce the RAM usage. These should be dynamic and only included if needed but I am currently able to replicate your current RAM usage with an empty program.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V5 needs a lot of memory with PIC12F675

Post by medelec35 »

Benj wrote:I will have a play and see if removing any of the libraries help to reduce the RAM usage. These should be dynamic and only included if needed
Hi Ben, That would be great for all versions.
There have been times when I have only just gone over, and that was after using local variables and cutting down as much as I could.

Martin
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: V5 needs a lot of memory with PIC12F675

Post by Benj »

Hello,

If I remove the Random library from the compiler options then the RAM and ROM usage drops a bit. I can also remove the float library but this creates loads and loads of compile errors so there must be code relying on this even though it's not being called. I will investigate.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V5 needs a lot of memory with PIC12F675

Post by medelec35 »

Can libraries automatically added and removed during compiling process, depending on contents of flowchart?
If not some way of selecting and unselecting libraries, since it wont be easy to manually add libraries if not use to libraries names.
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: V5 needs a lot of memory with PIC12F675

Post by Benj »

Hi Martin,

Would be a nice feature but only really applies to 8-bit PIC as far as I am aware, not sure on the best way to go about that. I will have a think and see if anything comes to mind.

Not sure why the libraries are consuming memory if they are not referenced but maybe there are globals that need initialising etc. The other compilers are all GCC based and I think they do a better job of optimising out unnecessary code but I could be wrong.

Jörg Güldner
Posts: 77
Joined: Wed Jun 22, 2011 3:32 pm
Has thanked: 17 times
Been thanked: 11 times
Contact:

Re: V5 needs a lot of memory with PIC12F675

Post by Jörg Güldner »

Hi Benj,
I read out of your discussions to take care in the moment , if the software for the smaler pics is usable.
For my project I uses now the PIC12F617 with 128bytes of ram.............................

Thanks for the background
J. Güldner

Post Reply