Hello,
I'm working with µVision now. I have created a project and I want to load it on my evaluation board MCB4300 (LPC4350). If I click on "Build" I see "0 Error(s), 0 Warning(s)", but if I click on "Load" I get the following error message --> Error: Flash Download failed - "Cortex-M4".
In "Target Options" I completed:
Device: LPC4350-Cortex-M4 Utilities: Settings -> Flash Download -> Add -> LPC18xx/43xx S25FL032 SPIFI Utilities: Settings -> Debug -> Download Options -> Download to Flash (yes)
Where is the problem? I hope anyone can help me.
And I also get the error message in Build Output: No Algorithm found for: 00000000H - 00002333H Erase skipped!
May be you need to add a flash algorithm for the internal flash, because the 0-0x2333 doesn't sound like it's an external SPI flash
The LPC4357 has two flash algorithms for the IAP 512KB banks at 0x1A000000 and 0x1B000000
Make sure the Target pane has IROM1 selected as one of those ranges, and not zero.
Review the example projects for the Keil MCB4300 board, uv4.7x has at least half a dozen of them.
I added the following informations in the target options form MCB4300 - LPC4350:
Target Options:
Device: LPC4350 -> LPC4350: Cortex-M4
Target: IROM1: 0x1A000000 (Start) and 0x80000 (Size) (tick) IROM2: 0x1B000000 (Start) and 0x80000 (Size) IRAM1: 0x10000000 (Start) and 0x20000 (Size) (tick) IRAM2: 0x20000000 (Start) and 0x10000 (Size) Operating System: None
I can only add the following:
Utilities: Settings -> Flash Download -> Programming Algorithm -> Add
- LPC18xx/43xx S25FL032 SPIFI 4M (Flash Size) Ext. Flash SPI (Device Type) MDK Core (Origin - RC28F640J3x Dual Flash 16M Ext. Flash 32-bit MDK Core - S29GL064N Dual Flash 16M Ext. Flash 32-bit MDK Core
LPC18xx/43xx S25FL032 SPIFI Start: 0x14000000 Size: 0x00400000 RC28F640J3x Dual Flash Start: 0x00000000 Size: 0x01000000 S29GL064N Dual Flash Start: 0x1C000000 Size: 0x01000000
Utilities: Settings -> Flash Download -> RAM for Algorithm: 0x10000000 (Start), 0x1000 (Size)
I added LPC18xx/43xx S25FL032 SPIFI.
But it doesn't works. I get always the error message: "Error: Flash Download failed - "Cortex-M4""
And is that accompanied by any other errors/warnings in the transaction log, that might suggest why it failed?
No, there are no other errors or warnings.
Now I set the jumpers to SPIFI but nothing happened. The MCB4350 (LPC4350) has no internal flash, so must I configure in a other way. I'm working more than two days with this problem, and I can't load my program to MCB4350.
The examples for MCB4300 is only for LPC4357 and not for LPC4350, otherwise I will use them.
If I choose:
S29GL064N Dual Flash 16M Ext. Flash 32-bit MDK Core
I get the following error message:
Flash Timeout. Reset the Target and try it again.
and after that:
Error: Flash Download failed - "Cortex-M4"
The MCB4300 (LPC4350) has no internal flash, so I have to load my program in the RAM or external flash. S29GL064N is my external flash. So why I get this error messages now?
Maybe the reason is the configuration of the JTAG/SW port clock. Please configure it to 1MHz or higher. With slower clock speeds, the flash algorithms may time-out as the data are not delivered fast enough.
I also encountered this problem for my application for another uC. I solved like below;
In target options, select "Utilities", select your debugger and click "Settings", There are Cortex-M Target Deriver Setup menu. select "Flash Download" tab, there are a "Add" button. please add your Chip's Programming Algorithm.
Thanks @Mehmet Aydogan, it works.