When loading code via ULINK USB (not burning the flash) the load takes approx 5 minutes for a 300K file. What does the LOAD command do and why does it take so long when we are not burning the FLASH?
What ULINK does when a debug session is started depends on the settings in the Target Driver Setup dialog (Options for Target - Debug - Settings). When Verify Application in ROM is selected, the complete ROM content is read back from the target system and compared against the application in the uVision project. This takes some time but ensures that the application matches the ROM content. When Download Application into RAM is selected, the application is downloaded into RAM which again takes time. Please check that the 'ULINK Driver for XC16x' (UL2OCDS.dll) is selected and not the old 'OCDS Driver for XC16x' (OCDSXC.dll).
We have already tried all that but it still takes 5 minutes for the debugger to connect. One thing we did notice is that if we remove the debug information from the file, it loads in about 3 seconds. We do have symbols loaded then, but of course there is no source code debugging available in this state.
I have never seen something like this before. Can you please send your application to support.intl@keil.com to my attention so that I can duplicate this problem. I need at least the linker output file (usually project name without extension) + uVision project files *.UV2 + *.OPT.
Before we investigate: what version are you using? Are you using the current revision or an older version? Reinhard
uVision 3.30a Compiler Version 6.04 Linker 5.21 Debugger ????
Thanks for the files, now I know what is going on. Since your application is already in flash and you have switched off the option 'Verify Application in ROM', the debugger load the application almost instantly. You see the load-progress-bar only one or two seconds. After that, the uVision target debugger needs to analyze the code to find ATOMIC and EXTx instructions. Therefore the complete code needs to be read. Since you have disabled all cache options in the Target Driver Setup dialog, the code needs to be read from the target system. This is where time is wasted. Please enable at least the option 'Ignore Code Modifications'. With this option set, the debugger starts in two seconds. As long as there is no good reason, I would enable all cache options.
Thank you Hans. I will give this a try and post back the results.
OK, I turned on the caching and the debugger now connects in about 1 second instead of 5 minutes! Thanks for the help.