Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » MSPGCC
  • » [Mspgcc-users] added support for msp430x24x and msp430x26x [RSS Feed]

#1 Jan. 30, 2008 03:28:50

Gunther L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] added support for msp430x24x and msp430x26x


Hi all,I've just finished patches for binutils and gcc to support the completefamily of F24x and F26x MCUs.Here's an archive containing the patches and a quite important README.txt:http://www.daqtix.com/msp430/mspgcc-24x-26x-patch-20080130.tar.bz2Hopefully, it'll work as expected (I'm absolutely no expert in hackingcompilers).Gunther

Offline

#2 Feb. 6, 2008 03:03:14

Gunther L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] added support for msp430x24x and msp430x26x


Gunther Lemm wrote:Hopefully, it'll work as expected (I'm absolutely no expert in hackingcompilers).Yeah well, lots of bugs in it ...

The old version contained some wrong RAM/stack offsets for msp430x247,
msp430x2471, msp430x248, msp430x2481, msp430x2410.
So you better use this new patch:http://daqtix.com/msp430/mspgcc-24x-26x-patch-20080206.tar.bz2Gunther

BTW: some feedback would be nice ...

Offline

#3 Feb. 6, 2008 10:07:40

Hardy G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] added support for msp430x24x and msp430x26x


Gunther Lemm wrote:
:BTW: some feedback would be nice ...:just to keep you a little bit motivated: gcc and binutils still compilefor me with your patch. Unfortunately I cannot do any functional testsbecause I have none of the newly supported MSP430 parts available.Hardy

Offline

#4 Feb. 28, 2008 14:56:01

steve a.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] added support for msp430x24x and msp430x26x


hi gunther.thanks for your work on adding support the new msp430s; like many i'm sure, we're anxiousto try out the new version (2618).i have some feedback in the form of a question: where did you get the version of binutilsthat you have a patch for? i pulled 2.17 from gnu.org, and your patch fails, choking onmissing mach_msp defs in archures.c, which propagate all over the bfd code.can you shed some light on this for me, please?

thanks,

steve ayer

Gunther Lemm wrote:Gunther Lemm wrote:Hopefully, it'll work as expected (I'm absolutely no expert in hackingcompilers).Yeah well, lots of bugs in it ...

The old version contained some wrong RAM/stack offsets for msp430x247,
msp430x2471, msp430x248, msp430x2481, msp430x2410.
So you better use this new patch:http://daqtix.com/msp430/mspgcc-24x-26x-patch-20080206.tar.bz2Gunther

BTW: some feedback would be nice ...


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/mspgcc-users

Offline

#5 Feb. 28, 2008 19:31:55

steve a.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] added support for msp430x24x and msp430x26x


aha!

i found the patch that has to be applied to binutils before yours, problem
solved.sorry about the confusion. i'll let you know what i find out and send you any mods that ihave to make.-steve

steve ayer wrote:hi gunther.thanks for your work on adding support the new msp430s; like many i'm sure, we're anxiousto try out the new version (2618).i have some feedback in the form of a question: where did you get the version of binutilsthat you have a patch for? i pulled 2.17 from gnu.org, and your patch fails, choking onmissing mach_msp defs in archures.c, which propagate all over the bfd code.can you shed some light on this for me, please?

thanks,

steve ayer

Gunther Lemm wrote:Gunther Lemm wrote:Hopefully, it'll work as expected (I'm absolutely no expert in hackingcompilers).Yeah well, lots of bugs in it ...

The old version contained some wrong RAM/stack offsets for msp430x247,
msp430x2471, msp430x248, msp430x2481, msp430x2410.
So you better use this new patch:http://daqtix.com/msp430/mspgcc-24x-26x-patch-20080206.tar.bz2Gunther

BTW: some feedback would be nice ...


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
Mspgcc-users mailing list
Mspgcc-us***@*ists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/mspgcc-users-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/mspgcc-users

Offline

#6 March 6, 2008 16:23:57

Mat B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] added support for msp430x24x and msp430x26x


Hi Gunther,

I've been attempting to use your patch and adding some more to it and
I have a problem with binutils.

Building ld is producing a problem I cant find the cause of affecting
241x and 26x devices, compilation will fail at link for any of these
devices with the following:

msp430-gcc -mmcu=msp430x2619 -o leds.elf main.o
msp430-ld: target not found


Is this the same problem you had Steve?

If it is can you let me know what the patch you used was as I cant see
it anywhere.
If thats the case, then the rest of this email is redundant so please ignore it.

Otherwise if this is a problem still:

I've found it is caused by some missing string entries in intermediate
build files in "build/binutils-2.17/ld/", the files are
"emsp430x241x.c" and "emsp430x261x.c" for x=6,7,8,9 there are two
empty strings that should not be, see "emsp430x2410.c" for an example
of a good file, the key differences are at the end of this email.

I'm guessing the cause is something to do with msp:241 and msp:26
being lost somewhere but I cant see anything in the binutils patch
that is different for the 24x devices so I cant find why they are
coming through the build ok.


Thanks,

Mat



exerpt of diff output of example 24x and 26x files:

--- build/binutils-2.17/ld/emsp430x2410.c 2008-03-06
15:24:42.000000000 +0000
+++ build/binutils-2.17/ld/emsp430x2616.c 2008-03-06
15:24:45.000000000 +0000
@@ -38,34 +38,34 @@


static void
-gldmsp430x2410_before_parse (void)
+gldmsp430x2616_before_parse (void)
{
#ifndef TARGET_ /* I.e., if not generic. */
- ldfile_set_output_arch ("msp:24", bfd_arch_unknown);
+ ldfile_set_output_arch ("", bfd_arch_unknown);
#endif /* not TARGET_ */
}

@@ -74,9 +74,9 @@
set_output_arch_default,
ldemul_default_target,
before_allocation_default,
- gldmsp430x2410_get_script,
- "msp430x2410",
- "elf32-msp430",
+ gldmsp430x2616_get_script,
+ "msp430x2616",
+ "",
finish_default,
NULL,
NULL,

Offline

#7 March 6, 2008 18:04:21

Gunther L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] added support for msp430x24x and msp430x26x


Hi Mat,I've been attempting to use your patch and adding some more to it and
I have a problem with binutils.What exactly was the "more" that you tried to add? your diff lookssomewhat broken.msp430-gcc -mmcu=msp430x2619 -o leds.elf main.o
msp430-ld: target not foundHmm, same behaviour here.Actually the whole patch is broken, because compiling the toolchain doesnot create the necessary crt430xxxx.o files. I didn't notice thatbecause I only testet msp430f248 support - and somehow I managed tocreate crt430x248.o when I first tried to patch the toolchain in december.It'll take some days until I'll find some time to take a close look whythings don't work. Sorry for the inconvenience.Gunther

Offline

#8 March 6, 2008 18:49:35

steve a.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] added support for msp430x24x and msp430x26x


hi mat and gunther.i did have this problem, and i have encountered a couple of missing items to pull this asfar as compiling a simple bare_test.c. unfortunately, i haven't assembled all of my fixesyet.one of the things that i discovered late in the game (been at it for several days now) isthat the definitions in binutils-2.17/ld/emulparams/msp430all.sh are for msp430xF2xxx.the 'F' is the killer, because it doesn't match up with the other defs. go down the listfrom F2416 - F2619 and kill each 'F' and re-run the build.i'll try to get another patch together to supplement gunther's; i've been concentrating onmsp430x261x.h, which is not quite ready yet; migration issues with the new usart -> uscimodules remain. clock-work remains, too. if you can wait, i can include that in mypatch; it's pretty much essential anyway. i'm hoping that i can get this together latertoday, but more likely tomorrow.btw, you caught me in the middle of finding the right bsl patch; there's a warning in themigration sheet about sending the wrong password the first time and having the msp430erase all of infomem, including some essential dco calibration stuff! ack.-steve

Gunther Lemm wrote:Hi Mat,I've been attempting to use your patch and adding some more to it and
I have a problem with binutils.What exactly was the "more" that you tried to add? your diff lookssomewhat broken.msp430-gcc -mmcu=msp430x2619 -o leds.elf main.o
msp430-ld: target not foundHmm, same behaviour here.Actually the whole patch is broken, because compiling the toolchain doesnot create the necessary crt430xxxx.o files. I didn't notice thatbecause I only testet msp430f248 support - and somehow I managed tocreate crt430x248.o when I first tried to patch the toolchain in december.It'll take some days until I'll find some time to take a close look whythings don't work. Sorry for the inconvenience.Gunther



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/mspgcc-users

Offline

#9 March 6, 2008 20:53:13

steve a.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] added support for msp430x24x and msp430x26x


hi mat and gunther,i have what may be a complete supplemental patch for at least the binutils tree. i'llcheck the gcc and libc bits tomorrow morning (eastern us time) and pass along anythingelse that i did to get this far.please let me know if i missed something in this tree and i'll fix the patch.

more later,

steve

/****************** binutils-2.17.supplemental.patch *********************/diff -urN -x '*.x*' -x 'Makefile*' -x 'doc*' -x 'config*' -x '*.lo' -x '*.o' -x '*.a'msp430base_toolchain/binutils-2.17/ld/emsp430x2416.cmsp430_toolchain/binutils-2.17/ld/emsp430x2416.c--- msp430base_toolchain/binutils-2.17/ld/emsp430x2416.c 2008-03-06
15:15:00.070791680 -0500
+++ msp430_toolchain/binutils-2.17/ld/emsp430x2416.c 2008-03-05
15:06:02.703942486 -0500
@@ -41,7 +41,7 @@
gldmsp430x2416_before_parse (void)
{
#ifndef TARGET_ /* I.e., if not generic. */
- ldfile_set_output_arch ("", bfd_arch_unknown);
+ ldfile_set_output_arch ("msp:241", bfd_arch_unknown);
#endif /* not TARGET_ */
}

@@ -76,7 +76,7 @@
before_allocation_default,
gldmsp430x2416_get_script,
"msp430x2416",
- "",
+ "elf32-msp430",
finish_default,
NULL,
NULL,diff -urN -x '*.x*' -x 'Makefile*' -x 'doc*' -x 'config*' -x '*.lo' -x '*.o' -x '*.a'msp430base_toolchain/binutils-2.17/ld/emsp430x2417.cmsp430_toolchain/binutils-2.17/ld/emsp430x2417.c--- msp430base_toolchain/binutils-2.17/ld/emsp430x2417.c 2008-03-06
15:15:00.474791754 -0500
+++ msp430_toolchain/binutils-2.17/ld/emsp430x2417.c 2008-03-05
15:06:03.036001969 -0500
@@ -41,7 +41,7 @@
gldmsp430x2417_before_parse (void)
{
#ifndef TARGET_ /* I.e., if not generic. */
- ldfile_set_output_arch ("", bfd_arch_unknown);
+ ldfile_set_output_arch ("msp:241", bfd_arch_unknown);
#endif /* not TARGET_ */
}

@@ -76,7 +76,7 @@
before_allocation_default,
gldmsp430x2417_get_script,
"msp430x2417",
- "",
+ "elf32-msp430",
finish_default,
NULL,
NULL,diff -urN -x '*.x*' -x 'Makefile*' -x 'doc*' -x 'config*' -x '*.lo' -x '*.o' -x '*.a'msp430base_toolchain/binutils-2.17/ld/emsp430x2418.cmsp430_toolchain/binutils-2.17/ld/emsp430x2418.c--- msp430base_toolchain/binutils-2.17/ld/emsp430x2418.c 2008-03-06
15:15:00.806757893 -0500
+++ msp430_toolchain/binutils-2.17/ld/emsp430x2418.c 2008-03-05
15:06:03.364058068 -0500
@@ -41,7 +41,7 @@
gldmsp430x2418_before_parse (void)
{
#ifndef TARGET_ /* I.e., if not generic. */
- ldfile_set_output_arch ("", bfd_arch_unknown);
+ ldfile_set_output_arch ("msp:241", bfd_arch_unknown);
#endif /* not TARGET_ */
}

@@ -76,7 +76,7 @@
before_allocation_default,
gldmsp430x2418_get_script,
"msp430x2418",
- "",
+ "elf32-msp430",
finish_default,
NULL,
NULL,diff -urN -x '*.x*' -x 'Makefile*' -x 'doc*' -x 'config*' -x '*.lo' -x '*.o' -x '*.a'msp430base_toolchain/binutils-2.17/ld/emsp430x2419.cmsp430_toolchain/binutils-2.17/ld/emsp430x2419.c--- msp430base_toolchain/binutils-2.17/ld/emsp430x2419.c 2008-03-06
15:15:01.126717891 -0500
+++ msp430_toolchain/binutils-2.17/ld/emsp430x2419.c 2008-03-05
15:06:03.688106360 -0500
@@ -41,7 +41,7 @@
gldmsp430x2419_before_parse (void)
{
#ifndef TARGET_ /* I.e., if not generic. */
- ldfile_set_output_arch ("", bfd_arch_unknown);
+ ldfile_set_output_arch ("msp:241", bfd_arch_unknown);
#endif /* not TARGET_ */
}

@@ -76,7 +76,7 @@
before_allocation_default,
gldmsp430x2419_get_script,
"msp430x2419",
- "",
+ "elf32-msp430",
finish_default,
NULL,
NULL,diff -urN -x '*.x*' -x 'Makefile*' -x 'doc*' -x 'config*' -x '*.lo' -x '*.o' -x '*.a'msp430base_toolchain/binutils-2.17/ld/emsp430x2616.cmsp430_toolchain/binutils-2.17/ld/emsp430x2616.c--- msp430base_toolchain/binutils-2.17/ld/emsp430x2616.c 2008-03-06
15:15:01.510672041 -0500
+++ msp430_toolchain/binutils-2.17/ld/emsp430x2616.c 2008-03-05
15:06:04.016170236 -0500
@@ -41,7 +41,7 @@
gldmsp430x2616_before_parse (void)
{
#ifndef TARGET_ /* I.e., if not generic. */
- ldfile_set_output_arch ("", bfd_arch_unknown);
+ ldfile_set_output_arch ("msp:26", bfd_arch_unknown);
#endif /* not TARGET_ */
}

@@ -76,7 +76,7 @@
before_allocation_default,
gldmsp430x2616_get_script,
"msp430x2616",
- "",
+ "elf32-msp430",
finish_default,
NULL,
NULL,diff -urN -x '*.x*' -x 'Makefile*' -x 'doc*' -x 'config*' -x '*.lo' -x '*.o' -x '*.a'msp430base_toolchain/binutils-2.17/ld/emsp430x2617.cmsp430_toolchain/binutils-2.17/ld/emsp430x2617.c--- msp430base_toolchain/binutils-2.17/ld/emsp430x2617.c 2008-03-06
15:15:01.834647360 -0500
+++ msp430_toolchain/binutils-2.17/ld/emsp430x2617.c 2008-03-05
15:06:04.344222241 -0500
@@ -41,7 +41,7 @@
gldmsp430x2617_before_parse (void)
{
#ifndef TARGET_ /* I.e., if not generic. */
- ldfile_set_output_arch ("", bfd_arch_unknown);
+ ldfile_set_output_arch ("msp:26", bfd_arch_unknown);
#endif /* not TARGET_ */
}

@@ -76,7 +76,7 @@
before_allocation_default,
gldmsp430x2617_get_script,
"msp430x2617",
- "",
+ "elf32-msp430",
finish_default,
NULL,
NULL,diff -urN -x '*.x*' -x 'Makefile*' -x 'doc*' -x 'config*' -x '*.lo' -x '*.o' -x '*.a'msp430base_toolchain/binutils-2.17/ld/emsp430x2618.cmsp430_toolchain/binutils-2.17/ld/emsp430x2618.c--- msp430base_toolchain/binutils-2.17/ld/emsp430x2618.c 2008-03-06
15:15:02.170614819 -0500
+++ msp430_toolchain/binutils-2.17/ld/emsp430x2618.c 2008-03-05
15:06:04.668266668 -0500
@@ -41,7 +41,7 @@
gldmsp430x2618_before_parse (void)
{
#ifndef TARGET_ /* I.e., if not generic. */
- ldfile_set_output_arch ("", bfd_arch_unknown);
+ ldfile_set_output_arch ("msp:26", bfd_arch_unknown);
#endif /* not TARGET_ */
}

@@ -76,7 +76,7 @@
before_allocation_default,
gldmsp430x2618_get_script,
"msp430x2618",
- "",
+ "elf32-msp430",
finish_default,
NULL,
NULL,diff -urN -x '*.x*' -x 'Makefile*' -x 'doc*' -x 'config*' -x '*.lo' -x '*.o' -x '*.a'msp430base_toolchain/binutils-2.17/ld/emsp430x2619.cmsp430_toolchain/binutils-2.17/ld/emsp430x2619.c--- msp430base_toolchain/binutils-2.17/ld/emsp430x2619.c 2008-03-06
15:15:02.494577721 -0500
+++ msp430_toolchain/binutils-2.17/ld/emsp430x2619.c 2008-03-05
15:06:05.020371803 -0500
@@ -41,7 +41,7 @@
gldmsp430x2619_before_parse (void)
{
#ifndef TARGET_ /* I.e., if not generic. */
- ldfile_set_output_arch ("", bfd_arch_unknown);
+ ldfile_set_output_arch ("msp:26", bfd_arch_unknown);
#endif /* not TARGET_ */
}

@@ -76,7 +76,7 @@
before_allocation_default,
gldmsp430x2619_get_script,
"msp430x2619",
- "",
+ "elf32-msp430",
finish_default,
NULL,
NULL,diff -urN -x '*.x*' -x 'Makefile*' -x 'doc*' -x 'config*' -x '*.lo' -x '*.o' -x '*.a'msp430base_toolchain/binutils-2.17/ld/emulparams/msp430all.shmsp430_toolchain/binutils-2.17/ld/emulparams/msp430all.sh--- msp430base_toolchain/binutils-2.17/ld/emulparams/msp430all.sh 2008-03-0614:55:41.065704387 -0500+++ msp430_toolchain/binutils-2.17/ld/emulparams/msp430all.sh 2008-03-0515:04:05.823352505 -0500@@ -954,7 +954,7 @@
STACK=0xa00
fi

-if ; then
+if ; then
ARCH=msp:241
MACHINE=
SCRIPT_NAME=elf32msp430
@@ -973,7 +973,7 @@
STACK=0x2100
fi

-if ; then
+if ; then
ARCH=msp:241
MACHINE=
SCRIPT_NAME=elf32msp430
@@ -992,7 +992,7 @@
STACK=0x3100
fi

-if ; then
+if ; then
ARCH=msp:241
MACHINE=
SCRIPT_NAME=elf32msp430
@@ -1011,7 +1011,7 @@
STACK=0x3100
fi

-if ; then
+if ; then
ARCH=msp:241
MACHINE=
SCRIPT_NAME=elf32msp430
@@ -1030,7 +1030,7 @@
STACK=0x2100
fi

-if ; then
+if ; then
ARCH=msp:26
MACHINE=
SCRIPT_NAME=elf32msp430
@@ -1049,7 +1049,7 @@
STACK=0x2100
fi

-if ; then
+if ; then
ARCH=msp:26
MACHINE=
SCRIPT_NAME=elf32msp430
@@ -1068,7 +1068,7 @@
STACK=0x3100
fi

-if ; then
+if ; then
ARCH=msp:26
MACHINE=
SCRIPT_NAME=elf32msp430
@@ -1087,7 +1087,7 @@
STACK=0x3100
fi

-if ; then
+if ; then
ARCH=msp:26
MACHINE=
SCRIPT_NAME=elf32msp430

Offline

#10 March 7, 2008 02:38:03

Gunther L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] added support for msp430x24x and msp430x26x


hi steve,

here's something else for you to add to your patch-patch:

take a look at msp430-libc/src/Makefile
the following lines seem to be missing:

crt430x247.o crt430x248.o crt430x249.o crt430x2410.o\
crt430x2471.o crt430x2481.o crt430x2491.o \
crt430x2416.o crt430x2417.o crt430x2418.o crt430x2419.o \
crt430x2616.o crt430x2617.o crt430x2618.o crt430x2619.o \

that could be the reason why there are no crt430*.o files :)
warning: I did not test this modification.

gunther

Offline

  • Root
  • » MSPGCC
  • » [Mspgcc-users] added support for msp430x24x and msp430x26x [RSS Feed]

Board footer

Moderator control

Enjoy the 11th of December
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support