Re: [Mspgcc-users] sscanf for msp430-gcc
Closest useful functionality may be strtoul(3), which is present (I haven't personally tested it). Peter On Mon, Apr 19, 2010 at 6:13 AM, Balbir Thomas bal...@hvpd.co.uk wrote: Hi, I am trying to port some software to msp430-gcc. I think the code was originally written for IAR (not sure). The original author used sscanf to extract unsigned short ints (%hu) from a string buffer. Is there an equivalent libc or other function call in msp430-gcc. regards b thomas -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Re: [Mspgcc-users] sscanf for msp430-gcc
-Original Message- From: Peter Bigot [mailto:p...@peoplepowerco.com] Sent: maandag 19 april 2010 14:02 To: GCC for MSP430 - http://mspgcc.sf.net Subject: Re: [Mspgcc-users] sscanf for msp430-gcc Closest useful functionality may be strtoul(3), which is present (I haven't personally tested it). I have, and it works. However, I did encounter breakage with one of the newer compiler builds, apparently because it uses register variables. As a workaround, I made a copy with normal variable declarations, which works fine. Michiel
Re: [Mspgcc-users] sscanf for msp430-gcc
hi michiel, your mention of broken register variables caught my eye. can you, or peter, please clarify? thanks, steve On 04/19/2010 08:09 AM, Michiel Konstapel wrote: -Original Message- From: Peter Bigot [mailto:p...@peoplepowerco.com] Sent: maandag 19 april 2010 14:02 To: GCC for MSP430 - http://mspgcc.sf.net Subject: Re: [Mspgcc-users] sscanf for msp430-gcc Closest useful functionality may be strtoul(3), which is present (I haven't personally tested it). I have, and it works. However, I did encounter breakage with one of the newer compiler builds, apparently because it uses register variables. As a workaround, I made a copy with normal variable declarations, which works fine. Michiel -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Re: [Mspgcc-users] sscanf for msp430-gcc
If you can duplicate that with mspgcc4 please let me know or file a ticket on that project and I'll see it gets fixed. Peter On Mon, Apr 19, 2010 at 7:09 AM, Michiel Konstapel m.konsta...@sownet.nlwrote: -Original Message- From: Peter Bigot [mailto:p...@peoplepowerco.com] Sent: maandag 19 april 2010 14:02 To: GCC for MSP430 - http://mspgcc.sf.net Subject: Re: [Mspgcc-users] sscanf for msp430-gcc Closest useful functionality may be strtoul(3), which is present (I haven't personally tested it). I have, and it works. However, I did encounter breakage with one of the newer compiler builds, apparently because it uses register variables. As a workaround, I made a copy with normal variable declarations, which works fine. Michiel -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Re: [Mspgcc-users] sscanf for msp430-gcc
I was using strtoul on a '2418 and it would continually reset. I dug up the source and compared it to that of atoi, which did work. The former used register variables: unsigned long strtoul(nptr, endptr, base) const char *nptr; char **endptr; register int base; { register const char *s = nptr; register unsigned long acc; register unsigned char c; I made a copy, removed the register modifiers and well, that seemed to work. This was with an older build of the MSP430X compiler. I figured I'd quickly recheck, and now it seems it doesn't reboot, but instead reports the wrong values. I'm afraid I don't have time to look into that at the moment, though. Regards, Michiel -Original Message- From: steve ayer [mailto:a...@handhelds.org] Sent: maandag 19 april 2010 14:51 To: GCC for MSP430 - http://mspgcc.sf.net Cc: Michiel Konstapel Subject: Re: [Mspgcc-users] sscanf for msp430-gcc hi michiel, your mention of broken register variables caught my eye. can you, or peter, please clarify? thanks, steve On 04/19/2010 08:09 AM, Michiel Konstapel wrote: -Original Message- From: Peter Bigot [mailto:p...@peoplepowerco.com] Sent: maandag 19 april 2010 14:02 To: GCC for MSP430 - http://mspgcc.sf.net Subject: Re: [Mspgcc-users] sscanf for msp430-gcc Closest useful functionality may be strtoul(3), which is present (I haven't personally tested it). I have, and it works. However, I did encounter breakage with one of the newer compiler builds, apparently because it uses register variables. As a workaround, I made a copy with normal variable declarations, which works fine. Michiel - - Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Re: [Mspgcc-users] sscanf for msp430-gcc
-Original Message- From: Peter Bigot [mailto:p...@peoplepowerco.com] Sent: maandag 19 april 2010 14:49 To: GCC for MSP430 - http://mspgcc.sf.net Subject: Re: [Mspgcc-users] sscanf for msp430-gcc If you can duplicate that with mspgcc4 please let me know or file a ticket on that project and I'll see it gets fixed. This is on 3.2.3 (OSHAN); I'll see if I can whip up a test with 4.4.3 later. Michiel