Keil Logo Arm Logo

Discussion Forum

Circumventing RW data compression

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
Tamir Michael
Posted
6-Jul-2012 09:21 GMT
Toolset
ARM
New! Circumventing RW data compression

Hello,

I have an array with global linkage that is 4[MB] in size. My image grows by about 64[KB] thanks to R/W compression, which is undesirable - the array does not contain any meaningful data anyway immediately after startup. The linker already chooses the optimal compression algorithm and it cannot be altered beyond the three that ARM makes available. I cannot use "malloc" during startup because we are talking about a LPC1788 with a FreeRTOS+MPU.
Any thoughts?

Read-Only
Author
Tamir Michael
Posted
6-Jul-2012 09:26 GMT
Toolset
ARM
New! RE: Circumventing RW data compression

I am going to try a zero init execution region - this should prevent the RW data compression.

Read-Only
Author
IB Shy
Posted
6-Jul-2012 09:28 GMT
Toolset
ARM
New! RE: Circumventing RW data compression

"I am going to try a zero init execution region"

That one has worked well for me in the past.

DJR

Read-Only
Author
Tamir Michael
Posted
6-Jul-2012 09:38 GMT
Toolset
ARM
New! RE: Circumventing RW data compression

Thanks. It worked.

Read-Only
Author
Mike Kleshov
Posted
6-Jul-2012 09:38 GMT
Toolset
ARM
New! RE: Circumventing RW data compression

My image grows by about 64[KB] thanks to R/W compression, which is undesirable - the array does not contain any meaningful data anyway immediately after startup.

That's odd. Why would the image grow when the array is not initialized? It should be zero-initialized according to C rules, should it not?

Read-Only
Author
Tamir Michael
Posted
6-Jul-2012 09:41 GMT
Toolset
ARM
New! RE: Circumventing RW data compression

I had to do this:

#pragma arm section zidata
  __attribute__ ((zero_init)) umm_block umm_heap[configTOTAL_DDC_HEAP_SIZE/sizeof(umm_block)] UMM_HEAP_SECTION;
#pragma arm section zidata

Tool Version Numbers:
Toolchain:        RealView MDK-ARM  Version: 4.14
Middleware:        RL-ARM Real-Time Library Version V4.13
Toolchain Path:    BIN40\ 
C Compiler:         Armcc.Exe       V4.1.0.567
Assembler:          Armasm.Exe       V4.1.0.567
Linker/Locator:     ArmLink.Exe       V4.1.0.567
Librarian:             ArmAr.Exe       V4.1.0.567
Hex Converter:      FromElf.Exe       V4.1.0.567
CPU DLL:               SARMCM3.DLL       V4.14
Dialog DLL:         DARMP1.DLL       V1.20.0.4
Target DLL:             BIN\UL2CM3.DLL       V1.80
Dialog DLL:         TARMP1.DLL       V1.20.0.3

Next Thread | Thread List | Previous Thread Start a Thread | Settings

arm-logo-small

Keil logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.