I'm trying to flash a file (previous version compiled file) to a K70 (Tower board) from within CW 10.4. without going through the debugger.
I select Flash File to Target (from popup menu), it automatically provides the Flash Config File (K70FN1M0.xml), I browse to file to flash, and then select Erase and Program.
I receive a Target Task Error dialog box that says
Error executing task K70FN1M0.xml, Wrong expression ${MQX_ROOT_DIR}/lib/(etc)/init_kinetis_tcl; Could not expand variable MQX_ROOT_DIR.
But MQX_ROOT_DIR is already defined in Linked Resources and used for many compiler and linker search paths. And programming through Debug or Run works fine.
What's the problem? Is there somewhere else I need to define MQX_ROOT_DIR?
Solved! Go to Solution.
Thanks for sending me the example project. Flash File To Target worked from your project. Having a project that worked showed the problem. I had defined a New Connection (in the Flash File To Target dialog window) and that somehow caused the MQX_ROOT_DIR error. I reset the connection to a previous connection and it works now from my project.
I don't understand why creating a New Connection caused the error. I defined it the same way as a connection that works. But too little about CodeWarrior Eclipse makes sense to me after using CodeWarrior (classic) for 6-7 years. I suppose it's just a learning curve, but it is a painful learning curve that's killing my productivity.
Hello,
does the macro is defined in the project used ?
Pascal
I'm not sure exactly what you are asking. The macro is defined in the project I'm using, and was defined in the project that created the compiled files. The projects compile fine and those files can be flashed using the Debug command, so the macro has to be defined correctly.
I'm trying to flash an earlier version of the code (for comparison purposes) that I saved. The Flash File to Target (from the popup menu), apparently can't use the same macro to find the init_kinetis_tcl file when executing K70FN1M0.xml. Is there another place the macro has to be defined for that process? In other words, how do you flash a file that you created previously that isn't the current version of your project?
I've a TWR-K70F120M board.
I've create a project via Project wizard for MQX for this board.
After to have rebuild the MQX lib under my MCU V10.4, I've build the project created.
I can load it via the debugger and create a Flash File to Target and it's running fine.
Extract of console:
++++++++++++++++++++++++++++++++++++++
fl::target -lc "LC for Simple Flash"
fl::target -b 0x1fff0000 0x20000
fl::target -v off -l off
cmdwin::fl::device -d "FTFE_PFlash1M0" -o "128Kx64x1" -a 0x0 0xfffff
cmdwin::fl::image -f "C:\\Temp\\Community\\307595\\MCU V10.4\\test_mqx_k70\\twrk70f120m_Int_Flash_DDRData_Debug\\test_mqx_k70.afx" -t "Auto Detect" -re on -r 0x0 0xfffff -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 0x00000FFF
Erasing Sector 0x00001000 to 0x00001FFF
Erasing Sector 0x00002000 to 0x00002FFF
Erasing Sector 0x00003000 to 0x00003FFF
Erasing Sector 0x00004000 to 0x00004FFF
Erasing Sector 0x00005000 to 0x00005FFF
Erasing Sector 0x00006000 to 0x00006FFF
Erasing Sector 0x00007000 to 0x00007FFF
Erasing Sector 0x00008000 to 0x00008FFF
Erasing Sector 0x00009000 to 0x00009FFF
Erasing Sector 0x0000A000 to 0x0000AFFF
Erasing Sector 0x0000B000 to 0x0000BFFF
Erasing Sector 0x0000C000 to 0x0000CFFF
Erasing Sector 0x0000D000 to 0x0000DFFF
Erasing ...
Erase Command Succeeded
cmdwin::fl::write
Beginning Operation ...
-------------------------
Using restricted address range 0x00000000 to 0x000FFFFF
Programming file C:\Temp\Community\307595\MCU V10.4\test_mqx_k70\twrk70f120m_Int_Flash_DDRData_Debug\test_mqx_k70.afx
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 0x00000410 bytes to be programmed at 0x00000000
Executing program ....
Program Command Succeeded
Downloading 0x0000D8BC bytes to be programmed at 0x00000420
Executing program ....
Program Command Succeeded
+++++++++++++++++++++++++++++++++
Attached you will find the project I'm using.
Regards
Pascal
Thanks for sending me the example project. Flash File To Target worked from your project. Having a project that worked showed the problem. I had defined a New Connection (in the Flash File To Target dialog window) and that somehow caused the MQX_ROOT_DIR error. I reset the connection to a previous connection and it works now from my project.
I don't understand why creating a New Connection caused the error. I defined it the same way as a connection that works. But too little about CodeWarrior Eclipse makes sense to me after using CodeWarrior (classic) for 6-7 years. I suppose it's just a learning curve, but it is a painful learning curve that's killing my productivity.