Hi All
We are using K60F128M CPU with external SRAM interfaced at address 0x60000000.
SRAM is working properly and I am able to store and retrieve values from the program.
But when trying to see the values loaded on SRAM in the memory view of debugger, it just shows "?????".
Then, I modified the memory configuration file(.mem) as below to match our setup.
After that when I try to start debugging its getting timed out saying "Debugger has lost connection to the target".
Any idea about how to solve this ?
// All reserved ranges read back 0xBABA...
reservedchar 0xBA
usederivative "MK60F15"
// Memory Map:
// ----------------------------------------------------------------------
range 0x00000000 0x000FFFFF 4 ReadWrite // 1024KB Code Flash
reserved 0x00100000 0x13FFFFFF
range 0x14000000 0x14003FFF 4 ReadWrite // 16KB Programming accelleration RAM
reserved 0x14004000 0x1FFEFFFF
range 0x1FFF0000 0x1FFFFFFF 4 ReadWrite // 64KB On chip SRAM (TCML)
range 0x20000000 0x2000FFFF 4 ReadWrite // 64KB On chip SRAM (TCMU)
reserved 0x20010000 0x21FFFFFF
range 0x22000000 0x221FFFFF 4 ReadWrite // Aliased to TCMU SRAM bitband
reserved 0x22200000 0x3FFFFFFF
range 0x60000000 0x6001FFFF 4 ReadWrite // Flexbus for external memory
reserved 0x60020000 0xDFFFFFFF // Flexbus for external memory
reserved 0xE0100000 0xFFFFFFFF
Solved! Go to Solution.
My PC was running XP and it was very slow while debugging. So I had to format and re-install the PC with Windows 7.
Now when I setup everything afresh, Ext.SRAM watch works as expected in my debug setup also.
Still the reason why it was not working is unknown, but its OK for the time being.
Thanks,
Renjith
Hello Renjith:
I guess this is because the Flex Bus is not configured yet when launching the debug session, so when the debugger attempts to read those addresses, it crashes.
In case this is the problem I attached a script which contains Flex Bus initialization code. Go to Run -> Debug Configurations -> (Select your connection) -> Edit -> Edit (again), and in the "Initialization" tab point to this script file. Check below:
With this the debugger should be able to 'see' the external memory without hanging.
Regards!,
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Jorge
Thanks for this input.
Flex Bus was not initialized in the tcl file as you guessed. But even after using your tcl file, debugger connection is losing same as before.
But when I tried my same .mem configuration file in another PC and HW board, it worked even without Flex Bus initialization in tcl file.
It worked on the first run as expected and I could view the contents of Ext.SRAM variables.
Does this hints help some how ? What could be the reason that it is not working in my debug setup?
Thanks,
Renjith
Hi,
It need to modify mem file to enable Flexbus related access memory range, such as below setting:
range | 0x60000000 0x6FFFFFFF 4 ReadWrite | // Flexbus for external memory |
reserved 0x70000000 0xDFFFFFFF
After that, it could see related memory contents with CodeWarrior software.
Wish it helps.
best regards
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Hui
As I mentioned in my original question I have done the necessary modifications to the .mem file. After that .mem file change only my debugger seems to be crashing and connection loss to it happens.
Regards
Renjith
Hi,
If you are using CodeWarrior provided Flexbus example code? The example code located at C:\Freescale\CW MCU v10.6\MCU\CodeWarrior_Examples\Kinetis_Examples\k40\flexbus folder.
Wish it helps.
best regards
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
My PC was running XP and it was very slow while debugging. So I had to format and re-install the PC with Windows 7.
Now when I setup everything afresh, Ext.SRAM watch works as expected in my debug setup also.
Still the reason why it was not working is unknown, but its OK for the time being.
Thanks,
Renjith