Skip to content

Commit

Permalink
Fix all projects
Browse files Browse the repository at this point in the history
  • Loading branch information
AniruddhaKanhere committed Mar 18, 2024
1 parent 6d93840 commit 926e33e
Show file tree
Hide file tree
Showing 10 changed files with 147 additions and 98 deletions.
4 changes: 2 additions & 2 deletions examples/common/ota/ota_pal.c
Expand Up @@ -95,9 +95,9 @@ OtaPalJobDocProcessingResult_t otaPal_CreateFileForRx( AfrOtaJobDocumentFields_t

LogDebug( ( "[OTA-NXP] CreateFileForRx" ) );

if( otaPal_GetPlatformImageState( pFileContext ) == OtaPalImageStateValid )
if( otaPal_SetPlatformImageState( pFileContext ,OtaImageStateAccepted ) == OtaPalSuccess )
{
/* TODO: Check here if anything is to be checked before sending the
/* TODO: Check here if anything is to be verified before sending the
* success message to IoT core. */
return OtaPalNewImageBooted;
}
Expand Down
5 changes: 3 additions & 2 deletions examples/common/ota/ota_update.c
Expand Up @@ -926,8 +926,9 @@ static void processOTAEvents( void )
case OtaPalNewImageBooted:
( void ) sendSuccessMessage();

/* Short delay before restarting the loop. */
vTaskDelay( pdMS_TO_TICKS( 1000 ) );
/* Short delay before restarting the loop. This allows IoT core
* to update the status of the job. */
vTaskDelay( pdMS_TO_TICKS( 5000 ) );

/* Get ready for new OTA job. */
nextEvent.eventId = OtaAgentEventRequestJobDocument;
Expand Down
83 changes: 38 additions & 45 deletions examples/evkbmimxrt1060/bootloader/signing_pub_key.c
@@ -1,45 +1,38 @@
/*
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* http://www.FreeRTOS.org
* http://aws.amazon.com/freertos
*
* 1 tab == 4 spaces!
*/

#include "mcuboot_config.h"

#if defined( MCUBOOT_SIGN_RSA )

#error Please use MCUBoot imgtool.py to generate an RSA signing key \
and replace this file with the output of the tool.

const unsigned char rsa_pub_key[] = { 0x00 };
const unsigned int rsa_pub_key_len = 0;

#elif defined( MCUBOOT_SIGN_EC256 )

#error Please use MCUBoot imgtool.py to generate an EC signing key \
and replace this file with the output of the tool.

const unsigned char ecdsa_pub_key[] = { 0x00 };
const unsigned int ecdsa_pub_key_len = 0;

#endif /* if defined( MCUBOOT_SIGN_RSA ) */
/* Autogenerated by imgtool.py, do not edit. */
const unsigned char rsa_pub_key[] = {
0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01,
0x00, 0xc7, 0x86, 0xd3, 0xf4, 0x7f, 0xf1, 0xba,
0xfd, 0xa4, 0x63, 0x4f, 0x33, 0x13, 0x35, 0x9a,
0xa1, 0xdc, 0x37, 0x87, 0x69, 0x96, 0x8d, 0xb5,
0x2b, 0x82, 0xa6, 0x37, 0x6c, 0x20, 0x6d, 0x73,
0x28, 0x36, 0x3d, 0x8e, 0x81, 0x96, 0x85, 0xe5,
0xb8, 0x92, 0x2d, 0xd8, 0xb3, 0x7b, 0x8c, 0x36,
0x74, 0xdf, 0x42, 0x5a, 0x2b, 0xc9, 0x71, 0xa2,
0xd2, 0xc5, 0xd5, 0x7d, 0x68, 0x02, 0x8a, 0x91,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4a,
0x56, 0xa8, 0xae, 0xd4, 0x2b, 0x3a, 0x25, 0x89,
0x69, 0x02, 0x03, 0x01, 0x00, 0x01,
};
const unsigned int rsa_pub_key_len = 270;
6 changes: 4 additions & 2 deletions examples/evkbmimxrt1060/pubsub/app_main.c
Expand Up @@ -47,15 +47,15 @@
* information for the device to connect to broker and perform OTA updates. Disabling the flag results
* in disabling the CLI task and execution of the demo tasks in normal device operation mode.
*/
#define appmainPROVISIONING_MODE ( 1 )
#define appmainPROVISIONING_MODE ( 0 )

/**
* @brief Subscribe Publish demo tasks configuration.
* Subscribe publish demo task shows the basic functionality of connecting to an MQTT broker, subscribing
* to a topic, publishing messages to a topic and reporting the incoming messages on subscribed topic.
* Number of subscribe publish demo tasks to be spawned is configurable.
*/
#define appmainMQTT_NUM_PUBSUB_TASKS ( 2 )
#define appmainMQTT_NUM_PUBSUB_TASKS ( 0 )
#define appmainMQTT_PUBSUB_TASK_STACK_SIZE ( 2048 )
#define appmainMQTT_PUBSUB_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )

Expand Down Expand Up @@ -97,6 +97,8 @@ int app_main( void )

xResult = KVStore_init();

configPRINTF( ( "Version 0.1.0" ) );

if( xResult == pdFAIL )
{
configPRINTF( ( "Failed to initialize key value configuration store.\r\n" ) );
Expand Down
32 changes: 21 additions & 11 deletions projects/evkmimxrt1060/defender/.cproject
Expand Up @@ -133,10 +133,15 @@
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../examples/common/logging&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../examples/common/mqtt_agent&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../examples/common/kvstore&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../examples/common/ota&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../examples/common/cli&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../examples/evkbmimxrt1060/defender/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../examples/evkbmimxrt1060/defender/board&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../Middleware/AWS/jobs/source/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../Middleware/AWS/jobs/source/otaJobParser/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../Middleware/AWS/mqtt-stream/source/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../examples/common/mqtt_wrapper&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../examples/common/ota/ota_os&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../examples/common/ota&quot;"/>
</option>
<option id="com.crt.advproject.c.misc.dialect.694419664" name="Language standard" superClass="com.crt.advproject.c.misc.dialect" useByScannerDiscovery="true" value="com.crt.advproject.misc.dialect.gnu99" valueType="enumerated"/>
<option id="com.crt.advproject.gcc.specs.604491904" name="Specs" superClass="com.crt.advproject.gcc.specs" useByScannerDiscovery="false" value="com.crt.advproject.gcc.specs.newlibnano" valueType="enumerated"/>
Expand Down Expand Up @@ -266,10 +271,15 @@
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../examples/common/logging&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../examples/common/mqtt_agent&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../examples/common/kvstore&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../examples/common/ota&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../examples/common/cli&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../examples/evkbmimxrt1060/defender/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../examples/evkbmimxrt1060/defender/board&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../Middleware/AWS/jobs/source/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../Middleware/AWS/jobs/source/otaJobParser/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../Middleware/AWS/mqtt-stream/source/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../examples/common/mqtt_wrapper&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../examples/common/ota/ota_os&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../examples/common/ota&quot;"/>
</option>
<inputType id="com.crt.advproject.compiler.input.1469817485" superClass="com.crt.advproject.compiler.input"/>
</tool>
Expand Down Expand Up @@ -399,15 +409,6 @@
&lt;/TargetConfig&gt;</projectStorage>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.2067845682;com.crt.advproject.config.exe.debug.2067845682.;com.crt.advproject.gcc.exe.debug.105390258;com.crt.advproject.compiler.input.318269832">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.2067845682;com.crt.advproject.config.exe.debug.2067845682.;com.crt.advproject.gas.exe.debug.1187433041;com.crt.advproject.assembler.input.1723538560">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile"/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Debug">
<resource resourceType="PROJECT" workspacePath="/aws_iot_defender"/>
Expand All @@ -425,4 +426,13 @@
<core>cm7</core>
<coreId>core0_MIMXRT1062xxxxB</coreId>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.2067845682;com.crt.advproject.config.exe.debug.2067845682.;com.crt.advproject.gas.exe.debug.1187433041;com.crt.advproject.assembler.input.1723538560">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.2067845682;com.crt.advproject.config.exe.debug.2067845682.;com.crt.advproject.gcc.exe.debug.105390258;com.crt.advproject.compiler.input.318269832">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile"/>
</scannerConfigBuildInfo>
</storageModule>
</cproject>
25 changes: 25 additions & 0 deletions projects/evkmimxrt1060/defender/.project
Expand Up @@ -86,6 +86,11 @@
<type>2</type>
<locationURI>PARENT-3-PROJECT_LOC/examples/evkbmimxrt1060/defender/include</locationURI>
</link>
<link>
<name>jobs</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>linkscripts</name>
<type>2</type>
Expand All @@ -106,6 +111,11 @@
<type>2</type>
<locationURI>PARENT-3-PROJECT_LOC/core/components/phy/mdio/enet</locationURI>
</link>
<link>
<name>mqtt-stream</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>ota</name>
<type>2</type>
Expand Down Expand Up @@ -316,6 +326,11 @@
<type>1</type>
<locationURI>PARENT-3-PROJECT_LOC/core/drivers/trng/fsl_trng.h</locationURI>
</link>
<link>
<name>jobs/source</name>
<type>2</type>
<location>/Users/kanherea/Desktop/nxp_gri/iot-reference-nxp-rt1060/Middleware/AWS/jobs/source</location>
</link>
<link>
<name>lwip/port</name>
<type>2</type>
Expand All @@ -341,6 +356,11 @@
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>mqtt-stream/source</name>
<type>2</type>
<location>/Users/kanherea/Desktop/nxp_gri/iot-reference-nxp-rt1060/Middleware/AWS/mqtt-stream/source</location>
</link>
<link>
<name>pkcs11/corePKCS11</name>
<type>2</type>
Expand Down Expand Up @@ -426,6 +446,11 @@
<type>2</type>
<locationURI>PARENT-3-PROJECT_LOC/examples/common/mqtt_agent</locationURI>
</link>
<link>
<name>source/mqtt_wrapper</name>
<type>2</type>
<location>/Users/kanherea/Desktop/nxp_gri/iot-reference-nxp-rt1060/examples/common/mqtt_wrapper</location>
</link>
<link>
<name>source/ota</name>
<type>2</type>
Expand Down

0 comments on commit 926e33e

Please sign in to comment.