Hello,
I'm really stuck trying to flash my build into the MCU. I'm using CW 10.6 with the TWR-K20D72M and on-board OSBDM. Whichever way I use to flash the file to the target this is the result:
"0 Bytes Programmed, Check Restricted Address Range
Program Command Succeeded"
I've looked at similar problems here in the community but nothing I do seems to make a difference.
The only way to at least have the MCU responding is to go into a debug session using the FLASH build. As long as I don't cycle power or push RESET the MCU runs the program properly. After that: nothing.
Please help me and please let me know what information you need to help me solve this.
Thanks,
Christean
Hello Christean:
What is the status of your issue?
Try to perform a mass erase to your device. Go to Run -> Debug Configurations, select your OSJTAG connection and in "Target Settings" click on "Edit". Then in the window that appears mark the box for "Always mass erase on connect" (check the picture below). Then run the debugger with this connection. This should mass erase your device before programming. After that, try again with the flash programmer.
I hope this helps.
Regards!,
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Jorge,
Thanks for your reply. My problem is as of yet unresolved.
I followed the steps you mentioned and made sure that "mass erase on connect" was marked. Unfortunately the result remains the same: "0 bytes programmed". See below for full console output.
Let me know if you require more information from me and what kind.
Kind regards,
Christean
Console output:
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 "E:\\IDE\\Freescale\\Workspace\\MK20D72M_Drivers\\FLASH\\MK20D72M_Drivers.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 ...
failed on register write: ETF_FCR
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 ...
Erase Command Succeeded
cmdwin::fl::write
-------------------------
Using restricted address range 0x00000000 to 0x0003FFFF
Programming file E:\IDE\Freescale\Workspace\MK20D72M_Drivers\FLASH\MK20D72M_Drivers.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 0x00001DF0 bytes to be programmed at 0x00000800
Executing program ....
Program Command Succeeded
cmdwin::fl::device -d "FTFL_DFlash32S1" -o "8Kx32x1" -a 0x10000000 0x10007fff
cmdwin::fl::image -f "E:\\IDE\\Freescale\\Workspace\\MK20D72M_Drivers\\FLASH\\MK20D72M_Drivers.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
Beginning Operation ...
Using restricted address range 0x10000000 to 0x10007FFF
Programming file E:\IDE\Freescale\Workspace\MK20D72M_Drivers\FLASH\MK20D72M_Drivers.elf
Auto-detection is successful.
File is of type Elf Format.
0 Bytes Programmed, Check Restricted Address Range
Program Command Succeeded
I'm having the same problem.
Did you find a solution?
edit:
Solved the problem: My default memeory sements were set to Internal_RAM, should of cause be _FLASH