Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.
Scarica, crea, esegui il flashing ed esegui la demo OTA di FreerTOS su Texas Instruments 0SF-LAUNCHXL CC322
Importante
Questa è una versione archiviata della FreeRTOS User Guide da utilizzare con la versione FreeRTOS 202012.00. Per l'ultima versione di questo documento, consulta la FreerTOS User Guide.
Per scaricare FreerTOS e il codice demo OTA
-
Puoi scaricare il codice sorgente dal GitHub sito https://github.com/FreeRTOS/FreerTOS
.
Per creare l'applicazione demo
-
Segui le istruzioni Guida introduttiva a FreerTOS per importare il
aws_demos
progetto in Code Composer Studio, configurare l' AWS IoT endpoint, l'SSID e la password Wi-Fi e una chiave privata e un certificato per la scheda. -
Aprire
, commentarefreertos
/vendors/vendor
/boards/board
/aws_demos/config_files/aws_demo_config.h#define CONFIG_MQTT_DEMO_ENABLED
e definireCONFIG_OTA_UPDATE_DEMO_ENABLED
. -
Creare la soluzione e accertarsi che venga compilata senza errori.
-
Avviare un emulatore di terminale e utilizzare le seguenti impostazioni per effettuare la connessione alla scheda:
-
Velocità in baud: 115200
-
Bit di dati: 8
-
Parità: nessuna
-
Bit di stop: 1
-
-
Eseguire il progetto sulla scheda per accertarsi che riesca a connettersi alla rete WiFi e al broker di messaggi MQTT AWS IoT .
Durante l'esecuzione, l'emulatore di terminale dovrebbe visualizzare testo simile al seguente:
0 0 [Tmr Svc] Starting Wi-Fi Module ... 1 0 [Tmr Svc] Simple Link task created Device came up in Station mode 2 142 [Tmr Svc] Wi-Fi module initialized. 3 142 [Tmr Svc] Starting key provisioning... 4 142 [Tmr Svc] Write root certificate... 5 243 [Tmr Svc] Write device private key... 6 340 [Tmr Svc] Write device certificate... 7 433 [Tmr Svc] Key provisioning done... [WLAN EVENT] STA Connected to the AP: Mobile , BSSID: 24:de:c6:5d:32:a4 [NETAPP EVENT] IP acquired by the device Device has connected to Mobile Device IP Address is 192.168.111.12 8 2666 [Tmr Svc] Wi-Fi connected to AP Mobile. 9 2666 [Tmr Svc] IP Address acquired 192.168.111.12 10 2667 [OTA] OTA demo version 0.9.2 11 2667 [OTA] Creating MQTT Client... 12 2667 [OTA] Connecting to broker... 13 3512 [OTA] Connected to broker. 14 3715 [OTA Task] [prvSubscribeToJobNotificationTopics] OK: $aws/things/OtaGA/jobs/$next/get/accepted 15 4018 [OTA Task] [prvSubscribeToJobNotificationTopics] OK: $aws/things/OtaGA/jobs/notify-next 16 4027 [OTA Task] [prvPAL_GetPlatformImageState] xFileInfo.Flags = 0250 17 4027 [OTA Task] [prvPAL_GetPlatformImageState] eOTA_PAL_ImageState_Valid 18 4034 [OTA Task] [OTA_CheckForUpdate] Request #0 19 4248 [OTA] [OTA_AgentInit] Ready. 20 4249 [OTA Task] [prvParseJSONbyModel] Extracted parameter [ clientToken: 0:OtaGA ] 21 4249 [OTA Task] [prvParseJSONbyModel] parameter not present: execution 22 4249 [OTA Task] [prvParseJSONbyModel] parameter not present: jobId 23 4249 [OTA Task] [prvParseJSONbyModel] parameter not present: jobDocument 24 4249 [OTA Task] [prvParseJSONbyModel] parameter not present: afr_ota 25 4250 [OTA Task] [prvParseJSONbyModel] parameter not present: streamname 26 4250 [OTA Task] [prvParseJSONbyModel] parameter not present: files 27 4250 [OTA Task] [prvParseJSONbyModel] parameter not present: filepath 28 4250 [OTA Task] [prvParseJSONbyModel] parameter not present: filesize 29 4250 [OTA Task] [prvParseJSONbyModel] parameter not present: fileid 30 4250 [OTA Task] [prvParseJSONbyModel] parameter not present: certfile 31 4251 [OTA Task] [prvParseJSONbyModel] parameter not present: sig-sha1-rsa 32 4251 [OTA Task] [prvParseJobDoc] Ignoring job without ID. 33 4251 [OTA Task] [prvOTA_Close] Context->0x2001b2c4 34 5248 [OTA] State: Ready Received: 1 Queued: 1 Processed: 1 Dropped: 0 35 6248 [OTA] State: Ready Received: 1 Queued: 1 Processed: 1 Dropped: 0 36 7248 [OTA] State: Ready Received: 1 Queued: 1 Processed: 1 Dropped: 0 37 8248 [OTA] State: Ready Received: 1 Queued: 1 Processed: 1 Dropped: 0 38 9248 [OTA] State: Ready Received: 1 Queued: 1 Processed: 1 Dropped: 0