Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12603 Discussions

Compress and optimize application

Altera_Forum
Honored Contributor II
1,068 Views

I have an application when converted to hex, creates 850 KB file size. I need this application to sit in on-chip memory of 5CEFA5F23C device. The max on-chip memory size which could be assigned is 412000 Bytes. I need to somehow compress the hex file in order for it to fit in on-chip memory. Can you please suggest a way to do this? I am using NIOS II EDS V14.1

0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
361 Views

 

--- Quote Start ---  

I have an application when converted to hex, creates 850 KB file size. I need this application to sit in on-chip memory of 5CEFA5F23C device. The max on-chip memory size which could be assigned is 412000 Bytes. I need to somehow compress the hex file in order for it to fit in on-chip memory. Can you please suggest a way to do this? I am using NIOS II EDS V14.1 

--- Quote End ---  

 

 

You might try one of the LZRW algorithms, I used one several years ago to improve on Altera's compression. Here is a link: http://www.ross.net/compression/
0 Kudos
Altera_Forum
Honored Contributor II
361 Views

I have made one observation. I generated elf with highest optimization flag and could reduce the size of elf by around 400KB. Now the size of elf is 1300 KB. When I generate hex file using mem_init_generate, it always converts elf file to hex file with a size of 849KB. No matter what the size of elf is, the size of hex file does not change.. Why is it so????

0 Kudos
Reply