3 * Copyright (c) 2020 Project CHIP Authors
4 * Copyright (c) 2020 Texas Instruments Incorporated
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
22 #include <platform/CHIPDeviceLayer.h>
24 #include <AppConfig.h>
29 /* Driver Header files */
30 #include <ti/drivers/Board.h>
31 #include <ti/drivers/GPIO.h>
32 #include <ti/drivers/NVS.h>
33 #include <ti/drivers/UART.h>
35 #include <ti/drivers/AESECB.h>
36 #include <ti/drivers/ECJPAKE.h>
37 #include <ti/drivers/SHA2.h>
40 #define TOTAL_ICALL_HEAP_SIZE (0xf000)
42 using namespace ::chip;
43 using namespace ::chip::Inet;
44 using namespace ::chip::DeviceLayer;
46 __attribute__((section(".heap"))) uint8_t GlobalHeapZoneBuffer[TOTAL_ICALL_HEAP_SIZE];
47 uint32_t heapSize = TOTAL_ICALL_HEAP_SIZE;
49 // ================================================================================
51 // ================================================================================
52 extern "C" void vApplicationStackOverflowHook(void)
60 // ================================================================================
62 // ================================================================================
65 int ret = CHIP_ERROR_MAX;
68 bpool((void *) GlobalHeapZoneBuffer, TOTAL_ICALL_HEAP_SIZE);
82 ret = GetAppTask().StartAppTask();
83 if (ret != CHIP_NO_ERROR)
85 // can't log until the kernel is started
86 // PLAT_LOG("GetAppTask().StartAppTask() failed");
91 vTaskStartScheduler();
93 // Should never get here.