How to fix "OutOfMemoryError: Java heap space" error
We are building using the Quartus 11.1sp1 version (yes that is old but we have no reason to upgrade at this time)
I found where I can remove “DEAD” codespace by adding this to my Compiler options:
-fdata-sections -ffunction-sections
And also adding this to my LINK options:
--gc-section
For our Fast Fare this worked and my codespace is now smaller, but for our Fast Fare-e (which uses more RAM) I get the following ERROR.
On the “nios2-elf-g++” command to do the LINK:
OutOfMemoryError: Java heap space
make[3]: *** [farebox__fastfare-e__release.elf] Error 1
make[3]: *** Deleting file `farebox__fastfare-e__release.elf'
make[3]: Leaving directory `C:/altera/fastfare/software/app/farebox'
make[2]: *** [.gfi_elf] Error 2
make[2]: Leaving directory `C:/altera/fastfare/software/app/farebox'
make[1]: *** [.gfi_build] Error 2
make[1]: Leaving directory `C:/altera/fastfare/software/app/farebox'
make: *** [fastfare-e.release.gfi_build] Error 2
There is virtually no difference in these two builds and the code is 85% the same but there are bigger RAM buffers in Fast Fare-e due to a larger Display (so bigger Virtual GUI Buffers).
How do I fix this so I can remove DEAD CODE from the build??
For now I removed the options and I am building fine...