Improving Code Compression for Arm Cortex M Microcontrollers Using Pre- Filtering
For last decades code size is no longer a concern except small embedded systems. ARM Cortex M is a typical microcontroller architecture of such systems. A simple yet effective approach based on pre- filtering Thumb2 binary code is proposed to improve code compression by the general purpose Deflate algorithm. It transforms BL (branch and link) instructions pointing to the same effective address before compression, and restores original opcodes after decompression.