12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- /*==================================================================================================
- * Project : RTD AUTOSAR 4.4
- * Platform : CORTEXM
- * Peripheral : S32K3XX
- * Dependencies : none
- *
- * Autosar Version : 4.4.0
- * Autosar Revision : ASR_REL_4_4_REV_0000
- * Autosar Conf.Variant :
- * SW Version : 1.0.0
- * Build Version : S32K3_RTD_1_0_0_D2110_ASR_REL_4_4_REV_0000_20211007
- *
- * (c) Copyright 2020 - 2021 NXP Semiconductors
- * All Rights Reserved.
- *
- * NXP Confidential. This software is owned or controlled by NXP and may only be
- * used strictly in accordance with the applicable license terms. By expressly
- * accepting such terms or by downloading, installing, activating and/or otherwise
- * using the software, you are agreeing that you have read, and that you agree to
- * comply with and are bound by, such license terms. If you do not agree to be
- * bound by the applicable license terms, then you may not retain, install,
- * activate or otherwise use the software.
- ==================================================================================================*/
- /**
- * @file main.c
- * 主函数入口
- * @addtogroup main_module main module documentation
- * @{
- */
- /* Including necessary configuration files. */
- #include "Mcal.h"
- #include "CAN.h"
- #include "SchM_Can.h"
- #include "Mcu.h"
- #include "Mcl.h"
- #include "Port.h"
- #include "Dio.h"
- #include "Uart.h"
- #include "Eep.h"
- #include "Fls.h"
- #include "SchM_Fls.h"
- #include "Platform.h"
- #include "Lpuart_Uart_Ip_Irq.h"
- #include "Flexio_Uart_Ip_Irq.h"
- #include "Dma_Ip.h"
- #include "Dma_Ip_Irq.h"
- #include "Lpuart_Uart_Ip.h"
- #include "Gpt.h"
- #include "Wdg_43_Instance0.h"
- #include "Icu.h"
- /* User includes */
- #include <string.h>
- #include "hal_adapter.h"
- #include "Lpuart_Uart_Ip.h"
- #include "AppTaskMain.h"
- #include "AppTaskUart0.h"
- #include "AppTaskUart1.h"
- #include "AppTaskCan.h"
- #include "AppTaskGps.h"
- #include "BCU.h"
- #include "Hal_Fls.h"
- int main(void)
- {
- volatile int exit_code = 0;
- taskENTER_CRITICAL();//以下为临界区,不允许中断打断
- coreInit();
- SystemModulesInit();
- debugInit();
- UartInit();
- xTaskCreate(MainTask, (const char *const)"MainTask", 128, (void *)0, main_TASK_PRIORITY + 6, &MainTask_Handle);
- //xTaskCreate(Uart0Task, (const char *const)"Uart0_Bms_Task", 512, (void *)0, main_TASK_PRIORITY + 2, Uart0Task_Handle);
- xTaskCreate(CanTask, (const char *const)"CanTask", 256, (void *)0, main_TASK_PRIORITY + 2, &CanTask_Handle);
- xTaskCreate(GpsTask, (const char *const)"GpsTask", 2048, (void *)0, main_TASK_PRIORITY + 1, &GpsTask_Handle);
- xTaskCreate(Uart_4G_Task, (const char *const)"Uart_4G_Task", 1024, (void *)0, main_TASK_PRIORITY + 0, &Uart_4G_Task_Handle);
- xTaskCreate(BCU,(const char *const)"Bcu_Task",2048,(void *)0,main_TASK_PRIORITY + 3,&BcuTask_Handle);
- vTaskStartScheduler();
- taskEXIT_CRITICAL();
- for (;;)
- {
- if (exit_code != 0)
- {
- break;
- }
- }
- return exit_code;
- }
- /** @} */
|