LPC804 I2C SBL Testing

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

LPC804 I2C SBL Testing

2,509 Views
arafathyasar24
Contributor II

Hi,

We are evaluating the I2C SBL with MCUXpresso IDE. For that lpc804_i2c_sbl_app.bin is flashed using GUI Flash tool in SWD mode.

After that from the project properties -> C/C++ Build Settings/ MCU Settings, memory details what to configure as per AN12373 document? As per AN12373 document it is telling about Keil IDE only.

The current configuration in MCUXpresso IDE is as follows.

arafathyasar24_0-1651063694594.png

Tried changing the PROGRAM_FLASH location from 0x0 to 0x2000 and Size 0x7f80 to 0x5f80, which is not working.

As the SBL is sitting in 0x0 to 0x2000, do we need to tell that one also here?

Kindly help us in right setting for enabling the same.

Thanks & Regards,

Yasar Arafath

Tags (2)
0 Kudos
Reply
7 Replies

2,442 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

Also pay attention do not use printf to print to console. 

0 Kudos
Reply

2,435 Views
arafathyasar24
Contributor II

Hi Alice,

The LED_Blinky doesn't use any printf in the example SDK

Thanks & Regards,

Yasar Arafath

0 Kudos
Reply

2,492 Views
arafathyasar24
Contributor II

Hi Alice,

As per AN12373 doc, lpc804_i2c_sbl.bin has to sit on 0x0. 

Procedure followed to test generated binary with PROGRAM_FLASH location 0x2000

  • Mass erased the chip
  • Reset the board
  • Flashed “lpc804_i2c_sbl.bin” at 0x0 with MCUXpresso IDE’s GUI Flash Tool
  • Reset the board
  • Flashed the below modified and built binary at 0x2000 with MCUXpresso IDE’s GUI Flash Tool
  • Reset the board

Thanks & Regards,

Yasar Arafath

0 Kudos
Reply

2,477 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

First you need confirm your application code work well by default( start from 0x0 address).

Then change PROGRAM_FLASH  start from 0x2000, also pay attention flash size.

You said not work, do you mean application code do not work? You can try just run your application project with offsite 0x2000, check whether it can work well, refer to:   

https://community.nxp.com/t5/LPC-Microcontrollers/Lpc845-app-code-can-t-debug-after-bootloader/m-p/8...   

"With regards to "MCUXpresso IDE can't debug application with start address from 0x3000", after programming flash, the IDE will by default reset the device - which causes the ROM bootrom code to run and call into a"valid image" in flash at 0x0. Thus if you have no valid image in flash at 0x0 this is not going to work.

One allow you to debug your application at 0x3000 via a LinkServer / CMSIS-DAP debug connection (assuming you have your boot loader or a "dummy application" at address 0x0) would probably be to change the way that the IDE resets the target after programming flash. To do this, edit the launch configuration (by double clicking on the .launch file that will have been created in your project) and change the "reset handling" option to "SOFT". "

0 Kudos
Reply

2,428 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

Have you try other test I mentioned last time, what about result?

0 Kudos
Reply

2,449 Views
arafathyasar24
Contributor II

Hi Alice,

The application works fine from default address 0x0 and it is the same LED_Blinky example from MCUXpresso SDK.

Thanks & Regards,

Yasar Arafath

0 Kudos
Reply

2,494 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

"Tried changing the PROGRAM_FLASH location from 0x0 to 0x2000 and Size 0x7f80 to 0x5f80, which is not working."

->> Do you meaning change the memory of your application project? 

How do you know it not work? 

Does the application project an work well by default, without secondary bootloader?

You'd better show your detail steps by picture or video,thanks.

 

BR

Alice

0 Kudos
Reply