Hi, I am using WinAVR-20040720 and AVRStudio 4.10. I have global variable definitions in main.c. One of which is char version[10]="1.0"; However, the version becomes "", i.e., version[0]=0 when the program is debugged and the variable is watched. Do anyone encounter similar problem? Thanks!

Bug found in GCC-AVR/ AVRStudio
Started by ●January 16, 2005
Reply by ●January 16, 20052005-01-16
>char version[10]="1.0"; >However, the version becomes ""This sounds more like an issue with the startup code. What happens if you declare it as const char instead?
Reply by ●January 16, 20052005-01-16
Reply by ●January 16, 20052005-01-16
> I am using WinAVR-20040720 and AVRStudio 4.10. I have global variable > definitions in main.c. One of which is > > char version[10]="1.0"; > > However, the version becomes "", i.e., version[0]=0 when the program is > debugged and the variable is watched. > Do anyone encounter similar problem? Thanks! >AVR Studio 4.11 is now released and avaialble at www.avrfreaks.net Don't know if thias will improve things though... -- Best Regards, Ulf Samuelsson. Ulf at atmel dot com These comments are intended to be my own opinion and they may, or may not be shared by my employer, Atmel Nordic AB.
Reply by ●January 16, 20052005-01-16
Reply by ●January 16, 20052005-01-16
<dereklai2k@yahoo.com.hk> wrote in message news:1105885415.339941.41040@c13g2000cwb.googlegroups.com...> Hi, > > I am using WinAVR-20040720 and AVRStudio 4.10. I have global variable > definitions in main.c. One of which is > > char version[10]="1.0"; > > However, the version becomes "", i.e., version[0]=0 when the program is > debugged and the variable is watched. > Do anyone encounter similar problem? Thanks!I take it you want this variable to exist in program memory (ROM)? -- Nicholas O. Lindan, Cleveland, Ohio Consulting Engineer: Electronics; Informatics; Photonics. Remove spaces etc. to reply: n o lindan at net com dot com psst.. want to buy an f-stop timer? nolindan.com/da/fstop/
Reply by ●January 16, 20052005-01-16
larwe@larwe.com wrote:> > >char version[10]="1.0"; > >However, the version becomes "" > > This sounds more like an issue with the startup code. What happens > if you declare it as const char instead?>From another thread we find that dereklai2k refuses to quote, andalso does not bother to reveal a solution when found. Thus I recommend ignoring him. -- "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson
Reply by ●January 16, 20052005-01-16
CBFalconer wrote:> larwe@larwe.com wrote: > >>>char version[10]="1.0"; >>>However, the version becomes "" >> >>This sounds more like an issue with the startup code. What happens >>if you declare it as const char instead? > > >>From another thread we find that dereklai2k refuses to quote, and > also does not bother to reveal a solution when found. Thus I > recommend ignoring him. >My vote, too for a PLONK. Let's give him an opportunity: Please post a minimal example which does not behave. Compile the code and run avr-objdump -D testfile.elf >testfile.dis and post the output. My feel is that this is an erroneous diagnosis of some other problem. ---- Please post the solution with the original header line added with '(solved)'. After pondering with a problem, we deserve to hear what was the culprit to be able to avoid it later. -- Tauno Voipio tauno voipio (at) iki fi
Reply by ●January 16, 20052005-01-16
what if you change your code to char *version="1.0" - jim dereklai2k@yahoo.com.hk wrote:> Hi, > > I am using WinAVR-20040720 and AVRStudio 4.10. I have global variable > definitions in main.c. One of which is > > char version[10]="1.0"; > > However, the version becomes "", i.e., version[0]=0 when the program is > debugged and the variable is watched. > Do anyone encounter similar problem? Thanks! >
Reply by ●January 16, 20052005-01-16
