No, this is not a bug in mspgcc.
Since you've suggested this is a college assignment, I won't say directly
what the problem is, but it's in your code. Try disassembling the two
compiled versions and look at the difference. Then think about what
optimization does.
Peter
On Wed, Mar 9, 2011 at 8:57 AM, Abhay sing <abay....@gmail.com> wrote:
> thanx for your reply...... i was successful installing mspgcc-4.4.5
>
> But now if i compile myfile.c using
>
> shell $ /opt/msp430-gcc-4.4.5/bin/msp430-gcc -mmcu=msp430x2274
> ledflash.c -o ledflash.elf
> then file .elf generated when downloaded to the board using mspdebug
> says
> shell $
> Programming...
> Writing 122 bytes to 8000...
> Writing 32 bytes to ffe0...
>
> and the code works but when I issue the command line using optimisation
> level 3, the code doesnt works as expected
> shell $ /opt/msp430-gcc-4.4.5/bin/msp430-gcc -mmcu=msp430x2274 ledflash.c
> -O3 -o ledflash.elf
> Then mspdebug says
> Programming...
> Writing 84 bytes to 8000...
> Writing 32 bytes to ffe0...
>
>
> Actually the code is simply to toggle the leds, When i run the code the one
> compiled with optimisation 3, leds simply doesnt blink.
> I have attached both the .elfs file and the code. I guess its some kind of
> bug related to msp430-gcc.
>
> Once again,thanx for your reply.
>
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users