LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

reducing program size

Labview 2009, uVision 3.90, Luminary 3s8962.

 

After getting everything into the program i wanted I get this error when compiling/linking:

 

[3:44:36 PM] Status: Error
linking...
.\Obj\LabVIEW.axf: Error: L6406W: No space in execution regions with .ANY selector matching Section x$fpl$ddiv(ddiv.o).
.

. (200 or so of these)

.

.\Obj\LabVIEW.axf: Error: L6406W: No space in execution regions with .ANY selector matching Section .bss(beeper.o).
.\Obj\LabVIEW.axf: Error: L6406W: No space in execution regions with .ANY selector matching Section .tex
.\obj\labview.awf: error: L6407W:  Sections of aggregate size 0x18f9c bytes could not fit into .ANY selector(s).

 

It doesn't take a genius to figure out the program is too big and when i disable a loop that TCPs my data it fits.  My question is do you have guidelines on how to reduce the program size?  Are they the same as Labview in general?  And finally, where can i find compile and linker error code descriiptions? 

0 Kudos
Message 1 of 4
(7,425 Views)

PJ has a chapter regarding LabVIEW Embedded (and optimization) in the book LabVIEW Graphical Programming, Fourth Edition.
If you don’t have the book you could go to Optimizing LabVIEW Embedded Applications (probably there is a newer version)

 

Additionally, you can review the hierarchy of your application for further optimization. For example, if the application needs LabVIEW parallel execution, so you cannot "disable parallel", you may think to group some nodes and make subVIs with "Generate serial only" checked or more, "Use stack variables" (i.e. display functions, or small computation). This can be done in VI properties window ("C Code Generation Options" category) or for each application in ("Source File Settings" panel).

 

Good Luck

0 Kudos
Message 2 of 4
(7,422 Views)

In addition to changing your G code as referred above, you can also decrease the program size by reducing the heap size.  By default, about half the the available RAM is reserved for the heap.  If you are running a program that may not use all of this heap, you can reduce it.  If you reduce it too much, you will get a runtime error.

 

You can reduce the heap size by opening up the Startup.s file in microvision and searching for "Heap    EQU     0x00008000" and changing to a lower number.  Note that this change is made local to your build specification.  So if you create another build spec, you will need to make this modification again.

 

 

Also you can find error codes at:

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0434a/index.html

0 Kudos
Message 3 of 4
(7,405 Views)

Thank  you both.

Perhaps this is typical, but after trying a number of things I was able to reduce the program and ram sizes down to just barely fit. But only if I first disable debugging, which is no problem since I can debug piecemeal by disabling a bit of code.

 

 Ignorance is not bliss.  I believe that is becoming my signature phrase.  Thank you both for the info.

0 Kudos
Message 4 of 4
(7,394 Views)