Upload okay, but old sketch still running

I was making a few last changes to my sketch, but they didn't seem to work. THe IDE szys:

Writing | ################################################## | 100% 0.57s

avrdude: 2030 bytes of flash written

avrdude done.  Thank you.

But be changes are not implemented. I always start with:

Serial.println("Start logging for: " __FILE__ ". Version: " __DATE__ " " __TIME__);

And as I suspected, the old version is still running. Searchin the web finds numerous solutions for upload errors but, I don't have any errors. Ust the nice progress bar and then the equally nice Thank you.

My Nano probably is a clone (not sure, I have several), but still: how can I get a message that everything is fine.

1 Like

Small update but, not surprising, when I check "Verify code after updates" I get:

Reading | ################################################## | 100% 3.82s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0042
         0x76 != 0x89
avrdude: verification error; content mismatch

avrdude done.  Thank you.

Failed uploading: uploading error: exit status 1

Is that a classic Nano or one of the newer ones like the Nano 33 IOT or Nano 33 BLE?
Which bootloader (328P, 328P old bootloader, ...)?

That happens to me however I use an external editor and forget to save the file so when I compile it does exactly what it was told t do, compile the old program as it was not updated.

Nah, wasn't my problem (see my own follow up) in my case the code verify failed, so it was clear the new code never made it. The upload code is obviously checking much :slight_smile: .

Thanks anyway. I really appreciate any attempt to help.See also my reply to GroundFungus.

Most of my Nano's appear to be clones with an old bootloader. I will attempt to update the bootloaders later because they don;t appear totally deas. But I think I need to solder the six pin header first (I've never done this before).

As it is, I have bricked three of those Nano's today. The last one seems to work. For now. I think I'll buy "official" Nano's the next time :slight_smile: It is just sometimes difficult to know what you're buying.

If your Nano has "old bootloader", you just need to choose such option in IDE.
"Old bootloader" doesn't prevent you from uploading the code and not bricks the board. You don't need to change the bootloader, you can still use the board with old one.

Of course I did that. I use "old bootloader" most of the time. And If I'm not sure what Nano I have, I try both. For the three bricked Nano' s, both options are not working. One hangs the IDE on upload, but the other two do what I described: they appear to upload correctly (with progress bar and all) but verification fails and the "old" script continues to run. So, the Nano is not completely dead. I just can't upload anything.

I think there is a chance that, after I use the procedure to replace the bootloader (with e new instance of the old one or, while I'm at it, a new one), at least the last two will be usable again. But is still is frustrating. Luckily I had a few of them :slight_smile:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.