Upgrading JTAGICE mkII question

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have been using AVR Studio 4.14.589 with the mkII with no problems. To see if I could reproduce an .elf flash problem some others are having, I just installed the latest AVR Studio in 32 bit Virtual XP under Windows7 64 bit:
[Sweet cut and paste from XP to W7]

AVR Studio		4.16.628  
GUI Version		4, 16, 0, 626



Operating System
Major			5
Minor			1
PlatformID		2
Build			2600
Service Pack 3

Plugins:

AvrPluginAvrAsmObject	1, 0, 0, 47
AvrPluginavrgccplugin	1, 0, 0, 10
Stk500Dll			1, 0, 1, 11

AVR Studio connected and wanted to upgrade the mkII firmware. When I said no and continued, it failed to read the target signature. The Dragon works fine in this setup so I guess the next step would be to let it change the mkII firmware.

My question is, what happens when I connect the mkII back to the older version of Studio. Will it work, offer to downgrade, or force me to go through a manual reload or upgrade AVR Studio?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I went back to V41.4 last week and did not get any problems that I can remember, now back to 4.16.

Any reasons for keeping Studio 4.14? well apart from avoiding fresh, unresolved V4.16 bugs. :?

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, I upgraded the mkII firmware and there is indeed a difference in the way it flashes .elf files.

The good news is it doesn't flash the extra contents of the .elf file, e.g. no duplicate bootloader or debugging information is written.

The bad news is it now flashes the .bootloader section to the wrong place, overwriting the start of the .bss section. This has an unfavorable effect on program execution :)

This is mkII hardware version 0x01 firmware 052c 052c on Studio 4.16.628

Studio 4.14.589 will connect to the newer firmware though.

BTW firmware upgrading in Virtual XP is not completely straightforward. The mkII does a USB reattach for the bootloader, which means you have to do a manual reattach for the virtual machine. Studio got hung at this point leaving the mkII in boot mode. The manual upgrade in the Tools menu then worked.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

The bad news is it now flashes the .bootloader section to the wrong place, overwriting the start of the .bss section. This has an unfavorable effect on program execution

There's a bootloader programming bug in 628 that is fixed when you apply SP1 and take it to 638

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, 4.16.638 on virtual XP didn't change the behavior: both the Dragon and JTAGICE write the .bootloader after the .text section, and not to the address specified (it's not actually a bootloader but some routines for runtime flash writes). Studio 4.14.589 on XP works with that elf file. I have submitted a ticket to Atmel.

$ avr-readelf.exe -S VXPravenusbstick.elf
There are 19 section headers, starting at offset 0x2e130:

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .data             PROGBITS        00800100 009730 00049c 00  WA  0   0  1
  [ 2] .text             PROGBITS        00000000 0000f4 00963c 00  AX  0   0  2
  [ 3] .bootloader       PROGBITS        0001fc00 009bcc 000078 00  AX  0   0  1
  [ 4] .bss              NOBITS          0080059c 009c44 001082 00  WA  0   0  1
  [ 5] .eeprom           PROGBITS        00810000 009c44 000008 00  WA  0   0  1
  [ 6] .fuse             PROGBITS        00820000 009c4c 000003 00  WA  0   0  1
  [ 7] .debug_aranges    PROGBITS        00000000 009c4f 000418 00      0   0  1
  [ 8] .debug_pubnames   PROGBITS        00000000 00a067 001fac 00      0   0  1
  [ 9] .debug_info       PROGBITS        00000000 00c013 00c2ec 00      0   0  1
  [10] .debug_abbrev     PROGBITS        00000000 0182ff 003f13 00      0   0  1
  [11] .debug_line       PROGBITS        00000000 01c212 008a7d 00      0   0  1
  [12] .debug_frame      PROGBITS        00000000 024c90 001410 00      0   0  4
  [13] .debug_str        PROGBITS        00000000 0260a0 004091 01  MS  0   0  1
  [14] .debug_loc        PROGBITS        00000000 02a131 003c92 00      0   0  1
  [15] .debug_ranges     PROGBITS        00000000 02ddc3 0002b0 00      0   0  1
  [16] .shstrtab         STRTAB          00000000 02e073 0000bc 00      0   0  1
  [17] .symtab           SYMTAB          00000000 02e428 003c10 10     18 516  4
  [18] .strtab           STRTAB          00000000 032038 00262c 00      0   0  1