at91sam9rl64 and SAM-BA 2.7

ATMEL in-system programing solution including SAM-BA and SAM-PROG.

Moderators: nferre, fab

Han_Hoekstra
Posts: 2
Joined: Tue Apr 19, 2016 12:52 pm

at91sam9rl64 and SAM-BA 2.7

Tue Apr 19, 2016 1:24 pm

Hello all,

I am trying to build applets for SAM-BA 2.7. I know this is an old version, but the project I am working on is already old and if possible I don't want to upgrade to a new SAM-BA version, because then also production needs to be updated, which is no simple task.

The problem that I have is that I am compiling the extram applet for the at91sam9rl64-ek target and the compiled applet does not work. The original one is working however. What I have been able to do is compile and successfully run the Dataflash applet, which I think should mean that I have a working compiler setup.

When I run my SAM-BA batch file with the newly compiled Extram applet (and also the new Dataflash applet), the only output I get is on the console:

Code: Select all

-I- Waiting ...
connection : \jlink\ARM0
board : AT91SAM9RL64-EK
target(handle) : 33074768
read chip ID : 0x00000010 at addr: 0xFFFFEE40
read chip ID : 0x019B03A0 at addr: 0xFFFFF240
-I- Found processor : AT91SAM9RL64 (0x019B03A0)
-I- Loading applet isp-extram-at91sam9rl64.bin at address 0x301000
I see this output when I kill the SAM-BA process in my task manager, if I don't kill it, it never stops. When I open my Segger J-Link control panel window, I see that there is something going on, but I don't know what. On the status bare bottom right, I see the seconds counting and the number of calls increasing.

I don't see any output on the debug UART.

Running the SAM-BA batch file with the old Extram applet but with the new Dataflash applet, I see the following output on the console:

Code: Select all

-I- Waiting ...
connection : \jlink\ARM0
board : AT91SAM9RL64-EK
target(handle) : 6336080
read chip ID : 0x00000010 at addr: 0xFFFFEE40
read chip ID : 0x019B03A0 at addr: 0xFFFFF240
-I- Found processor : AT91SAM9RL64 (0x019B03A0)
-I- Loading applet isp-extram-at91sam9rl64.bin at address 0x301000
-I- Memory Size : 0x4000000 bytes
-I- Buffer address : 0x3024A4
-I- Buffer size: 0x0 bytes
-I- Applet initialization done
-I- External RAM initialized
script file : ./program_development_device.tcl
-I- DATAFLASH::Init 0 (trace level : 5)
-I- Loading applet isp-dataflash-at91sam9rl64.bin at address 0x20000000
-I- Memory Size : 0x840000 bytes
-I- Buffer address : 0x20002B58
-I- Buffer size: 0x203A0 bytes
-I- Applet initialization done
-I- dataflash unlocked
<<<< AND A LOT MORE REGARDING PROGRAMMING THE FLASH >>>>
On the debug UART I see the following:

Code: Select all

-- EXTRAM ISP Applet 1.1 Jun 27 2008 17:49:48 --
-I- INIT command:
-I-     communication type : 2
-I-     Init SDRAM...
-I-     Init successful.
-I-     End of applet (command : 0 --- status : 0)
-- DataFlash AT45 ISP applet 1.1 Apr 19 2016 10:09:44 --
-I- INIT command: Dataflash 0 : SPI 0x0 SPI_NPCS 0x0 (0x20000014)
-I-     SPI NCSR 0x11a0a02
-I-     SPI and AT45 drivers initialized
-I-     AT45DB641E numPages : 8000 pageSize : 108 bufferAddr : 0x20002b58
-I-     End of applet (command : 0 --- status : 0)
-I- UNLOCK command
-I-     End of applet (command : 5 --- status : 0)
-I- WRITE at offset: 0x0 buffer at : 0x20002b58 of: 0x4208 Bytes
-I- WRITE return byte written : 0x4208 Bytes
-I-     End of applet (command : 2 --- status : 0)
My problem is that I don't have a clue what could be wrong.

My setup:
------------------------------------------------------------------------------------------------
- Target connected to the PC using a Segger J-Link interface connected to a USB port
- SAM-BA 2.7
- The applets seem to be from SAM-BA 2.8 (judging from what the Extram Applet reports and the directory name in my code repository where the Dataflash applet source code is located)
- The source code repository does not have the source code for the Extram applet, so I got that from the internet for SAM-BA 2.8 and from the installed SAM-BA 2.7, but both don't work
- I am running on Windows 7
- I use Cygwin for compilation
- I have tried 2 compilers sofar:
  • - Sourcery CodeBench Lite for ARM EABI [(Sourcery CodeBench Lite 2011.09-69) 4.6.1]
    - The GNU GCC compiler from the Atmel web-site (Atmel build: 475) 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 224288]
What I have tried so far is:
- Use different compilers
- Change the applet so that it does not do anything but set the pMailbos->status to APPLET_FAIL and then return. I had hoped this would show an error in the console, but this still hangs the SAM-BA application. Which t me indicates that there is a problem in the code that is running before the main of the applet is running, but this should be the same as for the Dataflash applet, which is working.

Is there anyone that can point me towards the problem or has any tips on how I could find the problem ?
This is the first time that I am using SAM-BA and its applets, so I am a novice in this field.

Kind regards,
Han

Return to “AT91-ISP”

Who is online

Users browsing this forum: No registered users and 1 guest