spot the bug
Page 1 of 1

Author:  EssEss [ Tue May 18, 2010 4:54 pm ]
Post subject:  spot the bug

// @warning rolls may occur
static inline void atomic_inc( atomic_t *pValue )
  unsigned long msr = atomic_start();
  atomic_end( msr );

if you need a hint, I think -wall in gcc may give that to you (not tested, simply a guess).

this stands as a good example of why you need to turn on all warnings and turn them into errors

Author:  Fred [ Tue May 18, 2010 10:42 pm ]
Post subject:  Re: spot the bug

Yep, I fixed a bug in the throttle control code here yesterday by irradicating all the warnings. float cast to unsigned int. correct procedure is to signed int, then unsigned as this is defined. thing works much more smoothly now.

I'm sorry, but I can't read the above code at all. It is incrementing a pointer, though, not the value pointed to, I guess that is the issue? I hate typedefs...

Author:  EssEss [ Tue May 18, 2010 11:31 pm ]
Post subject:  Re: spot the bug

yep - thats it

Author:  SleepyKeys [ Fri May 21, 2010 7:36 pm ]
Post subject:  Re: spot the bug

Yep, I have been using that option while coding binutils.

Author:  Huer [ Sat Mar 23, 2019 8:34 pm ]
Post subject:  Re: spot the bug

I don't like typedef's either. One of the things that irritates me with the arduino ide. Which brings something I have been thinking about. What is everyone's ide of choice? I like Keil but it doesn't support a lot of stuff. Eclipse and atmel studio are cool, but I kinda don't like VS.

Author:  Fred [ Wed Mar 27, 2019 9:42 am ]
Post subject:  Re: spot the bug

Eclipse for C work on this stuff, though it has been a while. Mostly in Vim recently.

VSCode is pretty decent, amazingly, considering it's from M$ :-D

Author:  Huer [ Thu Mar 28, 2019 12:15 pm ]
Post subject:  Re: spot the bug

I installed that. Takes a while to load but looks nice. I haven't played with it too much. Out of all of them the goofy Arduino IDE seems to load up the fastest, even though it's java hell.

Author:  Fred [ Thu Mar 28, 2019 8:07 pm ]
Post subject:  Re: spot the bug

For me, an IDE taking a while to start and burning some RAM isn't a big deal as long as it does good things and is reasonably responsive when you're in it and using it *all day*. Not sure about C in VSCode but someone probably did something for it. Maybe I should give it a whirl, but the C stuff in eclipse is GREAT and I can say that with a decade of CDT experience.

Author:  Huer [ Sun Mar 31, 2019 1:29 am ]
Post subject:  Re: spot the bug

I'm still IDE hunting. I'm looking for something that is good for old microcontrollers.. Like I have this old Ford EEC-IV brain with an intel 8061 mpu. I can't even find a real datasheet for it. I like this old stuff and want to play with it, but none of my toys do it. If I was doing IOT stuff, everything would be easy.

Author:  Fred [ Sun Mar 31, 2019 2:53 am ]
Post subject:  Re: spot the bug

IDEs support languages, not tools. Tools support CPUs, and variants of them. If you can find a command line tool to do C or ASM for that CPU then you should be able to make eclipse CDT work with it, AFAIK.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB® Forum Software © phpBB Group