jon_newcomb wrote on Tuesday, March 10, 2009:
Hi all, My setup is as follows:
Processor: AT91SAM7S
Compiler: IAR Electronics Workbench V5.30
Debugger: Jlink (using jlinkARM.dll supplied in IAR bin directory)
FreeRTOS: 5.1.2 (rtosdemo.eww project)
Has anyone ran into ‘flash download problems’ with this setup when running rtosdemo.eww
The project compiles fine, but just before downloading to flash the following message box appears…
" The debugging session could not be started.
Either the debugger initalization failed, or else the file “C:\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\Flash Bin\Exe\rtosdemo.out” was corrupt or of an unsupported format. "
…
The process finishes with the following text in the debug log…
Tue Mar 10 16:05:19 2009: Loaded macro file: C:\Program Files\IAR Systems\Embedded Workbench 5.4\arm\config\flashloader\ATMEL\resources\FlashAT91SAM7Sxx.mac
Tue Mar 10 16:05:23 2009: DLL version: V4.2|, compiled Jan 13 2009 20:12:45
Tue Mar 10 16:05:23 2009: Firmware: J-Link compiled Jul 30 2008 11:24:37 ARM Rev.5
Tue Mar 10 16:05:23 2009: JTAG speed is initially set to: 32 kHz
Tue Mar 10 16:05:23 2009: Initial reset was performed
Tue Mar 10 16:05:23 2009: TotalIRLen = 4, IRPrint = 0x01
Tue Mar 10 16:05:23 2009: J-Link found 1 JTAG device(s). ARM core Id: 3F0F0F0F ARM7
Tue Mar 10 16:05:23 2009: Device at TAP0 selected
Tue Mar 10 16:05:23 2009: JLINK command: ProjectFile = C:\Firmware\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\settings\rtosdemo_Flash Bin.jlink, return = 0
Tue Mar 10 16:05:23 2009: JLINK command: device = AT91SAM7S64, return = 0
Tue Mar 10 16:05:23 2009: ---------------------------------------- FLASH Download V1.3
Tue Mar 10 16:05:23 2009: ---------------------------------------- 14/November/2005
Tue Mar 10 16:05:23 2009: TotalIRLen = 4, IRPrint = 0x01
Tue Mar 10 16:05:23 2009: ---------------------------------------- PLL Enable
Tue Mar 10 16:05:23 2009: -------------------------------Set CPSR ----------------------------------
Tue Mar 10 16:05:23 2009: CPSR 000000D3
Tue Mar 10 16:05:24 2009: ---------------------------------------- PLL Enable
Tue Mar 10 16:05:24 2009: ------------------------------- The Remap is done ----------------------------------------
Tue Mar 10 16:05:24 2009: ---------------------------------------- Chip ID 0x270D0940
Tue Mar 10 16:05:24 2009: ---------------------------------------- Extention 0x00000000
Tue Mar 10 16:05:24 2009: ---------------------------------------- Flash Version 0x00000112
Tue Mar 10 16:05:24 2009: -------------------------------Set PC ----------------------------------------
Tue Mar 10 16:05:24 2009: RTCK is not connected
Tue Mar 10 16:05:24 2009: Auto JTAG speed: 8000 kHz
Tue Mar 10 16:05:25 2009: 5632 bytes downloaded and verified (9.77 Kbytes/sec)
Tue Mar 10 16:05:25 2009: Loaded debugee: C:\Program Files\IAR Systems\Embedded Workbench 5.4\arm\config\flashloader\ATMEL\AT91SAM7S64-EK\internalflash-sam7s64.out
Tue Mar 10 16:05:25 2009: Target reset
Tue Mar 10 16:05:25 2009: The flash loader program reported an error.
BTW, this is a fresh install of IAR EW 5.30 and unmodified rtosdemo.eww demo.
My guess is you have the same problem with the KS version.
(Aside… Why it defaults to 5.4 for the install directory, only IAR will know!?!..)
Whats really odd, is that we have one (precious) RDI licence for the JLINK, and it downloads to flash fine (after project options are modified to use the RDI DLL) Here is the output from the debug log:
Tue Mar 10 17:09:41 2009: Loaded macro file: C:\Firmware\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\resource\SAM7.mac
Tue Mar 10 17:09:42 2009: Sign on message from :
Segger JLink ARM JTAG
Tue Mar 10 17:09:42 2009: ------------------------------- The Remap is NOT -----------------------------------------
Tue Mar 10 17:09:42 2009: ---------------------------------------- Chip ID 0x270D0940
Tue Mar 10 17:09:42 2009: ---------------------------------------- Extention 0x00000000
Tue Mar 10 17:09:42 2009: ------------------------------- AIC INIT ---------------------------------------------
Tue Mar 10 17:09:42 2009: ------------------------------- Watchdog Disable ----------------------------------------
Tue Mar 10 17:09:42 2009: 13792 bytes downloaded (20.04 Kbytes/sec)
Tue Mar 10 17:09:42 2009: Loaded debugee: C:\Firmware\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\Flash_Debug\Exe\rtosdemo.out
Tue Mar 10 17:09:43 2009: Target reset
Tue Mar 10 17:09:43 2009: -------------------------------Set PC ----------------------------------------
(After this the debugger waits at main for you to hit the ‘Go’ button… and all works well)
So, anyone solved this for JLink then please post solution here… Thanks in advance. Jon.