----- Ursprüngliche Nachricht -----
Von: Valentin Sawadski
Gesendet am: 23 Aug 2011 11:56:52
Betreff: [Mspgcc-users] Binaries compiled with mspgcc won't run on CC430F6137
> My goal is to run a simple example on an CC430F6137 MCU. Compilation and
> Writing 32 bytes to ff80...
> Is this a bug in mspgcc or am I doing something wrong?
Either in the header files or the linker script.
The reset vector that points to the program start is in 0xfffe.
The compiler is apparently generating a vector table of 32 bytes (which isn't necessarily wrong) and the linker places it at 0cff80, which
too isn't necessarily wrong. But both together mean that the reset vector is written to 0xff9e not 0xfffe.
And without a reset vector address written to 0xfffe, the program won't start.
After looking into the device datasheet, the vector table supported by the processor has 64 entries, so it is 128 bytes long. However, 0
to 44 are reserved/unused.
So the compiler (instructed by the header files) should generate an 38 byte long vector table (at least) and the linker command script
should set the start address of the vector table to an address that fits this amount.