Skip to content

Commit c1c2f2d

Browse files
author
Amanda Butler
authored
Edit porting.md
Make further formatting edits.
1 parent bdc33b2 commit c1c2f2d

File tree

1 file changed

+136
-147
lines changed

1 file changed

+136
-147
lines changed

docs/porting/porting.md

Lines changed: 136 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -585,244 +585,233 @@ Program the generated .bin or .hex.
585585

586586
##### 9.2.3 mbed-cloud-client-example
587587

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)
589589

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+
```
610600

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.
612602

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+
```
615621
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-
```
628622
In addition, fill in the SSID and Password in mbed_app.json if connectivity method for the new target is WiFi.
629623
630624
Note that bootloader-details is the value displayed on the serial program while running mbed-bootloader program.
631625
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+
635642
```
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
645646
```
646647
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:
659650
660-
```
661-
[BOOT] Mbed Bootloader
651+
```
652+
[BOOT] Mbed Bootloader
662653

663-
[BOOT] ARM: 00000000000000000000
654+
[BOOT] ARM: 00000000000000000000
664655

665-
[BOOT] OEM: 00000000000000000000
656+
[BOOT] OEM: 00000000000000000000
666657

667-
[BOOT] Layout: 0 1006F44
658+
[BOOT] Layout: 0 1006F44
668659

669-
[BOOT] Active firmware integrity check:
660+
[BOOT] Active firmware integrity check:
670661

671-
[BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
662+
[BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
672663

673-
[BOOT] SHA256: ABAF3AC1F2D7B8173BC5540DA50E7093C8A479E4C0148090348BD1EA68A0958F
664+
[BOOT] SHA256: ABAF3AC1F2D7B8173BC5540DA50E7093C8A479E4C0148090348BD1EA68A0958F
674665

675-
[BOOT] Version: 1539890967
666+
[BOOT] Version: 1539890967
676667

677-
[BOOT] Slot 0 is empty
668+
[BOOT] Slot 0 is empty
678669

679-
[BOOT] Active firmware up-to-date
670+
[BOOT] Active firmware up-to-date
680671

681-
[BOOT] Application's start address: 0x1008400
672+
[BOOT] Application's start address: 0x1008400
682673

683-
[BOOT] Application's jump address: 0x1046081
674+
[BOOT] Application's jump address: 0x1046081
684675

685-
[BOOT] Application's stack address: 0x20040000
676+
[BOOT] Application's stack address: 0x20040000
686677

687-
[BOOT] Forwarding to application...
678+
[BOOT] Forwarding to application...
688679

689680

690681

691-
mcc_platform_storage_init() - bd->size() = 16021192704
682+
mcc_platform_storage_init() - bd->size() = 16021192704
692683

693-
mcc_platform_storage_init() - BlockDevice init OK.
684+
mcc_platform_storage_init() - BlockDevice init OK.
694685

695-
Application ready. Build at: Oct 18 2018 14:29:26
686+
Application ready. Build at: Oct 18 2018 14:29:26
696687

697-
Mbed OS version 99.99.99
688+
Mbed OS version 99.99.99
698689

699-
Start simple mbed Cloud Client
690+
Start simple mbed Cloud Client
700691

701-
Using hardcoded Root of Trust, not suitable for production use.
692+
Using hardcoded Root of Trust, not suitable for production use.
702693

703-
Starting developer flow
694+
Starting developer flow
704695

705-
mcc_platform_init_connection()
696+
mcc_platform_init_connection()
706697

707-
NSAPI_STATUS_CONNECTING
698+
NSAPI_STATUS_CONNECTING
708699

709-
NSAPI_STATUS_GLOBAL_UP
700+
NSAPI_STATUS_GLOBAL_UP
710701

711-
Network initialized, connecting...
702+
Network initialized, connecting...
712703

713704

714705

715-
Client registered
706+
Client registered
716707

717-
Endpoint Name: 016688bda0740000000000010010007a
708+
Endpoint Name: 016688bda0740000000000010010007a
718709

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+
```
725712
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
727716
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+
```
731720
732-
The following serial output is expected if firmware update is successful:
721+
The following serial output is expected if firmware update is successful:
733722
734-
```
735-
Firmware download requested
723+
```
724+
Firmware download requested
736725

737-
Authorization granted
726+
Authorization granted
738727

739-
Downloading: [++++++++++++++++++++++++++++++++++++++++++++++++++] 100 %
728+
Downloading: [++++++++++++++++++++++++++++++++++++++++++++++++++] 100 %
740729

741-
Download completed
730+
Download completed
742731

743-
Firmware install requested
732+
Firmware install requested
744733

745-
Authorization granted
746-
```
734+
Authorization granted
735+
```
747736
748-
Power cycle the board.
737+
Power cycle the board.
749738
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:
751740
752-
```
753-
[BOOT] Mbed Bootloader
741+
```
742+
[BOOT] Mbed Bootloader
754743

755-
[BOOT] ARM: 00000000000000000000
744+
[BOOT] ARM: 00000000000000000000
756745

757-
[BOOT] OEM: 00000000000000000000
746+
[BOOT] OEM: 00000000000000000000
758747

759-
[BOOT] Layout: 0 1006F44
748+
[BOOT] Layout: 0 1006F44
760749

761-
[BOOT] Active firmware integrity check:
750+
[BOOT] Active firmware integrity check:
762751

763-
[BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
752+
[BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
764753

765-
[BOOT] SHA256: ABAF3AC1F2D7B8173BC5540DA50E7093C8A479E4C0148090348BD1EA68A0958F
754+
[BOOT] SHA256: ABAF3AC1F2D7B8173BC5540DA50E7093C8A479E4C0148090348BD1EA68A0958F
766755

767-
[BOOT] Version: 1539890967
756+
[BOOT] Version: 1539890967
768757

769-
[BOOT] Slot 0 firmware integrity check:
758+
[BOOT] Slot 0 firmware integrity check:
770759

771-
[BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
760+
[BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
772761

773-
[BOOT] SHA256: ABAF3AC1F2D7B8173BC5540DA50E7093C8A479E4C0148090348BD1EA68A0958F
762+
[BOOT] SHA256: ABAF3AC1F2D7B8173BC5540DA50E7093C8A479E4C0148090348BD1EA68A0958F
774763

775-
[BOOT] Version: 1539892842
764+
[BOOT] Version: 1539892842
776765

777-
[BOOT] Update active firmware using slot 0:
766+
[BOOT] Update active firmware using slot 0:
778767

779-
[BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
768+
[BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
780769

781-
[BOOT] Verify new active firmware:
770+
[BOOT] Verify new active firmware:
782771

783-
[BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
772+
[BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
784773

785-
[BOOT] New active firmware is valid
774+
[BOOT] New active firmware is valid
786775

787-
[BOOT] Application's start address: 0x1008400
776+
[BOOT] Application's start address: 0x1008400
788777

789-
[BOOT] Application's jump address: 0x1046081
778+
[BOOT] Application's jump address: 0x1046081
790779

791-
[BOOT] Application's stack address: 0x20040000
780+
[BOOT] Application's stack address: 0x20040000
792781

793-
[BOOT] Forwarding to application...
782+
[BOOT] Forwarding to application...
794783

795784

796785

797-
mcc_platform_storage_init() - bd->size() = 16021192704
786+
mcc_platform_storage_init() - bd->size() = 16021192704
798787

799-
mcc_platform_storage_init() - BlockDevice init OK.
788+
mcc_platform_storage_init() - BlockDevice init OK.
800789

801-
Application ready. Build at: Oct 18 2018 14:29:26
790+
Application ready. Build at: Oct 18 2018 14:29:26
802791

803-
Mbed OS version 99.99.99
792+
Mbed OS version 99.99.99
804793

805-
Start simple mbed Cloud Client
794+
Start simple mbed Cloud Client
806795

807-
Using hardcoded Root of Trust, not suitable for production use.
796+
Using hardcoded Root of Trust, not suitable for production use.
808797

809-
Starting developer flow
798+
Starting developer flow
810799

811-
Developer credentials already exist, continuing..
800+
Developer credentials already exist, continuing..
812801

813-
mcc_platform_init_connection()
802+
mcc_platform_init_connection()
814803

815-
NSAPI_STATUS_CONNECTING
804+
NSAPI_STATUS_CONNECTING
816805

817-
NSAPI_STATUS_GLOBAL_UP
806+
NSAPI_STATUS_GLOBAL_UP
818807

819-
Network initialized, connecting...
808+
Network initialized, connecting...
820809

821810

822811

823-
Client registered
812+
Client registered
824813

825-
Endpoint Name: 016688bda0740000000000010010007a
814+
Endpoint Name: 016688bda0740000000000010010007a
826815

827-
Device Id: 016688bda0740000000000010010007a
828-
```
816+
Device Id: 016688bda0740000000000010010007a
817+
```

0 commit comments

Comments
 (0)