Steven Johnson wrote:

It seems this project has made a rod for its back by identifying all of the individual processor variants by number, rather than family. Just how does binutils care if the MSP430 is an FG439 or a F1101 or whatever, flash based or mask rom based. For that matter, why does GCC or any other tool (maybe with the exception of the debugger interface) care. [And the debugger is only a supposition because knowledge about the interface is not public, but I would expect even there, there are families. Every individual chip isnt going to be different??]

yes, it is different, each has different Flash and RAM size, other peripherals.

with gcc you only need to specify the cpu type on the command line while compiling/linking and your program has the right peripherals available.

i never include e.g. msp430x14x.h or something. io.h takes care of everything and it can't happen that i use some peripheral that isn't implemented on my target.

i also happen to write code that runs on different MCUs (e.g. when i use a larger for deveopment work and a smaller for production). then i need to use #ifdefs and only initialize the peripherals that are actualy there.

The only place it matters as far as I can tell is the script you pass to the linker to set up the memory map correctly, and the include files you use to define your peripherals.

and: with or without hardware multiplier.

If this is the case, what is the point in specifying every model of MSP430, when at a binary level they are all the same. The base registers are the same. The instruction set is the same. Where the vectors are is the same.

and here youre wrong. the interrupt vectors are different (compare 13x and 12x) some basic peripheral registers are different (compare USART0 of 13x and 12x) the 4x device have a whole set of different peripherals, starting with a different clock system.

> Binutils doesnt care about the memory map.

the linker is part of binutils and the linker scripts contain the memory map (for flash/ram/infomem etc sections). there are in the binutils distribution.

If GCC and Binutils only knew about the "MSP430" (being the only architecture member i know of in the family). Life would appear to be simpler and all this incessant patching the name tables in binutils and GCC to keep up with the rapidly diversifying range of peripherals available on the one architecture would cease.

well, if you dont like the features (automatialy the right include for your msp, the ability to use ifdefs for different targets) then you're free to use msp1 or msp2 as -mmcu=XX option. thge difference is that the first one is without, the second with HW mutilpier.

chris

Reply via email to