[chbot] Anyone seen this error ? avrdude: verification error, first mismatch at byte 0x3c000 on atmega2560

Peter Ellens ellensp at gmail.com
Fri Apr 24 08:49:50 BST 2020

On 4/24/20 5:25 PM, Volker Kuhlmann wrote:
> On Tue 21 Apr 2020 14:20:39 NZST +1200, Peter Ellens wrote:
>> I of course used good old never fails BODMAS...  (until C! )
> BODMAS? Is that edible?!???
>> Addition (0x3FFFF - 0x4000 +1) becomes (0x3FFFF - 0x4001)
> Uhhmm... no.
>> But C doesn't do this...
> Maybe there's a very good reason it doesn't... Operator precedence in C
> can be dicey in places, but not regarding addition or substraction.
> Back when I was at school and C was a letter not a language,
> (0x3FFFF - 0x4000 + 1) was ((0x3FFFF - 0x4000) + 1),
> or ((0x3FFFF + 1) - 0x4000), but most
> definitely not (0x3FFFF - (0x4000 + 1)). Addition is commutative,
> subtraction is not.
> Or, if you want, (+0x3FFFF + -0x4000 + +1) in any order of evaluation.
> If you're referring to the "+" in "0x4000 +1" being a sign and not an
> operator, the expression no longer has an operator. That's a no-go.
> Mathematical notation allows to leave off an operator, then it becomes
> multiplication. No programming language I've had contact with, including
> C, have ever allowed that.
> Are you blaming C, when your math is... in a bubble of one? ;-)
> Unless some virus has turned my brain to mush, in which case you can all
> have a laugh at my expense.
> Volker
Apparently I'm going senile...  luckily it doesn't effect the original 
bug, just the exact address point it starts to happen.

 From the internet:

    How Do I Remember It All ... ? BODMAS !

	*B*rackets first
	*O*rders (i.e. Powers and Square Roots, etc.)
	*D*ivision and*M*ultiplication (left-to-right)
	*A*ddition and*S*ubtraction (left-to-right)

This is not how I remembered it..

I incorrectly remembered it as  Addition then Subtraction.

Senility sucks...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ourshack.com/pipermail/chchrobotics/attachments/20200424/25dd825b/attachment.html>

More information about the Chchrobotics mailing list