Skip to content

Commit

Permalink
Provision: GFW now runs from RAM.
Browse files Browse the repository at this point in the history
  • Loading branch information
rcasallas-silabs committed May 2, 2024
1 parent 191c2f2 commit 1d919ed
Show file tree
Hide file tree
Showing 55 changed files with 37,136 additions and 49,153 deletions.
23 changes: 1 addition & 22 deletions provision/generator/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,9 @@
#include <lib/support/CHIPPlatformMemory.h>
#include <lib/support/CHIPMem.h>
#include <mbedtls/platform.h>
#include <FreeRTOS.h>
#include <task.h>

using namespace chip::DeviceLayer::Silabs;

#define MAIN_TASK_STACK_SIZE (1024)
#define MAIN_TASK_PRIORITY (configMAX_PRIORITIES - 1)

namespace {

TaskHandle_t main_Task;

void taskMain(void * pvParameter)
{
// Run manager
Provision::Manager &man = Provision::Manager::GetInstance();
while (man.Step());
// Reset
vTaskDelay(pdMS_TO_TICKS(500));
NVIC_SystemReset();
}

} // namespace

/*******************************************************************************
* Initialize application.
******************************************************************************/
Expand All @@ -53,7 +32,6 @@ void app_init(void)
mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree);
ReturnOnFailure(chip::Platform::MemoryInit());
#endif
xTaskCreate(taskMain, "Provision Task", MAIN_TASK_STACK_SIZE, nullptr, MAIN_TASK_PRIORITY, &main_Task);
}

/*******************************************************************************
Expand All @@ -62,4 +40,5 @@ void app_init(void)

void app_process_action(void)
{
Provision::Manager::GetInstance().Step();
}
File renamed without changes.
96 changes: 96 additions & 0 deletions provision/generator/efr32.slcp
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
project_name: generator
package: platform
quality: production
label: Matter Provisioner Generator
description: >
Generates the key-pair, and CSR for the DAC
category: Example|Platform
filter:
- { name: Device Type, value: [SoC] }
- { name: MCU, value: [32-bit MCU] }
- { name: Project Difficulty, value: [Beginner] }
ui_hints:
highlight:
- { path: README.md, focus: true }
readme:
- { path: README.md }

sdk: { id: gecko_sdk, version: 4.4.1 }

component:
- { id: sl_system }
- { id: device_init }
- { id: cpp_support }
- { id: iostream_rtt }
- { id: psa_its }
- { id: psa_driver }
- { id: psa_crypto }
- { id: psa_crypto_ecc_secp256r1 }
- { id: psa_crypto_sha256 }
- { id: psa_crypto_ecdsa }
- { id: psa_crypto_cipher_ctr }
- { id: mbedtls_pkcs5 }
- { id: mbedtls_ecc }
- { id: mbedtls_x509 }
- { id: bootloader_app_properties }

include:
- { path: '.' }
- { path: ../../examples }
- { path: ../../examples/platform/silabs }
- { path: ../../src }
- { path: ../../src/include }
- { path: ../../zzz_generated/app-common }
- { path: ../../third_party/nlassert/repo/include }
- { path: ../../third_party/nlio/repo/include }
- { path: ../../third_party/silabs/gecko_sdk/platform/bootloader }
- { path: ../../third_party/silabs/gecko_sdk/protocol/bluetooth/config }

source:
- { path: app.h }
- { path: app.cpp }
- { path: main.cpp }
- { path: efr32.c }
- { path: ../../examples/platform/silabs/provision/AttestationKey.h }
- { path: ../../examples/platform/silabs/provision/AttestationKeyPSA.cpp }
- { path: ../../examples/platform/silabs/provision/ProvisionChannel.h }
- { path: ../../examples/platform/silabs/provision/ProvisionChannelRTT.cpp }
- { path: ../../examples/platform/silabs/provision/ProvisionEncoder.h }
- { path: ../../examples/platform/silabs/provision/ProvisionEncoder.cpp }
- { path: ../../examples/platform/silabs/provision/ProvisionManager.h }
- { path: ../../examples/platform/silabs/provision/ProvisionManager.cpp }
- { path: ../../examples/platform/silabs/provision/ProvisionProtocol.h }
- { path: ../../examples/platform/silabs/provision/ProvisionProtocolV1.cpp }
- { path: ../../examples/platform/silabs/provision/ProvisionProtocolV2.cpp }
- { path: ../../examples/platform/silabs/provision/ProvisionStorage.h }
- { path: ../../examples/platform/silabs/provision/ProvisionStorageGeneric.h }
- { path: ../../examples/platform/silabs/provision/ProvisionStorage.cpp }
- { path: ../../examples/platform/silabs/provision/ProvisionStorageCustom.cpp }
- { path: ../../examples/platform/silabs/provision/ProvisionStorageDefault.cpp }
- { path: ../../src/lib/support/Base64.h }
- { path: ../../src/lib/support/Base64.cpp }
- { path: ../../src/lib/support/BytesToHex.h }
- { path: ../../src/lib/support/BytesToHex.cpp }
- { path: ../../src/lib/support/logging/CHIPLogging.h }
- { path: ../../src/lib/support/logging/TextOnlyLogging.cpp }
- { path: ../../src/platform/silabs/SilabsConfig.h }
- { path: ../../src/platform/silabs/SilabsConfig.cpp }
- { path: ../../src/platform/silabs/Logging.cpp }
- { path: ../../src/crypto/CHIPCryptoPALPSA.cpp }
- { path: ../../src/setup_payload/Base38Encode.h }
- { path: ../../src/setup_payload/Base38Encode.cpp }
- { path: ../../src/platform/silabs/multi-ota/OtaTlvEncryptionKey.h }
- { path: ../../src/platform/silabs/multi-ota/OtaTlvEncryptionKey.cpp }

define:
- { name: SL_PROVISION_CHANNEL_ENABLED, value: '1' }
- { name: SILABS_PROVISION_PROTOCOL_V1, value: '0' }
- { name: CHIP_SYSTEM_CONFIG_USE_SOCKETS, value: '1' }
- { name: CHIP_CONFIG_SHA256_CONTEXT_SIZE, value: '256' }
# This is needed to enable the OtaTlvEncryptionKey class
- { name: OTA_ENCRYPTION_ENABLE, value: '1'}

toolchain_settings:
- { option: optimize, value: size }
- { option: cxx_standard, value: c++17 }
- { option: gcc_compiler_option, value: -Wno-unused-parameter }
97 changes: 0 additions & 97 deletions provision/generator/generator_efr32.slcp

This file was deleted.

File renamed without changes.
Loading

0 comments on commit 1d919ed

Please sign in to comment.