Elec. Eng. programming various types of real-time systems since 1995. (Earlier work was on off-line support software for flight simulators.)

Re: Software Bugs

Reply posted 1 month ago (05/27/2020)
This is not exactly an answer to the original question, but here's a trick to use just in case you find yourself "forced" to write a function or two in assembler:Write...
Good question. (I, for one, do not know.)
Without the use of the div function, negative quotients may be rounded towards zero or away from zero, which makes implementing a portable "round quotient to nearest...
The reference for these kinds of questions is Andrew Koenig: C Traps and Pitfalls.As I recall, the answers are exactly as you were told, sadly enough.And don't get...
So what is the range then: 0 to 100 or -32768 to 32767?In many cases, the size is determined by something outside the processor, so there you should use the appropriate size-specific...
How about using unsigned int and (signed) int, unless you have a specific need to use a particular size? That's precisely their purpose, as I recall.E.g., in the...

Re: strcmp help please

Reply posted 3 months ago (04/07/2020)
Good suggestion, but beware of the "gotcha" concerning the length passed to strncmp: which length do you specify, the length of the string you expect to receive,...

Re: Funny or Not Funny?

Reply posted 5 months ago (02/13/2020)
Maybe not "offend" per se, but perhaps "upset"? One of my co-workers comes from China, and his entire family is "trapped" in the quarantined region. They're fine...

Re: Preventing Forum Fatigue

Reply posted 1 year ago (01/18/2019)
Thumbs up with this reply (also), with one caveat: I would defer creating the "newbies" forum (or sub-forum) for now, as there is only one (so-called) "newbie" to...

Re: Cooperative scheduling

Reply posted 2 years ago (06/01/2018)
A very good twist on this topic. That said, I would see such schedulers as, in effect, bare metal, but with an API (and/or a framework) to support the context switch...

Re: RTOS vs Bare-Metal

Reply posted 2 years ago (05/08/2018)
Sometimes you have to port multi-threaded code from (for example) Linux to an embedded MCU, and you do not have time [i.e., are not given the time!] to rework the...

Use this form to contact cprovidenti

Before you can contact a member of the *Related Sites:

  • You must be logged in (register here)
  • You must confirm you email address