初始提交
This commit is contained in:
57
sec_cpu/misc/main.c
Normal file
57
sec_cpu/misc/main.c
Normal file
@@ -0,0 +1,57 @@
|
||||
/****************************************************************************
|
||||
|
||||
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
|
||||
|
||||
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
|
||||
be copied by any method or incorporated into another program without
|
||||
the express written consent of Aerospace C.Power. This Information or any portion
|
||||
thereof remains the property of Aerospace C.Power. The Information contained herein
|
||||
is believed to be accurate and Aerospace C.Power assumes no responsibility or
|
||||
liability for its use in any way and conveys no license or title under
|
||||
any patent or copyright and makes no representation or warranty that this
|
||||
Information is free from patent or copyright infringement.
|
||||
|
||||
****************************************************************************/
|
||||
/* os shim includes */
|
||||
#include "os_types.h"
|
||||
#include "os_mem.h"
|
||||
#include "iot_config.h"
|
||||
#include "sec_cpu_utils.h"
|
||||
#include "sec_cpu_timer.h"
|
||||
#include "sec_cpu_fsm.h"
|
||||
#include "sec_cpu_phy_isr.h"
|
||||
|
||||
/* mbedtls: 8k, crypto dsa: 2k */
|
||||
#define SEC_CPU_ALLOC_MEM_SZ ((8 + 2) * 1024)
|
||||
|
||||
static uint8_t g_sec_cpu_alloc_mem[SEC_CPU_ALLOC_MEM_SZ] = { 0 };
|
||||
|
||||
uint8_t g_sec_cpu_run_state = 0;
|
||||
|
||||
void iot_module_init(void)
|
||||
{
|
||||
sec_cpu_timer_sys_init();
|
||||
/* init alloc mem */
|
||||
os_mem_init(g_sec_cpu_alloc_mem, sizeof(g_sec_cpu_alloc_mem));
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
iot_module_init();
|
||||
|
||||
sec_cpu_printf("sec_cpu start\n");
|
||||
|
||||
sec_cpu_fsm_init();
|
||||
|
||||
g_sec_cpu_run_state = 1;
|
||||
|
||||
sec_cpu_phy_isr_init();
|
||||
|
||||
sec_cpu_fsm_main();
|
||||
|
||||
sec_cpu_printf("sec_cpu error !!!\n");
|
||||
|
||||
while (1);
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user