Re: [Mspgcc-users] msp430x1612 header
The x variants were an early attempt to simplify identifying processors where part number variation did not affect the compiler, at a time when the MSP430 product line was quite limited. Introduction of additional processor families broke those assumptions, particularly in the need to vary the addresses and presence of different peripherals. In 2013 when I last updated msp430mcu (may not have been released) there were north of 450 distinct chip IDs that affected code generation or peripheral address. The generic ID originally spelled msp430x16x covered six of them. Peter On Thu, Mar 30, 2017 at 8:11 PM, Norrathep Rattanavipanonwrote: > Thanks I just found out that I need to include periph.x. Just curious is > there any difference for x1612 vs f1612 in terms of hardware configuration? > Or is x1612 just renamed to f1612? > > On Thu, Mar 30, 2017 at 4:51 PM, David W. Schultz < > david.schu...@earthlink.net> wrote: > > > On 03/30/2017 06:38 PM, Norrathep Rattanavipanon wrote: > > > Thank you so much for your help, David. Now it compiles perfectly past > > > that point but I run into another issue (I'm not sure if this is the > > > right place to post please let me know if its not): > > > > > > /usr/lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld: cannot represent > > > machine `msp:110' > > > > > > > There should be a linker script available as well in the same location. > > If you have given the compiler the path to that directory it should find > > it. > > > > -I /usr/ti/gcc/include > > > > Is what I use. > > > > TI moved a lot of information, like device register addresses, from the > > .h files into the linker scripts some time ago. You should use the > > provided linker scripts and they will resolve symbols like WDTCTL. > > > > -- > > David W. Schultz > > http://home.earthlink.net/~david.schultz > > "Life without stock is barely worth living..." - Anthony Bourdain > > > > > > -- > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > ___ > > Mspgcc-users mailing list > > Mspgcc-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > > > > > > -- > Norrathep (Oak) Rattanavipanon > M.S. in Computer Science > University of California - Irvine > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Mspgcc-users mailing list > Mspgcc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Re: [Mspgcc-users] msp430x1612 header
Thanks I just found out that I need to include periph.x. Just curious is there any difference for x1612 vs f1612 in terms of hardware configuration? Or is x1612 just renamed to f1612? On Thu, Mar 30, 2017 at 4:51 PM, David W. Schultz < david.schu...@earthlink.net> wrote: > On 03/30/2017 06:38 PM, Norrathep Rattanavipanon wrote: > > Thank you so much for your help, David. Now it compiles perfectly past > > that point but I run into another issue (I'm not sure if this is the > > right place to post please let me know if its not): > > > > /usr/lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld: cannot represent > > machine `msp:110' > > > > There should be a linker script available as well in the same location. > If you have given the compiler the path to that directory it should find > it. > > -I /usr/ti/gcc/include > > Is what I use. > > TI moved a lot of information, like device register addresses, from the > .h files into the linker scripts some time ago. You should use the > provided linker scripts and they will resolve symbols like WDTCTL. > > -- > David W. Schultz > http://home.earthlink.net/~david.schultz > "Life without stock is barely worth living..." - Anthony Bourdain > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Mspgcc-users mailing list > Mspgcc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > -- Norrathep (Oak) Rattanavipanon M.S. in Computer Science University of California - Irvine -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Re: [Mspgcc-users] msp430x1612 header
On 03/30/2017 06:38 PM, Norrathep Rattanavipanon wrote: > Thank you so much for your help, David. Now it compiles perfectly past > that point but I run into another issue (I'm not sure if this is the > right place to post please let me know if its not): > > /usr/lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld: cannot represent > machine `msp:110' > There should be a linker script available as well in the same location. If you have given the compiler the path to that directory it should find it. -I /usr/ti/gcc/include Is what I use. TI moved a lot of information, like device register addresses, from the .h files into the linker scripts some time ago. You should use the provided linker scripts and they will resolve symbols like WDTCTL. -- David W. Schultz http://home.earthlink.net/~david.schultz "Life without stock is barely worth living..." - Anthony Bourdain -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Re: [Mspgcc-users] msp430x1612 header
Thank you so much for your help, David. Now it compiles perfectly past that point but I run into another issue (I'm not sure if this is the right place to post please let me know if its not): /usr/lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld: cannot represent machine `msp:110' I put the following in the linker script - link-MSP430x: OUTPUT_FORMAT("elf32-msp430","elf32-msp430","elf32-msp430") OUTPUT_ARCH(msp:110) ,,, And it compiles using the following command: msp430-gcc -T link-MSP430.x -mmcu=msp430f1612 ... Then, I tried changing OUTPUT_ARCH(msp:110) to OUTPUT_ARCH(msp430). But I get a lot of undefined references: /usr/lib/gcc/msp430/4.6.3/mmpy-16/libcrt0.a(__watchdog_support.o): In function `__watchdog_support': /build/buildd/gcc-msp430-4.6.3~mspgcc-20120406/./gcc-4.6.3/gcc/config/msp430/crt0.S:105: undefined reference to `__WDTCTL' /usr/lib/gcc/msp430/4.6.3/mmpy-16/libcrt0.a(_copy_data.o): In function `__do_copy_data': /build/buildd/gcc-msp430-4.6.3~mspgcc-20120406/./gcc-4.6.3/gcc/config/msp430/crt0.S:193: undefined reference to `__WDTCTL' /usr/lib/gcc/msp430/4.6.3/mmpy-16/libcrt0.a(_clear_bss.o): In function `__do_clear_bss': /build/buildd/gcc-msp430-4.6.3~mspgcc-20120406/./gcc-4.6.3/gcc/config/msp430/crt0.S:219: undefined reference to `__WDTCTL' Thank you for your help. On Thu, Mar 30, 2017 at 3:03 PM, David W. Schultz < david.schu...@earthlink.net> wrote: > On 03/30/2017 04:43 PM, Norrathep Rattanavipanon wrote: > > Hello, > > > > I have an old code that compiles with " msp430-gcc -mmcu=msp430x1612 > ...". > > However, I'm very new and dont have any prior experience in msp430 so I > > tried to compile it but it said "warning unable to identify and include > MCU > > header". So I looked into msp430.h and it does not have any > msp430x1612.h. > > Is there anyway to run this code with the latest version of mspgcc? > > Identify a specific part: -mmcu=msp430f1612 > > -- > David W. Schultz > http://home.earthlink.net/~david.schultz > "Life without stock is barely worth living..." - Anthony Bourdain > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Mspgcc-users mailing list > Mspgcc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > -- Norrathep (Oak) Rattanavipanon M.S. in Computer Science University of California - Irvine -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Re: [Mspgcc-users] msp430x1612 header
On 03/30/2017 04:43 PM, Norrathep Rattanavipanon wrote: > Hello, > > I have an old code that compiles with " msp430-gcc -mmcu=msp430x1612 ...". > However, I'm very new and dont have any prior experience in msp430 so I > tried to compile it but it said "warning unable to identify and include MCU > header". So I looked into msp430.h and it does not have any msp430x1612.h. > Is there anyway to run this code with the latest version of mspgcc? Identify a specific part: -mmcu=msp430f1612 -- David W. Schultz http://home.earthlink.net/~david.schultz "Life without stock is barely worth living..." - Anthony Bourdain -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users