View unanswered posts | View active topics It is currently Sat Sep 21, 2019 2:30 pm



Reply to topic  [ 10 posts ] 
spot the bug 
Author Message
LQFP112 - Up with the play
User avatar

Joined: Thu Sep 10, 2009 9:23 am
Posts: 244
Location: Dayton, OH
Code:
// @warning rolls may occur
static inline void atomic_inc( atomic_t *pValue )
{
  unsigned long msr = atomic_start();
  *pValue++;
  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


Tue May 18, 2010 4:54 pm
Profile
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15333
Location: Home sweet home!
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...

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Tue May 18, 2010 10:42 pm
Profile WWW
LQFP112 - Up with the play
User avatar

Joined: Thu Sep 10, 2009 9:23 am
Posts: 244
Location: Dayton, OH
yep - thats it


Tue May 18, 2010 11:31 pm
Profile
LQFP144 - On Top Of The Game
User avatar

Joined: Mon Feb 11, 2008 10:52 pm
Posts: 549
Location: Arizona
Yep, I have been using that option while coding binutils.

_________________
You snooze, you lose!


Fri May 21, 2010 7:36 pm
Profile YIM
DIP8 - Involved

Joined: Mon Feb 18, 2019 4:54 pm
Posts: 27
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.


Sat Mar 23, 2019 8:34 pm
Profile
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15333
Location: Home sweet home!
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

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Wed Mar 27, 2019 9:42 am
Profile WWW
DIP8 - Involved

Joined: Mon Feb 18, 2019 4:54 pm
Posts: 27
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.


Thu Mar 28, 2019 12:15 pm
Profile
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15333
Location: Home sweet home!
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.

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Thu Mar 28, 2019 8:07 pm
Profile WWW
DIP8 - Involved

Joined: Mon Feb 18, 2019 4:54 pm
Posts: 27
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.


Sun Mar 31, 2019 1:29 am
Profile
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15333
Location: Home sweet home!
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.

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Sun Mar 31, 2019 2:53 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF. ColorizeIt.