This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Adding a printf statements causes a failure in flash download

I am using the uVision 3 (demo) with the ULINK debug module on a board which uses the Infineon XC167 microcontroller. We have an external flash as well.
I have a small program that increments a value and then uses a printf statement to send it to the serial port. This can then be viewed in hyperterminal.
The problem is if I set the board and the flash download utilities to use internal flash memory (on the XC167), the program runs fine. If I change the settings on the board and flash utilities (and other register setups of course) to use external flash, the error message "Error: Flash Download Failed" appears when I try to load the target. Remove the printf statement and everything works fine in external flash. The same is true for the putchar routine (printf uses this).
I've checked the generated code size and as far as I can tell we are under the 4K demo limit.

This doesn't make any sense to me. It shouldn't make any difference where the code resides. Has anyone seen this?

Thanks in advance.

-Les

0