Programming LPCXpresso54018 board produces "The flash loader program reported an error" in IAR

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Programming LPCXpresso54018 board produces "The flash loader program reported an error" in IAR

904 Views
viveksrinivasan
Contributor I

Hi Guys,

I recently had a chance to experiment with the LPCXpresso54018 board. I was just trying out different example codes that came with the SDK "SDK_2.3.0_LPCXpresso54018"(mainly the UART examples) using IAR. It was working fine for a day and then the next day after few download and debugging, suddenly this error popped up and not able to program the board after many retries.IAR error.jpg

I tried few things to debug this issue:

1. We have another spare LPCXpresso54018 board which produces the same error when trying to program the board at the very first attempt.

2. I tried to program this board on a different PC but the same error shows up.     

3. Tried powering the board directly from the PC instead of a USB hub.   

4. Tried reprogramming the LPC-Link2 to use J-Link instead of CMSIS-DAP using the LPCScrypt installation

5. Tried forcing the board into an ISP boot mode by holding down ISP2 or ISP1 and pressing and releasing the reset button(I'm not sure what is supposed to happen by doing this but did it anyway)

 

At this stage, I’m not sure what could be the cause of this error since none of the above steps helped. I have attached the IAR debug log for your reference. I don't think that both the boards are doomed since I was just trying out the example codes from the SDK. Could you please help me identify the cause of this error?

 

Thanks for your help!

Cheers,

Vivek

Labels (2)
0 Kudos
4 Replies

641 Views
viveksrinivasan
Contributor I

Hi kerryzhou‌, bernhardfink‌,

Thanks a lot for your quick response. But unfortunately I'm still having the same issue with IAR.

kerryzhou‌ - I am using the .mac file from the SDK. But still IAR refers to the .mac file from the IAR installation folder. So I copied the .mac file from the SDK to IAR installation folder but still the same error.

bernhardfink‌ - I tried your suggestion but still the same error.

One good news is that I was able to program the board using keil mdk with some examples(that does not use external flash XIP) from the SDK. This confirms that the board is working properly. I use J-link instead of CMSIS-DAP which is the only change that I make in the examples. I programmed LPC-Link2 with the J-Link binary Firmware_JLink_LPCXpressoV2.bin downloaded from the SEGGER website. But even with keil, I'm not able to program the examples that uses the external flash XIP such as (hello_world_qspi_xip, utick_wakeup_xip) using J-Link.  I get the following error.

                                                            mdk_jlink_error.png

                                 jlink_log.png

I'm not sure what I'm doing wrong and why the example programs are not working. Any suggestions would be very helpful.

Cheers,

Vivek

0 Kudos

641 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Vivek,

   Please also check your project mac file.

   From your error log, your problem is caused by the macro file:

pastedImage_2.png

Please use the SDK project attached mac file, like the following picture, you can select the setup macros:

pastedImage_1.png

Wish it helps you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

641 Views
bernhardfink
NXP Employee
NXP Employee

There is always the risk that software blocks somehow the programming algorithm.

Think about the execution order:

1. You do a reset --> user software in flash starts running --> could block access

2. You do a reset with the ISP buttons held (you enforce ISP mode, so user software from flash will not start) --> debugger does a reset over the debug channel --> device starts over and again starts user software from flash --> could block access

Try it this way:  keep the ISP buttons pressed while starting the programming out of IAR EWARM. This would force the chip to stay in the bootloader also when the debugger initiates a reset.

0 Kudos

642 Views
viveksrinivasan
Contributor I

Also I'm using IAR version 8.20.2.14838 which I think supports this MCU.

0 Kudos