ROM_MAP full with C-GPS


#1

Hi all,

developing with the completely new C-GPS i get an linker error:

attempt to open /cygdrive/c/OpenAT/I/cygdrive/c/OpenAT/IDE/GCC/4.0.1.0/bin/…/lib/gcc/arm-elf/4.0.1/…/…/…/…/arm-elf/bin/ld: region ROM_MAP is full (gcc_TrackOS_H.elf section .text)
/cygdrive/c/OpenAT/IDE/GCC/4.0.1.0/bin/…/lib/gcc/arm-elf/4.0.1/…/…/…/…/arm-elf/bin/ld: link errors found, deleting executable `gcc_TrackOS_H.elf’
DE/GCC/4.0.1.0/bin/…/lib/gcc/arm-elf/4.0.1/thumb/interwork/libc.a failed

The problem seems to be, that my application contains about 400 funktions, C-GPS adds about 1100 functions and the ROM-Map is full.

The Wavecom supplied demo QueryApp does not have this problem with it’s 40 functions, except that it does not run on the eval-board. I found that the init sequence is not according to documentation and the uart setup can’t work this way (need to stop uart before changing it’s setup).

How can i setup the ld options so that the ROM-Map may become larger?
Is there any workaround?

Thanks for your help.

Wolfram


#2

Hi Wolfram,

To solve the problem, you have to change the settings that are used by Open AT while creating the ROM map.
You can go to the following location:
C:\OpenAT\IDE\IDE\1.00.04\xsl
and open the file callled mnf2lnkopt.xsl.
In this file, change the following lines as indicated:
/* Set the memory mapping */
MEMORY
{
<xsl:for-each select="//Memory">
<xsl:if test="$WM_OAT_PRJ_MEM = ./@name">
ROM_MAP (rx) : ORIGIN = 0x<xsl:value-of select="./@ROBase" />, LENGTH = 8192k
RAM_MAP (!rx) : ORIGIN = 0x<xsl:value-of select="./@RWBase" />, LENGTH = 8192k
</xsl:if>
</xsl:for-each>
}

Save the file and close the visual C++ editor (or any editor you are using).
Now, create the project workspace once again (as these settings are copied in the workspace file). You might also opt to create a new applicatio n workspace in a new directory.

In my case, it worked, however, you must keep a backup copy of your previous settings.

Normally, it is not recommended to change these settings. However, you can give it a try and in case, it does not work, you can ask you FAE.

Hope this solve your problem.
What other problem are you facing while using C-GPS? You mentioned that you are not able to setup the UART? Can you provide more details regarding this?

Best Regards,
Open AT Fan.


#3

Thanks for you answer,

The MEMORY Section in my local installation IS already set to this:

/* Set the memory mapping */ 
MEMORY 
{ 
<xsl:for-each select="//Memory"> 
<xsl:if test="$WM_OAT_PRJ_MEM = ./@name"> 
ROM_MAP (rx) : ORIGIN = 0x<xsl:value-of select="./@ROBase" />, LENGTH = 8192k 
RAM_MAP (!rx) : ORIGIN = 0x<xsl:value-of select="./@RWBase" />, LENGTH = 8192k 
</xsl:if> 
</xsl:for-each> 
}

So do you recommend to increase the length Setting?

Regards


#4

Remember that the physical ROM chip has a finite size - you cannot exceed that limit! :open_mouth:


#5

Worth a try :smiley:
Patents pending…


#6

The other option is to pay for an ARM compiler that produces smaller code than GCC does. Be aware that it can cost up towards $6000 or something like that though.

If that’s not an option, you need to start optimizing your code.

The QueryApp example expects that UART2 is disabled by default, as wavecom stupidly enough outputs an ERROR if you try to enable an UART that is already enabled with AT+WMFM.
You could modify the code to ask if it is already enabled instead of taking the code as is.


#7

See this “Sticky” Thread in the “General” Forum:
wavecom.com/modules/movie/sc … ic.php?t=9


#8

Hello all, special regards to tobias.

it seems that i solved the problem after thinking about $6000:
I cleaned my gcc/out directory where some obj-files persisted that should not link into the current build (i.e. previous GPS-implementation).
It looks like the build process takes all obj-files from the out-dir even if not referenced in the build script. A “clean” seems to clean only files that are found in the make-script.
I also setup a new project, now the build (link) is successfull.

As i think about it again, i could have seen this in the ROM_MAP…

Thanks to all of you!