This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430 secondary Interrupt vector table

Other Parts Discussed in Thread: MSP430F6736, MSPBSL, MSP430F427A

Hi

I’m currently working on a project using the MSP430F6736/33A.

The project includes a custom bootloader resides in flash and a bootable application code.

I had experienced some difficulties to relocate the secondary interrupt vectors table to the bootable application code section.

The linker command file and a vector.asm file (which try to relocate the interrupts to main application) are shared for the bootloader and the bootable.

 

I attached my linker command file and the vectors.asm code I’ll be thankful for any help.

vector.txt
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
; Forward for the interrupt handlers.
;
; Default are the interrupts re-vectored to the positions which are stored into
; the vector table of the application (Shadow vector table) which is located
; at the start address SHADOW_VEC_TABLE.
;
; Note, this can (and should) also be included in the normal application.
; The application can then run by itself and the conversion tool will simply
; remove the boot and calibration part..
$include
.cdecls C,LIST,"build.h" ; what is being build..
.ref SHADOW_VEC_TABLE
; Stubs to call the address in the application interrupt table (shadow vectors)
.text
INT00 mov.w &SHADOW_VEC_TABLE + 0,PC
INT01 mov.w &SHADOW_VEC_TABLE + 2,PC
INT02 mov.w &SHADOW_VEC_TABLE + 4,PC
INT03 mov.w &SHADOW_VEC_TABLE + 6,PC
INT04 mov.w &SHADOW_VEC_TABLE + 8,PC
INT05 mov.w &SHADOW_VEC_TABLE + 10,PC
INT06 mov.w &SHADOW_VEC_TABLE + 12,PC
INT07 mov.w &SHADOW_VEC_TABLE + 14,PC
INT08 mov.w &SHADOW_VEC_TABLE + 16,PC
INT09 mov.w &SHADOW_VEC_TABLE + 18,PC
INT10 mov.w &SHADOW_VEC_TABLE + 20,PC
INT11 mov.w &SHADOW_VEC_TABLE + 22,PC
INT12 mov.w &SHADOW_VEC_TABLE + 24,PC
INT13 mov.w &SHADOW_VEC_TABLE + 26,PC
INT14 mov.w &SHADOW_VEC_TABLE + 28,PC
INT15 mov.w &SHADOW_VEC_TABLE + 30,PC
INT16 mov.w &SHADOW_VEC_TABLE + 32,PC
INT17 mov.w &SHADOW_VEC_TABLE + 34,PC
INT18 mov.w &SHADOW_VEC_TABLE + 36,PC
INT19 mov.w &SHADOW_VEC_TABLE + 38,PC
INT20 mov.w &SHADOW_VEC_TABLE + 40,PC
INT21 mov.w &SHADOW_VEC_TABLE + 42,PC
INT22 mov.w &SHADOW_VEC_TABLE + 44,PC
INT23 mov.w &SHADOW_VEC_TABLE + 46,PC
INT24 mov.w &SHADOW_VEC_TABLE + 48,PC
INT25 mov.w &SHADOW_VEC_TABLE + 50,PC
INT26 mov.w &SHADOW_VEC_TABLE + 52,PC
INT27 mov.w &SHADOW_VEC_TABLE + 54,PC
INT28 mov.w &SHADOW_VEC_TABLE + 56,PC
INT29 mov.w &SHADOW_VEC_TABLE + 58,PC
INT30 mov.w &SHADOW_VEC_TABLE + 60,PC
INT31 mov.w &SHADOW_VEC_TABLE + 62,PC
INT32 mov.w &SHADOW_VEC_TABLE + 64,PC
INT33 mov.w &SHADOW_VEC_TABLE + 66,PC
INT34 mov.w &SHADOW_VEC_TABLE + 68,PC
INT35 mov.w &SHADOW_VEC_TABLE + 70,PC
INT36 mov.w &SHADOW_VEC_TABLE + 72,PC
INT37 mov.w &SHADOW_VEC_TABLE + 74,PC
INT38 mov.w &SHADOW_VEC_TABLE + 76,PC
INT39 mov.w &SHADOW_VEC_TABLE + 78,PC
INT40 mov.w &SHADOW_VEC_TABLE + 80,PC
INT41 mov.w &SHADOW_VEC_TABLE + 82,PC
INT42 mov.w &SHADOW_VEC_TABLE + 84,PC
INT43 mov.w &SHADOW_VEC_TABLE + 86,PC
INT44 mov.w &SHADOW_VEC_TABLE + 88,PC
INT45 mov.w &SHADOW_VEC_TABLE + 90,PC
INT46 mov.w &SHADOW_VEC_TABLE + 92,PC
INT47 mov.w &SHADOW_VEC_TABLE + 94,PC
INT48 mov.w &SHADOW_VEC_TABLE + 96,PC
INT49 mov.w &SHADOW_VEC_TABLE + 98,PC
INT50 mov.w &SHADOW_VEC_TABLE + 100,PC
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
lnkCmd_msp430f6736.txt
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* ============================================================================ */
/* Copyright (c) 2016, Texas Instruments Incorporated */
/* All rights reserved. */
/* */
/* Redistribution and use in source and binary forms, with or without */
/* modification, are permitted provided that the following conditions */
/* are met: */
/* */
/* * Redistributions of source code must retain the above copyright */
/* notice, this list of conditions and the following disclaimer. */
/* */
/* * Redistributions in binary form must reproduce the above copyright */
/* notice, this list of conditions and the following disclaimer in the */
/* documentation and/or other materials provided with the distribution. */
/* */
/* * Neither the name of Texas Instruments Incorporated nor the names of */
/* its contributors may be used to endorse or promote products derived */
/* from this software without specific prior written permission. */
/* */
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" */
/* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, */
/* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
/* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR */
/* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */
/* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, */
/* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; */
/* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, */
/* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR */
/* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */
/* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
/* ============================================================================ */
/******************************************************************************/
/* lnk_msp430f6736.cmd - LINKER COMMAND FILE FOR LINKING MSP430F6736 PROGRAMS */
/* */
/* Usage: lnk430 <obj files...> -o <out file> -m <map file> lnk.cmd */
/* cl430 <src files...> -z -o <out file> -m <map file> lnk.cmd */
/* */
/*----------------------------------------------------------------------------*/
/* These linker options are for command line linking only. For IDE linking, */
/* you should set your linker options in Project Properties */
/* -c LINK USING C CONVENTIONS */
/* -stack 0x0100 SOFTWARE STACK SIZE */
/* -heap 0x0100 HEAP AREA SIZE */
/* */
/*----------------------------------------------------------------------------*/
/* Version: 1.192 */
/*----------------------------------------------------------------------------*/
/****************************************************************************/
/* Specify the system memory map */
/****************************************************************************/
APP_START = 0x4000;
APP_END = 0xFEDD; // ~48Kbytes
BOOT_START = 0xFEDE;
BOOT_END = 0x12000;
MEMORY
{
SFR : origin = 0x0000, length = 0x0010
PERIPHERALS_8BIT : origin = 0x0010, length = 0x00F0
PERIPHERALS_16BIT : origin = 0x0100, length = 0x0100
RAM : origin = 0x1C00, length = 0x2000
INFOA : origin = 0x1980, length = 0x0080
INFOB : origin = 0x1900, length = 0x0080
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

**Attention** This is a public forum