@@ -585,244 +585,233 @@ Program the generated .bin or .hex.
585
585
586
586
##### 9.2.3 mbed-cloud-client-example
587
587
588
- ###### 9.2.3.1 Application repository
588
+ Use the following test procedure on the ` mbed-cloud-client-example ` [ application repository] ( https://github.com/armmbed/mbed-cloud-client-example )
589
589
590
- https://github.com/armmbed/mbed-cloud-client-example
591
-
592
- ###### 9.2.3.2 Test procedure
593
-
594
- (1) Setup Pelion Account per instructions on https://cloud.mbed.com/product-overview .
595
-
596
- (2) Generate API key on Pelion Portal.
597
-
598
- (3) Run the following command with the generated API key in mbed-cloud-client-example directory
599
-
600
- ```
601
- $ mbed config -G CLOUD_SDK_API_KEY <API_KEY>
602
- $ mbed target <new_target>
603
- $ mbed toolchain GCC_ARM
604
- $ mbed dm init -d "<company domain name>" --model-name <new_target>
605
- ```
606
-
607
- Two files update_default_resources.c and mbed_cloud_dev_credentials.c should be created and used in the build.
608
-
609
- (4) Customize json files.
590
+ 1 . Set up Pelion Account per instructions on https://cloud.mbed.com/product-overview .
591
+ 1 . Generate API key on Pelion Portal.
592
+ 1 . Run the following command with the generated API key in mbed-cloud-client-example directory
593
+
594
+ ```
595
+ $ mbed config -G CLOUD_SDK_API_KEY <API_KEY>
596
+ $ mbed target <new_target>
597
+ $ mbed toolchain GCC_ARM
598
+ $ mbed dm init -d "<company domain name>" --model-name <new_target>
599
+ ```
610
600
611
- The following customization is needed prior to build:
601
+ Two files update_default_resources.c and mbed_cloud_dev_credentials.c should be created and used in the build.
612
602
613
- - Modify mbed-os.lib by changing the URL to https://github.com/ARMmbed/mbed-os-new-target
614
- - Add the new target to mbed-cloud-client-example/mbed_app.json. For example, the code block below adds CC3220SF:
603
+ 1 . Customize json files.
604
+
605
+ The following customization is needed prior to build:
606
+
607
+ - Modify mbed-os.lib by changing the URL to https://github.com/ARMmbed/mbed-os-new-target
608
+ - Add the new target to mbed-cloud-client-example/mbed_app.json. For example, the code block below adds CC3220SF:
609
+
610
+ ```
611
+ ...
612
+ "target.macros_remove" : ["MBEDTLS_CONFIG_HW_SUPPORT"]
613
+ },
614
+ "CC3220SF": {
615
+ "target.network-default-interface-type" : "WIFI",
616
+ "update-client.bootloader-details" : "0x01006F44",
617
+ "update-client.application-details" : "0x01008000",
618
+ "client_app.auto_partition": "1"
619
+ }
620
+ ```
615
621
616
- mbed_app.json example
617
- ```
618
- ...
619
- "target.macros_remove" : ["MBEDTLS_CONFIG_HW_SUPPORT"]
620
- },
621
- "CC3220SF": {
622
- "target.network-default-interface-type" : "WIFI",
623
- "update-client.bootloader-details" : "0x01006F44",
624
- "update-client.application-details" : "0x01008000",
625
- "client_app.auto_partition": "1"
626
- }
627
- ```
628
622
In addition, fill in the SSID and Password in mbed_app.json if connectivity method for the new target is WiFi.
629
623
630
624
Note that bootloader-details is the value displayed on the serial program while running mbed-bootloader program.
631
625
632
- - Add SOTP descriptors to mbed-cloud-client-example/mbed_lib.json, e.g.
633
-
634
- mbed_app.json example
626
+ - Add SOTP descriptors to mbed-cloud-client-example/mbed_lib.json, e.g.
627
+
628
+ ```
629
+ ...
630
+ "sotp-section-2-size" : "(16*1024)"
631
+ },
632
+ "CC3220SF": {
633
+ "sotp-section-1-address" : "(0x01000000+1020*1024)",
634
+ "sotp-section-1-size" : "(2*1024)",
635
+ "sotp-section-2-address" : "(0x01000000+1022*1024)",
636
+ "sotp-section-2-size" : "(2*1024)"
637
+ }
638
+ ```
639
+
640
+ 1. Build image.
641
+
635
642
```
636
- ...
637
- "sotp-section-2-size" : "(16*1024)"
638
- },
639
- "CC3220SF": {
640
- "sotp-section-1-address" : "(0x01000000+1020*1024)",
641
- "sotp-section-1-size" : "(2*1024)",
642
- "sotp-section-2-address" : "(0x01000000+1022*1024)",
643
- "sotp-section-2-size" : "(2*1024)"
644
- }
643
+ cd mbed-cloud-client-example
644
+ mbed deploy
645
+ mbed compile --target <new_target> --toolchain GCC_ARM
645
646
```
646
647
647
- (5) Build image.
648
-
649
- Build MMC
650
- ```
651
- cd mbed-cloud-client-example
652
- mbed deploy
653
- mbed compile --target <new_target> --toolchain GCC_ARM
654
- ```
655
-
656
- (6) Program the generated .bin or .hex to the board.
657
-
658
- (7) Verify serial output similar to:
648
+ 1. Program the generated .bin or .hex to the board.
649
+ 1. Verify serial output similar to:
659
650
660
- ```
661
- [BOOT] Mbed Bootloader
651
+ ```
652
+ [ BOOT] Mbed Bootloader
662
653
663
- [BOOT] ARM: 00000000000000000000
654
+ [ BOOT] ARM: 00000000000000000000
664
655
665
- [BOOT] OEM: 00000000000000000000
656
+ [ BOOT] OEM: 00000000000000000000
666
657
667
- [BOOT] Layout: 0 1006F44
658
+ [ BOOT] Layout: 0 1006F44
668
659
669
- [BOOT] Active firmware integrity check:
660
+ [ BOOT] Active firmware integrity check:
670
661
671
- [BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
662
+ [ BOOT] [ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
672
663
673
- [BOOT] SHA256: ABAF3AC1F2D7B8173BC5540DA50E7093C8A479E4C0148090348BD1EA68A0958F
664
+ [ BOOT] SHA256: ABAF3AC1F2D7B8173BC5540DA50E7093C8A479E4C0148090348BD1EA68A0958F
674
665
675
- [BOOT] Version: 1539890967
666
+ [ BOOT] Version: 1539890967
676
667
677
- [BOOT] Slot 0 is empty
668
+ [ BOOT] Slot 0 is empty
678
669
679
- [BOOT] Active firmware up-to-date
670
+ [ BOOT] Active firmware up-to-date
680
671
681
- [BOOT] Application's start address: 0x1008400
672
+ [ BOOT] Application's start address: 0x1008400
682
673
683
- [BOOT] Application's jump address: 0x1046081
674
+ [ BOOT] Application's jump address: 0x1046081
684
675
685
- [BOOT] Application's stack address: 0x20040000
676
+ [ BOOT] Application's stack address: 0x20040000
686
677
687
- [BOOT] Forwarding to application...
678
+ [ BOOT] Forwarding to application...
688
679
689
680
690
681
691
- mcc_platform_storage_init() - bd->size() = 16021192704
682
+ mcc_platform_storage_init() - bd->size() = 16021192704
692
683
693
- mcc_platform_storage_init() - BlockDevice init OK.
684
+ mcc_platform_storage_init() - BlockDevice init OK.
694
685
695
- Application ready. Build at: Oct 18 2018 14:29:26
686
+ Application ready. Build at: Oct 18 2018 14:29:26
696
687
697
- Mbed OS version 99.99.99
688
+ Mbed OS version 99.99.99
698
689
699
- Start simple mbed Cloud Client
690
+ Start simple mbed Cloud Client
700
691
701
- Using hardcoded Root of Trust, not suitable for production use.
692
+ Using hardcoded Root of Trust, not suitable for production use.
702
693
703
- Starting developer flow
694
+ Starting developer flow
704
695
705
- mcc_platform_init_connection()
696
+ mcc_platform_init_connection()
706
697
707
- NSAPI_STATUS_CONNECTING
698
+ NSAPI_STATUS_CONNECTING
708
699
709
- NSAPI_STATUS_GLOBAL_UP
700
+ NSAPI_STATUS_GLOBAL_UP
710
701
711
- Network initialized, connecting...
702
+ Network initialized, connecting...
712
703
713
704
714
705
715
- Client registered
706
+ Client registered
716
707
717
- Endpoint Name: 016688bda0740000000000010010007a
708
+ Endpoint Name: 016688bda0740000000000010010007a
718
709
719
- Device Id: 016688bda0740000000000010010007a
720
- ```
721
-
722
- (8) Verify device is registered on Pelion portal
723
-
724
- (9) Make change in the MCC client and rebuild the firmware.
710
+ Device Id: 016688bda0740000000000010010007a
711
+ ```
725
712
726
- (10) Perform firmware update
713
+ 1. Verify device is registered on Pelion portal
714
+ 1. Make change in the MCC client and rebuild the firmware.
715
+ 1. Perform firmware update
727
716
728
- ```
729
- $ mbed dm update device -D <device ID> -m <new_target>
730
- ```
717
+ ```
718
+ $ mbed dm update device -D <device ID > -m <new_target>
719
+ ```
731
720
732
- The following serial output is expected if firmware update is successful:
721
+ The following serial output is expected if firmware update is successful:
733
722
734
- ```
735
- Firmware download requested
723
+ ```
724
+ Firmware download requested
736
725
737
- Authorization granted
726
+ Authorization granted
738
727
739
- Downloading: [++++++++++++++++++++++++++++++++++++++++++++++++++] 100 %
728
+ Downloading: [ ++++++++++++++++++++++++++++++++++++++++++++++++++] 100 %
740
729
741
- Download completed
730
+ Download completed
742
731
743
- Firmware install requested
732
+ Firmware install requested
744
733
745
- Authorization granted
746
- ```
734
+ Authorization granted
735
+ ```
747
736
748
- Power cycle the board.
737
+ Power cycle the board.
749
738
750
- (11) Verify the newer firmware is running on the device. Serial output should display the following:
739
+ 1. Verify the newer firmware is running on the device. Serial output should display the following:
751
740
752
- ```
753
- [BOOT] Mbed Bootloader
741
+ ```
742
+ [ BOOT] Mbed Bootloader
754
743
755
- [BOOT] ARM: 00000000000000000000
744
+ [ BOOT] ARM: 00000000000000000000
756
745
757
- [BOOT] OEM: 00000000000000000000
746
+ [ BOOT] OEM: 00000000000000000000
758
747
759
- [BOOT] Layout: 0 1006F44
748
+ [ BOOT] Layout: 0 1006F44
760
749
761
- [BOOT] Active firmware integrity check:
750
+ [ BOOT] Active firmware integrity check:
762
751
763
- [BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
752
+ [ BOOT] [ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
764
753
765
- [BOOT] SHA256: ABAF3AC1F2D7B8173BC5540DA50E7093C8A479E4C0148090348BD1EA68A0958F
754
+ [ BOOT] SHA256: ABAF3AC1F2D7B8173BC5540DA50E7093C8A479E4C0148090348BD1EA68A0958F
766
755
767
- [BOOT] Version: 1539890967
756
+ [ BOOT] Version: 1539890967
768
757
769
- [BOOT] Slot 0 firmware integrity check:
758
+ [ BOOT] Slot 0 firmware integrity check:
770
759
771
- [BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
760
+ [ BOOT] [ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
772
761
773
- [BOOT] SHA256: ABAF3AC1F2D7B8173BC5540DA50E7093C8A479E4C0148090348BD1EA68A0958F
762
+ [ BOOT] SHA256: ABAF3AC1F2D7B8173BC5540DA50E7093C8A479E4C0148090348BD1EA68A0958F
774
763
775
- [BOOT] Version: 1539892842
764
+ [ BOOT] Version: 1539892842
776
765
777
- [BOOT] Update active firmware using slot 0:
766
+ [ BOOT] Update active firmware using slot 0:
778
767
779
- [BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
768
+ [ BOOT] [ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
780
769
781
- [BOOT] Verify new active firmware:
770
+ [ BOOT] Verify new active firmware:
782
771
783
- [BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
772
+ [ BOOT] [ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
784
773
785
- [BOOT] New active firmware is valid
774
+ [ BOOT] New active firmware is valid
786
775
787
- [BOOT] Application's start address: 0x1008400
776
+ [ BOOT] Application's start address: 0x1008400
788
777
789
- [BOOT] Application's jump address: 0x1046081
778
+ [ BOOT] Application's jump address: 0x1046081
790
779
791
- [BOOT] Application's stack address: 0x20040000
780
+ [ BOOT] Application's stack address: 0x20040000
792
781
793
- [BOOT] Forwarding to application...
782
+ [ BOOT] Forwarding to application...
794
783
795
784
796
785
797
- mcc_platform_storage_init() - bd->size() = 16021192704
786
+ mcc_platform_storage_init() - bd->size() = 16021192704
798
787
799
- mcc_platform_storage_init() - BlockDevice init OK.
788
+ mcc_platform_storage_init() - BlockDevice init OK.
800
789
801
- Application ready. Build at: Oct 18 2018 14:29:26
790
+ Application ready. Build at: Oct 18 2018 14:29:26
802
791
803
- Mbed OS version 99.99.99
792
+ Mbed OS version 99.99.99
804
793
805
- Start simple mbed Cloud Client
794
+ Start simple mbed Cloud Client
806
795
807
- Using hardcoded Root of Trust, not suitable for production use.
796
+ Using hardcoded Root of Trust, not suitable for production use.
808
797
809
- Starting developer flow
798
+ Starting developer flow
810
799
811
- Developer credentials already exist, continuing..
800
+ Developer credentials already exist, continuing..
812
801
813
- mcc_platform_init_connection()
802
+ mcc_platform_init_connection()
814
803
815
- NSAPI_STATUS_CONNECTING
804
+ NSAPI_STATUS_CONNECTING
816
805
817
- NSAPI_STATUS_GLOBAL_UP
806
+ NSAPI_STATUS_GLOBAL_UP
818
807
819
- Network initialized, connecting...
808
+ Network initialized, connecting...
820
809
821
810
822
811
823
- Client registered
812
+ Client registered
824
813
825
- Endpoint Name: 016688bda0740000000000010010007a
814
+ Endpoint Name: 016688bda0740000000000010010007a
826
815
827
- Device Id: 016688bda0740000000000010010007a
828
- ```
816
+ Device Id: 016688bda0740000000000010010007a
817
+ ```
0 commit comments