MCUBOOT

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

MCUBOOT

1,094 Views
LArmstrong1985
Contributor III
Hi,
I follow this guide (https://www.nxp.com/docs/en/user-guide/MBOOTDEMOUG.pdf) to try MBCUBOOT bootloader. The bootloader seems to work and respond to commands
in fact I'm be able to upload the led_demo_freedom_a000.bin but after upload the application not start and the led not change color.
What can it depend on?
How can i debug the bootloader?
If I launch the bootloader application in debug after application upload I think I erase all, also the led_demo application.
I also saw that there are "debug_printf" instructions but they don't seem to be enabled ...
Thank you in advance
Tags (1)
0 Kudos
3 Replies

911 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

If you keep the program default, the bootloader will start application after 5 second. The MCUxpresso or other IDE can debug bootloader directly. The FRDM-K64F has on board debugger. When you download bootloader with MCUXpresso, IDE will only erase used space. It will not erase all.

I guess your problem is the bootloader bin file is too big. If you compile in debug mode, it will over 0xd000. If you compile in release mode, it will over 0xb000. Please disable unused interface in bootloader_config.h. Make sure the bootloader bin file small than 0xa000.

Regards,

Jing

0 Kudos

911 Views
LArmstrong1985
Contributor III

Hi Jing,

I followed your instructions.

The application still didn't start but I understood why.

The bootloader correctly recognizes the presence of the application

(is_application_ready_for_executing() return true)

but configurationData->peripheralDetectionTimeoutMs is equal to 0xFFFF

than it not wait timeout but check directly

bootloader peripherals.

If I remove is_direct_boot() check or I manually modify

configurationData->peripheralDetectionTimeoutMs

it works correctly.

I looked that this configurationData resides on flash address

0x3c0-0x3ff. But how I can modify this data structure?

Another question if you can explain me better. Which operation I have to

do for move my application on address 0xa000?

Should I change only the linker file (.ld)?

If you give me instruction for a simple application like

frdmk64f_hello_world it would help me a lot.

Thank you very much!

Fabio

Il 28/01/2020 09:38, jingpan ha scritto:

>

NXP Community

<https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg>

>

Re: MCUBOOT

reply from Jing Pan

<https://community.nxp.com/people/jingpan?et=watches.email.thread> in

/MCU Bootloader/ - View the full discussion

<https://community.nxp.com/message/1260832?commentID=1260832&et=watches.email.thread#comment-1260832>

>

0 Kudos

911 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

There is an application demo in \boards\frdmk64f\bootloader_examples\demo_apps\led_demo_freedom_a000. You project can base on it. The BCA is in application's binary code. So, its absolute address is 0xa3c0. But you needn't care about it. Please see the startup_MK64F12.s in the demo application. If you enable it, it will be complied into that address automatically.

Regards,

Jing

0 Kudos