atprogram use for SAMB11

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

Hi All,

 

I am attempting to program the ATSAMB11 Xplained board with the Atmel-ICE development tool as we are looking to develop a product using this module and need this programming functionality in production.

 

Although atprogram reports success with the program, chiperase and erase commands there seems to be no effect on the actual program running on the board.  I'm not sure if I'm missing something fundamental or possibly the SAMB11 Xplained board is just not supported by atprogram...

 

Here's an example of a chiperase command:

>atprogram -v -i SWD -d atsamb11g18a -t atmelice chiperase
[DEBUG] Starting execution of "chiperase"
[DEBUG] Starting process 'C:\Program Files (x86)\Atmel\Studio\7.0\atbackend\atbackend.exe'
[DEBUG] Connecting to TCP:127.0.0.1:50118
[INFO] Connected to atmelice, fw version: 1.1c
Firmware check OK
[INFO] Firmware check OK
Chiperase completed successfully
[DEBUG] Command "chiperase" finished with return code 0
[DEBUG] Exit successfully.

 

Even though the output of the command claims the operation was successful the SAMB11 Xplained board still runs the firmware previously programmed through AtmelStudio.

 

 

When trying to program the SAMB11 Xplained board (that has been erased through Atmel Studio 7) with an elf file it also doesn't work:

>atprogram -v -i SWD -d atsamb11g18a -t atmelice program -c -f "C:\Users\nick.ward\Documents\Atmel Studio\7.0\TIME_INFORMATION_SAMB11_XPLAINED_PRO1\TIME_INFORMATION_SAMB11_XPLAINED_PRO1\Debug\TIME_INFORMATION_SAMB11_XPLAINED_PRO1.elf"
[DEBUG] Starting execution of "program"
[DEBUG] Starting process 'C:\Program Files (x86)\Atmel\Studio\7.0\atbackend\atbackend.exe'
[DEBUG] Connecting to TCP:127.0.0.1:50137
[INFO] Connected to atmelice, fw version: 1.1c
Firmware check OK
[INFO] Firmware check OK
[DEBUG] Memory segment base written at 0x10008000. Size = 0x00009d10.
[DEBUG] Memory segment base written at 0x10011d10. Size = 0x000000a8.
Programming completed successfully.
[DEBUG] Command "program" finished with return code 0
[DEBUG] Exit successfully.

 

The programming finishes very quickly compared to programming through Atmel Studio and afterwards the SAMB11 Xplained board remains unresponsive as if the board is still erased.

 

When looking at the memory segments that are being written to it doesn't make sense as the memory area is IDRAM not Flash memory.

 

If a atprogram info command is executed the the program memory areas can be noted:

 

C:\Users\nick.ward\Documents>atprogram -v -i SWD -d atsamb11g18a -t atmelice info
[DEBUG] Starting execution of "info"
[DEBUG] Starting process 'C:\Program Files (x86)\Atmel\Studio\7.0\atbackend\atbackend.exe'
[DEBUG] Connecting to TCP:127.0.0.1:50167
[INFO] Connected to atmelice, fw version: 1.1c
Firmware check OK
[INFO] Firmware check OK
Tool atmelice has firmware version: 01.1c
Target voltage: 3.37 V

Device information:

Name:       atsamb11g18a
JtagId:     N/A
Revision:   R
CPU arch.:  CORTEX-M0
Series:     SAMB11

Security bit is not set.

Memory Information:

Address Space    StartAddress            Size

base                      0x0      0x10042000
  BOOTROM                 0x0         0x20000
  IDRAM            0x10000000         0x20000
  BLERAM           0x10040000          0x2000
  APB              0x40000000         0x20000

extflash                  0x0         0x20000

Fuses:
[ERROR] Could not get Module FUSES for atsamb11g18a. (TCF Error code: 131120)

 

 

Any help with issue would be greatly appreciated.

 

Thanks.

 

This topic has a solution.
Last Edited: Sun. May 15, 2016 - 10:15 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

 

I am trying to program the SAMB11 as well and I have problems too!

I set a post on Tuesday but unfortunately I haven't got any hints yet.

 

I tried to program the board directly over the USB port via EDBG and I have same situation. The Studio 7 can detect the device and reads the settings but it can't flash. I used the command atprogram as well. Atprogram can detect but can't flash it.

 

There is a chapter in the Atmel Studio Release Notes on the website about USB driver issues but without any help for me. I have new set up Windows 10 64bit system with all updates and no further software than Atmel Studio 7. On a second system with windows 7 it doesn't work either. In my opinion it is a USB driver problem. I spent many hours to get it going - I dont know what I am doing wrong.

 

I habe been working with ATMEGA256 some time ago and didn't have any problems.

 

RENE77

 

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

atprogram does not currently support SAMB11, which is running an OS out of ROM. At boot, the OS downloads the user code from an on-die external flash to the on-chip RAM. The user code consists of a ROM patch (provided by Atmel) and user application (the ELF you compile) combined together in a flash image. This is created as a postbuild step when creating Studio projects. IAR handles this differently.

 

To program an application onto the SAMB11 flash use the sambflashtool.exe utility found in the samb11 device pack.

 

On my machine, this is:

C:\Program Files (x86)\Atmel\Studio\7.0\packs\atmel\SAMB11_DFP\2.1.129\tools

 

 

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

Thank you. It works for me now.

 

RENE77

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

Thanks danv, sambflashtool.exe is the solution I was looking for.  Cheers!

 

@Atmel, it would be nice if atprogram.exe gave a warning that the SAMB11 module was not currently supported.

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

Hi ,

 

thanks for the update. i too face the same problem with samb11 xplain pro. when i tried to run the application a black window appears for 1 sec and disappears immediately. unable to open sambflash tool.

i am using windows 8 os 64 bit. any solution for this.

 

C:\Program Files (x86)\Atmel\Studio\7.0\packs\atmel\SAMB11_DFP\2.1.129\tools