How to run evkmimxrt1060_lwip_httpssrv_ota_freertos?

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

How to run evkmimxrt1060_lwip_httpssrv_ota_freertos?

5,602 Views
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.

Labels (1)
0 Kudos
38 Replies

2,262 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Rob Yu,

     Thanks for your patient.

     Today, I have finished the lwip_httpssrv_ota project testing, totally works.

     Now, please follow my steps to make it work:

1. Download the evkmimxrt1060_ota_bootloader, build the release version.

2. Download the evkmimxrt1060_lwip_httpssrv_ota_freertos

3. Find a PC, configure your PC Ethernet properties like this:

pastedImage_2.png

4. Find an Ethernet cable to connect the PC and your board, power on your board.

5.You can ping your board

pastedImage_3.png

No lost

6.  Open the serial tool, you will find the print out log:

Initializing PHY...

************************************************
mbedSSL HTTPS Server example
************************************************
IPv4 Address : 192.168.0.102
IPv4 Subnet mask : 255.255.255.0
IPv4 Gateway : 192.168.0.100
************************************************

Please note, to identify the evkmimxrt1060_lwip_httpssrv_ota_freertos version 1 or version 2, I add the version printf code in the evkmimxrt1060_lwip_httpssrv_ota_freertos project

pastedImage_4.png

7. Now, open a brower, you can use the chrome, type https://192.168.0.102

  Then you can upload the new V2 (when current is V1 )or V1(when current is V2) evkmimxrt1060_lwip_httpssrv_ota_freertos .bin file

   This is my test result:

   pastedImage_5.png

You can find, when my current is V1, after I upload the new V2.bin app, then the new printf result is V2, it means my http ota is working.

Vice-versa, when my current is V2, I can upload V1 version, then you will see the new printf result is V1.

Now, answer you new questions, your understanding is correct, OTA is used to update the self app code, in this example, evkmimxrt1060_lwip_httpssrv_ota_freertos is the app, it use the ethernet to update itself code, that's why you will find the new printf is V2, or V1.

I also upload my generated V1 and V2 .bin code, for your reference.

Please try it on your side.

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 Kudos

1,406 Views
ping1
Contributor V

Thank, Kerry, it really helps

A few questions:

1. Does the app need to set both XIP_EXTERNAL_FLASH and XIP_BOOT_EXTERNAL_FLASH to 1? In other words, both bootloader and application needs to include the bootable image Header?

2. Does the App run on its own without bootloader programmed into the flash area? Or it has to be jumped here by bootloader and then run?

3. I cannot run as i don't have the board, really helpful if NXP can include the example into EVK_1024 and EVK_1064. I only have these 2 boards. Recently have to change to use RT1024 only as it is not BGA and still has internal flash.

Thanks!

Ping

0 Kudos

1,659 Views
rob4
Contributor II

thanks Kerry. I appreciate your help.

-Rob

0 Kudos

1,660 Views
mjbcswitzerland
Specialist V

Hi All

Note that the uTasker project has supported HTTP OTA web server upgrade integrated (also encrypted uploads) so can be used without needing to solve problems with examples and saves professional projects time. It also works on all standard processors and boards without any porting effort:

Ethernet processors:
MIMXRT1020-EVK with i.MX RT 1021 - https://www.utasker.com/iMX/RT1020.html
MIMXRT1050-EVK with i.MX RT 1052 - https://www.utasker.com/iMX/RT1050.html
Embedded Artists iMX RT1052 OEM with i.MX RT 1052 - https://www.utasker.com/iMX/iMX_RT1052_OEM.html
MIMXRT1060-EVK with i.MX RT 1062 - https://www.utasker.com/iMX/RT1060.html
Embedded Artists iMX RT1062 OEM with i.MX RT 1062 - https://www.utasker.com/iMX/iMX_RT1062_OEM.html
MIMXRT1064-EVK with i.MX RT 1064 - https://www.utasker.com/iMX/RT1064.html


Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]

0 Kudos

1,660 Views
rob4
Contributor II

thank you, I'll keep this in mind if we can't get the SDK demo working.

-Rob

On Wed, Apr 29, 2020 at 9:20 AM mjbcswitzerland <admin@community.nxp.com>

0 Kudos

1,660 Views
pavel_chromy
NXP Employee
NXP Employee

Hello Felix,

Which toolchain do you use?

How do you program the bootloader and the application to FLASH memory?

Do you use debugger in IDE or do you program it using flash loader (e.g. blhost)?

The intended workflow is to program the bootloader, let it run at lease once (the bootloader creates default partition set, i.e. formats the FLASH) and then program the application and reboot. The example in the final 2.7.0 release should be then able to start from cold boot without issues.

Best regards, Pavel

0 Kudos

1,660 Views
felix1
Contributor IV

Hi Pavel,

my steps are as fellow,

IDE: MCUXpresso IDE v11.1.0
SDK: SDK_2.7.0_EVK-MIMXRT1060
HW: MIMXRT1060-EVK

1) use MCUXpresso to program evkmimxrt1060_ota_bootloader
see the following messages from UART,
...
Running bootloader...
Bootloader version K2.7.0
Initing HID

2) use MCUXpresso to program evkmimxrt1060_lwip_httpssrv_ota_freertos

3) press SW3 to reboot

still just the bootloader messages from UART,
...
Running bootloader...
Bootloader version K2.7.0
Initing HID

0 Kudos

1,660 Views
pavel_chromy
NXP Employee
NXP Employee

Hello Felix,

I was able to reproduce the issue and it seems to be related to MCUX build of OTA bootloader - it is fine with other toolchain(s). This is indeed a bug, unfortunately root cause and workaround it not known yet. I am creating ticket for this.

Best regards, Pavel

0 Kudos

1,660 Views
tkroeger
Contributor II

Any update on this?

I am having the same issue with my own custom MIMXRT1061 board.

The system eternally waits for HID initialization with: 'Initing HID' message.

0 Kudos

1,660 Views
willieken49
Contributor I

1. Login to ALM project (as in your example code, declare 'td' object then login and connect to an ALM project)
2. Get hold of a Test object from TDConnection object, then TestFactory object by the ID or name of the test case.
3. Use 'CoverRequirement' method of Test object to add a requirement to be covered by this test, by requirement ID.
4. Use 'RemoveCoverage' mthod of Test object to remove the requirement object.

 

Is there any opictorial representation(diagram) of object model available listing the objects and fuctions through which can understand the flow.

 Mybkexperience

0 Kudos

1,660 Views
felix1
Contributor IV

Hi Madison,

About the above steps, I do not know what it means?

Hi Kerry, 

Do you have time to test OTA sample before Chinese New Year?

0 Kudos

1,660 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Felix Shih,

  Sorry for my later reply, there are really too many cases on the queue.

  I will find time to test it, and give you the log, and I have contact with our SDK testing team, they confirmed this example works.

  So, please give me more time, after I test it, I will let you know the log and result.

  Thanks a lot for your understanding.

Best Regards,

Kerry

0 Kudos

1,660 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Felix Shih,

  Sorry for our later reply!

  Please tell me which SDK version you are using? SDK2.7.0?

  All the examples in the SDK is tested.

  Do you fully follow the SDK ota bootloader and lwip_httpssrv_ota readme to test it?

Have a great day,
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 Kudos

1,660 Views
felix1
Contributor IV

Hi Kerry,

any updated information?

0 Kudos

1,660 Views
felix1
Contributor IV

1) SDK_2.7.0_EVK-MIMXRT1060

2) evkmimxrt1060_ota_bootloader, evkmimxrt1060_lwip_httpssrv_ota_freertos

    follow the readme to test it. You can tell me which readme item should be noticed, maybe I not notice it.

3) If you can jump to the application success, please give your console log for me to trace the steps.

0 Kudos

1,660 Views
felix1
Contributor IV

Hi NXP,

Can you give me a suggestion about SDK sample? Or guide me how to do OTA?

0 Kudos

1,660 Views
felix1
Contributor IV

I got the following messages from bootloader, but still failed to connect EVK using browser.

Have anyone tried the OTA sample?

===

Running bootloader_reliable_update_as_requested...
Boot Meta summary:
---------------------------
Boot Partition: start=0x60000000, size=0x00040000
Primary Partition: start=0x60040000, size=0x00100000
Secondary Partition: start=0x60140000, size=0x00101000
Swap Meta summary:
---------------------------
swap_type:kSwapType_None
swap_progress: offset=0x00000000, scratch_size=0x00000000, stage=kSwapStage_NotStarted, remaining_size=0x00000000
Image Info:image[0].size=0x0x00000400, image[1].size=0x0x00000000
Swap Meta summary:
---------------------------
swap_type:kSwapType_None
swap_progress: offset=0x00000000, scratch_size=0x00000000, stage=kSwapStage_NotStarted, remaining_size=0x00000000
Image Info:image[0].size=0x0x00000400, image[1].size=0x0x00000000


Running bootloader...
Bootloader version K2.7.0
Initing HID

0 Kudos

1,660 Views
felix1
Contributor IV

evkmimxrt1060_ota_bootloader seems stuck in get_active_peripheral(), why?

0 Kudos