Failed chip erase uploading error exit status 1

Купил Pro mini на 328P камне. На нем так и написано Решил залить загрузчик используя USBasp и ядро Minicore если в настройках выбирать 328P то шьется с ошибкой и говорит что плата 328 PB Если выбирать 328 pb и шить, то он вроде шьется но есть залоченый байт. Подделку подсунули, как прошить...

Купил Pro mini на 328P камне. На нем так и написано
Решил залить загрузчик используя USBasp и ядро Minicore если в настройках выбирать 328P то шьется с ошибкой и говорит что плата 328 PB

avrdude: Version 6.3-20201216
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:UsersQiasarAppDataLocalArduino15packagesMiniCorehardwareavr2.1.3/avrdude.conf"

         Using Port                    : usb
         Using Programmer              : usbasp
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9516 (probably m328pb)
avrdude: Expected signature for ATmega328P is 1E 95 0F
         Double check chip, or use -F to override this check.

avrdude done.  Thank you.

Failed chip erase: uploading error: exit status 1

Если выбирать 328 pb и шить, то он вроде шьется но есть залоченый байт.

avrdude: Version 6.3-20201216
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:UsersQiasarAppDataLocalArduino15packagesMiniCorehardwareavr2.1.3/avrdude.conf"

         Using Port                    : usb
         Using Programmer              : usbasp
         AVR Part                      : ATmega328PB
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9516 (probably m328pb)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file "C:UsersQiasarAppDataLocalArduino15packagesMiniCorehardwareavr2.1.3/bootloaders/empty/empty.hex"
avrdude: writing flash (0 bytes):

Writing | ################################################## | 100% -0.00s

avrdude: 0 bytes of flash written
avrdude: verifying flash memory against C:UsersQiasarAppDataLocalArduino15packagesMiniCorehardwareavr2.1.3/bootloaders/empty/empty.hex:
avrdude: load data flash data from input file C:UsersQiasarAppDataLocalArduino15packagesMiniCorehardwareavr2.1.3/bootloaders/empty/empty.hex:
avrdude: input file C:UsersQiasarAppDataLocalArduino15packagesMiniCorehardwareavr2.1.3/bootloaders/empty/empty.hex contains 0 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 0 bytes of flash verified
avrdude: reading input file "0x0f"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x0f:
avrdude: load data lock data from input file 0x0f:
avrdude: input file 0x0f contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of lock verified

avrdude done.  Thank you.

Подделку подсунули, как прошить то его?

Comments

@Heheovereggs

I install library through additional board manager URL,
tool->board I select is Attiny45/85 (Optiboot), and the programmer is USBasp (AttinyCore)
The hardware I have is a Chinese USBasp purchased from amazon and attiny85 is brand-new from Digikey.
Tried on both 2.0.0-rc2 and 1.8.18 versions of Arduino IDE

Error output:
avrdude: set SCK frequency to 187500 Hz avrdude: warning: cannot set sck period. please check for usbasp firmware update. avrdude: set SCK frequency to 187500 Hz avrdude: warning: cannot set sck period. please check for usbasp firmware update. ***failed; avrdude: verification error, first mismatch at byte 0x0000 0x00 != 0xdf avrdude: verification error; content mismatch Error while burning the bootloader: Failed chip erase: uploading error: exit status 1

Please let me know if there is any additional information I can provide

@SpenceKonde

Recheck the connections very carefully. Remember that MISO and MOSI pins for ISP programming are swapped from what thy are when using the ATTiny as master to control an SPI slave. MISO goes to tiny85’s DO pins MOSI goes to DI pin — the ISP programming uses the same hardware as the USI which a lot of people (rightly so) find very confusing.

«failed chip erase»? Makes me suspect bad firmware on the USBasp — there are like a million versions of the FW that ship on USBAsps, and not all of them are good

Try with another Arduino and Arduino as ISP -at least that way, you know whthat the code is in theory possibly able to
it’s goddwful, but at least it rules out a USBAsp with bad firmware.

@pcfreak1201

Had also these messages some times with my cheap chinese USBasp. I could solder a jumper to «slow», so the firmware should reduce the SCK for 1MHz clock on ATTINY85, if the jumper is set. It happens always with new chips, never when already set to 8MHz or 16.5MHz with a sketch …

@SpenceKonde

oh god arethey still shipping UASBAsps that don’t autoadjust frequencty!!!?

What you want is Bill Perry’s firmware for it, which fixes a shitlaod of obnoxious bugs

@pcfreak1201

@bperrybap

You want the 1.06alpha branch.
Yeah, I guess I need to do some cleanup on the repository.

@SpenceKonde

This issue does not represent a defect in the core nor an action item for me; closing.

Avatar

ATMEGA328P-AU BOOTLOADER

I’ve made this PCB with the ATmega328p-AU. In case the chip is brand new and doesn’t have bootloader, learn here how to burn it with Arduino IDE and an Arduino NANO with ISP code.

Part 1.1 — Basic Connections

First, below you have the general connections for the ATmega328p-AU with the basic configuration. Then, later you will have connections to the PCB. But jsut in case, if yu have a different PCB, make sure you have the connections below before you try burning the bootloader.

Part 1.2 — PCB Connections

And here are the connections to our PCB. The connections are the same but the PCB has special pads for that. So, connect it like below and then let’s go to next part.

Part 2.1 — Arduino as ISP

Ok, we have to burn a bootloader to the chip and then uplaod our codes. For these steps we need the connections above to an Arduino. In my case I will use Arduino NANO because I hev the AU version of the chip. So, make the connections as above between the Arduino SPI port and the PCB. We will use the Arduino as ISP to uplaod codes.

In order to use the Arduino as an ISP programmer, we need to uplaod a code to it so for that, go to Examples -> ArduinoISP -> ArduinoISP and open that example code. Then make sure yous elect the type of board for your Arduino, in my case, Arduino NANO. Select the com and leave the default programmer as «AVRISP mkII». Connect the USB, select the COM and uplaod the code to the Arduino UNO.

Part 2.2 — Bootloader burn

Ok, now the Arduino has the ISP code so it will act as a ISP programmer. Now, let’s burn the bootloader. Go to Tools -> Board and select the NANO type of board. Go to Tools -> Programmer and make sure you now change the normal programmer from «AVRISP mkII» to «Arduino as ISP«. Finally, make sure the Arduino NANO is connected to the PCB to the ISP port and go to Tools -> Burn Bootloader. The Arduino Rx/Tx LEDs will blink and after a while you will get the bootloader burn complete on the screen.

Part 3.1 — Uploade codes (basic configuration)

Make sure that you change back the programmer from «Arduino as ISP» to «AVRISP mkII». Then connect the FTDI progrmmer to the UART port as below to pins RX, TX and DTR. Add a 100nF cap between DTR and reset pin of the chip. Make sure you have selected Arduino NANO as board and the COM of the FTDI programmer. Then, get your code, compile and uplaod.

Part 3.2 — Uploade codes (our PCB)

Make sure that you change back the programmer from «Arduino as ISP» to «AVRISP mkII». Then connect the FTDI progrmmer to the UART port of the PCB as below to pins RX, TX and DTR. The PCB already has the 100nF capacitor so don’t worry. Make sure you have selected Arduino NANO as board and the COM of the FTDI programmer. Then, get your code, compile and uplaod.

2022/12/31

Programming ATtiny85 from Arduino Nano — The Test

Now that the adapted Blink.ino is on the ATtiny85, we need to verify if it works in a target environment. Power down your programmer and remove the ATtiny85. As an emulated target environment, you can use either of the test designs. Place the ATtiny85 in your target environment and provide power to the setup.

The video shows both test setups, each with a ATtiny85.

Assuming you followed along with this series of blog posts and reached this point. Congratulations! You now have a working programmer based on a Nano, burned the bootloader, ported a sketch, successfully installed the sketch and tested it on an ATtiny85.

2022/12/31

Programming ATtiny85 from Arduino Nano — The Upload

In the previous post in this series, we went through the porting process and adapted Blink.ino to be able to run on ATtiny85. In this post, the apdated Blink.ino is uploaded to the ATtiny85.

DISCLAIMER

THIS BLOG POST IS PROVIDED «AS IS», WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THIS HOWTO OR SOFTWARE OR THE USE OR OTHER DEALINGS IN THIS BLOG POST.

Upload

Now we have prepared the Blink.ino sketch for ATtiny85, it is time to upload it to the ATtiny85 chip.

Open Arduino GUI

If you don’t have the Arduino GUI open any more, start it first.

Open New Sketch

Open a new sketch. Select:

File -> New Sketch

Use Adapted Blink.ino

Copy/Paste the adapted Blink.ino that uses pin 3 in the new sketch. There is no need to save it.

#define LED_PIN 3
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_PIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_PIN, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(1000);                      // wait for a second
  digitalWrite(LED_PIN, LOW);   // turn the LED off by making the voltage LOW
  delay(1000);                      // wait for a second
}

Verify Settings

Make sure you have the same settings that you used for burning the bootloader.

Upload Using Programmer

Instead of using the normal Upload button, you now have to select:

Sketch -> Upload Using Programmer

The output window of the Arduino IDE will show you details of the compilation and upload process and if all goes well, ends with:

avrdude: erasing chip
avrdude: reading input file "C:UsersxxxxxxxxAppDataLocalTemparduino-sketch-50B9D151E34A20A45A3B89D655F813D5/sketch_dec31a.ino.hex"
avrdude: writing flash (682 bytes):
Writing | ################################################## | 100% 1.02s
avrdude: 682 bytes of flash written
avrdude done.  Thank you.

The adapted Blink.ino is now uploaded onto the ATtiny85. In the next post it is put to the test.

2022/12/29

Programming ATtiny85 from Arduino Nano — The Porting Process

In the previous post in this series, we prepared the ATtiny85 by installing the bootloader. Existing sketches require some work to adjust them for use on ATtiny85. In ICT it is common practice to adapt applications written for a certain platform, so they can run on another platform. Often you will see an application with versions for Linux, Microsoft Windows and Apple macOS. The process of making an application suitable for a different platform is called porting. On a smaller level, Arduino sketches, created on e.g. Uno might not automatically run on an ATtiny85. You also need to apply a porting process and create a sketch version suitable for the ATtiny platform.

DISCLAIMER

THIS BLOG POST IS PROVIDED «AS IS», WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THIS HOWTO OR SOFTWARE OR THE USE OR OTHER DEALINGS IN THIS BLOG POST.

Differences

Size

There are some obvious differences between the commonly used Arduino boards and the ATtiny85. The first thing to notice is the size difference. This affects many features, e.g.:

  • Memory
  • Pins
  • UART
  • Libraries

Memory

The memory of the ATtiny85 is smaller compared to other boards. This means that large sketches might not fit. Compilation will halt if you exceed the available space. Minimize the amount of source code used to achieve your goal.

Pins

With 8 pins, the ATtiny85 has a lot less connection points. This limits the amount of pins you can address in your sketch.

UART

Arduino boards have at least one serial port and often use pin 0 and 1 for serial communication. UART is not available on ATtiny chips. Instead of Serial you have to use SoftwareSerial, which comes with its own limitations. This makes it difficult to monitor what is going on inside the program at runtime. You could print debug messages with SoftwareSerial to dedicated RX/TX pins. And then use a separte Uno board, connected to these pins to read the messages and display them via Arduino GUI’s serial monitor. But that means having to sacrifice 2 pins of ATtiny for monitoring.

Libraries

For connected sensors on output devices, you may need a dedicated ATtiny version of the library. E.g. for LCD screens, you can use LiquidCrystal_I2C on Arduino boards. This won’t run on ATtiny chips. You need an alternative. e.g. the TinyLiquidCrystal_I2C library.

Examples

Pin Example

Commonly you need to assign different pin numbers for the ATtiny platform.

The LED_BULLETIN pin (13) used in Blink.ino is not available on ATtiny85. Obviously it only has 8 physical pins, so pin 13 doesn’t exist. And there are no on-board LEDs either. If you want to use Blink.ino on an ATtiny85, you need to adapt the pin numbers to address an external LED on an existing pin. To make it more complicated, the pin numbers you address in your sketch are mapped pin numbers that are different from the physical pin numbers. In the ATtiny85 datasheet you can find the pinout and the mapped numbers.

You can address pins from group PB in your sketch. In this example, the mapped pin 3 (PB3) is used in the sketch. An updated Blink.ino might look like this:

#define LED_PIN 3
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 3 as an output.
  pinMode(LED_PIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_PIN, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(1000);                      // wait for a second
  digitalWrite(LED_PIN, LOW);   // turn the LED off by making the voltage LOW
  delay(1000);                      // wait for a second
}

We will use this code in the next post and upload it to the ATtiny85.
The wire to the LED needs to be connected to the physical pin 2.

LCD and Sensor Example

If you want to connect a DHT11 temperature and humidity sensor and a LCD screen to an ATtiny85, you need to use libraries suited for the ATtiny platform. Instead of using the libraries LiquidCrystal_I2C and DHT, you now need to include ATtiny versions:

#include <TinyLiquidCrystal_I2C.h>
#include "TinyDHT.h"
DHT dht(DHTPIN, DHTTYPE);
TinyLiquidCrystal_I2C lcd = TinyLiquidCrystal_I2C(0x27,16,2);

Not all functions may be available in the tiny versions of the libraries. E.g. TinyDHT doesn´t have the computeHeatIndex function.

2022/12/29

Programming ATtiny85 from Arduino Nano — The Bootloader

In the previous blog post in this series, we installed the programmer software on the Nano and placed the last components to be able to program an ATtiny85 chip. New ATtiny85 chips need to be prepared to take Arduino sketches by burning a bootloader. In this post, we go through the steps of configuring the Arduino IDE for programming ATtiny85 and burning the bootloader to ATtiny85.

DISCLAIMER

THIS BLOG POST IS PROVIDED «AS IS», WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THIS HOWTO OR SOFTWARE OR THE USE OR OTHER DEALINGS IN THIS BLOG POST.

Step-by-step Guide

Verify ATtiny85 Placement

Verify the ATtiny85 is installed, according to the design, with pin 1 top right. Check for the notch and the dot at pin 1.

TODO Put macro image here

Connect Nano and Start Arduino GUI

Connect the Nano via USB to your computer for the Arduino GUI to be able to find its COM port. Note the slowly pulsing green LED to indicate the programmer software ArduinoISP.ino is running.

Configure for ATtiny85

We need to set the appropriate settings in the Arduino GUI for programming the ATtiny85. For the purpose of these blog posts, we will leave most settings on their default value.

Select the ATtiny85 Board

Tools -> Board -> ATtiny Microcontrollers -> ATtiny25/45/85

Note that the Tools menu now has additional items, related to the ATtiny:

  • Clock
  • Processor

Port

First select the correct COM port.

Tools -> Port -> COM<x>

Verify Board Selection

Make sure you have the correct board selected. It should show ATtiny25/45/85.

Tools -> Get Board Info

BN: ATtiny25/45/85
VID: N/A
PID: N/A

Select OK to close the popup window.

Clock

Tools -> Clock -> Internal 8 MHz

Processor

Tools -> Processor -> ATtiny85

Programmer

Select the programmer for ISP you want to use. You may still have this selected from when it was set in the last blog post.

Tools — Programmer -> Arduino as ISP

Burn the Bootloader

Note that you only have to burn the bootloader once on a newly arrived chip. You have prepared the configuration and can now burn the bootloader.

Tools -> Burn Bootloader

The output window shows the technical details of erasing the chip, installing the bootloader and the verification.

avrdude: Version 6.3-20201216
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch
... detailed info  ...
avrdude: Device signature = 0x1e930b (probably t85)
avrdude: Send: Q [51]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [10] 
avrdude done.  Thank you.

ATtiny85 Prepared

The ATtiny85 is now prepared with the bootloader and is ready to receive sketches. Sketches that work on e.g. Uno, will not automatically work on ATtiny85. They need to be adapted in a process called porting. More on that in the next blog post.

2022/12/26

Programming ATtiny85 from Arduino Nano — The Programmer

In the previous blog post in this series, we created the prototype from the design, up to the point were the programmer can be installed. In this post, we go through the process of installing the programmer on Nano.

DISCLAIMER

THIS BLOG POST IS PROVIDED «AS IS», WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THIS HOWTO OR SOFTWARE OR THE USE OR OTHER DEALINGS IN THIS BLOG POST.

Step-by-step Guide

Connect Nano

Connect the Nano via USB to your computer. Expect the power LED on the Nano to switch on. This LED can be identified by looking for POW or PWR next to the LED.

Here the Nano has Blink.ino loaded. Note the permanently burning POW LED and blinking bulletin LED.

Open IDE

Open the Arduino IDE. This version was used to create this step-by-step guide:

Version: 2.0.3
Date: 2022-12-05T09:30:25.331Z
CLI Version: 0.29.0 [76251df9]

Open Example ArduinoISP.ino

The programmer that comes as part of the Arduino IDE examples. We will upload it to Nano in a later step. To open it, select
File -> Examples -> 11. ArduinoISP -> ArduinoISP

Set Verbose Output

If you want to get a better understanding of the compile and upload processes, make sure you have enabled verbose output during compile and upload.

File -> Preferences -> Show verbose output during compile upload

Check the boxes for both compile and upload. Then select OK.

Set Nano Details

Before we can upload the programmer to the Nano, make sure you have selected the correct port, board and processor. Select

Tools -> Board «<current board>» -> Arduino AVR boards -> Arduino Nano

Tools- > Port «<current port>» -> COM<x>

The Nano used here requires the processor «ATmega328P (Old Bootloader)».

Select the appropriate processor for your Nano. E.g.:

Tools -> Processor -> ATmega328P (Old Bootloader)

Use the «Arduino as ISP» for the programmer option. Although it doesn’t affect the programmer upload to Nano in this stage, we will need that later when programming the ATtiny85.

Tools -> Programmer: «<current programmer>» -> Arduino as ISP

Wrong Processor Error Messages

When the processor was on the wrong setting («ATmega328P») for the Nano that was used, the upload failed after several attempts with these kind of messages:

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xa1
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xa1
Failed uploading: uploading error: exit status 1

Upload Programmer to Nano

Now that you prepared all the settings, you can go ahead and compile and upload the ArduinoISP.ino to the Nano.

Select the upload button button and wait for the upload process to finish.

You have now loaded the programmer software onto the Nano. You should see the green LED slowly pulsing as the «heartbeat», indicating ArduinoISP.ino is running.

Disconnect Nano

Disconnect Nano from USB and make sure it is powered down.

Place ATtiny85 and Capacitors

With Nano powered down, install the last components to finish the design.

Place the 10 kF capacitor over RST and GND of the Nano. Place the positive pin of the capacitor in A14 (just below Nano’s RST pin) and the negative pin in A15 (just below Nano’s GND pin). I guess this will allow the Nano to be recognized as the programmer by the IDE when uploading to the ATtiny85.

To reduce interference, place a 104 capacitor (100,000 pF = 100 nF = 0,1 µF) over ATtiny85’s pin 8 VCC (E24, via the red jumper wire) and pin 4 GND (G27). The red wire is used to have the 104 capacitor far enough out of the way to be able to let it sit in the breadboard while inserting and removing the ATtiny85 chips.

Place the ATtiny85 chip. Look for pin 1. Follow the design where pin 1 is placed top right in F30.

Ready to Upload to ATtiny85

Your programmer should now be ready for use and can be reconnected. Verify that all three LEDs blink shortly at startup. Then look for the green LED slowly pulsing as the «heartbeat», indicating ArduinoISP.ino is running.

In the next blog post we see how to burn the bootloader to the ATtiny85.

2022/12/22

Programming ATtiny85 from Arduino Nano — The Prototype

In the previous post in this series, the design was created based on prerequisites and requirements. Now we want to turn the design into a prototype on your breadboard that you can really use. To recreate the design follow the step-by-step guide. Each step depicts the added item in the design.

DISCLAIMER

THIS BLOG POST IS PROVIDED «AS IS», WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THIS HOWTO OR SOFTWARE OR THE USE OR OTHER DEALINGS IN THIS BLOG POST.

Detailed steps

Follow this step-by-step guide to setup your programmer on the Arduino Nano in line with the design.

Components

1x Arduino Nano (compatible)
1x ATtiny85 chip
1x 400 points Breadboard (half+)
1x Green LED
1x Yellow LED
1x Red LED
3x 1 kΩ resistor
1x 10 µF 25V condensator
1x 100 nF ceramic condensator (104) (= 0,1 µF)
Breadboard wires: orange, yellow, red, green
Mini jump wires, created from solid core wire: red, black
Dupont male-female wires: red, black, brown, white, blue

Breadboard

Take the breadboard and orientate it with A1 tie-point in the lower left corner.

Install Nano

Place the Nano on the breadboard, with pin D13 in breadboard tie-point B2. This allows the complete footprint of the Nano to stay inside the breadboard edges and leaves room above to place the wires, LEDs and resitors.

LEDs

Place the green LED positive pin in I19 and negative pin in I18.

Place the yellow LED positive pin in I22 and negative pin in I21.

Place the red LED positive pin in I25 and negative pin in I24.

Resitors

Place a 1 kΩ resistor with one end in j18 and the other in the negative strip of the power lane.

Place a 1 kΩ resistor with one end in j21 and the other in the negative strip of the power lane.

Place a 1 kΩ resistor with one end in j24 and the other in the negative strip of the power lane.

Breadboard Wires

Note: positions slightly differ from tie-points on the design, but are still in the same vertical strip.
In the design wires would be on top of each other, making the design hard to understand

Place the orange wire in H4 (just above Nano pin D10) and in J30.
(in same vertical strip as pin 1 of ATtiny85 on F30)

Place the green wire in H5 (just above Nano pin D9) and in H19.

Place the red wire in H6 (just above Nano pin D8) and in H25.

Place the yellow wire in H7 (just above Nano pin D7) and in H22.

Dupont Wires

Remember the ICSP header orientation from previous posts and the location of the pins:

      6 5
 GND  . .  RST
MOSI  . .  SCK
 VTG  . .  MISO
      2 1

Place red wire on VTG of ICSP header and connect to A30.
(A30 is in the same vertical strip as pin 8 of ATtiny85 on E30)

Place white wire on SCK of ICSP header and connect to A29.
(A29 is in the same vertical strip as pin 7 of ATtiny85 on E29)

Place blue wire on MISO of the ICSP header and connect to A28.

Place brown wire on MOSI of the ICSP header and connect to A27.

Place black wire on GND of the ICSP header and connect to the negative strip of the power lane.

Small Jumper Wires

Place a small red jumper wire from B30 to D24.
(Needed later on to place a capacitor over 5V and GND of the ATtiny85)

Place a small black jumper wire from J27 to the negative strip of the power lane.
(J27 is in the same vertical strip as pin 4 GND of ATtiny85 on F27)

After Installing Programmer

At this point, the prototype is ready for installing the programmer ArduinoISP.ino on Nano.

More on that in the next post. Note that the last three steps, placing the ATtiny85 and 2 capcitors, to complete the design, can only be done after the programmer is installed.

2022/12/20

Programming ATtiny85 from Arduino Nano — The Design

In the previous blog post, we did the research on all the prerequistes and requirements for uploading sketches via the programmer Arduino Nano to the target ATtiny85. Now it is time to apply the findings and turn them into a breadboard design.

Note that my electronics knowledge is limited. Please post any doubts, concerns or remarks on our social media page.

DISCLAIMER

THIS BLOG POST IS PROVIDED «AS IS», WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THIS HOWTO OR SOFTWARE OR THE USE OR OTHER DEALINGS IN THIS BLOG POST.

Design

All the research led to this design for the programmer.

Image created with Fritzing

Image created with Fritzing

This design features the use of the ICSP header and LED indicators as described in ArduinoISP.ino.

// Put an LED (with resistor) on the following pins:
// 9: Heartbeat   - shows the programmer is running
// 8: Error       - Lights up if something goes wrong (use red if that makes sense)
// 7: Programming - In communication with the target

Schema

Image created with Fritzing

Test boards

The design leaves little room for blink test leds on the programmer breadboard. And we are trying to implement the separation of concerns principles and want to keep the programmer and the test setup separate.
To be able to verify the correct upload of Blink.ino onto the ATtiny85, one of these test boards must be prepared, according to this design.

In the next blog post in this series, we will turn the design into a prototype.

Sidenote

You might argue, why not also use the RST of the ICSP header? At least, I did. Then all connections towards the ATtiny85 would be on the ICSP header.

This is most likely by design and set in ArduinoISP.ino, where it states: «Pin 10 is used to reset the target microcontroller.» It is clearly the intention that this should be used. The pin number for RESET is specifically set:

#define RESET 10  // Use pin 10 to reset the target rather than SS

I actually tried to use the RST on the ICSP header, but then burning the bootloader fails with these messages:

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.
Failed chip erase: uploading error: exit status 1

Cleary not the way to go. This is probably also what you see when any of the other connections are not setup properly.

I’m assuming the RST on the ICSP header is connected through with the other RST pins. At least that is what Fritzing shows me when I click and hold the RST pin on the ICSP header. All RST pins turn yellow, indicating that they are somehow connected. I’m guessing these can’t be used, because there is a capacitor over RST and GND, to allow the Nano to act as the programmer.

Image created with Fritzing

With pin 10 of Nano connected to pin 1 (RESET) on ATtiny85, the bootloader burn ends with this success message:

avrdude: verifying ...
avrdude: 2 bytes of flash verified
avrdude done.  Thank you.

More on the bootloader and upload process later in this series.

2022/12/19

Programming ATtiny85 from Arduino Nano — The Challenge

Introduction

In December 2022, this blog’s author was given a challenge to implement a way to upload sketches to ATtiny85. There are many examples that use the Uno to program the ATtiny85.

As a self-imposed challenge an Arduino Nano would need to be used as the programmer. Being relatively new to the Arduino world at that time, research was started to find out the prerequisites to achieve this. This blog post is the first of a series, describing the process.

DISCLAIMER

THIS BLOG POST IS PROVIDED «AS IS», WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THIS HOWTO OR SOFTWARE OR THE USE OR OTHER DEALINGS IN THIS BLOG POST.

Research

Searching the Internet several videos and pages were found regarding this topic. Here are some that might peek your interest.

References

  1. Arduino as ISP and Arduino Bootloaders
  2. How-To: Shrinkify Your Arduino Projects
  3. Matching Article: How-To: Shrinkify Your Arduino Projects
  4. How to Program an Attiny85 From an Arduino Uno
  5. Program ATtiny85 with Arduino Nano
  6. Programming ATtiny85/84 with Arduino Uno (ATTinyCore)
  7. Program the ATTINY85 with Arduino 1.8.18 (2022)

ICSP

In on of the references, the ICSP header is used, rather than the pins D11, D12 and D13 as seen in most examples. Because of the header name, this also seems to have been the intented use for an Arduino board as a programmer. Looking at the ISP example ‘ArduinoISP.ino’ in the Arduino IDE below File -> Examples -> 11. ArduinoISP -> ArduinoISP, the comment reads:

// By default, the hardware SPI pins MISO, MOSI and SCK are used to communicate
// with the target. On all Arduinos, these pins can be found
// on the ICSP/SPI header:
//
//               MISO °. . 5V (!) Avoid this pin on Due, Zero...
//               SCK   . . MOSI
//                     . . GND

This is confirmed on e.g. https://arduino.stackexchange.com/a/30027, where it states: «The standard connection for the ISP is a 100 mil 6-pin header (2×3).» The image from this answer shows the pin assignment for the ICSP header of the Uno:

      1 2
MISO  . .  VTG
 SCK  . .  MOSI
 RST  . .  GND
      5 6

ICSP headers on Arduino UnoImage created with Fritzing

With both Uno and Nano rotated with the USB port pointing to the left you may notice that pin 1 is at the botom for the Nano, not at the top as with the Uno. If you look at it from that orientation, this is the pin assignment for the ICSP header of the Nano:

      6 5
 GND  . .  RST
MOSI  . .  SCK
 VTG  . .  MISO
      2 1

ICSP headers on Arduino NanoImage created with Fritzing

This confused me a bit at first, but it’s the exact same header. It just depends on the board’s orientation where to find the correct pin numbers.

Lesson learned: Make sure to locate pin 1, before connecting cables.
Look for a small dot or a small 1.

TODO add macro photo’s from Uno and Nano pin 1 indication

The key pins for ICSP seem to be MISO, MOSI and SCK. After locating them on the Nano ICSP header, the matching pins on the ATtiny85 also need to be located. As suggested in the references, look for the chip’s datasheet and find the section that describes the pins.

Now the needed data to connect the wires is available for both the programmer (Nano) and the peripheral (ATtiny85). From that we can deduct what to connect where and assign some colors for the wires.

Nano ICSP Header      ATtiny85               wire color
Pin 1 MISO            Pin 6 PB1 (MISO)       Blue
Pin 2 +5V             Pin 8 VCC              Red
Pin 3 SCK             Pin 7 PB1 (SCK)        White
Pin 4 MOSI            Pin 6 PB0 (MOSI)       Brown
Pin 6 GND             Pin 4 GND              Black
Nano standard pin                          
Pin D10               Pin 1 PB5 (RESET)      Orange

Indicator LEDs

In ref 1 and in the ArduinoISP example, there is a comment on using LEDs (with resistor), to indicate the status of the programmer.

// Put an LED (with resistor) on the following pins:
// 9: Heartbeat   - Shows the programmer is running
// 8: Error       - Lights up if something goes wrong (use red if that makes sense)
// 7: Programming - In communication with the slave

This was added to the challenge aswell. This led to a design for Arduino Nano to be used as a programmer for ATtiny85 via the ICSP header with indicator LEDs.

The next blog post will feature the design.

2022/12/09

Compile and Upload .ino file to Aruduino board via arduino-cli

This blog post describes how you can use a Windows 10 batch file to compile and upload Arduino .ino files to an Arduino board. And it provides background on why it was created in the first place.

Update 2022-12-19: Many of the concerns mentioned in this blog are no longer valid for version 2.0.3 of the Arduino GUI. Just downloaded and installed this version:

Version: 2.0.3
Date: 2022-12-05T09:30:25.331Z
CLI Version: 0.29.0 [76251df9]
Copyright © 2022 Arduino SA

The editor now features line numbers and you can now set font size and dark theme. The need to match directory name and sketch name seems to no longer exist. Need to investigate if the need for this batch file still exists.

The .ino files are compiled and uploaded to Arduino boards, like the Uno. There it can read input from sensors and push buttons and control output devices, like the LED show here.

Example of an electronic prototype with an Uno and breadboard. Image created with Fritzing.

Disclaimer

THIS HOWTO AND SOFTWARE ARE PROVIDED «AS IS», WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THIS HOWTO OR SOFTWARE OR THE USE OR OTHER DEALINGS IN THIS HOWTO OR SOFTWARE.

Features

CMD and PowerShell

Works in both CMD and PowerShell. See the examples section below.

Creating temporary directory

The file location for the .ino file is provided as input on the command line.

D:ArduinoPROJECTS001 My First Project>CompileAndUpload.bat Button.ino

From the file name, it will extract the sketch name and create a temporary directory with this sketch name.

Copying

The original .ino file is copied to the temporary directory.

Locating communication ports

Compiling

The .ino file in the temporary directory is compiled.

Uploading

If compiling succeeds, the created byte code is uploaded to the Arduino board.

Removing

The temporary directory and all its content is removed.

Limitations and Known Issues

ANSI Color code not handled correctly

After compiling with the arduino-cli, the ANSI color codes are not displayed correctly. Instead of enabling and disabling the color for the terminal text, it shows ←[96m and ←[0m. Example:

This seems to be caused by the arduino-cli, because if I comment that out, the colors are shown correctly. Have not found a real cause or workaround for it.

Only Tested on Arduino Uno and Nano

So far, this batch file has only been tested with Arduino Uno and Nano boards. The Nano upload phase has the ‘cpu=atmega328old’ option set. Nothing is known on how it behaves with other boards.

Serial Terminals block access to COM ports

If you opened a serial terminal in the Arduino IDE or Fritzing IDE, upload will fail. The serial terminals deny the batch file access to the COM ports. (Toegang geweigerd = Access denied)

COM port entry in command line history

If you used multiple ports and manual enter a choice, the COM port name will be in the command line history and will show up if you use arrow up to go to previous commands.

Examples

File not found

Compile Errors

Successful Compile and Upload

Multiple COM port detection

Prerequisites

Windows 10

Arduino IDE

Arduino CLI

Fritzing IDE

Windows 10

The target system for the batch file is Windows 10 on which it has been tested.

Arduino IDE

Arduino CLI

The Arduino CLI allows users to type commands to compile and upload the software.

Fritzing IDE

Installation

Before you can use the batch file, you need to prepare the following.

Install Arduino GUI

Install Arduino CLI

The Arduino CLI 64 bits MSI installation file can be downloaded and executed to install the CLI through a setup wizard.

Follow the instructions to install the CLI.

Download the Batch File

Here is the code for the Windows batch file. Copy/Paste the text into a file called CompileAndUpload.bat on your local computer. Put it in a suitable location. E.g:

Add the location to your enviroment path.

To run it, open a cmd or PowerShell window. After the prompt, type:

CompileAndUpload.bat [ino filename]

Provide the path to the .ino file. E.g.:

CompileAndUpload.bat Button.ino

You can use mapped drives, files and directories with spaces. E.g.:

CompileAndUpload.bat "\NASArduinoPROJECTS001 LED and ButtonMultiFunctionButton.ino"

Background Story

A while ago a good friend, who is a model-train enthusiast, asked me to create some software to control LEDs for emulating a running light, a welding light and randomly switching on/off lights in the model houses. The software needed to run on an Arduino Uno board to which these LEDs are connected. This introduced me to Arduino ecosystem.

To start developing the code for the requested functionality, I downloaded the Arduino IDE. It works great and has a Verify and Upload button. And easy to learn how to use. The only quirky thing is that a .ino file must always be in a sketch directory with the same name. E.g.

I’d like to use multiple .ino files, without having any restrictions on the directory name. E.g.

ArduinoPROJECTS001 LED and ButtonButton.ino
ArduinoPROJECTS001 LED and ButtonMultiFunctionButton.ino
ArduinoPROJECTS001 LED and ButtonOther Code Here.ino

An alternative might be the Fritzing IDE. This supports multiple .ino files per project. It has an upload button, but there doesn’t seem to be a Verify button to only compile the .ino files, like the Arduino GUI has. Therefore Fritzing doesn’t seem to have a way to show the compile error messages if you make a mistake in your source code. If you have invalid code, the upload will fail without any error message to indicate what is going wrong.

The only way to work around these issues was to create a batch file that can compile, show the compile error messages and upload when compile succeeds, as described above.

2018/12/26

WordPress in Docker on ReadyNAS OS VM

Abstract

This blog post describes how to setup a virtualized ReadyNAS OS. Docker is then installed and configured to run WordPress and MySQL in this environment.

Disclaimers

THIS HOWTO IS PROVIDED «AS IS», WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THIS HOWTO OR THE USE OR OTHER DEALINGS IN THIS HOWTO.

Netgear states: «Access by SSH is not discouraged, but is recommended for advanced users only. As such, using SSH is at the user’s own risk.»

This is how it worked in the situation of the baseline described below. Use it at your own risk.

Prerequisites

  • PC with Windows 7 SP1 with VirtualBox installed
  • Terminal emulation software

Prior Knowledge

  • ReadyNAS OS 6
  • WordPress installation procedure
  • Debian Linux command line syntax

Baseline

Even-though several combinations of items with other versions may be able to utilize this setup, this has only been tested on the baseline mentioned here:

  • Windows 7 SP1
  • VirtualBox 5.2.22 r126460 (Qt5.6.2)
  • VMDK disk image ReadyNASOS-6.6.0-x86_64.vmdk
  • WordPress 5.0.2
  • Putty 0.63

Please note that VirtualBox 6.0 is recently released.

References

This how-to builds on great work by others. Many thanks! See the links to their respective pages.

https://en.wikipedia.org/wiki/PuTTY
https://www.virtualbox.org/
https://www.virtualbox.org/wiki/Downloads
https://www.virtualbox.org/manual/ch03.html#installation_windows
How to Edit the Default Virtual Machine Directories in VirtualBox
https://github.com/ReadyNAS/sdk/wiki/Setup-ReadyNAS-OS-on-VirtualBox
Why Docker
https://hub.docker.com/_/wordpress/ https://docs.docker.com/compose/wordpress/ http://powareverb.github.io/Docker-on-ReadyNAS-OS6/

Background

After spending a lot of time of setting up 2 physical ReadyNAS machines to run this website, I’m reluctant to make changes to any settings, as it can potential break current functionality. Having a VM of the ReadyNAS OS is a great alternative to be able to experiment with new settings.

Since Koken CMS seems no longer being developed further, an alternative CMS is needed. WordPress seems to be the obvious choice here.

With some hacking, WordPress can be installed on the native ReadyNAS OS. While doing that, some issues popped up. E.g. getting the WordPress .htaccess (mod_rewrite) to work proved difficult. And the versions of MySQL and PHP used in ReadyNAS OS are never the latest versions, since Netgear needs to deliver a stable OS for all it’s customers, I guess. Latest versions of WordPress plugins may have requirements on MySQL that cannot be met.

WordPress runs on 3 main components:

  • Server-side scripting language: PHP
  • Web server: Apache (NGINX)
  • Database: MySQL (MariaDB)

Using Docker containers allows for a free choice of make and version for these 3 components without having to make changes to the ReadyNAS OS.

Below you can find the steps to come to a setup of WordPress in Docker on ReadyNAS OS VM. Three product are used to enable this setup:

  • VMM: Virtual Box (to run ReadyNAS OS in a virtual machine on Windows)
  • Containerization: Docker (to run WordPress inside containers on the virtualized ReadyNAS OS)
  • CMS: WordPress (to create and manage your website)

VirtualBox

A Hypervisor (VMM) is needed to run the ReadyNAS OS Virtual Machine. First download VirtualBox. Then follow the installation instructions.

Set your default location to a disk with ample available space, so the VM for ReadyNAS OS that we are about to create can grow in size.

Now setup the ReadyNAS OS on VirtualBox.

There are several ways to setup the network connections for the virtual machine. Here we use NAT. Make sure to configure some NAT port translation to be able to connect to the VM from your Windows applications. In the VirtualBox Manager, select
Network -> Adapter 1 -> Port forwarding.
Use the + button on the right to add rules for:

  • SSH 22 -> 22
  • HTTP 80 -> 80
  • HTTPS 433 -> 433
  • MySQL 3306 -> 3306
  • WordPress (on Docker) 8000 -> 8000
  • ReadyNAS OS configuration

    Browse to http://localhost/ to access the ReadyNAS Admin Page.

    Authenticate with default ReadyNAS Admin username and password:
    admin
    password

    Follow the instructions on screen as if you were setting up a physical ReadyNAS. Note the provided Hostname nas-XX-XX-XX.
    You might need it later on. Part of the procedure is to change your default admin password.

    Authenticate again with the admin username and (new) password.

    A pop-up window will alert you of the availability of new firmware. Upgrade to the new firmware version. When the progress bar almost reaches the far right, normally it would auto-refresh once the installation is complete. I needed to refresh the browser to see the admin page again.

    Go to «Settings» and enable «SSH».

    Docker

    Got to «Apps» -> «Available Apps».

    Click the Install button below the Docker CLI logo. Wait for the installation to finish.The Docker CLI will show up in the «Installed Apps» with the switch set to on.

    Now switch to your terminal emulator on Windows and login as root to
    localhost:22. In the terminal window, find the docker version and run the hello-world container to verify correct installation.You should see the text «Hello from Docker!» as part of the output.

    # docker -v
    Docker version 18.06.1-ce, build e68fc7a
    # docker run hello-world
    Unable to find image 'hello-world:latest' locally
    latest: Pulling from library/hello-world
    d1725b59e92d: Pull complete
    Digest: sha256:b3a26e22bf55e4a5232b391281fc1673f18462b75cdc76aa103e6d3a2bce5e77
    Status: Downloaded newer image for hello-world:latest
    Hello from Docker!
    This message shows that your installation appears to be working correctly.
    To generate this message, Docker took the following steps:
     1. The Docker client contacted the Docker daemon.
     2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
        (amd64)
     3. The Docker daemon created a new container from that image which runs the
        executable that produces the output you are currently reading.
     4. The Docker daemon streamed that output to the Docker client, which sent it
        to your terminal.
    To try something more ambitious, you can run an Ubuntu container with:
     $ docker run -it ubuntu bash
    Share images, automate workflows, and more with a free Docker ID:
     https://hub.docker.com/
    For more examples and ideas, visit:
     https://docs.docker.com/get-started/
    

    WordPress

    First create a location where your Docker project for WordPress can live. In the ReadyNAS Admin page, go to the Shares tab.

    Click the «New share» button in the top right corner to create a new share called e.g. «Projects». In the terminal emulator, create the project.

    # cd /data/Projects/
    # mkdir my_wordpress_project

    The latest version of Compose can be found on https://github.com/docker/compose/releases.
    E.g. 1.23.2. Use this version number in the URL of the curl command. Install and test the Docker Composer.

    # curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    # chmod +x /usr/local/bin/docker-compose
    # docker-compose --version
    docker-compose version 1.23.1, build b02f1306

    Next, go to the new project folder in the «Projects» share and follow the instructions below (based on the «Quickstart: Compose and WordPress» page) to create a YAML file that can be use by Docker Compose to retrieve and start the needed containers.

    # cd my_wordpress_project/
    # vi docker-compose.yml
    version: '3.3'
    services:
       db:
         image: mysql:5.7
         volumes:
           - db_data:/var/lib/mysql
         restart: always
         environment:
           MYSQL_ROOT_PASSWORD: somewordpress
           MYSQL_DATABASE: wordpress
           MYSQL_USER: wordpress
           MYSQL_PASSWORD: wordpress
       wordpress:
         depends_on:
           - db
         image: wordpress:latest
         ports:
           - "8000:80"
         restart: always
         environment:
           WORDPRESS_DB_HOST: db:3306
           WORDPRESS_DB_USER: wordpress
           WORDPRESS_DB_PASSWORD: wordpress
    volumes:
        db_data: {}
    # docker-compose up -d
    Creating network "my_first_project_default" with the default driver
    Creating volume "my_first_project_db_data" with default driver
    Pulling db (mysql:5.7)...
    5.7: Pulling from library/mysql
    a5a6f2f73cd8: Pull complete
    936836019e67: Pull complete
    283fa4c95fb4: Pull complete
    1f212fb371f9: Pull complete
    e2ae0d063e89: Pull complete
    5ed0ae805b65: Pull complete
    0283dc49ef4e: Pull complete
    a7905d9fbbea: Pull complete
    cd2a65837235: Pull complete
    5f906b8da5fe: Pull complete
    e81e51815567: Pull complete
    Pulling wordpress (wordpress:latest)...
    latest: Pulling from library/wordpress
    a5a6f2f73cd8: Already exists
    633e0d1cd2a3: Pull complete
    fcdfdf7118ba: Pull complete
    4e7dc76b1769: Pull complete
    c425447c8835: Pull complete
    75780b7b9977: Pull complete
    33ed51bc30e8: Pull complete
    7c4215700bc4: Pull complete
    d4f613c1e621: Pull complete
    de5465a3fde0: Pull complete
    6d373ffaf200: Pull complete
    991bff14f001: Pull complete
    d0a8c1ecf326: Pull complete
    aa3627a535bb: Pull complete
    a36be75bb622: Pull complete
    98ebddb8e6ca: Pull complete
    ed6e19b74de1: Pull complete
    18b9cc4a2286: Pull complete
    dfe625c958ac: Pull complete
    Creating my_first_project_db_1_d278ded39132 ... done
    Creating my_first_project_wordpress_1_e65d5f77183a ... done
    
    # docker ps
    CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                  NAMES
    993c01433ea9        wordpress:latest    "docker-entrypoint.s…"   5 minutes ago       Up 5 minutes        0.0.0.0:8000->80/tcp   my_first_project_wordpress_1_2762b868a024
    f9ba1041050d        mysql:5.7           "docker-entrypoint.s…"   5 minutes ago       Up 5 minutes        3306/tcp, 33060/tcp    my_first_project_db_1_923ac948ded6
    

    Browse to http://localhost:8000 to see the WordPress setup pages.
    Follow the instructions on screen.

    On the «Success!» page, select the «Log In» button.
    This will take you to the WordPress Dashboard.

    Browse to http://localhost:8000/ to see the «My First Project» pages.

    Your setup is now ready and you are running WordPress in Docker on ReadyNAS OS VM!

Содержание

  1. Arduino.ru
  2. Регистрация новых пользователей и создание новых тем теперь только на новом форуме https://forum.arduino.ru
  3. forum.arduino.ru
  4. #Avrdude
  5. Upload not working #164
  6. Comments
  7. Footer
  8. Arduino.ru
  9. Регистрация новых пользователей и создание новых тем теперь только на новом форуме https://forum.arduino.ru
  10. forum.arduino.ru
  11. exit status 1 Ошибка компиляции для платы Arduino Nano.Задолбало
  12. Upload fails in subsequent windows with Serial Monitor open #726
  13. Comments
  14. Describe the bug
  15. To Reproduce
  16. Expected behavior
  17. Desktop
  18. Additional context
  19. Arduino.ru
  20. Регистрация новых пользователей и создание новых тем теперь только на новом форуме https://forum.arduino.ru
  21. forum.arduino.ru
  22. exit status 1 Ошибка компиляции для платы Arduino Nano.Задолбало

Arduino.ru

Регистрация новых пользователей и создание новых тем теперь только на новом форуме https://forum.arduino.ru

forum.arduino.ru

#Avrdude

boolean butt_flag = 0 ;

Драйвера скорее всего не установлены

у меня работал раньше только с платой Uno

в один момент перестал работать

тут нет никаких ошибок, просто винда не видит плату.

проблема или с драйверамиили с кабелями или с самой ардуиной

Этим все сказано.

Плата новая, кабель data, Windows обнаруживает как USB-Serial CH340 (com*)

только что переустановил драйвера, IDE

Как перебороть эту ошибку

у меня работал раньше только с платой Uno

поясните эту фразу.

Раньше работало с уно, а теперь взял ХХХХ — не работает? Что взяли вместо уно? Определяется ли нынешняя плата ХХХХ виндой? заливались на нее прежде скетчи?

Значит не тот порт выбран. Чудес не бывает

я устранил проблему. Всем Спасибо!))

в отделе инструменты/процессор/Atmega328P(old bootloader)

я устранил проблему. Всем Спасибо!))

в отделе инструменты/процессор/Atmega328P(old bootloader)

вы слепой? — см ответ #3

он пошел по форуму всех теперь учить, что надо делать, не глядя на даты.

Нуууу ребяты. Словить ошибку 500 это недостойно для настоящего ардуинщика. Набираем в поиске «stk500_recv()» читаем и смотрим видосы до полного понимания проблемы.

Пока писал, уже все сделали, молодцы.

Гдей-то тут ашипка 500?

я устранил проблему. Всем Спасибо!))

в отделе инструменты/процессор/Atmega328P(old bootloader)

Вам это сказали с самого начала — #3. Ответов не читаем?

Кстати, если бы Вы смилостивились сказать, что у Вас проблема именно с Нано, ответ был бы не в третьем, а в первом посте. Учитесь вопросы задавать.

Источник

Upload not working #164

I am trying to upload the test sketch from the readme to an arduino leonardo. I have compiled it sucessfully, but when I try to upload I get the following: Connecting to programmer: Found programmer: ; type = S Software Version = 1.0; No Hardware Version given. Programmer supports buffered memory access with buffersize=128 bytes. Programmer supports the following devices: Device code: 0x44 I am running the latest version which I have just compiled today. The program previously uploaded is no longer running.

The text was updated successfully, but these errors were encountered:

Is that the full output from the upload command?

Any update/workaround about how to upload a sketch to an Arduino Leonardo using Arduino CLI? I still get the same error using the latest nightly build.

I get this message with the Arduino Micro

We are getting this same issue although that’s not the full message in our case:

We have successfully uploaded via the Arduino IDE on this same device with same cable/etc setup.

We’ve also been having this issue for a long time but are only able now to address it.

Any updates or anything I can try? We are trying to get this working for a network of remote devices and can’t rely on the IDE upload.

May you run the same command adding: —log-level debug -v and copy the output here?

In case you are on MacOSX Catalina you must install all the system updates available.

I was trying to change the baudrate with the .avrduderc (which I think I am doing wrong), so it just contains:

Try to upload full output @mo-pyy

I have the same issue .
Please find below my detailed logs
Version: 2.0.0
Date: 2022-09-14T07:06:37.759Z
CLI Version: 0.27.1 [a900cfb]

Copyright © 2022 Arduino SA

Hi @mo-pyy and @wtgee. You have posted the output from a successful upload so all is well. Congratulations!

If you have any other questions, you are welcome to post on the Arduino forum. We’ll be happy to help you out over there:

get this message with the Arduino Micro

© 2023 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Arduino.ru

Регистрация новых пользователей и создание новых тем теперь только на новом форуме https://forum.arduino.ru

forum.arduino.ru

exit status 1 Ошибка компиляции для платы Arduino Nano.Задолбало

После долгих мучений все заработало . Пришлось несколько раз ардуино иде искать и скачивать , проблемма в ней оказалась .

ну если не в состоянии прочитать текст сообщения #67 — то только и остается по кругу ИДЕ переставлять. Сказано же четко — автор проекта неправильно описал библиотеку. ее нужно не устанавливать средствами Ардуино ИДЕ, а вручную положить в папку со скетчем. Неужели это так трудно понять?

Хотя некоторые и при отстуствии драйверов на флешку первым делом бегут всю винду переставлять.

Какраз в иде проблемма была . весь форум перелопатил , что только не делал и по подсказкам форума и по своему , все равно ни чег не шло . Переставил стал другую ошибку выдавать , пока не нашел нормальную иде . Вссе сделал , как и до переустановки и сразу все пошло и скетч и русский язык и все ,что мне нужно с ним делать.Теперь думаю , как эту ид на флешку или диск сбросить вместе с библиотеками , чтоб потом не искать .

Может мне кто поможет. Правда у меня Arduino UNO

Есть скетч для Nano, пытаюсь залить в UNO — выдает ошибку при заливке. Я начинающий и только на первых шагах.

Библиотеки лежат в папке со скетчем

«fatal error: LiquidCrystal_I2C.h: No such file or directory» — первод требуется?

Да разобрался поставил другие библиотеки и пошло.

И у меня такая же проблема. Заливаю скетч и он выдаёт ошибку, говоря что ожидается деконструктор, конструктор или ещё что-то, указывая на строку в коде: digitalWrite(CS, HIGH);

Подключал светодиодную плату. (Просто написал, а то мало ли) в начале кода объявил константу, так что не подумайте.

И у меня такая же проблема. Заливаю скетч и он выдаёт ошибку, говоря что ожидается деконструктор, конструктор или ещё что-то, указывая на строку в коде: digitalWrite(CS, HIGH);

какая же это нафик «такая же проблема», если ошибка совсем другая? Или вы не вникаете и для вас любая ошибка при компиляции — «такая же»?

По делу — приведите текст скетча и скопируйте сюда лог компиляции с ошибками. Только не надо вставлять скриншоты Ардуино ИДЕ или видео компиляции — это никому не интересно.

извините, если сильно многонаписал

И у меня такая же проблема. Заливаю скетч и он выдаёт ошибку, говоря что ожидается деконструктор, конструктор или ещё что-то, указывая на строку в коде: digitalWrite(CS, HIGH);

какая же это нафик «такая же проблема», если ошибка совсем другая? Или вы не вникаете и для вас любая ошибка при компиляции — «такая же»?

По делу — приведите текст скетча и скопируйте сюда лог компиляции с ошибками. Только не надо вставлять скриншоты Ардуино ИДЕ или видео компиляции — это никому не интересно.

на счёт того ,что я писал «такая же проблема», я имел ввиду, что у менятоже в ошибке написано «exit status1». не удивляйтесь, я новичок.

Источник

Upload fails in subsequent windows with Serial Monitor open #726

Describe the bug

The Arduino IDE uses the serial ports of Arduino boards in two different ways:

  • Uploading sketches
  • Communication via Serial Monitor

The port can not be used for both of these things simultaneously. The IDE handles the condition of Serial Monitor being open when an upload is started automagically like so:

  1. Close port in Serial Monitor
  2. Complete upload process
  3. Reopen port in Serial Monitor

🐛 This works as expected in the first IDE window you open, but it no longer works in subsequent windows.

NOTE: although similar, this is different from #586 because it occurs even when the port is not open in a Serial Monitor/Serial Plotter of another IDE window.

To Reproduce

  1. Connect an Arduino board to your computer.
  2. Select the appropriate board and port.
  3. Select Tools > Serial Monitor from the Arduino IDE menus to open Serial Monitor.
  4. Select Sketch > Upload from the Arduino IDE menus.
    🙂 Upload succeeds as expected.
  5. Select Tools > Serial Monitor from the Arduino IDE menus to close Serial Monitor.
    This is necessary to avoid

Upload fails if port is open in Serial Monitor of another window #586

  • Select File > New from the Arduino IDE menus.
  • Select Tools > Serial Monitor from the Arduino IDE menus in the new window.
    🐛 Note that there is an unexpected banner in Serial Monitor:

    Not connected. Select a board and a port to connect automatically.

    Expected behavior

    Upload with Serial Monitor open in the same IDE window to always be handled automagically.

    Desktop

    • OS: Windows 10
    • Version: 2.0.0-rc3
      Date: 2021-12-22T15:46:56.004Z
      CLI Version: 0.20.2 [13783819]

    Additional context

    It is not necessary to leave the original window open to reproduce the bug. It occurs even if that window is closed.

    I bisected the issue to 767b09d (it does not occur at 8839793).

    The text was updated successfully, but these errors were encountered:

    Closing as fixed by #982

    why is this closed? this is still an issue in rc9.2.
    If you don’t manually close the «Serial Monitor» tab at the bottom before trying to upload a sketch, it just gives you the:
    Failed uploading: uploading error: exit status 1avrdude: ser_open(): can’t open device «\.COM#»: Access Denied
    error

    Hi @ProxyPlayerHD. Thanks for your report.

    The issue is closed because the bug was fixed for me and the majority of the other users who reported being affected by it after the changes made in #982.

    We are tracking one other report of continued failing uploads at #1306, but it is not certain that it has the same cause and we have not even been able to determine how the developers can reproduce that issue.

    Please provide more information:

    • Which Arduino board are you using?
    • Does the problem occur consistently, or intermittently?
    • Does the problem persist after you restart your computer?
    • Does the problem also occur when using Arduino IDE 2.0.0-rc9 or older (download links for 2.0.0-rc9 listed here, or 1.8.19 here)

    hmm, i hate it when it does this. aparently the issues seems to have fixed itself out of nowhere. but now a different issue emerged where the Serial Monitor doesn’t display anything from my Arduino Mega 2560 but works fine for other board i tested it with (Nucleo 144, and RaspPi Pico).
    i just have a looping «Hello World!» program on the Arduino and i can see the sending LED constantly being lit up but nothing appears in the IDE. I can send stuff from the Serial Monitor to the Arduino and see the receiving LED light up shortly when i do it, so clearly it has a working connection.
    power cycling/reconnecting the Arduino or restarting the IDE doesn’t fix it. (reuploading the sketch while the Serial Monitor is open makes it print a few garbled «Hello World»‘s)
    i can also use some other terminal software like Teraterm to connect to the Arduino and it works perfectly fine there.

    this is probably enough to open a seperate issue, but i’ll restart my PC to see if that maybe fixes it
    EDIT: nope that didn’t fix it. swaping board again it’s really oly the Mega that doesn’t want to display stuff in the Serial Monitor.

    Источник

    Arduino.ru

    Регистрация новых пользователей и создание новых тем теперь только на новом форуме https://forum.arduino.ru

    forum.arduino.ru

    exit status 1 Ошибка компиляции для платы Arduino Nano.Задолбало

    После долгих мучений все заработало . Пришлось несколько раз ардуино иде искать и скачивать , проблемма в ней оказалась .

    ну если не в состоянии прочитать текст сообщения #67 — то только и остается по кругу ИДЕ переставлять. Сказано же четко — автор проекта неправильно описал библиотеку. ее нужно не устанавливать средствами Ардуино ИДЕ, а вручную положить в папку со скетчем. Неужели это так трудно понять?

    Хотя некоторые и при отстуствии драйверов на флешку первым делом бегут всю винду переставлять.

    Какраз в иде проблемма была . весь форум перелопатил , что только не делал и по подсказкам форума и по своему , все равно ни чег не шло . Переставил стал другую ошибку выдавать , пока не нашел нормальную иде . Вссе сделал , как и до переустановки и сразу все пошло и скетч и русский язык и все ,что мне нужно с ним делать.Теперь думаю , как эту ид на флешку или диск сбросить вместе с библиотеками , чтоб потом не искать .

    Может мне кто поможет. Правда у меня Arduino UNO

    Есть скетч для Nano, пытаюсь залить в UNO — выдает ошибку при заливке. Я начинающий и только на первых шагах.

    Библиотеки лежат в папке со скетчем

    «fatal error: LiquidCrystal_I2C.h: No such file or directory» — первод требуется?

    Да разобрался поставил другие библиотеки и пошло.

    И у меня такая же проблема. Заливаю скетч и он выдаёт ошибку, говоря что ожидается деконструктор, конструктор или ещё что-то, указывая на строку в коде: digitalWrite(CS, HIGH);

    Подключал светодиодную плату. (Просто написал, а то мало ли) в начале кода объявил константу, так что не подумайте.

    И у меня такая же проблема. Заливаю скетч и он выдаёт ошибку, говоря что ожидается деконструктор, конструктор или ещё что-то, указывая на строку в коде: digitalWrite(CS, HIGH);

    какая же это нафик «такая же проблема», если ошибка совсем другая? Или вы не вникаете и для вас любая ошибка при компиляции — «такая же»?

    По делу — приведите текст скетча и скопируйте сюда лог компиляции с ошибками. Только не надо вставлять скриншоты Ардуино ИДЕ или видео компиляции — это никому не интересно.

    извините, если сильно многонаписал

    И у меня такая же проблема. Заливаю скетч и он выдаёт ошибку, говоря что ожидается деконструктор, конструктор или ещё что-то, указывая на строку в коде: digitalWrite(CS, HIGH);

    какая же это нафик «такая же проблема», если ошибка совсем другая? Или вы не вникаете и для вас любая ошибка при компиляции — «такая же»?

    По делу — приведите текст скетча и скопируйте сюда лог компиляции с ошибками. Только не надо вставлять скриншоты Ардуино ИДЕ или видео компиляции — это никому не интересно.

    на счёт того ,что я писал «такая же проблема», я имел ввиду, что у менятоже в ошибке написано «exit status1». не удивляйтесь, я новичок.

    Источник

  • Понравилась статья? Поделить с друзьями:
  • Failed at step exec spawning exec format error
  • Failed api setaction error 0x80070057 параметр задан неверно
  • Failed an error occurred during host configuration esxi snmp
  • Failed a general system error occurred vim fault filenotfound
  • Failed a general system error occurred missing vstor2 driver or not started