On Tue, Jun 26, 2012 at 5:05 PM, Simeon Felis <simeon.fe...@hs-regensburg.de
> wrote:
> Am 26.06.2012 13:12, schrieb Peter Bigot:
> >> According to
> >> http://mspgcc.sourceforge.net/manual/x1028.html
> >> READ_SR() should return the content of status register r2, however. When
> >> used, msp430-gcc will returns
> >>
> >> error: called object '__read_status_register()' is not a function
> >
> > While I agree this is probably a bad choice, turns out it's the manual
> > that's wrong. READ_SR and READ_SP have been defined as macros that
> > are not function-like since their introduction in 2001. It would not
> > be appropriate to change that now.
> >
> > Peter
> >
>
> Did I understand you right: The manual is wrong and should quote READ_SR
> instead of READ_SR()?
>
> I wasn't used to errors in system headers, and was digging manuals,
> google and my code for hours,
When something is well maintained, that is a reasonable approach.
However, when something isn't
(whether commercial or open-source doesn't really matter, its still the
same), confusion is pretty rampant.
> until I decided to look into the system
> headers.
That is why RTFS > RTFM.
> It wasn't obvious to find there, too. That wasn't fun at all
> and messed up my day. I thought this one-liner could save a lot of
> stress for other beginners like me. But: lessen learned ;)
>
I use... in the case of READ_SR...
top toolchain directories...
/opt/msp430-z1 (3.2.3 derivative, old mspgcc toolchain)
/usr/ (current 4.5.3 installed here)
/opt/msp430-45 (new 4.5.3 install home)
/opt/msp430-46 (4.6.3, will be new default for tinyos 2.1.2)
/opt/msp430-47 (experimental 4.7 with 20 bit support)
cd <one of the above>/msp430/include
grep -nHiR read_sr .
and see what it says.
yeah it can be a pain.....
>
> Bests
>
> Simeon
>
>
> --
> M.Eng. Simeon Felis
> Fakultät Elektro- und Informationstechnik
> Laboratory for Safe and Secure Systems, LaS3 - a software engineering
> discipline (www.las3.de)
> Seybothstrasse 2
> P.O. 12 03 27
> 93025 Regensburg
> Germany
> FON: +49 (0)941 / 943 9823
> MOB: +49 (0)176 / 2323 8962
>
>
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Mspgcc-users mailing list
> Mspgcc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
>
--
Eric B. Decker
Senior (over 50 :-) Researcher
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users