Marcelo Slomp | 1 Sep 02:12 2006

Re: Problem in Install gcc on Windows XP


Dash, Santos Kumar  IN BLR SISL wrote:
> 
> Hi, 
> I want to Compile and install gcc on Windows XP. 
> Can you please tell me wat are the seqence of steps to do it. 
> Regards, 
> Santos Kumar Dash
> S I E M E N S Information Systems Ltd (SISL) 
> Work: -+91 -80- 28091562 (Dir)  ext: 4562
>  Cell: -+91 9886817129 
> mailto:Santoskumar.Dash <at> siemens.com
> 
> 

I've written a mini-howto, containing instructions on how to build the
latest gcc (currently v.4.1.1) from scratch under win32, using the
msys/mingw environment.

Readme.1st: apologize my imperfect english :/

I   - Setting up the MSYS envirnoment
II  - Installing pre-built gcc binaries
III - Creating the gcc host environment
IV  - Building and installing gcc
V   - Adding other build tools
VI  - Have fun

I - SETTING UP THE MSYS ENVIRONMENT
The first thing we'll need is a fully functional msys environment. You can
(Continue reading)

wizard00 | 1 Sep 03:39 2006
Picon

movq instruction not supported?


Hi all,
   I try to do movq  0x5555555555555555, %es:(%edx)
 move quadword to a memory location
but gcc complains error suffix or operand invalid.
what's wrong?

thanks
--

-- 
View this message in context: http://www.nabble.com/movq-instruction-not-supported--tf2200246.html#a6091470
Sent from the gcc - Help forum at Nabble.com.

Kanwal Preet Singh CHANANA | 1 Sep 06:08 2006

Pointer allocation problem

Hi all,

I am porting my project from ADS to GCC_ARM v4.0.3. I have been able to
compile & Link my source files with GCC-ARM.  The image (running in Flash)
crashes on target. The reason for crash is wrong pointer allocation.

I have used a pointer to a structure as shown below:

typedef volatile struct UARTInfoTag
{
    void                         (*rxInt_p) (void);
    void                         (*txComplete_p) (void);
    tUartLineStatusCallbackFunc  lineStatusInt_p;
    tBool                        NewRxData;
    tBool                        IsTransmitting;
} UARTInfo;

#define NUMBER_OF_UARTS		2	

UARTInfo   UARTCallBack[NUMBER_OF_UARTS];
UARTInfo  *pUARTInfo = &UARTCallBack[0];

UARTCallBack is located in RAM with &UARTCallBack[0]=0x000033C8, but
pUARTInfo contains the value 0x4B1D1BCA & pUARTInfo is located in RAM at
address 0x00001FCA.

The address 0x4B1D1BCA is out of my memory range which leads to image crash
on target.

Also the pUARTInfo contains value =0x000033C8 when I use ADS for image
(Continue reading)

Richard Earnshaw | 1 Sep 10:30 2006

Re: Pointer allocation problem

On Fri, 2006-09-01 at 05:08, Kanwal Preet Singh CHANANA wrote:
> Hi all,
> 
> I am porting my project from ADS to GCC_ARM v4.0.3. I have been able to
> compile & Link my source files with GCC-ARM.  The image (running in Flash)
> crashes on target. The reason for crash is wrong pointer allocation.
> 
> I have used a pointer to a structure as shown below:
> 
> typedef volatile struct UARTInfoTag
> {
>     void                         (*rxInt_p) (void);
>     void                         (*txComplete_p) (void);
>     tUartLineStatusCallbackFunc  lineStatusInt_p;
>     tBool                        NewRxData;
>     tBool                        IsTransmitting;
> } UARTInfo;
> 
> #define NUMBER_OF_UARTS		2	
> 
> UARTInfo   UARTCallBack[NUMBER_OF_UARTS];
> UARTInfo  *pUARTInfo = &UARTCallBack[0];
> 
> UARTCallBack is located in RAM with &UARTCallBack[0]=0x000033C8, but
> pUARTInfo contains the value 0x4B1D1BCA & pUARTInfo is located in RAM at
> address 0x00001FCA.
> 
           ^^^^^^^^^^^

here's your problem.  This isn't a 32-bit aligned address, so attempts
(Continue reading)

Kanwal Preet Singh CHANANA | 1 Sep 10:41 2006

RE: Pointer allocation problem

Hi Richard,

Thanks a lot for all your support. I have fixed this problem.

Actually, in my scatter file the alignment was correct but the Load address
range of *.data section was overlapping with our IRAM_CODE section(code
running from RAM). So load time, the *.data section was getting corrupted. I
certified that all global data was getting corrupted. So I rectified the
load addresses & now Image is running fine on target board. 

I have successully ported my project from ADS to GNU-ARM. Anybody need any
help on this issue, mail me. 

Thanks everybody for support.
Kanwal

-----Original Message-----
From: Richard Earnshaw [mailto:rearnsha <at> arm.com] 
Sent: Friday, September 01, 2006 2:00 PM
To: Kanwal Preet Singh CHANANA
Cc: gcc-help <at> gcc.gnu.org; crossgcc <at> sources.redhat.com
Subject: Re: Pointer allocation problem

On Fri, 2006-09-01 at 05:08, Kanwal Preet Singh CHANANA wrote:
> Hi all,
> 
> I am porting my project from ADS to GCC_ARM v4.0.3. I have been able 
> to compile & Link my source files with GCC-ARM.  The image (running in 
> Flash) crashes on target. The reason for crash is wrong pointer 
> allocation.
(Continue reading)

Rohit Arul Raj | 1 Sep 15:31 2006
Picon

Modifying the LABEL for functions emitted by the GCC Compiler

Hello Everyone,

I am trying to link the object file emitted by a Cross Compiler IDE
with the GCC Coldfire Linker and its libraries.
The Problem that i faced was:

The  gcc-coldfire compiler spits out the labels as it is in the
assembly file (main, printf etc), where  as the IDE compiler spits out
the labels prefixed with a  '_' (_main, _printf etc).

Is there any way  i can  make gcc-coldfire compiler emit  the lables
prefixed with an underscore (' _ ').Can anyone Help me OUT of this
mess!!!

Thanks in Advance,
Rohit

Tim Prince | 1 Sep 15:51 2006
Picon
Picon

Re: Modifying the LABEL for functions emitted by the GCC Compiler

Rohit Arul Raj wrote:

> 
> The  gcc-coldfire compiler spits out the labels as it is in the
> assembly file (main, printf etc), where  as the IDE compiler spits out
> the labels prefixed with a  '_' (_main, _printf etc).
> 
> Is there any way  i can  make gcc-coldfire compiler emit  the lables
> prefixed with an underscore (' _ ').Can anyone Help me OUT of this
> mess!!!
> 
How about reconciling the -fleading-underscore options?

Rohit Arul Raj | 1 Sep 16:06 2006
Picon

Re: Modifying the LABEL for functions emitted by the GCC Compiler

Rohit Arul Raj wrote:

>
> The  gcc-coldfire compiler spits out the labels as it is in the
> assembly file (main, printf etc), where  as the IDE compiler spits out
> the labels prefixed with a  '_' (_main, _printf etc).
>
> Is there any way  i can  make gcc-coldfire compiler emit  the lables
> prefixed with an underscore (' _ ').Can anyone Help me OUT of this
> mess!!!
>
How about reconciling the -fleading-underscore options?
-------------------------------------------------------------------------------------------------------------------------------------

Yeah Thanks!!!

That works for the compiler.... But the problem is that how can i
force my linker to accept the labels with an '_'.
If i link with an '_' prefix i get the following error message
<Error>
metro.o: In function `_main':
(.text+0xe): undefined reference to `_printf'
metro.o: In function `_main':
(.text+0x8): relocation truncated to fit: R_68K_16 against `_ <at> 7'
sim-crt0.o: In function `start':
sim-crt0.S:(.text+0x56): undefined reference to `main'
<Error>
Is there any option available in the Linker part to get round this???

ttyl,
(Continue reading)

John (Eljay) Love-Jensen | 1 Sep 16:18 2006
Picon

RE: Modifying the LABEL for functions emitted by the GCC Compiler

Hi Rohit,

Note:  your question is somewhat off topic to this forum.  It's not really a GCC question, per se.

If your platform has the convention of leading underscore on C routines, you should have everything
compiled with that convention.

Trying to mix with and without leading underscore conventions will be an exercise in frustration and futility.

If you have a library compiled one way, and other code compiled the other way, and you just REALLY have to get
them to talk (and you have a lot of time and patience), you could write some springboard stub routines.

But I first strongly recommend just insuring everything is compiled with the same leading underscore convention.

HTH,
--Eljay

PS:  please don't cross post to both the gcc and gcc-help forums.

Ravishankar S | 1 Sep 17:42 2006

RE: Specifiying alternatives to .data .bss in C source files

	// preserve variables across wakeup
	#pragma section DATA ".dataW" ".bssW" far-absolute
	#pragma section SDATA ".sdataW" ".sbssW" far-absolute -> Should
this not be near ?

In gcc we specify the section in this way:

int var __attribute__((section(".mysection"));

There is no way to separate initalized variable and uninitialized
variable: it has to done explicitly.

example:

int u_var __attribute__((section(".bssW"));
int i_var __attribute__((section(".dataW")) = 10;

Coming to addressing mode: It has to be specied in command line. 
Options are -msdata=eabi, -G <NUM> -fno-common. Refer to GCC manual for
details. However refer to an earlier mail of mine to see the problems in
the full utilization of SDA in PPC by GCC.

Diab is very powerful in this sense: it allows the definition of more
SDA's than what is specified by the EABI. This is currently may not be
possible in GCC.

- Ravishankar

-----Original Message-----
From: gcc-help-owner <at> gcc.gnu.org [mailto:gcc-help-owner <at> gcc.gnu.org] On
(Continue reading)


Gmane