How to run evkmimxrt1060_lwip_httpssrv_ota_freertos?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to run evkmimxrt1060_lwip_httpssrv_ota_freertos?

5,606 次查看
felix1
Contributor IV

I want to add OTA function to my application, so I test the SDK sample evkmimxrt1060_lwip_httpssrv_ota_freertos, but fail to run. How to fix it?

my steps are:

SW7 setting: 0010

1) program evkmimxrt1060_ota_bootloader (using default address 0x60000000)

2) program evkmimxrt1060_lwip_httpssrv_ota_freertos (using default address 0x60040000)

3) press SW4 to reset

I can not connect EVK using browser, and the EVK RJ45 connector LED is not flash. I guess the application not run.

标签 (1)
0 项奖励
38 回复数

2,712 次查看
ping1
Contributor V

Thanks for the posts, just wonder whether this works for RT1024? Can I just modify the processor and run it on EVK_RT1024?

Ping

0 项奖励

2,946 次查看
rob4
Contributor II

It works! Thank you.

Steps 1-3 (load both executables but don't run, then press  the reset button to execute both programs) were the missing ingredients.

From reading the docs, I never would have guessed that sequence of steps.

0 项奖励

2,946 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Rob Yu,

   Thanks for your updated information. I am glad to hear you also make it works.

   In fact, the lwip_httpssrv_ota project readme.txt mentioned it:

Prepare the Demo
================
Prior launching the demo it is recommended to pre-build modified version of the application in .bin format to test the OTA update process.
It is also required to have ota_bootloder programmed to the FLASH memory.

Anyway, it's good that you also make it works.

Please also let your colleague do it like you.

If you have any questions, please create the new question post, I will help you in your new question post, thanks.

Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励

2,946 次查看
rob4
Contributor II

A follow-up question: do you have any app notes or other resources on how the bootloader and demo actually work?

regards

-Rob

0 项奖励

2,946 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Rob Yu,

  If just for the SDK bootloader questions, no other app notes, just the SDK project readme.

  But don't worry, if you have any further question, just create the case or the question post, and let me know, I would like to help you to check more details.

Wish it helps you!

Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励

2,946 次查看
james_boyce
Contributor II

Hi Kerry,

will these examples be made available for the RT1064?

James

0 项奖励

2,946 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi James Boyce

   OTA code still didn't add to the RT1064 SDK, but from theory, the operation should be the same.

   New SDK will be launched recently, I will check whether it is added to the new SDK or not when we test it.

Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励

2,946 次查看
james_boyce
Contributor II

Hi Kerry,

Any update on the OTA being added to the RT1064 SDK?

Regards

James

0 项奖励

2,946 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi James Boyce

  Still no directly OTA code for MIMXRT1064, but I think you totally can refer to the MIMXRT1060.

Best Regards,

Kerry

0 项奖励

1,751 次查看
ulivinico1
Contributor II

Hi kerryzhou,

even me, I am interested in update on the OTA being added to the RT1064 SDK. Any news?

0 项奖励

2,960 次查看
rob4
Contributor II

I have exactly the same question.

I am using the MIMXRT1060-EVK and I'm trying to run the SDK 2.7's evkmimxrt1060_httpssrv_ota_freertos example via MCUXpresso IDE. This example runs a webserver through which I should be able to upload new firmware.

From reading the the httpssrv_ota_freertos readme.txt, it seems I first need to write ota_bootloader to flash. So I get the SDK's evkmimxrt1060_ota_bootloader code, and build it. Then I launch and load the debugger. SW7 is set to 0010 (QSPI flash).

During execution, main() gets stuck in bootloader_init(). Specifically, it hangs in get_active_peripheral():

Thread #1 1 (Suspended : Step)
   get_active_peripheral() at bl_main.c:425 0x600061ce
   bootloader_init() at bl_main.c:583 0x600061ce
   main() at bl_main.c:639 0x600061ce

It never exits this loop. No diagnostic messages appear via the serial port.

Can you help me execute the httpssrv_ota_freertos example??

regards

-Rob

0 项奖励

2,960 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Rob Yu,

  Do you try to download the ota_bootloader release version at first instead of the debug version? This version should works.

  

Best Regards,

Kerry

0 项奖励

2,960 次查看
rob4
Contributor II

hi Kerry,

I just cleaned + rebuilt the project as a "release" version, then executed it from the debugger.

The LED flashes and I don't see anything on serial port terminal (I don't know if this is expected from a "release" executable).

When I hit the pause button, I can see that execution is still in bootloader_init()--it never gets to bootloader_run().

Thread #1 1 (Suspended : Signal : SIGINT:Interrupt)
  usb_hid_poll_for_activity() at usb_hid_msc_peripheral_interface.c:119 0x600062b2
  get_active_peripheral() at bl_main.c:425 0x60005ace
  bootloader_init() at bl_main.c:583 0x60005ace
  main() at bl_main.c:639 0x60005ace

Do you have any suggestions for how to proceed? Is the executable looking for a USB peripheral and not finding it?

0 项奖励

2,960 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Rob Yu,

   I will find time to test it on my side, please keep patient, any updated information, I will let you know.

Best Regards,

Kerry

0 项奖励

2,945 次查看
rob4
Contributor II

hi Kerry,

Any updates here? Should I open a support case number?

regards

-Rob

0 项奖励

2,945 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Rob Yu,

   Sorry for my later reply because of the May Day vocation.

   Tomorrow, I will test it on my side again, today, when I test it, I find my PC Ethernet port is broken, so I will find another PC to test it tomorrow.

   You don't need to create the new case, after I test it, I will let you know the updated information in this post directly.

   Thanks a lot for your understanding.

Best Regards,

Kerry

0 项奖励

2,945 次查看
rob4
Contributor II

Thank you Kerry.

Can you also clarify how the lwip_httpssrv_ota_freertos  demo is supposed to work? From reading the documentation, it seems that I take the following steps:

- execute ota_bootloader to load a special bootloader in flash

- build two executables of lwip_httpssrv_ota_freertos, A and B, with different webpages

- run executable A on the MIMXRT1060. observe that A's webpage is visible.

- through A's webpage, upload the binary for executable B and reboot

- reconnect to the webserver and observe that B's webpage is now visible.

Is this correct?

-Rob

0 项奖励

2,945 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Rob Yu,

  Any updated information from your side after my detailed operation steps?

If you still have questions about it, please kindly let me know.

Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励

2,945 次查看
rob4
Contributor II

hi Kerry,

Unfortunately, I cannot even execute your first step.

You wrote:
1. Download the evkmimxrt1060_ota_bootloader, build the release version.

So I build the release version of ota_bootloader by setting the Build Configuration to Active:

20200511_114127_iCXZ7Y.png

Then I clean and rebuild:

20200511_124715_T7b33i.png

And the ota_bootloader executable builds correctly:

Building target: evkmimxrt1060_ota_bootloader.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -Xlinker ...
Memory region Used Size Region Size %age Used
m_flash_config: 512 B 4 KB 12.50%
m_ivt: 48 B 4 KB 1.17%
m_interrupts: 1 KB 1 KB 100.00%
m_text: 28648 B 237567 B 12.06%
m_data: 22016 B 98303 B 22.40%
Finished building target: evkmimxrt1060_ota_bootloader.axf

make --no-print-directory post-build
Performing post-build steps
arm-none-eabi-size "evkmimxrt1060_ota_bootloader.axf"; # arm-none-eabi-objcopy -v -O binary "evkmimxrt1060_ota_bootloader.axf" "evkmimxrt1060_ota_bootloader.bin" ; # checksum -p MIMXRT1062xxxxA -d "evkmimxrt1060_ota_bootloader.bin";
text data bss dec hex filename
30232 632 19968 50832 c690 evkmimxrt1060_ota_bootloader.axf

11:43:03 Build Finished. 0 errors, 0 warnings. (took 13s.745ms)

Then I execute ota_bootloader via the debugger:

20200511_114432_atkHjG.png

The executable loads onto the board and halts in main():

20200511_115153_4K3SPX.png

When I hit Resume (F8), the red LED next to the debug USB flashes but nothing appears on the serial port.

After waiting a bit, I hit Pause on the debugger. Execution seems to be stuck in bootloader_init():

20200511_115316_o6l6NC.png

If hit "resume" then "pause," I can see that execution is looping in bootloader_init():

20200511_115334_mrvOyJ.png

At this point I've tried to run evkmimxrt1060_lwip_httpssrv_ota_freertos, hoping that somehow the bootloader had loaded, but that also hangs.

My coworker hit the same problem when trying to run the demo on a completely separate hardware setup (MIMXRT1060-EVK, linux), so I'm reasonably sure that this is not a problem with my setup.

Can you please help? Thank you for your patience.

0 项奖励

2,945 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Rob Yu ,

    Your ota_bootloader is stuck, it is caused by you lack the lwip_httpssrv_ota_freertos, the jumpt to function will jump to lwip_httpssrv_ota_freertos.

    So,

1. Download the evkmimxrt1060_ota_bootloader, build the release version.

2. Download the evkmimxrt1060_lwip_httpssrv_ota_freertos

  Means you enter the debug mode, then exit, just download the code is OK.

1.png

You don't need to debug it.

ota_bootloader and the lwip_httpssrv_ota_freertros are in the different flash location:

2.png

3.png

After you download the two code, please press the on board reset button.

Please also note, SW7 is: 1-off,2-off,3-on,4-off, just select the internal boot mode.

Please use my method download the two code again:

1,  evkmimxrt1060_ota_bootloader, enter debug mode, exit it.

2. evkmimxrt1060_lwip_httpssrv_ota_freertos enter debug mode, exit it.

3. press on board reset

4. check the uart printf log

5. ping 192.168.0.102

Then all the other steps, please check my last reply.

 Please check the code function works or not at first, not just debug it, even you debug it, you also need to debug evkmimxrt1060_lwip_httpssrv_ota_freertos , not the evkmimxrt1060_ota_bootloader, as evkmimxrt1060_ota_bootloader code will jump to evkmimxrt1060_lwip_httpssrv_ota_freertos, and run it.

Please try it again.

If you still have questions, please tell me which IDE version you are using? I am using MCUXpresso IDE v11.1.0 [Build 3209] [2019-12-12]

Let's make the windows version works at first, if your colleague Linux version still have issue, I will help him after your windows version works.

If you still have questions about it, please kindly let me know.

Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------