Forum: Mikrocontroller und Digitale Elektronik AtSamC21 AtmelStudio/MicrochipStudio device-programming failed


von Nik L. (firefly0815)


Angehängte Dateien:

Lesenswert?

Hallo Forum-Community!

Ich wollte soeben eine Kleinserie mit dem AtSamC21E16A und bestehender 
Firmware programmieren (SWD-Schnittstelle) und bin über folgendes 
Problem gestolpert:

**Funktioniert:**
AtmelStudio aus dem Projekt heraus programmieren/debuggen klappt 
problemlos!

---
**Funktioniert NICHT:**
AtmelStudio --> Tools --> Device Programming --> Memories (hex-file)

--> [ERROR] Could not activate interface, but found DAP with ID 
0xbc11477..
This usually indicates that the device is locked or in deep sleep. Try 
to do a chip erase to restore connectivity to the device., ModuleName: 
TCF (TCF command: Device:startSession failed.)
17:22:46: [ERROR] Could not activate interface, but found DAP with ID 
0xbc11477.

---
**Funktioniert auch NICHT:**
MPLAB IPE

--> Currently loaded versions:
Application version...........1.41.137 (0x01.0x29.0x89)
Tool pack version .............1.3.220
Target voltage detected
Device could not enter reset extension, check cap on RST line
Reset error.

---
**Workaround für AS:**
(Bild im Anhang)
Folgenden Workaround habe ich für AS->DevProg gefunden, bin damit aber 
noch nicht glücklich:
1. AS --> Device programming --> Memmory
--> Erase Chip (klappt)
2. Haken entfernen bei "Erase Flash before programming" und bei "Verify 
Flash after programming"
3. "Program" flash (klappt nun)
4. "Verify" klappt auch

Warum lässt sich das hex nicht wie gewohnt über MPLAB-IPE oder das 
AS-Device-Programming aufspielen? Warum der Workaround?

Danke für eure Hilfe

von Rudolph R. (rudolph)


Lesenswert?

Hast Du den Reset Pin beim SWD nicht mit angeschlossen?

von NickNack (Gast)


Lesenswert?

Rudolph R. schrieb:
> Hast Du den Reset Pin beim SWD nicht mit angeschlossen?

Ja, Reset ist auch angeschlossen.
(VCCIO, SWDIO, SWCLK, !RESET, GNDIO)
---
Allerdings habe ich jetzt das Phänomen, dass auf einem anderen Rechner 
das Programmieren über AS->DeviceProgramming funktioniert :D
(Microchip Studio Version 7.0.2594)
Leider habe ich nun keinen Zugriff auf den Rechner von heute Mittag:
Die Versionen von AS werde ich noch vergleichen.

MPLAB-IPE (V5.50 & V5.45) weigert sich nach wie vor.

von Nik L. (firefly0815)


Lesenswert?

Sorry, Anmelden vergessen...
Der Gast NickNack bin ich.

von Mark S. (voltwide)


Lesenswert?

Erlebe gerade ein ähnliches Problem mit ISP-flash-Programmierung 
(AVRDUDE) - die hatte bis vor wenigen Monaten noch funktioniert - und 
nun nicht mehr. Wobei ich unter Linux arbeite. Habe verschiedene Laptops 
mit unterschiedlich alten LMDEs - auf dem einen geht es - auf dem 
anderen nicht. Scheint irgendwas mit den USB-Kernel-Modulen zu tun zu 
haben.

von Nik L. (firefly0815)


Lesenswert?

NickNack schrieb:
> Leider habe ich nun keinen Zugriff auf den Rechner von heute Mittag:
> Die Versionen von AS werde ich noch vergleichen.

Ich konnte soeben die AS-Versionen vergleichen.

Der "Problemrechner" hat eine ältere Version installiert:
Atmel Studio: 7.0.1931
Atmel Kit: 7.0.122

Ich werde die Programme Anfang der kommenden Woche aktualisieren und 
erneut testen.

von Rudolph (Gast)


Lesenswert?

Zu der 7.0.2594 fällt mir gerade noch ein, dass die dem Atmel ICE ein 
Firmwareupdate verpasst hat.

von Nik L. (firefly0815)


Lesenswert?

Rudolph schrieb:
> Zu der 7.0.2594 fällt mir gerade noch ein, dass die dem Atmel ICE ein
> Firmwareupdate verpasst hat.

Vielen Dank für den Hinweis. Es wird wohl Zeit die changelogs zu suchen

Bearbeitet:
Wahnsinn, an wie vielen Ecken dort geschraubt wird... Vermutlich ist es 
das von @Rudolph erwähnte Firmware-Upgrade, welches das Problem löst.

Auszug von...
https://ww1.microchip.com/downloads/aemDocuments/documents/DEV/ProductDocuments/SoftwareTools/Microchip-Studio-Release-Notes-DS50002917.pdf

---
**Microchip Studio for AVR® and SAM Devices 7.0.2594**
• Support for MPLAB® PICkit™ 4 with firmware update
• Updated debugger firmware for device support with Atmel-ICE, JTAGICE3, 
and Power Debugger
• Support for project import of MPLAB® Code Configurator generated 
projects
• Advanced Software Framework 3.52.0, including previous version back to 
3.44.1

---
**Microchip Studio for AVR® and SAM Devices 7.0.2542**
• Renaming of Atmel Studio to Microchip Studio for AVR and SAM Devices
• Microchip Studio installer bundles with the AVR GCC Toolchain, Arm GCC 
Toolchain, and the MPLAB® XC8
Compiler with AVR devices support. To unlock all optimization options of 
the MPLAB XC8 Compiler, try or get a
PRO license.
• Default optimization for debug configuration is -Og, previous it was 
-O1
• Improved scrolling performance on large projects/files
• AVR Macro assembler version 2.2.8
• Advanced Software Framework 3.49.1, including previous version back to 
3.42
• Updated kit recognition
Atmel Studio 7.0.2397
• Updated nEDGB firmware (v1.14.464) fixing a connection issue

---
**Atmel Studio 7.0.2389 contains:**
• Advanced Software Framework 3.47.0
• AVR 8-bit GCC Toolchain 3.6.2
• Arm GCC Toolchain 6.3.1 with Upstream Versions: GCC 
(Arm/embedded-6-branch revision 249437), GNU Arm
Embedded Toolchain: 6-2017-q2-update
• Inclusion of the Most Recent Device Family Packs Included in Installer 
as of Sept. 2019. Use the Device Pack
Manager to Check for Updates to get the Newest Device Support or 
Download an Older Device Family Pack for
Legacy Support.
• Contains Fixes for the Following Issues:
– AVRSV-8221: Issue with SRAM access seen for ATtiny817 with EDBG
– AVRSV-8212: Reading Target voltage for SAMD21 fails
– AVRSV-8187: Support for CMSIS 5.4.0 schema in atpackmanager
– AVRSV-8170: SAM D51, E5x - ELF parsing incorrect with ECC in Flash
– AVRSV-8105: Erase User page before programming fails for SAME54
– AVRSV-8073: SAM E54 User Page read/write using atprogram
– AVRSV-8130: Studio picks up old JLinkArm.dll instead of the installed 
one
– AVRSV-8166: tinyAVR®-2 devices are not compiling due to incorrect 
memory definition in a linker script
– AVRSV-8176: EEPROM and User Signature erase broken on UPDI
– AVRSV-8158: Unable to build ASM-projects for AVR64DA128 in Studio
– AVRSV-8123: Reading voltage doesn't work when device ID does not match
– AVRSV-8152: Update lib-elf-dwarf build job from stash to bitbucket
– AVRSV-8132: ChipErase issue with J-Link
– AVRSV-8131: SAMD21J17D is unable to Program or Debug with Atmel-ICE
– AVRSV-8171: SAM L11 BOOTOPT programming issue
– AVRSV-8159: Not able to program BOCOR on SAML11 from within an ELF 
file
– AVRSV-8149: Breakpoints support for TrustZone SG assembly instruction
– AVRSV-8182: Issue with Secure Boot support for SAM L11

---
**Atmel Studio 7.0.1931 contains:**
• Advanced Software Framework 3.40.0
• New Microchip Gallery extension
• Atmel START Extension Provides Improved Feedback on Required Device 
Pack Dependencies
• Support for Arm® Cortex®-M23 Architecture with TrustZone
• Support for Kits with the New nEDBG Debugger Platform
• Support for Devices:
[...]
• AVR 8-bit GCC Toolchain 3.6.1
• Arm GCC Toolchain 6.3.1 with Upstream Versions: GCC 
(Arm/embedded-6-branch revision 249437), GNU Arm
Embedded Toolchain: 6-2017-q2-update
• Atmel Studio 7.0.1931 Contains Fixes for the Following Issues that 
were Present in 7.0.1645:
– AVRSV-8001: Tool firmware upgrade instability.
– AVRSV-8063: ELF production file programming did not support fuses for 
the ATtiny817 family.
– AVRSV-8075: Launch of debugging with ATSAM4L unstable in some cases.
– AVRSV-7895: Solution with links between projects compiles the wrong 
file.
– AVRSV-7745: Linked files in a subfolder cause build failure.
– AVRSV-7939: Function breakpoint fails for AVR devices.
– AVRSV-8005: Writing fuses and memory sometimes fails cases on M0+ 
devices.

: Bearbeitet durch User
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.