AnsweredAssumed Answered

MK20DX256VLL7 with Codewarrios Flash issue

Question asked by felixgottwald on Aug 10, 2017
Latest reply on Aug 11, 2017 by Alice_Yang

Hi,

I`am using MK20DX256VLL7 with J-Link Edu and Codewarrior 10.7.

Debugging works fine but if I try to flash the device, get the output shown below.

I´ve tried all proposed solution from other tickets, without success.

For me, two things in the output of the flash tool are confusing. Why it says that the hex file is of 0 Byte size. This is not true. The debugging session also uses this file, successfully.

The second thing is about the resticted memory area. In this adress range, the controller has some NMI stuff in use but NMI is disabled in ProcessorExpert.

If I try to flash the elf-File with SEGGER Tools results in exactly the same behaviour. It seems like the code memory is allocated to RAM but in  the build options everthing is linked to internal flash.

I´ve no idea, what do, to get the programmer running with this controller. And would be very greatful for your help.

Thank you and regards

 

 

Output of Flash tool:

 

fl::target -lc "LC for Simple Flash"
fl::target -b 0x20000000 0x8000
fl::target -v off -l off
cmdwin::fl::device -d "FTFL_PFlash256" -o "64Kx32x1" -a 0x0 0x3ffff
cmdwin::fl::image -f "C:\\Users\\Administrator\\workspace\\test\\FLASH\\test.elf" -t "Auto Detect" -re on -r 0x0 0x3ffff -oe off
cmdwin::fl::erase image
 Beginning Operation ...    
-------------------------
Auto-detection is successful.   
  File is of type Elf Format.   
 
Performing target initialization ...    
 Downloading Flash Device Driver ...   
 Reading flash ID ...
Erasing Sector 0x00000000 to 0x000007FF   
Erasing Sector 0x00000800 to 0x00000FFF   
Erasing Sector 0x00001000 to 0x000017FF   
Erasing Sector 0x00001800 to 0x00001FFF   
Erasing Sector 0x00002000 to 0x000027FF   
Erasing Sector 0x00002800 to 0x00002FFF   
Erasing Sector 0x00003000 to 0x000037FF   
Erasing Sector 0x00003800 to 0x00003FFF   
Erasing Sector 0x00004000 to 0x000047FF   
Erasing Sector 0x00004800 to 0x00004FFF   
Erasing Sector 0x00005000 to 0x000057FF   
Erasing Sector 0x00005800 to 0x00005FFF   
 Erasing ...
 Erase Command Succeeded    
cmdwin::fl::write
-------------------------
Using restricted address range 0x00000000 to 0x0003FFFF   
Programming file C:\Users\Administrator\workspace\test\FLASH\test.elf   
Auto-detection is successful.   
  File is of type Elf Format.   
 
 Downloading Flash Device Driver ...   
 Reading flash ID ...
Auto-detection is successful.   
  File is of type Elf Format.   
 
Downloading 0x000001BC bytes to be programmed at 0x00000000   
Executing program ....   
 Program Command Succeeded    
Downloading 0x00005BD0 bytes to be programmed at 0x00000410   
Executing program ....   
 Program Command Succeeded    
cmdwin::fl::device -d "FTFL_DFlash32S1" -o "8Kx32x1" -a 0x10000000 0x10007fff
cmdwin::fl::image -f "C:\\Users\\Administrator\\workspace\\test\\FLASH\\test.elf" -t "Auto Detect" -re on -r 0x10000000 0x10007fff -oe off
cmdwin::fl::erase image
-------------------------
Auto-detection is successful.   
  File is of type Elf Format.   
 
Image size is 0 bytes, nothing to erase.   
Nothing to erase.  No sectors selected
Erase Command Succeeded.   
cmdwin::fl::write
-------------------------
Using restricted address range 0x10000000 to 0x10007FFF   
Programming file C:\Users\Administrator\workspace\test\FLASH\test.elf   
Auto-detection is successful.   
  File is of type Elf Format.   
 
 0 Bytes Programmed, Check Restricted Address Range   
Program Command Succeeded   

Outcomes