Is it possible to use a bootloader setup to load files?

With help from LarryD see

I succeeded in building an uno as programmer connected to a breadboard with crystal, capacitors and a zip socket on and using the arduino as isp sketch loading the bootloader into chips.
Is it possible to keep this in place and load sketches into the target chip through the uno and arduino as ISP?
I have tried loading the blink sketch using the arduino as isp programmer by clicking on both the right pointing arrow (upload) and /sketch/upload using programmer but both just seem to load the blink sketch onto my uno wiping the arduino ISP sketch and not loading anything on the target chip.
I intend making a board with an uno plugged in to a veroboard with the components I presently have on the breadboard and using it to load the bootloader and then sketches that I write if it is possible.
Thanks.

Hi @matelot.

The correct way to do it is by selecting Sketch > Upload Using Programmer from the Arduino IDE menus.

If you click the "Upload" button, this is expected. It will not happen if you instead select Sketch > Upload Using Programmer from the Arduino IDE menus so I think you must have misinterpreted the results. Probably the sequence of events was as follows:

  1. You clicked the "Upload" button.
    The "Blink" sketch was uploaded to the UNO.
  2. You selected Sketch > Upload Using Programmer from the Arduino IDE menus.
    The upload failed due to the UNO no longer having the "ArduinoISP" sketch loaded.
  3. The UNO continued to run the "Blink" sketch, which was uploaded at the first step in the sequence.

So load the "ArduinoISP" sketch on the UNO and then try uploading to the target chip once again, this time making certain to use the correct procedure of selecting Sketch > Upload Using Programmer from the Arduino IDE menus. I think you will find that the "Blink" sketch is uploaded to the target chip.

Thanks guys,
I reloaded the arduino as ISP sketch and with a chip that already has a 1 sec on/off blink in it that works in another uno I put it in the breadboard zif socket I have been using for bootloading, altered the blink sketch to 5 secs to 1 sec and altered the /tools/programmer to arduino as isp. Then with the blink sketch showing on screen pressed /sketch/upload using programmer and got

vrdude: Expected signature for ATmega328P is 1E 95 0F
Double check chip, or use -F to override this check.
Failed programming: uploading error: exit status 1

I altered the /tools/board to pro or pro/mini as the picture above, pressed sketch/upload using programmer and got the same response?
Should I risk using -f? and how do I do that if I am clicking on sketch/load using programmer?

I'm going to ask you to provide the full verbose output from an upload attempt.


:red_exclamation_mark: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Uncheck the box next to Show verbose output during: ā˜‘ compile in the "Preferences" dialog.
  3. Check the box next to Show verbose output during: ☐ upload.
  4. Click the "OK" button.
    The "Preferences" dialog will close.
  5. Attempt an upload, as you did before.
  6. Wait for the upload to fail.
  7. You will see an "Upload error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
  8. Open a reply here on this forum topic by clicking the "Reply" button.
  9. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
  10. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the error output from the upload into the code block.
  11. Move the cursor outside of the code block markup before you add any additional text to your reply.
  12. Click the "Reply" button to publish the post.

I owe you an apology, I returned to the breadboard unit this evening with the intension of making a kicad copy of the circuit and noticed the power from the uno to the breadboard was plugged into the 3.3v pin on the uno, instead of the 5v pin.
I altered it and ran the load a sketch test with sketch/upload using programmer and it worked fine.
I have not put it back into the 3.3v to test it but I now have an answer to my query.
I will now produce a veroboard with the components on it including the indicator leds on the drawing above.
Just to make certain I will add a 10 uF capacitor between reset and gnd though there isn't one on my breadboard.
Thank you for your help it was very welcome.

  • Note: You can add a switch between the Reset pin and the 10uF so you can easily add and remove it as mentioned in the schematic write up.

I had thought of something like that, in fact what I had in mind was a plug like the one in the picture that I could turn through 90 degrees to add or remove.