Hi I try to upload program (on Atmega8) with I created in Arduino using throught Chinese programmator and I have an error
avrdude warning cannot set sck period. please check for usbasp firmware update
In Arduino I set up:
Tools->programmer->USBasp
Tools->Board->Arduino NG or older w/Atmega8
to upload the hex code I use the command File->Upload Using Programmer
Wher I try to upload thtought khazama program everything ok.
You're getting that warning because the programmer isn't accepting the speed set command from AVRDUDE. This was an option added to later versions of the USBasp firmware to support slow devices (e.g., ones running off a watch crystal).
However, the programmer you're using (according to that description) auto-adjusts its speed to an appropriate value, so there's no need for AVRDUDE to adjust it in the first place.
And in the end, a warning is still just a warning. Unless you see actual errors generated by AVRDUDE the program should have been uploaded to the chip properly regardless.
Related
Purchased some clone Arduino nanos a while ago and finally got to working with them.
Of the 3 i worked with, 2 of them upload and verify fine.
The third is able to upload (code functions properly), however it fails to read flash data.
this is required to post pastebin
Here is the output from a clone that worked:
https://pastebin.com/x1y0yr1k
Here is the output from the one with the issue:
https://pastebin.com/YGAGC4XN
this is required to post pastebin
What I've done so far:
Reflashed bootloader from working Arduino as ISP
CH340 driver installed
Used (old) bootloader when uploading
Tested on both Linux and OSX
Any suggestions or insight would be much appreciated.
If you have a working UNO or similar board, you could try uploading the bootloader using the Arduino IDE (https://www.arduino.cc/en/Main/Software), and see if you get different results. Sorry, I'm not familiar with using avrdude.
The link on sparkfun gives really good instructions on how to accomplish this task. Scroll about half-way down to where it says Upload Arduino as ISP https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader/all
Basically, you connect the UNO to your target as shown in the link, then select ArduinoISP in the examples menu, select the COM port and board, and upload the sketch. Then you select your target board in tools, and select Programmer, Arduino as ISP in tools, and finally, Burn Bootloader in tools.
I've had 100% success burning blank Atmega chips using this method.
I have a nodemcu v3 and I'm trying some basic stuff
I installed the esp8266 board in Arduino IDE and then I uploaded a blink example.
But now I'm trying to upload Lua code using ESPLorer but I doesn't work properly. I press in open and set the baud rate to 115200 but I just get some infinite Chinese letters.
Should I reinstall the firmare or something?
There is a very good answers at https://stackoverflow.com/a/43509569/131929 and https://stackoverflow.com/a/47510019/131929.
Should I reinstall the firmare or something?
First you should make up your mind whether you want to conveniently program in Lua or whether you want to stick with Arduino (running on the NodeMCU-clone board). It is an either-or question. Flashing on of them to the module will erase the respective other.
And no, in case you want to use the NodeMCU firmware, you should not use those outdates binaries from 2015. Build a recent version conveniently in the cloud: https://nodemcu.readthedocs.io/en/latest/en/build/.
P.S. if you're interested why I call yours a clone board you may want to read https://frightanic.com/iot/comparison-of-esp8266-nodemcu-development-boards/ from yours truly.
You must erase the flash of your NodeMCU before a new upload. If you ignore that, your software don't run appropriately. To do that, I'm using esptool:
python esptool.py --port COM9: erase_flash
In that example COM9: is the name of my USB/serial interface.
After that you can flash for example your ESP8266 with that line of code to add a boot part:
python esptool.py --port COM9: write_flash -fm dout 0x00000 boot_v1.5.bin
Use the preview line of code and adapt it to upload other parts of the map of the flash memory.
Getting this when I upload the blink example from the arduino getting started book. The file compiles but just hangs at this point. I have reset, restarted, reinstalled. Nothing seems to work.
It worked just 1 day ago and there have been no changes since.
System wide configuration file is "C:\Program Files (x86)\Arduino/hardware/tools/avr/etc/avrdude.conf"
Using Port : COM5
Using Programmer : avr109
Overriding Baud Rate : 57600
Most of the problems with uploading sketches to Arduino boards come down to communication problems.
Try using other USB ports, check if you selected the correct COM port in the Arduino IDE, also check that you selected the correct board in the IDE.
If all else fails, please check if you can upload the sketch on another PC.
this error might be caused from a mistake in connecting the wires or a problem in the program.So try to check the connection of the wires and if you uploaded the program just because you still don't know how to write arduino codes, I advise you to learn and experiment with the help of the tutorials on the arduino site and reference.I hope that my answer helped you.
I have a sketch for a mega2560 board that I can upload successfully using the Arduino IDE using the upload button but I would prefer to use a script using avrdude. The only problem is if I try to run avrdude more than once to flash the board it get's a stk500v2_ReceivedMessage(): timeout. It doesn't happen every time but enough. The only way the avrdude seems to work again is if I update the same sketch using the Arduino IDE.
I was having trouble finding what the Arduino IDE does to upload a file but all the settings I could find suggest that avrdude is doing it the same way.
Verbose compilation and upload can be enabled in Arduino IDE Settings:
File->Preferences->Show verbose output during: [] compilation [x] upload.
It will show complete commands used for upload and the avrdude should be same or you can use the same avrdude.exe. You should see something like:
C:\arduino\hardware\tools\avr/bin/avrdude -CC:\arduino\hardware\tools\avr/etc/avrdude.conf -v -V -patmega2560 -cwiring -PCOM17 -b115200 -D -Uflash:w:C:\Users\kiiv\AppData\Local\Temp\build658cdf44885ca2a8676f164a933c092f.tmp/MAX7219_4x4x4.ino.hex:i
BTW: I've just started with PlatformIO CLI (command line tool) and I'm loving it.
PlatformIO IDE didn't work well for me, as I'm using czech keyboard layout and keystrokes prevents me to write all essential characters like []{}#& without switching it to english one.
I guess I'm having a basic understanding issue regarding the nodemcu/ESP8266 when it is used with the Arduino IDE and/or visual micro (for MS Visual Studio).
Everytime I upload a program/sketch which is obviously written in C in this case, it is compiling and uploading a binary of about 280kb, even if it is only a simple "blink" example.
Is it some kind of firmware being uploaded everytime or is it just monsterious libraries needed for the ESP to work with the Arduino IDE?
If it is firmware, do you normally "update" the firmware to a more recent build when working with the Arduino IDE? When using the nodemcu LUA firmware, there are periodic updates.
Thanks!
Basically, you build the firmware, which is a combination of your own code, and lots of other code/libraries.
All the other parts are part of the Arduino ESP8266 core, which does indeed get updates (it lives here: https://github.com/esp8266/Arduino). And it itself contains the Espressif SDK, which also gets updates (https://github.com/esp8266/Arduino/tree/master/tools/sdk).
Like NodeMCU you can get periodic updates, but they are of the core, and the only way to get them into your firmware is to recompile your sketch.
This is completely normal - When writing code for an interpreted language like Lua for the ESP/NodeMCU, you're just uploading what is a relatively small text file(s), as the code needed to run it is already on the chip, and doesn't change.
However, when you start working with compiled languages like C (With the Espressif SDK only, for example), or C++ with the Arduino IDE, you are replacing the entire firmware each time your code changes. This includes the TCP/IP stack, WiFi management, the logic controlling the PHY/MAC interface, the mini OS, and a host of other bits to make your ESP8266 work. Even if your code appears to be just a simple "blink" sequence, there's a lot of code running behind the scenes to make it possible, leading to the large sketch size.
Generally, every change to your sketch code will produce a complete copy of everything needed to create a bootable, runnable binary for the ESP8266. This is what is causing the 280KiB file. Since each copy of your code includes the newest (Or at least whatever is in your IDE at the time) copy of the system level code, there is no separate update process - Each time you upload your sketch, the system code is updated too.
Additionally, there is some extra overhead from the Arduino abstraction on the Espressif SDK, leading to a larger resulting binary size.