Altera_Forum
Honored Contributor
20 years agoHow to make very compact code
I have some code that gets run whenever the processor is reset and basically reads a register continually, waits for it to be set to '1' and when it is, sets up a DMA (by setting the registers directly NOT using the HAL) and sets a few more registers. So, it basically consists of about 20 reads and writes to 32 bit registers, and a few small (less than 128 iterations) simple loops.
Why does it take 17KB when I compile it using IDE? What can I do to make it nice and small so I can fit in in some M4K blocks and make it part of the configuration file? I want to get it down to 8KB. Many thanks, Brian