EMS,硬件设计文件以及软件功能验证程序

This commit is contained in:
张鹏
2024-11-19 17:24:00 +08:00
parent 068b96a0ca
commit 3e80f8466a
351 changed files with 1109995 additions and 57 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,101 @@
/*
* File: ert_main.c
*
* Code generated for Simulink model 'test1'.
*
* Model version : 1.12
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Mon Jan 29 10:36:35 2024
*
* Target selection: ert.tlc
* Embedded hardware selection: Intel->x86-64 (Windows64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#include <stddef.h>
#include <stdio.h> /* This example main program uses printf/fflush */
#include "test1.h" /* Model header file */
/*
* Associating rt_OneStep with a real-time clock or interrupt service routine
* is what makes the generated code "real-time". The function rt_OneStep is
* always associated with the base rate of the model. Subrates are managed
* by the base rate from inside the generated code. Enabling/disabling
* interrupts and floating point context switches are target specific. This
* example code indicates where these should take place relative to executing
* the generated code step function. Overrun behavior should be tailored to
* your application needs. This example simply sets an error status in the
* real-time model and returns from rt_OneStep.
*/
void rt_OneStep(void);
void rt_OneStep(void)
{
static boolean_T OverrunFlag = false;
/* Disable interrupts here */
/* Check for overrun */
if (OverrunFlag) {
rtmSetErrorStatus(rtM, "Overrun");
return;
}
OverrunFlag = true;
/* Save FPU context here (if necessary) */
/* Re-enable timer or interrupt here */
/* Set model inputs here */
/* Step the model */
test1_step();
/* Get model outputs here */
/* Indicate task complete */
OverrunFlag = false;
/* Disable interrupts here */
/* Restore FPU context here (if necessary) */
/* Enable interrupts here */
}
/*
* The example main function illustrates what is required by your
* application code to initialize, execute, and terminate the generated code.
* Attaching rt_OneStep to a real-time clock is target specific. This example
* illustrates how you do this relative to initializing the model.
*/
int_T main(int_T argc, const char *argv[])
{
/* Unused arguments */
(void)(argc);
(void)(argv);
/* Initialize model */
test1_initialize();
/* Attach rt_OneStep to a timer or interrupt service routine with
* period 0.01 seconds (base rate of the model) here.
* The call syntax for rt_OneStep is
*
* rt_OneStep();
*/
printf("Warning: The simulation will run forever. "
"Generated ERT main won't simulate model step behavior. "
"To change this behavior select the 'MAT-file logging' option.\n");
fflush((NULL));
while (rtmGetErrorStatus(rtM) == (NULL)) {
/* Perform application tasks here */
}
/* Terminate model */
test1_terminate();
return 0;
}
/*
* File trailer for generated code.
*
* [EOF]
*/

View File

@@ -0,0 +1,57 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Code Generation Report</title>
<link rel="stylesheet" href="lib/index-css.css" type="text/css" />
</head>
<body class="tundra reportV2">
<script src="data/data.js"></script>
<script src="data/pages.js"></script>
<script src="data/model.js"></script>
<script src="lib/slcoderRpt/dojoConfig-release-global.js"></script>
<div class="reportPage_root_container" data-dojo-type="dijit/layout/BorderContainer"
data-dojo-props="design: 'headline'">
<div id="centerArea" class="centerPanel" data-dojo-type="dijit/layout/BorderContainer"
data-dojo-props="region: 'center'">
<div id="contentArea" class="contentPanel" data-dojo-type="dijit/layout/ContentPane"
data-dojo-props="region: 'top', splitter: true">
</div>
<div id="webviewArea" class="webviewPanel" data-dojo-type="dijit/layout/ContentPane"
data-dojo-props="region: 'center'">
<iframe id="rtw_webview" height="100%" width="100%" src="" style="display: none;"></iframe>
</div>
</div>
<div id="leftPanel" class="edgePanel" data-dojo-type="dijit/layout/ContentPane"
data-dojo-props="region: 'left', splitter: true">
</div>
</div>
<script type="text/javascript">
dojoConfig.isDebug = false;
dojoConfig.async = true;
dojoConfig.cacheBust = false;
</script>
<!-- identifier used in main_application -->
<div id="internalHTML"></div>
<script src="lib/bundle.index.js"></script>
</body>
</html>
<!-- LocalWords: async
-->

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
var modelInfo = {model:"test1"};var modelHierarchy=[{model:"test1",relativePath:"_internal.html",parent:"null"},];

View File

@@ -0,0 +1 @@
var reportPages = [["摘要","test1_survey.html"],["子系统报告","test1_subsystems.html"],["代码接口报告","test1_interface.html"],["可追溯性报告","test1_trace.html"],["静态代码指标报告","test1_metrics.html"],["代码替换报告","test1_replacements.html"],["代码生成器假设","test1_coderassumptions.html"]];

View File

@@ -0,0 +1,32 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Code Generation Report</title>
<link rel="stylesheet" href="lib/index-css.css" type="text/css" />
</head>
<body class="tundra reportV2">
<script src="data/model.js"></script>
<script src="lib/slcoderRpt/dojoConfig-release-global.js"></script>
<div id= "rootContainer" class="app_root_container" data-dojo-type="dijit/layout/BorderContainer"
data-dojo-props="design: 'headline'">
<div id="topBar" class="contentPanel" data-dojo-type="dijit/layout/ContentPane"
data-dojo-props="region: 'top'"></div>
<div id="reportPageArea" class="centerPanel" data-dojo-type="dijit/layout/ContentPane"
data-dojo-props="region: 'center'">
</div>
</div>
<script src="lib/bundle.index.js"></script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,257 @@
/* Copyright 2011-2019 The MathWorks, Inc. */
body,p,table {font-family: calibri, verdana, sans-serif;}
button,.buton {font-family: calibri, verdana, sans-serif;}
button,.button {font-size: small;}
.small_font {font-size: small;}
h1 { font-weight: normal; color: #000066; }
td { vertical-align: top }
th { background-color: #eeeeee; text-align: left; }
a:link { color: #0033cc; }
a:visited { color: #666666; }
input { font-family: sans-serif, verdana, calibri; }
table {
background-color: #ffffff;
width: 100%;
}
table.toc, table.button, table.panel {
border-style: none;
}
/* LineNumber */
.LN {
font-style: italic;
color: #888888;
}
/* Comment */
.CT {
font-style: italic;
color: #117755;
}
/* PreProcessor */
PP {
/* font-weight: bold; */
color: #992211;
}
/* Keyword */
.KW {
/* font-weight: bold; */
color: #0000FF;
}
/* Datatype */
.DT {
/* font-weight: bold; */
color: #112266
}
.highlighted {
background-color: yellow;
}
.highlightedCurrent {
background-color: rgba(150, 12, 116, 0.1);
}
input.search {
background-color: #ffffff;
}
input.failedSearch {
background-color: #F78181;
}
/* ensure that code2model links are comment green */
a.code2model:link {
color: #117755;
font-style: italic;
}
a.code2model:visited{
color: #117755;
font-style: italic;
}
.toc td, .button td, .panel td {
border-style: none;
padding: 4px;
}
h1 { font-weight: normal; color: #000066; }
td { vertical-align: top }
th { background-color: #eeeeee; text-align: left; }
a:link { color: #0033cc; }
a:visited { color: #666666; }
/******* table *******/
/* default table style */
table.AltRow {
border-collapse: collapse; border: none; border-spacing: 0pt;
border-top: solid #4F81BD 1.0pt; border-bottom: solid #4F81BD 1.0pt;
}
table.AltRow th, table.AltRow td { padding: 2pt 8pt 2pt 2pt }
/* default alternating row style */
table.AltRow tr.even td { background-color:#D3DFEE; border:none;}
table.AltRow tr.odd td { background-color:#FFFFFF; border:none;}
/* tr class="heading" */
table.AltRow tr.heading td, table.AltRow th {
background-color:#FFFFFF; font-weight:bold; border:none;
border-bottom: solid #4F81BD 1.0pt;
}
/* table class="FirstColumn" */
table.FirstColumn td:first-child { font-weight:bold }
/* table class="TotalRow" */
table.TotalRow tr:last-child { font-weight:bold }
table.TotalRow tr:last-child td { border-top: solid #4F81BD 1.0pt }
a.closeButton {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #f9f9f9), color-stop(1, #e9e9e9) );
background:-moz-linear-gradient( center top, #f9f9f9 5%, #e9e9e9 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#e9e9e9');
background-color:#f9f9f9;
-webkit-border-top-left-radius:20px;
-moz-border-radius-topleft:20px;
border-top-left-radius:20px;
-webkit-border-top-right-radius:20px;
-moz-border-radius-topright:20px;
border-top-right-radius:20px;
-webkit-border-bottom-right-radius:20px;
-moz-border-radius-bottomright:20px;
border-bottom-right-radius:20px;
-webkit-border-bottom-left-radius:20px;
-moz-border-radius-bottomleft:20px;
border-bottom-left-radius:20px;
text-indent:0;
border:2px solid #dcdcdc;
display:inline-block;
color:#454143;
font-family:Arial;
font-size:15px;
font-weight:bold;
font-style:normal;
height:20px;
line-height:20px;
width:20px;
text-decoration:none;
text-align:center;
cursor: pointer;
}
a.closeButton:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #e9e9e9), color-stop(1, #f9f9f9) );
background:-moz-linear-gradient( center top, #e9e9e9 5%, #f9f9f9 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e9e9e9', endColorstr='#f9f9f9');
background-color:#e9e9e9;
}
a.closeButton:active {
position:relative;
top:1px;
}
.button {
-moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
-webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
box-shadow:inset 0px 1px 0px 0px #ffffff;
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) );
background:-moz-linear-gradient( center top, #ededed 5%, #dfdfdf 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#dfdfdf');
background-color:#ededed;
-webkit-border-top-left-radius:5px;
-moz-border-radius-topleft:5px;
border-top-left-radius:5px;
-webkit-border-top-right-radius:5px;
-moz-border-radius-topright:5px;
border-top-right-radius:5px;
-webkit-border-bottom-right-radius:5px;
-moz-border-radius-bottomright:5px;
border-bottom-right-radius:5px;
-webkit-border-bottom-left-radius:5px;
-moz-border-radius-bottomleft:5px;
border-bottom-left-radius:5px;
text-indent:0px;
border:1px solid #dcdcdc;
display:inline-block;
color:black;
font-family:Arial;
font-size:12px;
font-weight:bold;
font-style:normal;
height:12px;
line-height:12px;
width:45px;
text-decoration:none;
text-align:center;
text-shadow:1px 1px 0px #ffffff;
}
.button:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #dfdfdf), color-stop(1, #ededed) );
background:-moz-linear-gradient( center top, #dfdfdf 5%, #ededed 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dfdfdf', endColorstr='#ededed');
background-color:#dfdfdf;
}.button:active {
position:relative;
top:1px;
}.button:disabled {
color:#777777;
}
ul.nav_list {
list-style-type:none;
display: block;
margin: 0;
padding: 0;
}
ul.nav_list li {
list-style-type:none;
display: inline;
margin: 0 18px 0 0;
padding: 0;
}
.nav_toolbar {
background-color: ivory;
margin-top: 0;
}
.inspect_body {
margin: 0;
margin-bottom: 0;
display: inline;
vertical-align:middle;
}
table.nav_table {
background-color: ivory;
border: none;
width: 100%;
display: inline;
vertical-align:middle;
}
table#rtwIdTracePanel > tr > td {
white-space: nowrap;
table-layout:fixed;
vertical-align:middle;
}
table.nav_table > button {
height: 20px;
}
select#fileSelector {
padding: 5px;
font-size: 16px;
line-height: 1;
border-radius: 0;
height: 34px;
}
.treeTable table{
table-layout: fixed;
}
.treeTable td:first-child > span{
display: inline-block;
text-overflow: ellipsis;
overflow: hidden;
width: 100%;
}

View File

@@ -0,0 +1,210 @@
// Copyright 2011-2017 The MathWorks, Inc.
function RTW_STRUCT(prop, value) {
this.prop = prop;
if (typeof(value) == 'undefined') {
this.value = "";
} else {
this.value = value;
}
}
// initialize the cache when code generation report is first loaded
function RTW_BOOK() {
this.length = 0;
this.rtw_pages = new Array();
this.getPage = function(file) {
return this.rtw_pages[file];
};
this.addPage = function(file) {
var page;
if (this.hasPage(file)) {
page = this.rtw_pages[file];
} else {
page = new RTW_PAGE(file);
this.rtw_pages[file] = page;
}
return page;
};
this.hasPage = function(file) {
return typeof(this.rtw_pages[file]) != 'undefined';
};
this.removePage = function(file) {
var tmp;
if (typeof(this.rtw_pages[file]) != 'undefined') {
tmp = this.rtw_pages[file];
delete this.rtw_pages[file];
this.length--;
}
return tmp;
};
}
if (!RTW_BOOK.instance) {
RTW_BOOK.instance = new RTW_BOOK();
}
function RTW_PAGE() {
this.length = 0;
this.items = new Array();
this.pagename = '';
if (arguments.length > 0 && typeof(arguments[1]) != 'undefined') {
this.pagename = arguments[1];
}
this.getItem = function(id) {
return this.items[id];
};
this.getItems = function() {
return this.items;
};
this.addItem = function(id, value) {
var tmp;
if (typeof(value) != 'undefined') {
if (typeof(this.items[id]) != 'undefined') {
this.length++;
} else {
tmp = this.items[id];
}
this.items[id] = value;
this.length++;
}
return tmp;
};
this.hasItem = function(id) {
return typeof(this.items[id]) != 'undefined';
};
this.removeItem = function(id) {
var tmp;
if (typeof(this.items[id]) != 'undefined') {
tmp = this.items[id];
delete this.items[id];
this.length--;
}
return tmp;
};
}
function rtwTableShrink(doc, obj, id, isSymbol) {
var hide, hide_text, show, show_text;
if (isSymbol) {
hide = "[-]";
hide_text = hide;
show = "[+]";
show_text = show;
} else {
hide = "[<u>hide</u>]";
hide_text = "[hide]";
show = "[<u>show</u>]";
show_text = "[show]";
}
hide = "<span class='shrink-button'>" + hide + "</span>";
show = "<span class='shrink-button'>" + show + "</span>";
if (doc.getElementsByName) {
var o = doc.getElementsByName(id);
for (var oid = 0; oid < o.length; ++oid) {
if (o[oid].style.display === "none") {
o[oid].style.display = "";
} else {
o[oid].style.display = "none";
}
}
if (o.length >= 0 && addToPage) {
addToPage(doc, o[0], 'display');
}
}
// IE supports innerText while other browsers support textContent
if (obj.textContent) {
var objText = obj.textContent;
} else {
var objText = obj.innerText;
}
if (objText.toLowerCase() === show_text.toLowerCase()) {
obj.innerHTML = hide;
} else {
obj.innerHTML = show;
}
if (addToPage) {
addToPage(doc, obj, 'innerHTML');
}
}
function rtwTableExpand(doc, controlObj, id) {
if (doc.getElementById) {
var obj = doc.getElementById(id);
if (obj && obj.style.display === "none") {
rtwTableShrink(doc, controlObj, id, false);
}
}
}
function restoreState(docObj) {
var filename = docObj.location.href;
if (RTW_BOOK.instance && RTW_BOOK.instance.hasPage(filename)) {
var page = RTW_BOOK.instance.getPage(filename);
var items = page.getItems();
var elem;
if (docObj.getElementsByName) {
for (var i in items) {
var o = docObj.getElementsByName(i);
for (var oid = 0; oid < o.length; ++oid) {
elem = o[oid];
if (items[i].prop === 'display') {
if (elem.style.display === 'none') {
elem.style.display = '';
} else {
elem.style.display = 'none';
}
} else if (items[i].prop === 'innerHTML') {
elem.innerHTML = items[i].value;
}
}
}
}
}
}
function addToPage(docObj, obj, prop) {
var filename = docObj.location.href;
if (RTW_BOOK.instance) {
var page;
if (RTW_BOOK.instance.hasPage(filename)) {
page = RTW_BOOK.instance.getPage(filename);
} else {
page = RTW_BOOK.instance.addPage(filename);
}
if (page.hasItem(obj.id)) {
page.removeItem(obj.id);
} else {
var my_struct;
if (prop === "display") {
my_struct = new RTW_STRUCT(prop, obj.style.display);
} else {
my_struct = new RTW_STRUCT(prop, obj.innerHTML);
}
page.addItem(obj.id, my_struct);
}
}
}
function rtwSwitchView(doc, obj1, obj2) {
if (doc.getElementsByName) {
var o = doc.getElementsByName(obj1);
for (var oid = 0; oid < o.length; ++oid) {
o[oid].style.display = "none";
}
if (o.length >= 0 && addToPage) {
addToPage(doc, o[0], 'display');
}
var o = doc.getElementsByName(obj2);
for (var oid = 0; oid < o.length; ++oid) {
o[oid].style.display = "";
}
if (o.length >= 0 && addToPage) {
addToPage(doc, o[0], 'display');
}
}
}

View File

@@ -0,0 +1,237 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="stylesheet" type="text/css" href="rtwreport.css" /><title>
'test1' 的代码生成器假设
</title>
</head>
<body onload="try {if (top) {if (top.rtwPageOnLoad) top.rtwPageOnLoad('rtwIdCoderAssumptionsPage'); else local_onload();}} catch(err) {};">
<h1>
'test1' 的代码生成器假设
</h1>
<div>
<p>
您可以检查的假设列表和所选目标环境的预期结果。有关详细信息,请参阅<a href="javascript: void(0)" onclick="postParentWindowMessage({message:'legacyMCall', expr:'helpview(fullfile(docroot,\'toolbox\',\'ecoder\',\'helptargets.map\'),\'verif_of_code_generation_assumptions\')'})" >代码生成假设的验证</a>
</p>
</div>
<div>
</div>
<h3 name="sec_Intel->x86-64_(Windows64)_目标硬件的_C_语言配置" id="sec_target_hardware">
Intel->x86-64 (Windows64) 目标硬件的 C 语言配置
</h3>
<table width="100%" border="0">
<tr>
<td align="left" valign="top">
<p>
<table class="AltRow" cellspacing="0">
<tr class="even">
<td align="left" valign="top">
BitPerChar
</td>
<td align="left" valign="top">
8
</td>
</tr>
<tr class="odd">
<td align="left" valign="top">
BitPerShort
</td>
<td align="left" valign="top">
16
</td>
</tr>
<tr class="even">
<td align="left" valign="top">
BitPerInt
</td>
<td align="left" valign="top">
32
</td>
</tr>
<tr class="odd">
<td align="left" valign="top">
BitPerLong
</td>
<td align="left" valign="top">
32
</td>
</tr>
<tr class="even">
<td align="left" valign="top">
BitPerFloat
</td>
<td align="left" valign="top">
32
</td>
</tr>
<tr class="odd">
<td align="left" valign="top">
BitPerDouble
</td>
<td align="left" valign="top">
64
</td>
</tr>
<tr class="even">
<td align="left" valign="top">
BitPerPointer
</td>
<td align="left" valign="top">
64
</td>
</tr>
<tr class="odd">
<td align="left" valign="top">
BitPerSizeT
</td>
<td align="left" valign="top">
64
</td>
</tr>
<tr class="even">
<td align="left" valign="top">
BitPerPtrDiffT
</td>
<td align="left" valign="top">
64
</td>
</tr>
</table>
<br /><table class="AltRow" cellspacing="0">
<tr class="even">
<td align="left" valign="top">
字节顺序
</td>
<td align="left" valign="top">
LittleEndian
</td>
</tr>
<tr class="odd">
<td align="left" valign="top">
有符号整数的右移是算术移位。
</td>
<td align="left" valign="top">
True
</td>
</tr>
<tr class="even">
<td align="left" valign="top">
有符号整数除法舍入方式
</td>
<td align="left" valign="top">
Zero
</td>
</tr>
</table>
</p>
</td>
</tr>
</table>
<h3 name="sec_C_语言标准" id="sec_lang_standard">
C 语言标准
</h3>
<table width="100%" border="0">
<tr>
<td align="left" valign="top">
<p>
零初始化代码已针对模型 'test1' 进行优化。
</p>
<p>
<table class="AltRow" cellspacing="0">
<tr class="even">
<td align="left" valign="top">
全局整数变量的初始值为零。
</td>
<td align="left" valign="top">
True
</td>
</tr>
<tr class="odd">
<td align="left" valign="top">
动态分配的 int 数组的每个元素的初始值为零。
</td>
<td align="left" valign="top">
True
</td>
</tr>
</table>
</p>
<p>
如果假设不正确,请使用<a href="javascript: void(0)" onclick="postParentWindowMessage({message:'legacyMCall', expr:'rtw.report.CoderAssumptions.showMemZeroInitParams(\'test1\')'})" >配置参数 > 代码生成 > 优化</a>设置删除优化。或者,配置目标环境以保持假设。
</p>
</td>
</tr>
</table>
<h3 name="sec_浮点数" id="sec_floating_point_num">
浮点数
</h3>
<table width="100%" border="0">
<tr>
<td align="left" valign="top">
<p>
代码生成配置为支持浮点数。目标环境可能会执行次正规数计算。
</p>
<p>
<table class="AltRow" cellspacing="0">
<tr class="even">
<td align="left" valign="top">
将计算出的次正规值的值下溢为零(FTZ)。
</td>
<td align="left" valign="top">
False
</td>
</tr>
<tr class="odd">
<td align="left" valign="top">
将传入的次正规值下溢为零(DAZ)。
</td>
<td align="left" valign="top">
False
</td>
</tr>
</table>
</p>
<p>
如果假设不正确,次正规数可能导致模型和生成的代码仿真结果不匹配。有关详细信息,请参阅<a href="javascript: void(0)" onclick="postParentWindowMessage({message:'legacyMCall', expr:'helpview(fullfile(docroot,\'toolbox\',\'ecoder\',\'helptargets.map\'),\'subnormal_numbers_performance\')'})" >次正规数性能</a>
</p>
</td>
</tr>
</table>
<script>function postParentWindowMessage(message) {window.parent.postMessage(message, "*");}</script>
</body>
</html>

View File

@@ -0,0 +1,381 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="stylesheet" type="text/css" href="rtwreport.css" /><script language="JavaScript" type="text/javascript">function rtwTableShrink(o) {var t = o.nextSibling;if (t.nodeType != 1) {t = t.nextSibling;}if (t.style.display == "none") {t.style.display = "";o.innerHTML = "[-]"} else {t.style.display = "none";o.innerHTML = "[+] ... "}}</script><script>function postParentWindowMessage(message) {window.parent.postMessage(message, "*");}</script><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>
test1 的代码接口报告
</title>
</head>
<body>
<h1>
test1 的代码接口报告
</h1>
<h3>
目录
</h3>
<ul>
<li>
<a href="#sec_入口函数">
入口函数
</a>
</li>
<li>
<a href="#sec_输入端口">
输入端口
</a>
</li>
<li>
<a href="#sec_输出端口">
输出端口
</a>
</li>
<li>
<a href="#sec_接口参数">
接口参数
</a>
</li>
<li>
<a href="#sec_数据存储">
数据存储
</a>
</li>
</ul>
<h3>
<a name="sec_入口函数">
入口函数
</a>
</h3>
<p>
函数: <a href="javascript: void(0)" onclick="postParentWindowMessage({message:'jumpToCode',location:'test1_initialize'})">test1_initialize</a>
</p>
<table width="100%" class="AltRow" cellspacing="0">
<tr class="even">
<td width="25%" align="left" valign="top">
原型
</td>
<td width="75%" align="left" valign="top">
<b>
void test1_initialize(void)
</b>
</td>
</tr>
<tr class="odd">
<td width="25%" align="left" valign="top">
描述
</td>
<td width="75%" align="left" valign="top">
生成代码的初始化入口函数
</td>
</tr>
<tr class="even">
<td width="25%" align="left" valign="top">
定时
</td>
<td width="75%" align="left" valign="top">
只能调用一次
</td>
</tr>
<tr class="odd">
<td width="25%" align="left" valign="top">
参数
</td>
<td width="75%" align="left" valign="top">
None
</td>
</tr>
<tr class="even">
<td width="25%" align="left" valign="top">
返回值
</td>
<td width="75%" align="left" valign="top">
None
</td>
</tr>
<tr class="odd">
<td width="25%" align="left" valign="top">
头文件
</td>
<td width="75%" align="left" valign="top">
<a href="javascript: void(0)" onclick="postParentWindowMessage({message:'jumpToCode',location:'test1.h'})">test1.h</a>
</td>
</tr>
</table>
<p>
函数: <a href="javascript: void(0)" onclick="postParentWindowMessage({message:'jumpToCode',location:'test1_step'})">test1_step</a>
</p>
<table width="100%" class="AltRow" cellspacing="0">
<tr class="even">
<td width="25%" align="left" valign="top">
原型
</td>
<td width="75%" align="left" valign="top">
<b>
void test1_step(void)
</b>
</td>
</tr>
<tr class="odd">
<td width="25%" align="left" valign="top">
描述
</td>
<td width="75%" align="left" valign="top">
生成代码的输出入口函数
</td>
</tr>
<tr class="even">
<td width="25%" align="left" valign="top">
定时
</td>
<td width="75%" align="left" valign="top">
必须周期性调用,每 0.01 秒调用一次
</td>
</tr>
<tr class="odd">
<td width="25%" align="left" valign="top">
参数
</td>
<td width="75%" align="left" valign="top">
None
</td>
</tr>
<tr class="even">
<td width="25%" align="left" valign="top">
返回值
</td>
<td width="75%" align="left" valign="top">
None
</td>
</tr>
<tr class="odd">
<td width="25%" align="left" valign="top">
头文件
</td>
<td width="75%" align="left" valign="top">
<a href="javascript: void(0)" onclick="postParentWindowMessage({message:'jumpToCode',location:'test1.h'})">test1.h</a>
</td>
</tr>
</table>
<p>
函数: <a href="javascript: void(0)" onclick="postParentWindowMessage({message:'jumpToCode',location:'test1_terminate'})">test1_terminate</a>
</p>
<table width="100%" class="AltRow" cellspacing="0">
<tr class="even">
<td width="25%" align="left" valign="top">
原型
</td>
<td width="75%" align="left" valign="top">
<b>
void test1_terminate(void)
</b>
</td>
</tr>
<tr class="odd">
<td width="25%" align="left" valign="top">
描述
</td>
<td width="75%" align="left" valign="top">
生成代码的终止入口函数
</td>
</tr>
<tr class="even">
<td width="25%" align="left" valign="top">
定时
</td>
<td width="75%" align="left" valign="top">
只能调用一次
</td>
</tr>
<tr class="odd">
<td width="25%" align="left" valign="top">
参数
</td>
<td width="75%" align="left" valign="top">
None
</td>
</tr>
<tr class="even">
<td width="25%" align="left" valign="top">
返回值
</td>
<td width="75%" align="left" valign="top">
None
</td>
</tr>
<tr class="odd">
<td width="25%" align="left" valign="top">
头文件
</td>
<td width="75%" align="left" valign="top">
<a href="javascript: void(0)" onclick="postParentWindowMessage({message:'jumpToCode',location:'test1.h'})">test1.h</a>
</td>
</tr>
</table>
<h3>
<a name="sec_输入端口">
输入端口
</a>
</h3>
<table width="100%" class="AltRow FirstColumn" cellspacing="0">
<tr class="heading">
<th width="42%" align="left" valign="top">
<b>
模块名称
</b>
</th>
<th width="26%" align="left" valign="top">
<b>
代码标识符
</b>
</th>
<th width="21%" align="left" valign="top">
<b>
数据类型
</b>
</th>
<th width="10%" align="right" valign="top">
<b>
维度
</b>
</th>
</tr>
<tr class="even">
<td width="42%" align="left" valign="top">
&lt;Root&gt;/in1
</td>
<td width="26%" align="left" valign="top">
x
</td>
<td width="21%" align="left" valign="top">
real_T
</td>
<td width="10%" align="right" valign="top">
1
</td>
</tr>
<tr class="odd">
<td width="42%" align="left" valign="top">
&lt;Root&gt;/in2
</td>
<td width="26%" align="left" valign="top">
y
</td>
<td width="21%" align="left" valign="top">
real_T
</td>
<td width="10%" align="right" valign="top">
1
</td>
</tr>
</table>
<h3>
<a name="sec_输出端口">
输出端口
</a>
</h3>
<table width="100%" class="AltRow FirstColumn" cellspacing="0">
<tr class="heading">
<th width="42%" align="left" valign="top">
<b>
模块名称
</b>
</th>
<th width="26%" align="left" valign="top">
<b>
代码标识符
</b>
</th>
<th width="21%" align="left" valign="top">
<b>
数据类型
</b>
</th>
<th width="10%" align="right" valign="top">
<b>
维度
</b>
</th>
</tr>
<tr class="even">
<td width="42%" align="left" valign="top">
&lt;Root&gt;/out1
</td>
<td width="26%" align="left" valign="top">
z
</td>
<td width="21%" align="left" valign="top">
real_T
</td>
<td width="10%" align="right" valign="top">
1
</td>
</tr>
</table>
<h3>
<a name="sec_接口参数">
接口参数
</a>
</h3>
<p>
模型中没有接口/可调参数。
</p>
<h3>
<a name="sec_数据存储">
数据存储
</a>
</h3>
<p>
模型中没有数据存储;请注意,此报告仅列出具有非自动存储类和全局数据存储的数据存储
</p>
</body>
</html>

View File

@@ -0,0 +1,18 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="stylesheet" type="text/css" href="rtwreport.css" /><title>
静态代码指标报告
</title>
</head>
<body onload="try {if (top) {if (top.rtwPageOnLoad) top.rtwPageOnLoad('rtwIdCodeMetrics'); else local_onload();}} catch(err) {};">
<h1>
静态代码指标报告
</h1>
<div>
</div>
<img src="hilite_warning.png" />未生成静态代码指标报告。在<b>配置参数 &gt; 代码生成 &gt; 报告</b>窗格中,选择<b>生成静态代码指标</b>。然后,重新编译模型。
</body>
</html>

View File

@@ -0,0 +1,19 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="stylesheet" type="text/css" href="rtwreport.css" /><title>
test1 中的代码替换
</title>
</head>
<body onload="try {if (top) {if (top.rtwPageOnLoad) top.rtwPageOnLoad('rtwIdCodeReplacements'); else local_onload();}} catch(err) {};">
<h1>
test1 中的代码替换
</h1>
<div>
</div>
<img src="hilite_warning.png" />未生成代码替换报告。选择 <a href="javascript: void(0)" onclick="postParentWindowMessage({message:'legacyMCall', expr:'configset.highlightParameter(\'test1\', \'GenerateCodeReplacementReport\')'})" >'摘要显示哪些模块触发了代码替换'</a>
<script>function postParentWindowMessage(message) {window.parent.postMessage(message, "*");}</script>
</body>
</html>

View File

@@ -0,0 +1,129 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="stylesheet" type="text/css" href="rtwreport.css" /><script language="JavaScript" type="text/javascript" src="rtwshrink.js"></script><title>
test1 中的非虚拟子系统
</title>
</head>
<body onload="try {if (top) {if (top.rtwPageOnLoad) top.rtwPageOnLoad('rtwIdSubsystem'); else local_onload();}} catch(err) {};">
<h1>
test1 中的非虚拟子系统
</h1>
<div>
</div>
<div>
</div>
<h3 name="sec_代码映射" id="sec_code_mapping">
1. 代码映射 <span title="Click to shrink or expand section" style="cursor:pointer;font-weight:normal;" id="rtwIdSubsystem_table_001_control" onclick ="if (rtwTableShrink) rtwTableShrink(window.document, this, 'rtwIdSubsystem_table_001', false)"><span class="shrink-button">[<u>hide</u>]</span></span>
</h3>
<table width="100%" name="rtwIdSubsystem_table_001" id="rtwIdSubsystem_table_001" border="0">
<tr>
<td align="left" valign="top">
<p>
此表: <br /><ul>
<li>
提供从模型中的非虚拟子系统到生成代码中的函数或可重用函数的映射。该表
</li>
<li>
记录导致非虚拟子系统不重用代码的异常,即使它们的函数打包设置(子系统模块对话框上的 '函数打包' 条目)被指定为 '自动' 或 '可重用函数' 也是如此。
</li>
</ul>
</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<table class="AltRow FirstColumn" cellspacing="0">
<tr class="heading">
<th align="left" valign="top">
<b>
子系统
</b>
</th>
<th align="left" valign="top">
<b>
重用设置
</b>
</th>
<th align="left" valign="top">
<b>
重用结果
</b>
</th>
<th align="left" valign="top">
<b>
结果诊断
</b>
</th>
</tr>
<tr class="even">
<td align="left" valign="top">
&lt;S1&gt;
</td>
<td align="left" valign="top">
Auto
</td>
<td align="left" valign="top">
Inline
</td>
<td align="left" valign="top">
<FONT COLOR="green">normal</FONT>
</td>
</tr>
</table>
</td>
</tr>
</table>
<h3 name="sec_代码重用异常" id="sec_reuse_exception">
2. 代码重用异常 <span title="Click to shrink or expand section" style="cursor:pointer;font-weight:normal;" id="rtwIdSubsystem_table_002_control" onclick ="if (rtwTableShrink) rtwTableShrink(window.document, this, 'rtwIdSubsystem_table_002', false)"><span class="shrink-button">[<u>hide</u>]</span></span>
</h3>
<table width="100%" name="rtwIdSubsystem_table_002" id="rtwIdSubsystem_table_002" border="0">
<tr>
<td align="left" valign="top">
<p>
本节提供在非虚拟子系统的函数打包设置为以下项的情况下导致子系统出问题的每个异常的详细信息<br /><ul>
<li>
'自动' - 导致生成内联代码段,
</li>
<li>
'自动' - 导致生成不带参数的不可重用函数,或
</li>
<li>
'可重用函数' - 导致生成不带参数的不可重用函数。
</li>
</ul>
<b>注意:</b>本节不报告图上带有相同 'Auto' 标记, 只因功能属性(如维度、数据类型、工作向量、参数等)的差异 而未重用的 非虚拟子系统。在这种情况下, 您可以通过检查模型中或内联生成代码中 子系统功能属性的差异来确定 不重用的原因。
</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<br /><b>模型中不存在重用异常。</b>
</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,190 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="stylesheet" type="text/css" href="rtwreport.css" /><title>
'test1' 的代码生成报告
</title>
</head>
<body onload="try {if (top) {if (top.rtwPageOnLoad) top.rtwPageOnLoad('rtwIdSummaryPage'); else local_onload();}} catch(err) {};">
<h1>
'test1' 的代码生成报告
</h1>
<div>
</div>
<div>
</div>
<h3 name="sec_模型信息" id="sec_model_info">
模型信息
</h3>
<table width="100%" border="0">
<tr>
<td align="left" valign="top">
<p>
<table class="AltRow" cellspacing="0">
<tr class="even">
<td align="left" valign="top">
作者
</td>
<td align="left" valign="top">
czy
</td>
</tr>
<tr class="odd">
<td align="left" valign="top">
上次修改者
</td>
<td align="left" valign="top">
czy
</td>
</tr>
<tr class="even">
<td align="left" valign="top">
模型版本
</td>
<td align="left" valign="top">
1.12
</td>
</tr>
<tr class="odd">
<td align="left" valign="top">
任务模式
</td>
<td align="left" valign="top">
单任务
</td>
</tr>
</table>
<br /><a onclick="return postParentWindowMessage({message:'legacyMCall', expr:'coder.internal.viewCodeConfigsetFromReport(\'file:///F:/desktop/EMS(能量管理系统)/simulink/slprj/ert/test1/tmwinternal/binfo.mat?test1\')'});" id="linkToCS_V2" href="javascript:void(0)">
代码生成时的配置设置
</a>
</p>
</td>
</tr>
</table>
<h3 name="sec_代码信息" id="sec_code_info">
代码信息
</h3>
<table width="100%" border="0">
<tr>
<td align="left" valign="top">
<p>
<table class="AltRow" cellspacing="0">
<tr class="even">
<td align="left" valign="top">
系统目标文件
</td>
<td align="left" valign="top">
ert.tlc
</td>
</tr>
<tr class="odd">
<td align="left" valign="top">
硬件设备类型
</td>
<td align="left" valign="top">
Intel->x86-64 (Windows64)
</td>
</tr>
<tr class="even">
<td align="left" valign="top">
Simulink Coder 版本
</td>
<td align="left" valign="top">
9.8 (R2022b) 13-May-2022
</td>
</tr>
<tr class="odd">
<td align="left" valign="top">
生成的源代码的时间戳
</td>
<td align="left" valign="top">
Mon Jan 29 10:36:35 2024
</td>
</tr>
<tr class="even">
<td align="left" valign="top">
<span id="sourceLocationTitle">生成的源代码的位置</span>
</td>
<td align="left" valign="top">
<span id="sourceLocation">F:\desktop\EMS(能量管理系统)\simulink\test1_ert_rtw</span>
</td>
</tr>
<tr class="odd">
<td align="left" valign="top">
编译的类型
</td>
<td align="left" valign="top">
模型
</td>
</tr>
<tr class="even">
<td align="left" valign="top">
指定的目标
</td>
<td align="left" valign="top">
<b>
<font Color="orange">
Unspecified
</font>
</b>
</td>
</tr>
</table>
</p>
</td>
</tr>
</table>
<h3 name="sec_其他信息" id="sec_additional_info">
其他信息
</h3>
<table width="100%" border="0">
<tr>
<td align="left" valign="top">
<table class="AltRow" cellspacing="0">
<tr class="even">
<td align="left" valign="top">
代码生成顾问
</td>
<td align="left" valign="top">
Not run
</td>
</tr>
</table>
</td>
</tr>
</table>
<script>function postParentWindowMessage(message) {window.parent.postMessage(message, "*");}</script>
</body>
</html>

View File

@@ -0,0 +1,7 @@
<HTML><HEAD><TITLE>test1 的可追溯性报告</TITLE>
<LINK rel="stylesheet" type="text/css" href="rtwreport.css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</HEAD><BODY ONLOAD="try {if (top) {if (top.rtwPageOnLoad) top.rtwPageOnLoad('rtwIdTraceability'); else local_onload();}} catch(err) {};">
<H1>test1 的可追溯性报告</H1>
<P><IMG src="hilite_warning.png" />未生成可追溯性报告。在<b>配置参数 &gt; 代码生成 &gt; 报告</b>窗格中,选择<b>已消除/虚拟模块</b>。然后,重新编译模型。</P>
</BODY></HTML>

View File

@@ -0,0 +1,4 @@
Simulink Coder project for test1 using . MATLAB root = D:\Program Files\MATLAB\R2022b. SimStruct date: 26-7月-2022 02:34:02
This file is generated by Simulink Coder for use by the make utility
to determine when to rebuild objects when the name of the current Simulink Coder project changes.
The rtwinfomat located at: ..\slprj\ert\test1\tmwinternal\binfo.mat

View File

@@ -0,0 +1,156 @@
/*
* File: rtwtypes.h
*
* Code generated for Simulink model 'test1'.
*
* Model version : 1.12
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Mon Jan 29 10:36:35 2024
*
* Target selection: ert.tlc
* Embedded hardware selection: Intel->x86-64 (Windows64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#ifndef RTWTYPES_H
#define RTWTYPES_H
/* Logical type definitions */
#if (!defined(__cplusplus))
#ifndef false
#define false (0U)
#endif
#ifndef true
#define true (1U)
#endif
#endif
/*=======================================================================*
* Target hardware information
* Device type: Intel->x86-64 (Windows64)
* Number of bits: char: 8 short: 16 int: 32
* long: 32
* native word size: 64
* Byte ordering: LittleEndian
* Signed integer division rounds to: Zero
* Shift right on a signed integer as arithmetic shift: on
*=======================================================================*/
/*=======================================================================*
* Fixed width word size data types: *
* int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers *
* uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers *
* real32_T, real64_T - 32 and 64 bit floating point numbers *
*=======================================================================*/
typedef signed char int8_T;
typedef unsigned char uint8_T;
typedef short int16_T;
typedef unsigned short uint16_T;
typedef int int32_T;
typedef unsigned int uint32_T;
typedef float real32_T;
typedef double real64_T;
/*===========================================================================*
* Generic type definitions: boolean_T, char_T, byte_T, int_T, uint_T, *
* real_T, time_T, ulong_T. *
*===========================================================================*/
typedef double real_T;
typedef double time_T;
typedef unsigned char boolean_T;
typedef int int_T;
typedef unsigned int uint_T;
typedef unsigned long ulong_T;
typedef char char_T;
typedef unsigned char uchar_T;
typedef char_T byte_T;
/*===========================================================================*
* Complex number type definitions *
*===========================================================================*/
#define CREAL_T
typedef struct {
real32_T re;
real32_T im;
} creal32_T;
typedef struct {
real64_T re;
real64_T im;
} creal64_T;
typedef struct {
real_T re;
real_T im;
} creal_T;
#define CINT8_T
typedef struct {
int8_T re;
int8_T im;
} cint8_T;
#define CUINT8_T
typedef struct {
uint8_T re;
uint8_T im;
} cuint8_T;
#define CINT16_T
typedef struct {
int16_T re;
int16_T im;
} cint16_T;
#define CUINT16_T
typedef struct {
uint16_T re;
uint16_T im;
} cuint16_T;
#define CINT32_T
typedef struct {
int32_T re;
int32_T im;
} cint32_T;
#define CUINT32_T
typedef struct {
uint32_T re;
uint32_T im;
} cuint32_T;
/*=======================================================================*
* Min and Max: *
* int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers *
* uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers *
*=======================================================================*/
#define MAX_int8_T ((int8_T)(127))
#define MIN_int8_T ((int8_T)(-128))
#define MAX_uint8_T ((uint8_T)(255U))
#define MAX_int16_T ((int16_T)(32767))
#define MIN_int16_T ((int16_T)(-32768))
#define MAX_uint16_T ((uint16_T)(65535U))
#define MAX_int32_T ((int32_T)(2147483647))
#define MIN_int32_T ((int32_T)(-2147483647-1))
#define MAX_uint32_T ((uint32_T)(0xFFFFFFFFU))
/* Block D-Work pointer type */
typedef void * pointer_T;
#endif /* RTWTYPES_H */
/*
* File trailer for generated code.
*
* [EOF]
*/

View File

@@ -0,0 +1,16 @@
set MATLAB=D:\Program Files\MATLAB\R2022b
call "\\DESKTOP-OPT7PK4\D$\Program Files\MATLAB\R2022b\bin\win64\checkMATLABRootForDriveMap.exe" "\\DESKTOP-OPT7PK4\D$\Program Files\MATLAB\R2022b" > mlEnv.txt
for /f %%a in (mlEnv.txt) do set "%%a"\n
cd .
if "%1"=="" ("D:\Program Files\MATLAB\R2022b\bin\win64\gmake" MATLAB_ROOT=%MATLAB_ROOT% ALT_MATLAB_ROOT=%ALT_MATLAB_ROOT% MATLAB_BIN=%MATLAB_BIN% ALT_MATLAB_BIN=%ALT_MATLAB_BIN% -f test1.mk all) else ("D:\Program Files\MATLAB\R2022b\bin\win64\gmake" MATLAB_ROOT=%MATLAB_ROOT% ALT_MATLAB_ROOT=%ALT_MATLAB_ROOT% MATLAB_BIN=%MATLAB_BIN% ALT_MATLAB_BIN=%ALT_MATLAB_BIN% -f test1.mk %1)
@if errorlevel 1 goto error_exit
exit /B 0
:error_exit
echo The make command returned an error of %errorlevel%
exit /B 1

View File

@@ -0,0 +1,57 @@
/*
* File: test1.c
*
* Code generated for Simulink model 'test1'.
*
* Model version : 1.12
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Mon Jan 29 10:36:35 2024
*
* Target selection: ert.tlc
* Embedded hardware selection: Intel->x86-64 (Windows64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#include "test1.h"
#include "rtwtypes.h"
/* Real-time model */
static RT_MODEL rtM_;
RT_MODEL *const rtM = &rtM_;
/* Exported data definition */
/* Definition for custom storage class: Global */
real_T x; /* '<Root>/in1' */
real_T y; /* '<Root>/in2' */
real_T z; /* '<Root>/out1' */
/* Model step function */
void test1_step(void)
{
/* Outport: '<Root>/out1' incorporates:
* Inport: '<Root>/in1'
* Inport: '<Root>/in2'
* MATLAB Function: '<Root>/fcn'
*/
z = x + y;
}
/* Model initialize function */
void test1_initialize(void)
{
/* (no initialization code required) */
}
/* Model terminate function */
void test1_terminate(void)
{
/* (no terminate code required) */
}
/*
* File trailer for generated code.
*
* [EOF]
*/

View File

@@ -0,0 +1,77 @@
/*
* File: test1.h
*
* Code generated for Simulink model 'test1'.
*
* Model version : 1.12
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Mon Jan 29 10:36:35 2024
*
* Target selection: ert.tlc
* Embedded hardware selection: Intel->x86-64 (Windows64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#ifndef RTW_HEADER_test1_h_
#define RTW_HEADER_test1_h_
#ifndef test1_COMMON_INCLUDES_
#define test1_COMMON_INCLUDES_
#include "rtwtypes.h"
#endif /* test1_COMMON_INCLUDES_ */
#include "test1_types.h"
/* Macros for accessing real-time model data structure */
#ifndef rtmGetErrorStatus
#define rtmGetErrorStatus(rtm) ((rtm)->errorStatus)
#endif
#ifndef rtmSetErrorStatus
#define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val))
#endif
/* Real-time Model Data Structure */
struct tag_RTM {
const char_T * volatile errorStatus;
};
/* Model entry point functions */
extern void test1_initialize(void);
extern void test1_step(void);
extern void test1_terminate(void);
/* Real-time Model object */
extern RT_MODEL *const rtM;
/* Exported data declaration */
/* Declaration for custom storage class: Global */
extern real_T x; /* '<Root>/in1' */
extern real_T y; /* '<Root>/in2' */
extern real_T z; /* '<Root>/out1' */
/*-
* The generated code includes comments that allow you to trace directly
* back to the appropriate location in the model. The basic format
* is <system>/block_name, where system is the system number (uniquely
* assigned by Simulink) and block_name is the name of the block.
*
* Use the MATLAB hilite_system command to trace the generated code back
* to the model. For example,
*
* hilite_system('<S3>') - opens system 3
* hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
*
* Here is the system hierarchy for this model
*
* '<Root>' : 'test1'
* '<S1>' : 'test1/fcn'
*/
#endif /* RTW_HEADER_test1_h_ */
/*
* File trailer for generated code.
*
* [EOF]
*/

View File

@@ -0,0 +1,334 @@
###########################################################################
## Makefile generated for component 'test1'.
##
## Makefile : test1.mk
## Generated on : Mon Jan 29 10:36:41 2024
## Final product: $(RELATIVE_PATH_TO_ANCHOR)/test1.exe
## Product type : executable
##
###########################################################################
###########################################################################
## MACROS
###########################################################################
# Macro Descriptions:
# PRODUCT_NAME Name of the system to build
# MAKEFILE Name of this makefile
# CMD_FILE Command file
PRODUCT_NAME = test1
MAKEFILE = test1.mk
MATLAB_ROOT = D:/Program Files/MATLAB/R2022b
MATLAB_BIN = D:/Program Files/MATLAB/R2022b/bin
MATLAB_ARCH_BIN = $(MATLAB_BIN)/win64
START_DIR = F:/desktop/EMS(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD>/simulink
SOLVER =
SOLVER_OBJ =
CLASSIC_INTERFACE = 0
TGT_FCN_LIB = ISO_C
MODEL_HAS_DYNAMICALLY_LOADED_SFCNS = 0
RELATIVE_PATH_TO_ANCHOR = ..
CMD_FILE = test1.rsp
C_STANDARD_OPTS =
CPP_STANDARD_OPTS =
###########################################################################
## TOOLCHAIN SPECIFICATIONS
###########################################################################
# Toolchain Name: LCC-win64 v2.4.1 | gmake (64-bit Windows)
# Supported Version(s): 2.4.1
# ToolchainInfo Version: 2022b
# Specification Revision: 1.0
#
#-----------
# MACROS
#-----------
SHELL = cmd
LCC_ROOT = $(MATLAB_ROOT)/sys/lcc64/lcc64
LCC_BUILDLIB = $(LCC_ROOT)/bin/buildlib
LCC_LIB = $(LCC_ROOT)/lib64
MW_EXTERNLIB_DIR = $(MATLAB_ROOT)/extern/lib/win64/microsoft
MW_LIB_DIR = $(MATLAB_ROOT)/lib/win64
TOOLCHAIN_INCLUDES = -I$(LCC_ROOT)/include64
TOOLCHAIN_SRCS =
TOOLCHAIN_INCS =
TOOLCHAIN_LIBS =
#------------------------
# BUILD TOOL COMMANDS
#------------------------
# C Compiler: Lcc-win64 C Compiler
CC_PATH = $(LCC_ROOT)/bin
CC = "$(CC_PATH)/lcc64"
# Linker: Lcc-win64 Linker
LD_PATH = $(LCC_ROOT)/bin
LD = "$(LD_PATH)/lcclnk64"
# Archiver: Lcc-win64 Archiver
AR_PATH = $(LCC_ROOT)/bin
AR = "$(AR_PATH)/lcclib64"
# MEX Tool: MEX Tool
MEX_PATH = $(MATLAB_ARCH_BIN)
MEX = "$(MEX_PATH)/mex"
# Download: Download
DOWNLOAD =
# Execute: Execute
EXECUTE = $(PRODUCT)
# Builder: GMAKE Utility
MAKE_PATH = %MATLAB%\bin\win64
MAKE = "$(MAKE_PATH)/gmake"
#-------------------------
# Directives/Utilities
#-------------------------
CDEBUG = -g
C_OUTPUT_FLAG = -Fo
LDDEBUG =
OUTPUT_FLAG = -o
ARDEBUG =
STATICLIB_OUTPUT_FLAG = /out:
MEX_DEBUG = -g
RM = @del /F
ECHO = @echo
MV = @move
RUN =
#----------------------------------------
# "Faster Builds" Build Configuration
#----------------------------------------
ARFLAGS =
CFLAGS = -c -w -noregistrylookup -nodeclspec -I$(LCC_ROOT)/include64
DOWNLOAD_FLAGS =
EXECUTE_FLAGS =
LDFLAGS = -s -L$(LCC_LIB) $(LDFLAGS_ADDITIONAL)
MEX_CPPFLAGS =
MEX_CPPLDFLAGS =
MEX_CFLAGS =
MEX_LDFLAGS =
MAKE_FLAGS = -f $(MAKEFILE)
SHAREDLIB_LDFLAGS = -dll -entry LibMain -s -L$(LCC_LIB) $(LDFLAGS_ADDITIONAL) $(DEF_FILE)
###########################################################################
## OUTPUT INFO
###########################################################################
PRODUCT = $(RELATIVE_PATH_TO_ANCHOR)/test1.exe
PRODUCT_TYPE = "executable"
BUILD_TYPE = "Top-Level Standalone Executable"
###########################################################################
## INCLUDE PATHS
###########################################################################
INCLUDES_BUILDINFO = -I$(START_DIR) -I$(START_DIR)/test1_ert_rtw -I$(MATLAB_ROOT)/extern/include -I$(MATLAB_ROOT)/simulink/include -I$(MATLAB_ROOT)/rtw/c/src -I$(MATLAB_ROOT)/rtw/c/src/ext_mode/common -I$(MATLAB_ROOT)/rtw/c/ert
INCLUDES = $(INCLUDES_BUILDINFO)
###########################################################################
## DEFINES
###########################################################################
DEFINES_BUILD_ARGS = -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTERMFCN=1 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0
DEFINES_CUSTOM =
DEFINES_OPTS = -DTID01EQ=0
DEFINES_STANDARD = -DMODEL=test1 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0
DEFINES = $(DEFINES_BUILD_ARGS) $(DEFINES_CUSTOM) $(DEFINES_OPTS) $(DEFINES_STANDARD)
###########################################################################
## SOURCE FILES
###########################################################################
SRCS = $(START_DIR)/test1_ert_rtw/test1.c
MAIN_SRC = $(START_DIR)/test1_ert_rtw/ert_main.c
ALL_SRCS = $(SRCS) $(MAIN_SRC)
###########################################################################
## OBJECTS
###########################################################################
OBJS = test1.obj
MAIN_OBJ = ert_main.obj
ALL_OBJS = $(OBJS) $(MAIN_OBJ)
###########################################################################
## PREBUILT OBJECT FILES
###########################################################################
PREBUILT_OBJS =
###########################################################################
## LIBRARIES
###########################################################################
LIBS =
###########################################################################
## SYSTEM LIBRARIES
###########################################################################
SYSTEM_LIBS =
###########################################################################
## ADDITIONAL TOOLCHAIN FLAGS
###########################################################################
#---------------
# C Compiler
#---------------
CFLAGS_BASIC = $(DEFINES) $(INCLUDES)
CFLAGS += $(CFLAGS_BASIC)
###########################################################################
## INLINED COMMANDS
###########################################################################
###########################################################################
## PHONY TARGETS
###########################################################################
.PHONY : all build buildobj clean info prebuild download execute
all : build
@echo "### Successfully generated all binary outputs."
build : prebuild $(PRODUCT)
buildobj : prebuild $(OBJS) $(PREBUILT_OBJS)
@echo "### Successfully generated all binary outputs."
prebuild :
download : $(PRODUCT)
execute : download
@echo "### Invoking postbuild tool "Execute" ..."
$(EXECUTE) $(EXECUTE_FLAGS)
@echo "### Done invoking postbuild tool."
###########################################################################
## FINAL TARGET
###########################################################################
#-------------------------------------------
# Create a standalone executable
#-------------------------------------------
$(PRODUCT) : $(OBJS) $(PREBUILT_OBJS) $(MAIN_OBJ)
@echo "### Creating standalone executable "$(PRODUCT)" ..."
$(LD) $(LDFLAGS) -o $(PRODUCT) @$(CMD_FILE) $(subst /,\,$(SYSTEM_LIBS)) $(subst /,\,$(TOOLCHAIN_LIBS))
@echo "### Created: $(PRODUCT)"
###########################################################################
## INTERMEDIATE TARGETS
###########################################################################
#---------------------
# SOURCE-TO-OBJECT
#---------------------
%.obj : %.c
$(CC) $(CFLAGS) -Fo"$@" $(subst /,\,"$<")
%.obj : $(RELATIVE_PATH_TO_ANCHOR)/%.c
$(CC) $(CFLAGS) -Fo"$@" $(subst /,\,"$<")
%.obj : $(START_DIR)/%.c
$(CC) $(CFLAGS) -Fo"$@" $(subst /,\,"$<")
%.obj : $(START_DIR)/test1_ert_rtw/%.c
$(CC) $(CFLAGS) -Fo"$@" $(subst /,\,"$<")
%.obj : $(MATLAB_ROOT)/rtw/c/src/%.c
$(CC) $(CFLAGS) -Fo"$@" $(subst /,\,"$<")
%.obj : $(MATLAB_ROOT)/simulink/src/%.c
$(CC) $(CFLAGS) -Fo"$@" $(subst /,\,"$<")
ert_main.obj : $(START_DIR)/test1_ert_rtw/ert_main.c
$(CC) $(CFLAGS) -Fo"$@" $(subst /,\,"$<")
test1.obj : $(START_DIR)/test1_ert_rtw/test1.c
$(CC) $(CFLAGS) -Fo"$@" $(subst /,\,"$<")
###########################################################################
## DEPENDENCIES
###########################################################################
$(ALL_OBJS) : rtw_proj.tmw $(MAKEFILE)
###########################################################################
## MISCELLANEOUS TARGETS
###########################################################################
info :
@echo "### PRODUCT = $(PRODUCT)"
@echo "### PRODUCT_TYPE = $(PRODUCT_TYPE)"
@echo "### BUILD_TYPE = $(BUILD_TYPE)"
@echo "### INCLUDES = $(INCLUDES)"
@echo "### DEFINES = $(DEFINES)"
@echo "### ALL_SRCS = $(ALL_SRCS)"
@echo "### ALL_OBJS = $(ALL_OBJS)"
@echo "### LIBS = $(LIBS)"
@echo "### MODELREF_LIBS = $(MODELREF_LIBS)"
@echo "### SYSTEM_LIBS = $(SYSTEM_LIBS)"
@echo "### TOOLCHAIN_LIBS = $(TOOLCHAIN_LIBS)"
@echo "### CFLAGS = $(CFLAGS)"
@echo "### LDFLAGS = $(LDFLAGS)"
@echo "### SHAREDLIB_LDFLAGS = $(SHAREDLIB_LDFLAGS)"
@echo "### ARFLAGS = $(ARFLAGS)"
@echo "### MEX_CFLAGS = $(MEX_CFLAGS)"
@echo "### MEX_CPPFLAGS = $(MEX_CPPFLAGS)"
@echo "### MEX_LDFLAGS = $(MEX_LDFLAGS)"
@echo "### MEX_CPPLDFLAGS = $(MEX_CPPLDFLAGS)"
@echo "### DOWNLOAD_FLAGS = $(DOWNLOAD_FLAGS)"
@echo "### EXECUTE_FLAGS = $(EXECUTE_FLAGS)"
@echo "### MAKE_FLAGS = $(MAKE_FLAGS)"
clean :
$(ECHO) "### Deleting all derived files..."
$(RM) $(subst /,\,$(PRODUCT))
$(RM) $(subst /,\,$(ALL_OBJS))
$(ECHO) "### Deleted all derived files."

View File

@@ -0,0 +1,2 @@
ert_main.obj
test1.obj

View File

@@ -0,0 +1,26 @@
/*
* File: test1_private.h
*
* Code generated for Simulink model 'test1'.
*
* Model version : 1.12
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Mon Jan 29 10:36:35 2024
*
* Target selection: ert.tlc
* Embedded hardware selection: Intel->x86-64 (Windows64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#ifndef RTW_HEADER_test1_private_h_
#define RTW_HEADER_test1_private_h_
#include "rtwtypes.h"
#include "test1_types.h"
#endif /* RTW_HEADER_test1_private_h_ */
/*
* File trailer for generated code.
*
* [EOF]
*/

View File

@@ -0,0 +1,28 @@
/*
* File: test1_types.h
*
* Code generated for Simulink model 'test1'.
*
* Model version : 1.12
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Mon Jan 29 10:36:35 2024
*
* Target selection: ert.tlc
* Embedded hardware selection: Intel->x86-64 (Windows64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#ifndef RTW_HEADER_test1_types_h_
#define RTW_HEADER_test1_types_h_
/* Forward declaration for rtModel */
typedef struct tag_RTM RT_MODEL;
#endif /* RTW_HEADER_test1_types_h_ */
/*
* File trailer for generated code.
*
* [EOF]
*/

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<MF0 version="1.1" packageUris="http://schema.mathworks.com/mf0/SlCache/19700101">
<slcache.FileAttributes type="slcache.FileAttributes" uuid="ad79e5ea-d9ab-4aee-96d7-7668158c0754">
<checksum>BbZH0/sxN9KlrEK2Rmjm+V9+MzUfVDew5ISwBuSuZqiAGtalg1D7yaYM3Ozk1lPrKC8efrkkn3kIQ5DLfbD6Og==</checksum>
</slcache.FileAttributes>
</MF0>