I am trying to use AVR Studio 5 to program an Atxmega64a1 with basic hello world code. I am using 64 bit win7. I have the chip plugged in to an STK600 to try and program it. When I go to tools>AVR Programming and select the tool, I see two options: Simulator and STK600 (with a long serial number after it). I set the tool to STK600 and select the proper Device, switch the interface to JTAG, and hit "Apply"
AVR Studio freezes for a moment and says:
"Unable to connect to tool STK600 (6&33ECC3F5&0&4)", with the following details:
Timestamp: 2012-01-19 20:04:38.771
Severity: ERROR
ComponentId: 20000
StatusCode: 0
Unable to connect to tool context: 'Atmel.VsIde.AvrStudio.Services.TargetService.TCF.Internal.Services.Remote.ToolProxy+ToolContext'.
I hit close and after another few seconds get a second error:
"Failed to get JTAG daisy chain settings." with the following details:
Timestamp: 2012-01-19 20:07:59.057
Severity: ERROR
ComponentId: 20000
StatusCode: 0
Unable to connect to tool context: 'Atmel.VsIde.AvrStudio.Services.TargetService.TCF.Internal.Services.Remote.ToolProxy+ToolContext'.
It's not this board because it works on a friend's computer, and I get the same error when using a JTAGICE MKII and even with a Dragon. Any idea what it might be? I have tried uninstall and re-installing absolutely everything.
After much trial and error, it seems that USB 3.0 is incompatible with avr programmers. I switched USB ports to a 2.0 port and now it works beautifully!
Related
I'm trying to flash a basic LED blinking program to my Nucleo F413ZH board using the STM32CubeIDE, but whenever I try to debug it says:-
"No ST-LINK connected! Please connect ST-LINK and restart the debug
session."
The board has the PWR and COM LEDs blinking, meaning the USB I've connected to the board is providing power, I just can't upload any code.
I've tried using the ST-LINK upgrade firmware (https://www.st.com/en/development-tools/stsw-link007.html) to install new drivers as that's what some people online have suggested but the program won't respond once I've downloaded it, which seems to be a side issue of not registering connectivity.
I'm not sure whether this is an issue with drivers or if my hardware is busted. I'm using macOS Big Sur.
In Windows 10 this problem occurs as a result of an incorrect driver priority as pointed out in this post. Error in initializing ST-Link Device - Failed to connect to device perhaps this solution might point you in the right direction. I have set up several new M1 Mac Minis in the past few months for clients, Big Sur and the new M1 have several compatibility issues like slow network drive access and flashing screens, the Android M1 chip has dramatically less external connectivity which is why they went from 4 thunderbolt ports on the last intel Mac Mini to just 2. I would not be surprised if Big Sur is the core of the problem. Try a different computer if you have the opportunity.
I was also getting the same error on ubuntu system while using stm cube ide, with st-link v2 programmer.
blue led was continuously blinking.
but solved the error just by reconnecting the usb-extention-hub, now when connected blue led is on (no blink), and now i can program and debug the target.
i am trying to make an anti theft door notification IOT app. I am using nodemcu,arduino for coding and a blynk app to operate it. I have already installed a drivers from the link for nodemcu. Now I don't why I am not able to upload a code.
I am getting this as an error:
Sketch uses 281080 bytes (26%) of program storage space. Maximum is 1044464 bytes.
Global variables use 30152 bytes (36%) of dynamic memory, leaving 51768 bytes for local variables. Maximum is 81920 bytes.
error: Failed to open COM1
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed
You are getting
error: Failed to open COM1 error: espcomm_open failed error: espcomm_upload_mem failed error: espcomm_upload_mem failed
Because the arduino IDE was not able to upload code to the nodeMCU through COM1.
There are multiple reasons for this to happen,
If you are on linux or mac, make sure you have write permission to the port. (as the port you mention looks like a windows port this is probably not your issue.)
Make sure that you have selected proper board in the Arduino IDE board list.
Press and hold the flash on nodeMCU and plug the USB cable into the PC, once you connect the cable release the flash button. now try to upload the code.
I am working on this example on writing a simple Windows driver and debugging it from VS:
https://msdn.microsoft.com/en-us/library/windows/hardware/hh439665(v=vs.85).aspx
My Setup
Host: Windows 7 Physical system
Target: Windows 7 Physical system
Connection type: Serial cable (USB to serial in host, serial in
target)
Provisioning the target system is successful. Serial connection parameters are correct (tested the serial connection with different software). Driver is built and installed successfully in the target but "Break all" command does nothing. I am able to attach to a different process in the target.
I have seen similar questions and the usual response is to check for a mismatch between the connection parameters in the host and the target. I have checked this and the parameters are correct.
I would appreciate any advice.
Thanks!
Background info
WinAVR:
I installed WinAVR, and use avrdude.exe comes with WinAVR to download program into our board.
Adapter card:
We have an adapter card with FTDI4232 and AVR m328p on it. PC connects to FTDI4232 with a micro USB cable.
Schematic:
Sorry, I cannot post pics. So just describe the major part of schematic here. Two wires from(DATA_P & DATA_N pins) out from macro USB connector to DP[pin8] and DM[pin7] on 4232. And four wires(SCK, MOSI, MISO, SS_N) out from 4232 to m328p.
How to download program into the card before: Via pocket programmer. But we cannot give one pocket programmer to every engineer, so try to find out a way to download the program into m328p. Coz we have already had FTDI4232 on board, so this seems to be the best choice.
Can I download program via FTDI4232 on adapter card?
I know there is dedicated programmer based on 4232 chip, but this is our own design, I am not sure we can do it or not according to the above schematic.
what I did
Run this command:
C:\WinAVR-20100110\bin\avrdude.exe -c 4232h -p m328p -U flash:w:\Desktop\work\a_card\WinAVR\blink\blink.hex:i
But got the following error:
avrdude.exe: Error: no libftdi or libusb support. Install libftdi1/libusb-1.0 or libftdi/libusb and run configure/make again.
Then, download the compiled libftdi package from this link:
https://code.google.com/p/picusb/downloads/detail?name=libftdi1-1.0_devkit_mingw32_17Feb2013.zip
, and extract it as “compiled_libftdi”.
There is not too much info about how to use this compiled package, so I just found info online.
(1) I installed WinUSB driver for the first two ports of 4232 by Zadig. I can choose one port in the drop down menu, then choose “WinUSB(v6.1,7600…)”, “Install WCID Driver”.
(2) Then, enter into the “compiled_libftdi” folder, run “find_all”, I saw:
Number of FTDI devices found:1
Checking device: 0
Manufactureer: FTDI, Description: USB <-> Serial Converter
I think it means the USB driver for libftdi package installed successfully.
Run the above download command again, still failed.
I thought maybe because the avrdude.exe is out of date. So download a .exe from here:
http://download.savannah.gnu.org/releases/avrdude/avrdude-6.0.1-mingw32.zip
And replace the old one in the WinAVR folder.
Still got the error, but got one extra line info:
avrdude.exe: programmer operation not supported
I recently purchased an Arduino with an atmega1280 on it. I did not get it to use the Arduino IDE but just as a handy board to use with AVR Studio and my Dragon.
I purchased a new computer around the same time and it is running windows 7 64bit, I downloaded AVR Studio 5.1 and plugged in my Dragon. I upgraded to the latest firmware as it forces you to do. I then connected the Dragon to the Arduino and I get the following error:
[ERROR] Failed to enter programming mode. ispEnterProgMode: Error status received: Got 0xc0, expected 0x00, ModuleName: TCF (TCF command: Device:startSession failed.)
I have verified the ribbon cable pinouts are the same on both ends and have continuity. Pin 1 goes to Pin 1 and so forth. AVR Studio can read the 5.0V on the sense line but that is it.
I then installed libusb-win (1.6.2.0) and used avrdude to get a more descriptive error:
pasebin output
I have tried to wire up an atmega8 and atmega128 on breadboard with ISP and JTAG connections and I get the same errors as above but it makes more since so troubleshoot the PCB to PCB connection issue to eliminate any mis-wireings I may have.
Any idea where to start looking for the problem???
One thing is the power on the JTAG header, and another is on the actual chip. Could you try checking connections all the way from the AVR to the JTAG-pins? In my experience, there are almost always bad wiring, even if you think it is perfect.
When that is not the case, the AVR is not getting power.
Are you trying ISP or JTAG or both? Does the AVR support JTAG?
Is it ISP extracted from a JTAG connector?
Atmel's JTAGICE mkII documentation explains quite a bit of both ISP and JTAG.
I just recently build a board with JTAG connection (http://www.avrfreaks.net/modules/PNphpBB2/files/display_105.png), which may be descriptive on how to connect your JTAG, and this I know is working ;)