기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.
Texas Instruments CC3220SF-LAUNCHXL에 대한 FreeRTOS OTA 데모 다운로드, 빌드, 플래시 및 실행
중요
이 라이브러리는 더 이상 사용되지 않는 Amazon-FreeRTOS 리포지토리에서 호스팅됩니다. 새 프로젝트를 생성할 때는 여기서 시작하는 것이 좋습니다. 현재 사용되지 않는 Amazon-FreeRTOS 리포지토리를 기반으로 하는 기존 FreeRTOS 프로젝트가 이미 있는 경우에는 Amazon-FreeRTOS Github 리포지토리 마이그레이션 가이드 섹션을 참조하세요.
FreeRTOS 및 OTA 데모 코드를 다운로드하려면
-
GitHub 사이트 https://github.com/FreeRTOS/FreeRTOS
에서 소스 코드를 다운로드할 수 있습니다.
데모 애플리케이션을 빌드하려면
-
무료로 시작하기RTOS의 지침에 따라
aws_demos
프로젝트를 Code Composer Studio로 가져오고 AWS IoT 엔드포인트, Wi-Fi SSID 및 암호, 보드에 대한 프라이빗 키 및 인증서를 구성합니다. -
를 열고freertos
/vendors/vendor
/boards/board
/aws_demos/config_files/aws_demo_config.h#define CONFIG_CORE_MQTT_MUTUAL_AUTH_DEMO_ENABLED
를 주석으로 처리한 다음CONFIG_OTA_MQTT_UPDATE_DEMO_ENABLED
또는CONFIG_OTA_HTTP_UPDATE_DEMO_ENABLED
를 정의합니다. -
솔루션을 빌드하고 오류 없이 빌드되는지 확인합니다.
-
터미널 에뮬레이터를 시작하고 다음 설정을 사용하여 보드에 연결합니다.
-
전송 속도: 115200
-
데이터 비트: 8
-
패리티: 없음
-
정지 비트: 1
-
-
보드에서 프로젝트를 실행하여 Wi-Fi 및 AWS IoT MQTT 메시지 브로커에 연결할 수 있는지 확인합니다.
실행되면 터미널 에뮬레이터에 다음과 같은 텍스트가 표시됩니다.
0 1000 [Tmr Svc] Simple Link task created Device came up in Station mode 1 2534 [Tmr Svc] Write certificate... 2 5486 [Tmr Svc] [ERROR] Failed to destroy object. PKCS11_PAL_DestroyObject failed. 3 5486 [Tmr Svc] Write certificate... 4 5776 [Tmr Svc] Security alert threshold = 15 5 5776 [Tmr Svc] Current number of alerts = 1 6 5778 [Tmr Svc] Running Demos. 7 5779 [iot_thread] [INFO ][DEMO][5779] ---------STARTING DEMO--------- 8 5779 [iot_thread] [INFO ][INIT][5779] SDK successfully initialized. Device came up in Station mode [WLAN EVENT] STA Connected to the AP: afrlab-pepper , BSSID: 74:83:c2:b4:46:27 [NETAPP EVENT] IP acquired by the device Device has connected to afrlab-pepper Device IP Address is 192.168.36.176 9 8283 [iot_thread] [INFO ][DEMO][8282] Successfully initialized the demo. Network type for the demo: 1 10 8283 [iot_thread] [INFO] OTA over MQTT demo, Application version 0.9.0 11 8283 [iot_thread] [INFO] Creating a TLS connection to <endpoint>-ats.iot.us-west-2.amazonaws.com:8883. 12 8852 [iot_thread] [INFO] Creating an MQTT connection to <endpoint>-ats.iot.us-west-2.amazonaws.com. 13 8914 [iot_thread] [INFO] Packet received. ReceivedBytes=2. 14 8914 [iot_thread] [INFO] CONNACK session present bit not set. 15 8914 [iot_thread] [INFO] Connection accepted. 16 8914 [iot_thread] [INFO] Received MQTT CONNACK successfully from broker. 17 8914 [iot_thread] [INFO] MQTT connection established with the broker. 18 8915 [iot_thread] [INFO] Received: 0 Queued: 0 Processed: 0 Dropped: 0 19 8953 [OTA Agent T] [INFO] Current State=[RequestingJob], Event=[Start], New state=[RequestingJob] 20 9008 [MQTT Agent ] [INFO] Packet received. ReceivedBytes=3. 21 9015 [OTA Agent T] [INFO] SUBSCRIBED to topic $aws/things/__test_infra_thing73/jobs/notify-next to broker. 22 9015 [OTA Agent T] [INFO] Subscribed to MQTT topic: $aws/things/__test_infra_thing73/jobs/notify-next 23 9504 [MQTT Agent ] [INFO] Publishing message to $aws/things/__test_infra_thing73/jobs/$next/get. 24 9535 [MQTT Agent ] [INFO] Packet received. ReceivedBytes=2. 25 9535 [MQTT Agent ] [INFO] Ack packet deserialized with result: MQTTSuccess. 26 9536 [MQTT Agent ] [INFO] State record updated. New state=MQTTPublishDone. 27 9537 [OTA Agent T] [INFO] Sent PUBLISH packet to broker $aws/things/__test_infra_thing73/jobs/$next/get to broker. 28 9537 [OTA Agent T] [WARN] OTA Timer handle NULL for Timerid=0, can't stop. 29 9537 [OTA Agent T] [INFO] Current State=[WaitingForJob], Event=[RequestJobDocument], New state=[WaitingForJob] 30 9539 [MQTT Agent ] [INFO] Packet received. ReceivedBytes=120. 31 9539 [MQTT Agent ] [INFO] De-serialized incoming PUBLISH packet: DeserializerResult=MQTTSuccess. 32 9540 [MQTT Agent ] [INFO] State record updated. New state=MQTTPublishDone. 33 9540 [MQTT Agent ] [INFO] Received job message callback, size 62. 34 9616 [OTA Agent T] [INFO] Failed job document content check: Required job document parameter was not extracted: parameter=execution 35 9616 [OTA Agent T] [INFO] Failed job document content check: Required job document parameter was not extracted: parameter=execution.jobId 36 9617 [OTA Agent T] [INFO] Failed job document content check: Required job document parameter was not extracted: parameter=execution.jobDocument 37 9617 [OTA Agent T] [INFO] Failed job document content check: Required job document parameter was not extracted: parameter=execution.jobDocument.afr_ota 38 9617 [OTA Agent T] [INFO] Failed job document content check: Required job document parameter was not extracted: parameter=execution.jobDocument.afr_ota.protocols 39 9618 [OTA Agent T] [INFO] Failed job document content check: Required job document parameter was not extracted: parameter=execution.jobDocument.afr_ota.files 40 9618 [OTA Agent T] [INFO] Failed job document content check: Required job document parameter was not extracted: parameter=filesize 41 9618 [OTA Agent T] [INFO] Failed job document content check: Required job document parameter was not extracted: parameter=fileid 42 9619 [OTA Agent T] [INFO] Failed to parse JSON document as AFR_OTA job: DocParseErr_t=7 43 9619 [OTA Agent T] [INFO] No active job available in received job document: OtaJobParseErr_t=OtaJobParseErrNoActiveJobs 44 9619 [OTA Agent T] [ERROR] Failed to execute state transition handler: Handler returned error: OtaErr_t=OtaErrJobParserError 45 9620 [OTA Agent T] [INFO] Current State=[WaitingForJob], Event=[ReceivedJobDocument], New state=[CreatingFile] 46 9915 [iot_thread] [INFO] Received: 0 Queued: 0 Processed: 0 Dropped: 0 47 10915 [iot_thread] [INFO] Received: 0 Queued: 0 Processed: 0 Dropped: 0 48 11915 [iot_thread] [INFO] Received: 0 Queued: 0 Processed: 0 Dropped: 0 49 12915 [iot_thread] [INFO] Received: 0 Queued: 0 Processed: 0 Dropped: 0 50 13915 [iot_thread] [INFO] Received: 0 Queued: 0 Processed: 0 Dropped: 0 51 14915 [iot_thread] [INFO] Received: 0 Queued: 0 Processed: 0 Dropped: 0