Reply by FreeRTOS.org February 22, 20092009-02-22
"Grant Edwards" <grante@visi.com> wrote in message 
news:_6qdnS41jNPCGDzUnZ2dnUVZ_oHinZ2d@posted.usinternet...
> On 2009-02-22, FreeRTOS.org <noemail@given.com> wrote: >> >> "qwertz911" <qwertz911@gmail.com> wrote in message >> news:kbWdnVypZNXV0DzUnZ2dnUVZ_rfinZ2d@giganews.com... >>> Hello, >>> >>> i am new with ARM and i found one problem. I really need >>> change endian from little to big. I think that its changing in >>> startup with function: > > [...] > > As has been pointed out, you select endianness of code by using > command-line parameters to gcc/gas. > >> This is a fixed little endian processor. Compiling to bin >> endian will prevent any code running at all. Why would you >> want to switch it to big endian? > > Because God and The Internet are big-endian!
My laptop is little endian, and it seems to have no problem talking to God - albeit not as efficiently as if it were big endian. -- Regards, Richard. + http://www.FreeRTOS.org Designed for microcontrollers. More than 7000 downloads per month. + http://www.SafeRTOS.com Certified by T&#4294967295;V as meeting the requirements for safety related systems.
Reply by Grant Edwards February 22, 20092009-02-22
On 2009-02-22, FreeRTOS.org <noemail@given.com> wrote:
> > "qwertz911" <qwertz911@gmail.com> wrote in message > news:kbWdnVypZNXV0DzUnZ2dnUVZ_rfinZ2d@giganews.com... >> Hello, >> >> i am new with ARM and i found one problem. I really need >> change endian from little to big. I think that its changing in >> startup with function:
[...] As has been pointed out, you select endianness of code by using command-line parameters to gcc/gas.
> This is a fixed little endian processor. Compiling to bin > endian will prevent any code running at all. Why would you > want to switch it to big endian?
Because God and The Internet are big-endian!
> From the manual "The MC handles only little-endian mode > accesses. The masters work in little-endian mode only." [MC = > memory controller]
I can vouch for the fact that switching an ARM CPU so that its endian setting disagrees with that of all the peripherals is a non-productive way to spend an afternoon. [It's actually a little surprising what will work in that mode, but it's not enough to be very useful.] -- Grant
Reply by FreeRTOS.org February 22, 20092009-02-22
"qwertz911" <qwertz911@gmail.com> wrote in message 
news:kbWdnVypZNXV0DzUnZ2dnUVZ_rfinZ2d@giganews.com...
> Hello, > > i am new with ARM and i found one problem. I really need change endian > from little to big. I think that its changing in startup with function: > > OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") > > but when i change it to "elf32-bigarm", compiler report problem, that he > cannot compile anything because ld.exe is little endian. Please tell me > how > to change endian or at least describe how the function OUTPU_FORMAT() > works. > > I am using AT91SAM7S256 and winarm. > > Thank you Zbynek
This is a fixed little endian processor. Compiling to bin endian will prevent any code running at all. Why would you want to switch it to big endian? From the manual "The MC handles only little-endian mode accesses. The masters work in little-endian mode only." [MC = memory controller] -- Regards, Richard. + http://www.FreeRTOS.org Designed for microcontrollers. More than 7000 downloads per month. + http://www.SafeRTOS.com Certified by T&#4294967295;V as meeting the requirements for safety related systems.
Reply by John Devereux February 22, 20092009-02-22
"qwertz911" <qwertz911@gmail.com> writes:

> Hello, > > i am new with ARM and i found one problem. I really need change endian > from little to big. I think that its changing in startup with function: > > OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") > > but when i change it to "elf32-bigarm", compiler report problem, that he > cannot compile anything because ld.exe is little endian. Please tell me how > to change endian or at least describe how the function OUTPU_FORMAT() > works. > > I am using AT91SAM7S256 and winarm. >
Are you sure you want to change to big-endian? The part appears to be a little-endian one, and that is normally the default for gcc so you should not have to do anything. As far as I know endianness is normally specified from the (gcc) compiler command line; have you tried the switches: -mbig-endian -mlittle-endian To control the endianness? -- John Devereux
Reply by qwertz911 February 22, 20092009-02-22
Hello,

i am new with ARM and i found one problem. I really need change endian
from little to big. I think that its changing in startup with function:

OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")

but when i change it to "elf32-bigarm", compiler report problem, that he
cannot compile anything because ld.exe is little endian. Please tell me how
to change endian or at least describe how the function OUTPU_FORMAT()
works. 

I am using AT91SAM7S256 and winarm.

Thank you Zbynek