Quantcast

msp430-gdb an no bss in sim target

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

msp430-gdb an no bss in sim target

Blarpott
I've managed to get binutils, gcc, libc and gdb compiled for Mac OS using macports. In parallel I tried the original win32 insttalation on Vista using parallels set-up. Both set-up show the same behaviour, that no bss could be found. I read the messages in the board, added the variables and saw, that a '.data' appeared. But the msp430-gdb keeps saying, that no bss is avaible. Some information from the files:
 
$ msp430-objdump -h main
 
main: file format elf32-msp430
 
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000054 0000fc00 0000fc00 00000094 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000002 00000200 0000fc54 000000e8 2**1
CONTENTS, ALLOC, LOAD, DATA
2 .vectors 00000020 0000ffe0 0000ffe0 000000ea 2**0
CONTENTS, ALLOC, LOAD, READONLY, CODE
3 .stab 000000f0 00000000 00000000 0000010c 2**2
CONTENTS, READONLY, DEBUGGING
4 .stabstr 0000001e 00000000 00000000 000001fc 2**0
CONTENTS, READONLY, DEBUGGING
 
<---------->
 
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i386-apple-darwin9.5.0 --target=msp430".
(gdb) target sim
Connected to the simulator.
(gdb) load main
``main'' has no bss section.
unable to load program
 
<---------->
 
$ cat main.c
//#include <msp430x22x4.h> 
 
int dummy = 1;
 
int main( void ) {
// int i = 0x42;
// return( dummy + i );
return( 0 );
}
 
Any suggestion, what I should try next?
 
Regards

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: msp430-gdb an no bss in sim target

Sergey A. Borshch
Blarpott wrote:
> I've managed to get binutils, gcc, libc and gdb compiled for Mac OS using
> macports. In parallel I tried the original win32 insttalation on Vista using
> parallels set-up. Both set-up show the same behaviour, that no bss could be
> found. I read the messages in the board, added the variables and saw, that a
> '.data' appeared. But the msp430-gdb keeps saying, that no bss is avaible.
.bss contains uninitialized (zeroed at startup) data.
> //#include <msp430x22x4.h>
>  
> int dummy = 1;
Try to add int dummy2; here

   Sergey

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mspgcc-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: msp430-gdb an no bss in sim target

Adam Bark
In reply to this post by Blarpott
2008/10/15 Blarpott <[hidden email]>

I've managed to get binutils, gcc, libc and gdb compiled for Mac OS using
macports. In parallel I tried the original win32 insttalation on Vista using
parallels set-up. Both set-up show the same behaviour, that no bss could be
found. I read the messages in the board, added the variables and saw, that a
'.data' appeared. But the msp430-gdb keeps saying, that no bss is avaible.
Some information from the files:

$ msp430-objdump -h main

main: file format elf32-msp430

Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000054 0000fc00 0000fc00 00000094 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000002 00000200 0000fc54 000000e8 2**1
CONTENTS, ALLOC, LOAD, DATA
2 .vectors 00000020 0000ffe0 0000ffe0 000000ea 2**0
CONTENTS, ALLOC, LOAD, READONLY, CODE
3 .stab 000000f0 00000000 00000000 0000010c 2**2
CONTENTS, READONLY, DEBUGGING
4 .stabstr 0000001e 00000000 00000000 000001fc 2**0
CONTENTS, READONLY, DEBUGGING

<---------->

GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i386-apple-darwin9.5.0 --target=msp430".
(gdb) target sim
Connected to the simulator.
(gdb) load main
``main'' has no bss section.
unable to load program

<---------->

$ cat main.c
//#include <msp430x22x4.h>

int dummy = 1;

int main( void ) {
//      int i = 0x42;
//      return( dummy + i );
return( 0 );
}

Any suggestion, what I should try next?

Regards
If you declare a volatile int before main it will include a .bss

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mspgcc-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Loading...