Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
mips elf and pic 32
26-02-2013, 12:01 AM,
#1
mips elf and pic 32
Hello everybody,
for studying purpose I'm trying to do not use the Pinguino IDE and his toolchain to build hex for my Pinguino-pic32-olimex but to the work by hand.
So..
I downloaded the mips toolchain from the official website
I followed the rules and everything works fine.
I wrote a simple program to power on the LED2 of my board:
Code:
#include <p32xxxx.h> /* pic 32 version xxx -> via compiler option */

int main(void)
{
    while(1)
    {
        PORTDSET = 0x02; /*imposta il registro a 32 bit PORT[D] al valore 2. Cioè, secondo bit a 1, gli altri a 0.
                           Dato che nel pinguino pic-32 otg il led 2, è mappato sul secondo bit*/
    }
    return 0;
}

I copied from the pinguino IDE the linker script and I putted it in
~/MIPS/ToolChain/linker/scripts/PIC32_PINGUINO_OTG/procdefs.ld
and i also copied the processor.o file for my board, and i putted in ~/MIPS/ToolChain/obj/non-free/processor.o

I compile the code using:
Code:
mips-sde-elf-gcc -EL -D __PIC32MX__ -D __32MX440F256H__ -T ../ToolChain/linker/scripts/PIC32_PINGUINO_OTG/procdefs.ld  -I ../ToolChain/include/non-free/ led.c -o led.elf ../ToolChain/obj/non-free/processor.o
And i get my ELF file.

Then, I tried to get an hex file from the elf:
Code:
mips-sde-elf-objcopy -O ihex led.elf led.hexBFD: led.hex: address 0xffffffff9d006a00 out of range for Intel Hex file
mips-sde-elf-objcopy:led.hex: Bad value

So, i searched into the forum and I've seen this topic: http://forum.pinguino.cc/showthread.php?tid=3267

So, If i don't want to use your modified version of mips-elf-gcc and other tools, what should I do?

And what is your change in gcc and other tools of the mips toolchain?

Thanks to everybody
Reply
27-02-2013, 12:29 PM, (This post was last modified: 27-02-2013, 05:56 PM by nessnuo.)
#2
RE: mips elf and pic 32
UP.
I remember that gcc code is licensed under GPL v3 so every modify should be public.
Reply
28-02-2013, 06:59 PM, (This post was last modified: 28-02-2013, 08:09 PM by nessnuo.)
#3
RE: mips elf and pic 32
Up, please
Reply
01-03-2013, 11:52 AM,
#4
RE: mips elf and pic 32
Answer here : http://forum.pinguino.cc/showthread.php?...53#pid6753

(28-02-2013, 06:59 PM)nessnuo Wrote: Up, please
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)