Decompress compressed code during scatter loading from FLASH/ROM to RAM in ARM DS

I'm using ARM DS IDE 2019 with the ARM Compiler 5.06u5 toolchain. I'm looking for a way to compress code during link phase and decompress code during scatter loading of a section of code linked to run in RAM. These code parts are appropriately declared to be collected in a specific section. I thought there was a directive in the scatter file that, once marked as COMPRESSED, would cause the compressed section in ROM to be copied and expanded into RAM during the scatter loading process, similar to how the linker application manages by default RW data. I have not found any such directive, and what I have tried does not work. Is there a technique in ARM DS to achieve this, or do I need to develop my own compression and decompression system?

0