OK more progress made...

Using objcopy and readelf i have figured out the problem. and that is:
the .vectors section needs the flags of "ax" and needs to be of type progbits
so if you use the .section .vectors you will need to specify this.
like:

.section .vectors,"ax",@progbits
        .word   symbol
        ....

I found this to work very well all the vector bits are set in memory now my 
assembler programs are working correctly and have all appropriate vectors 
assigned. 

WHEW! that was fun.

--Del

On Mon, 19 Jul 2004 13:42:14 -0400
Delbert Martin <dmartin-...@kionix.com> wrote:

> OK Over the weekend I got the latest versions of the tools and got them 
> compiled. I rebuilt my file and presto in the objdump I have the vectors all 
> listed... then the push to the micro. 
> 
> Monitor erase main
> load test
> monitor puc
> c
> warning: Remote failure reply: E00
> 
> ok Reset everything
> x/xb 0x1100
> 0x1100 <__dtors_start>: 0x31
> OK looks like it has our program loaded
> x/xb 0xFFFE
> 0xfffe: 0xff
> x/xb 0xFFFF
> 0xffff: 0xff
> 
> HMmm looks like still no reset vector set...
> Ok objdump set this up:
> 
> 
> test:     file format elf32-msp430
> 
> Disassembly of section .text:
> 
> 00001100 <__ctors_end>:
>     1100:     31 40 00 0a     mov     #2560,  r1      ;#0x0a00
>     1104:     b2 40 05 00     mov     #5,     &0x0120 ;#0x0005
>     1108:     20 01 
>     110a:     b0 12 18 11     call    #4376           ;#0x1118
>     110e:     b0 12 4e 11     call    #4430           ;#0x114e
>     1112:     32 d2           eint                    
> 
> 00001114 <L1>:
>     1114:     ff 3f           jmp     $+0             ;abs 0x1114
> 
> 00001116 <_unexpected>:
>     1116:     00 13           reti                    
> 
> 00001118 <SetupPorts>:
>     1118:     c2 43 26 00     mov.b   #0,     &0x0026 ;r3 As==00
>     111c:     f2 40 ff 00     mov.b   #255,   &0x0022 ;#0x00ff
>     1120:     22 00 
>     1122:     c2 43 21 00     mov.b   #0,     &0x0021 ;r3 As==00
>     1126:     c2 43 1f 00     mov.b   #0,     &0x001f ;r3 As==00
>     112a:     f2 40 ff 00     mov.b   #255,   &0x001e ;#0x00ff
>     112e:     1e 00 
>     1130:     c2 43 1d 00     mov.b   #0,     &0x001d ;r3 As==00
>     1134:     f2 c0 80 00     bic.b   #128,   &0x002a ;#0x0080
>     1138:     2a 00 
>     113a:     f2 c0 80 00     bic.b   #128,   &0x002e ;#0x0080
>     113e:     2e 00 
>     1140:     f2 d0 80 00     bis.b   #128,   &0x002d ;#0x0080
>     1144:     2d 00 
>     1146:     f2 c0 80 00     bic.b   #128,   &0x002c ;#0x0080
>     114a:     2c 00 
>     114c:     30 41           ret                     
> 
> 0000114e <InitColors>:
>     114e:     f2 40 07 00     mov.b   #7,     &0x0021 ;#0x0007
>     1152:     21 00 
>     1154:     e2 d2 1d 00     bis.b   #4,     &0x001d ;r2 As==10
>     1158:     30 41           ret                     
> 
> 0000115a <P2_ISR>:
>     115a:     e2 e2 1d 00     xor.b   #4,     &0x001d ;r2 As==10
>     115e:     f2 c0 80 00     bic.b   #128,   &0x002b ;#0x0080
>     1162:     2b 00 
>     1164:     f2 e0 07 00     xor.b   #7,     &0x0021 ;#0x0007
>     1168:     21 00 
>     116a:     00 13           reti                    
> Disassembly of section .vectors:
> 
> 0000ffe0 <_vectors_end-0x20>:
>     ffe0:     16 11           interrupt service routine at 0x1116
>     ffe2:     5a 11           interrupt service routine at 0x115a
>     ffe4:     16 11           interrupt service routine at 0x1116
>     ffe6:     16 11           interrupt service routine at 0x1116
>     ffe8:     16 11           interrupt service routine at 0x1116
>     ffea:     16 11           interrupt service routine at 0x1116
>     ffec:     16 11           interrupt service routine at 0x1116
>     ffee:     16 11           interrupt service routine at 0x1116
>     fff0:     16 11           interrupt service routine at 0x1116
>     fff2:     16 11           interrupt service routine at 0x1116
>     fff4:     16 11           interrupt service routine at 0x1116
>     fff6:     16 11           interrupt service routine at 0x1116
>     fff8:     16 11           interrupt service routine at 0x1116
>     fffa:     16 11           interrupt service routine at 0x1116
>     fffc:     16 11           interrupt service routine at 0x1116
>     fffe:     00 11           interrupt service routine at 0x1100
> 
> OK Great.
> now objcopy, I used objcopy cause this is used for converting things to intel 
> hex format
> so we should see some lines like: :10FFE003... to show that there is info 
> there.
> I get:
> 
> :101100003140000AB24005002001B0121811B0129F
> :101110004E1132D2FF3F0013C2432600F240FF00BF
> :101120002200C2432100C2431F00F240FF001E0004
> :10113000C2431D00F2C080002A00F2C080002E00D1
> :10114000F2D080002D00F2C080002C003041F2402F
> :1011500007002100E2D21D003041E2E21D00F2C092
> :0C11600080002B00F2E0070021000013CB
> :0400000300001100E8
> :00000001FF
> 
> look not there.
> OK i have a C program that does the same thing... take a peek at the hex file 
> for that:
> 
> :10110000B240805A20013F409C113E4000023D40C9
> :1011100000020D9E0524FE4F00001E530E9DFB2B6A
> :101120003F4000023D4000020D9F0524CF430000D8
> :101130001F530F9DFB2B3040401130403E110013D8
> :101140003140000A0441B240805A2001C2432600C7
> :10115000F2432200C2432100C2431F00F2431E009B
> :10116000F2431D00F2407F002A00F2432E00F240BD
> :1011700080FF2D00C2432C0032D2FF3F304094113B
> :1011800005120412F2E080FF2B00E2E21D00344160
> :0C119000354100130F123F4102DFFE3F0B
> :10FFE0003A1180113A113A113A113A113A113A1173
> :10FFF0003A113A113A113A113A113A113A110011E3
> :0400000300001100E8
> :00000001FF
> 
> hmmm  It has these which define the data in the vector table.
> :10FFE0003A1180113A113A113A113A113A113A1173   //Starts 0xFFE0
> :10FFF0003A113A113A113A113A113A113A110011E3   //Starts 0xFFF0
> 
> help?
> --Del
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
> _______________________________________________
> Mspgcc-users mailing list
> Mspgcc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
> 

Reply via email to