%% Copyright (C) 2013 Czech Technical University in Prague %% %% Authors: %% - Carlos Jenkins %% %% This program is free software; you can redistribute it and/or modify %% it under the terms of the GNU General Public License as published by %% the Free Software Foundation; either version 2 of the License, or %% (at your option) any later version. %% %% This program is distributed in the hope that it will be useful, %% but WITHOUT ANY WARRANTY; without even the implied warranty of %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %% GNU General Public License for more details. %% %% You should have received a copy of the GNU General Public License %% along with this program. If not, see . %% %% File : rpp_srmain.tlc %% Abstract: %% Custom file processing to generate a "main" file. %% Reference: ??? %selectfile NULL_FILE %function FcnSingleTaskingMain() void %if GenerateSampleERTMain %assign CompiledModel.GenerateSampleERTMain = TLC_FALSE %endif %assign cFile = LibCreateSourceFile("Source", "Custom", "ert_main") %openfile tmpBuf #include "%.h" /* Include Files */ #include "sys_common.h" #include "system.h" #include "cmd_proc_freertos_tms570.h" #include "FreeRTOS.h" #include "os_task.h" #include "can.h" #include "adc.h" #include "gio.h" #include "het.h" #include "emif.h" #include "dmm.h" #include "lin.h" #include "emac_test.h" #include "spi_tms570.h" #include "spi_drv.h" %closefile tmpBuf % %openfile tmpBuf %closefile tmpBuf % %openfile tmpBuf void main(void) { /* Initialize model */ %\ dmmInit(); gioInit(); hetInit(); sciInit(); canInit(); adcInit(); linInit(); emif_SDRAMInit(); spi_tms570_init(); _enable_IRQ(); initCmdProc(1, (uint8_t*)"\r\n----\r\n Rapid Prototyping Platform v00.01-001\r\n Porsche Engineering 12/2012\r\n----\r\n\r\nType commands", (uint8_t *)"\r\n--> "); vTaskStartScheduler(); // We should never get here while(1) ; %\ return 0; } %closefile tmpBuf % %endfunction