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.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,94 @@
/*
* File: ert_main.c
*
* Code generated for Simulink model 'fuc'.
*
* Model version : 1.18
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Sat Jan 6 10:24:46 2024
*
* Target selection: ert.tlc
* Embedded hardware selection: ARM Compatible->ARM 64-bit (LP64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#include <stddef.h>
#include <stdio.h> /* This example main program uses printf/fflush */
#include "fuc.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(fuc_M, "Overrun");
return;
}
OverrunFlag = true;
/* Save FPU context here (if necessary) */
/* Re-enable timer or interrupt here */
/* Set model inputs here */
/* Step the model */
fuc_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 */
fuc_initialize();
/* Simulating the model step behavior (in non real-time) to
* simulate model behavior at stop time.
*/
while ((rtmGetErrorStatus(fuc_M) == (NULL)) && !rtmGetStopRequested(fuc_M)) {
rt_OneStep();
}
/* Terminate model */
fuc_terminate();
return 0;
}
/*
* File trailer for generated code.
*
* [EOF]
*/

View File

@@ -0,0 +1,328 @@
/*
* File: fuc.c
*
* Code generated for Simulink model 'fuc'.
*
* Model version : 1.18
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Sat Jan 6 10:24:46 2024
*
* Target selection: ert.tlc
* Embedded hardware selection: ARM Compatible->ARM 64-bit (LP64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#include "fuc.h"
#include "rtwtypes.h"
#include <math.h>
#include "fuc_private.h"
#include "rt_nonfinite.h"
/* Block signals (default storage) */
B_fuc_T fuc_B;
/* Continuous states */
X_fuc_T fuc_X;
/* Real-time model */
static RT_MODEL_fuc_T fuc_M_;
RT_MODEL_fuc_T *const fuc_M = &fuc_M_;
/*
* This function updates continuous states using the ODE3 fixed-step
* solver algorithm
*/
static void rt_ertODEUpdateContinuousStates(RTWSolverInfo *si )
{
/* Solver Matrices */
static const real_T rt_ODE3_A[3] = {
1.0/2.0, 3.0/4.0, 1.0
};
static const real_T rt_ODE3_B[3][3] = {
{ 1.0/2.0, 0.0, 0.0 },
{ 0.0, 3.0/4.0, 0.0 },
{ 2.0/9.0, 1.0/3.0, 4.0/9.0 }
};
time_T t = rtsiGetT(si);
time_T tnew = rtsiGetSolverStopTime(si);
time_T h = rtsiGetStepSize(si);
real_T *x = rtsiGetContStates(si);
ODE3_IntgData *id = (ODE3_IntgData *)rtsiGetSolverData(si);
real_T *y = id->y;
real_T *f0 = id->f[0];
real_T *f1 = id->f[1];
real_T *f2 = id->f[2];
real_T hB[3];
int_T i;
int_T nXc = 3;
rtsiSetSimTimeStep(si,MINOR_TIME_STEP);
/* Save the state values at time t in y, we'll use x as ynew. */
(void) memcpy(y, x,
(uint_T)nXc*sizeof(real_T));
/* Assumes that rtsiSetT and ModelOutputs are up-to-date */
/* f0 = f(t,y) */
rtsiSetdX(si, f0);
fuc_derivatives();
/* f(:,2) = feval(odefile, t + hA(1), y + f*hB(:,1), args(:)(*)); */
hB[0] = h * rt_ODE3_B[0][0];
for (i = 0; i < nXc; i++) {
x[i] = y[i] + (f0[i]*hB[0]);
}
rtsiSetT(si, t + h*rt_ODE3_A[0]);
rtsiSetdX(si, f1);
fuc_step();
fuc_derivatives();
/* f(:,3) = feval(odefile, t + hA(2), y + f*hB(:,2), args(:)(*)); */
for (i = 0; i <= 1; i++) {
hB[i] = h * rt_ODE3_B[1][i];
}
for (i = 0; i < nXc; i++) {
x[i] = y[i] + (f0[i]*hB[0] + f1[i]*hB[1]);
}
rtsiSetT(si, t + h*rt_ODE3_A[1]);
rtsiSetdX(si, f2);
fuc_step();
fuc_derivatives();
/* tnew = t + hA(3);
ynew = y + f*hB(:,3); */
for (i = 0; i <= 2; i++) {
hB[i] = h * rt_ODE3_B[2][i];
}
for (i = 0; i < nXc; i++) {
x[i] = y[i] + (f0[i]*hB[0] + f1[i]*hB[1] + f2[i]*hB[2]);
}
rtsiSetT(si, tnew);
rtsiSetSimTimeStep(si,MAJOR_TIME_STEP);
}
real_T rt_powd_snf(real_T u0, real_T u1)
{
real_T y;
if (rtIsNaN(u0) || rtIsNaN(u1)) {
y = (rtNaN);
} else {
real_T tmp;
real_T tmp_0;
tmp = fabs(u0);
tmp_0 = fabs(u1);
if (rtIsInf(u1)) {
if (tmp == 1.0) {
y = 1.0;
} else if (tmp > 1.0) {
if (u1 > 0.0) {
y = (rtInf);
} else {
y = 0.0;
}
} else if (u1 > 0.0) {
y = 0.0;
} else {
y = (rtInf);
}
} else if (tmp_0 == 0.0) {
y = 1.0;
} else if (tmp_0 == 1.0) {
if (u1 > 0.0) {
y = u0;
} else {
y = 1.0 / u0;
}
} else if (u1 == 2.0) {
y = u0 * u0;
} else if ((u1 == 0.5) && (u0 >= 0.0)) {
y = sqrt(u0);
} else if ((u0 < 0.0) && (u1 > floor(u1))) {
y = (rtNaN);
} else {
y = pow(u0, u1);
}
}
return y;
}
/* Model step function */
void fuc_step(void)
{
real_T rtb_Sum;
real_T rtb_Sum_tmp;
real_T rtb_y;
real_T rtb_y_c;
real_T y_j_tmp;
if (rtmIsMajorTimeStep(fuc_M)) {
/* set solver stop time */
rtsiSetSolverStopTime(&fuc_M->solverInfo,((fuc_M->Timing.clockTick0+1)*
fuc_M->Timing.stepSize0));
} /* end MajorTimeStep */
/* Update absolute time of base rate at minor time step */
if (rtmIsMinorTimeStep(fuc_M)) {
fuc_M->Timing.t[0] = rtsiGetT(&fuc_M->solverInfo);
}
/* Clock: '<S2>/t' */
rtb_y = fuc_M->Timing.t[0];
/* MATLAB Function: '<S2>/sint' incorporates:
* Clock: '<S2>/t'
* MATLAB Function: '<S2>/ddsint'
* SignalConversion generated from: '<S8>/ SFunction '
*/
rtb_Sum_tmp = sin(0.20943951023931953 * rtb_y);
/* Sum: '<Root>/Sum' incorporates:
* Integrator: '<Root>/sys'
* MATLAB Function: '<S2>/sint'
* SignalConversion generated from: '<S8>/ SFunction '
*/
rtb_Sum = rtb_Sum_tmp * 0.0 - fuc_X.sys_CSTATE;
/* MATLAB Function: '<S2>/dsint' incorporates:
* Clock: '<S2>/t'
* SignalConversion generated from: '<S7>/ SFunction '
*/
rtb_y_c = cos(0.20943951023931953 * rtb_y) * 0.0;
/* Integrator: '<Root>/Integrator' */
fuc_B.x2 = fuc_X.Integrator_CSTATE;
/* MATLAB Function: '<Root>/u(2)+u(1)*u(3)-u(4)' incorporates:
* SignalConversion generated from: '<S5>/ SFunction '
*/
rtb_y = (rtb_y_c + rtb_Sum) - fuc_B.x2;
/* MATLAB Function: '<Root>/u' incorporates:
* Integrator: '<Root>/sys'
* MATLAB Function: '<Root>/-u(3)//u(2)*u(1)^3+u(4)//u(2)'
* MATLAB Function: '<Root>/u(1)//u(3)*u(2)^3'
*/
y_j_tmp = rt_powd_snf(fuc_X.sys_CSTATE, 3.0);
/* MATLAB Function: '<Root>/-u(3)//u(2)*u(1)^3+u(4)//u(2)' incorporates:
* Integrator: '<Root>/Integrator1'
* MATLAB Function: '<Root>/u'
* MATLAB Function: '<S2>/ddsint'
* SignalConversion generated from: '<S3>/ SFunction '
* SignalConversion generated from: '<S6>/ SFunction '
*/
fuc_B.y_j = ((((rtb_Sum_tmp * -0.0 + rtb_Sum) + (rtb_y_c - fuc_B.x2)) +
fuc_X.Integrator1_CSTATE * y_j_tmp) + rtb_y) - y_j_tmp;
/* MATLAB Function: '<Root>/u(1)//u(3)*u(2)^3' incorporates:
* SignalConversion generated from: '<S4>/ SFunction '
*/
fuc_B.y = rtb_y * y_j_tmp;
if (rtmIsMajorTimeStep(fuc_M)) {
rt_ertODEUpdateContinuousStates(&fuc_M->solverInfo);
/* Update absolute time for base rate */
/* The "clockTick0" counts the number of times the code of this task has
* been executed. The absolute time is the multiplication of "clockTick0"
* and "Timing.stepSize0". Size of "clockTick0" ensures timer will not
* overflow during the application lifespan selected.
*/
++fuc_M->Timing.clockTick0;
fuc_M->Timing.t[0] = rtsiGetSolverStopTime(&fuc_M->solverInfo);
{
/* Update absolute timer for sample time: [10.0s, 0.0s] */
/* The "clockTick1" counts the number of times the code of this task has
* been executed. The resolution of this integer timer is 10.0, which is the step size
* of the task. Size of "clockTick1" ensures timer will not overflow during the
* application lifespan selected.
*/
fuc_M->Timing.clockTick1++;
}
} /* end MajorTimeStep */
}
/* Derivatives for root system: '<Root>' */
void fuc_derivatives(void)
{
XDot_fuc_T *_rtXdot;
_rtXdot = ((XDot_fuc_T *) fuc_M->derivs);
/* Derivatives for Integrator: '<Root>/sys' */
_rtXdot->sys_CSTATE = fuc_B.x2;
/* Derivatives for Integrator: '<Root>/Integrator' */
_rtXdot->Integrator_CSTATE = fuc_B.y_j;
/* Derivatives for Integrator: '<Root>/Integrator1' */
_rtXdot->Integrator1_CSTATE = fuc_B.y;
}
/* Model initialize function */
void fuc_initialize(void)
{
/* Registration code */
/* initialize non-finites */
rt_InitInfAndNaN(sizeof(real_T));
{
/* Setup solver object */
rtsiSetSimTimeStepPtr(&fuc_M->solverInfo, &fuc_M->Timing.simTimeStep);
rtsiSetTPtr(&fuc_M->solverInfo, &rtmGetTPtr(fuc_M));
rtsiSetStepSizePtr(&fuc_M->solverInfo, &fuc_M->Timing.stepSize0);
rtsiSetdXPtr(&fuc_M->solverInfo, &fuc_M->derivs);
rtsiSetContStatesPtr(&fuc_M->solverInfo, (real_T **) &fuc_M->contStates);
rtsiSetNumContStatesPtr(&fuc_M->solverInfo, &fuc_M->Sizes.numContStates);
rtsiSetNumPeriodicContStatesPtr(&fuc_M->solverInfo,
&fuc_M->Sizes.numPeriodicContStates);
rtsiSetPeriodicContStateIndicesPtr(&fuc_M->solverInfo,
&fuc_M->periodicContStateIndices);
rtsiSetPeriodicContStateRangesPtr(&fuc_M->solverInfo,
&fuc_M->periodicContStateRanges);
rtsiSetErrorStatusPtr(&fuc_M->solverInfo, (&rtmGetErrorStatus(fuc_M)));
rtsiSetRTModelPtr(&fuc_M->solverInfo, fuc_M);
}
rtsiSetSimTimeStep(&fuc_M->solverInfo, MAJOR_TIME_STEP);
fuc_M->intgData.y = fuc_M->odeY;
fuc_M->intgData.f[0] = fuc_M->odeF[0];
fuc_M->intgData.f[1] = fuc_M->odeF[1];
fuc_M->intgData.f[2] = fuc_M->odeF[2];
fuc_M->contStates = ((X_fuc_T *) &fuc_X);
rtsiSetSolverData(&fuc_M->solverInfo, (void *)&fuc_M->intgData);
rtsiSetIsMinorTimeStepWithModeChange(&fuc_M->solverInfo, false);
rtsiSetSolverName(&fuc_M->solverInfo,"ode3");
rtmSetTPtr(fuc_M, &fuc_M->Timing.tArray[0]);
fuc_M->Timing.stepSize0 = 10.0;
/* InitializeConditions for Integrator: '<Root>/sys' */
fuc_X.sys_CSTATE = 0.0;
/* InitializeConditions for Integrator: '<Root>/Integrator' */
fuc_X.Integrator_CSTATE = 0.0;
/* InitializeConditions for Integrator: '<Root>/Integrator1' */
fuc_X.Integrator1_CSTATE = 0.0;
}
/* Model terminate function */
void fuc_terminate(void)
{
/* (no terminate code required) */
}
/*
* File trailer for generated code.
*
* [EOF]
*/

View File

@@ -0,0 +1,191 @@
/*
* File: fuc.h
*
* Code generated for Simulink model 'fuc'.
*
* Model version : 1.18
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Sat Jan 6 10:24:46 2024
*
* Target selection: ert.tlc
* Embedded hardware selection: ARM Compatible->ARM 64-bit (LP64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#ifndef RTW_HEADER_fuc_h_
#define RTW_HEADER_fuc_h_
#ifndef fuc_COMMON_INCLUDES_
#define fuc_COMMON_INCLUDES_
#include "rtwtypes.h"
#include "rtw_continuous.h"
#include "rtw_solver.h"
#endif /* fuc_COMMON_INCLUDES_ */
#include "fuc_types.h"
#include <string.h>
#include "rt_nonfinite.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
#ifndef rtmGetStopRequested
#define rtmGetStopRequested(rtm) ((rtm)->Timing.stopRequestedFlag)
#endif
#ifndef rtmSetStopRequested
#define rtmSetStopRequested(rtm, val) ((rtm)->Timing.stopRequestedFlag = (val))
#endif
#ifndef rtmGetStopRequestedPtr
#define rtmGetStopRequestedPtr(rtm) (&((rtm)->Timing.stopRequestedFlag))
#endif
#ifndef rtmGetT
#define rtmGetT(rtm) (rtmGetTPtr((rtm))[0])
#endif
#ifndef rtmGetTPtr
#define rtmGetTPtr(rtm) ((rtm)->Timing.t)
#endif
/* Block signals (default storage) */
typedef struct {
real_T x2; /* '<Root>/Integrator' */
real_T y; /* '<Root>/u(1)//u(3)*u(2)^3' */
real_T y_j; /* '<Root>/-u(3)//u(2)*u(1)^3+u(4)//u(2)' */
} B_fuc_T;
/* Continuous states (default storage) */
typedef struct {
real_T sys_CSTATE; /* '<Root>/sys' */
real_T Integrator_CSTATE; /* '<Root>/Integrator' */
real_T Integrator1_CSTATE; /* '<Root>/Integrator1' */
} X_fuc_T;
/* State derivatives (default storage) */
typedef struct {
real_T sys_CSTATE; /* '<Root>/sys' */
real_T Integrator_CSTATE; /* '<Root>/Integrator' */
real_T Integrator1_CSTATE; /* '<Root>/Integrator1' */
} XDot_fuc_T;
/* State disabled */
typedef struct {
boolean_T sys_CSTATE; /* '<Root>/sys' */
boolean_T Integrator_CSTATE; /* '<Root>/Integrator' */
boolean_T Integrator1_CSTATE; /* '<Root>/Integrator1' */
} XDis_fuc_T;
#ifndef ODE3_INTG
#define ODE3_INTG
/* ODE3 Integration Data */
typedef struct {
real_T *y; /* output */
real_T *f[3]; /* derivatives */
} ODE3_IntgData;
#endif
/* Real-time Model Data Structure */
struct tag_RTM_fuc_T {
const char_T *errorStatus;
RTWSolverInfo solverInfo;
X_fuc_T *contStates;
int_T *periodicContStateIndices;
real_T *periodicContStateRanges;
real_T *derivs;
XDis_fuc_T *contStateDisabled;
boolean_T zCCacheNeedsReset;
boolean_T derivCacheNeedsReset;
boolean_T CTOutputIncnstWithState;
real_T odeY[3];
real_T odeF[3][3];
ODE3_IntgData intgData;
/*
* Sizes:
* The following substructure contains sizes information
* for many of the model attributes such as inputs, outputs,
* dwork, sample times, etc.
*/
struct {
int_T numContStates;
int_T numPeriodicContStates;
int_T numSampTimes;
} Sizes;
/*
* Timing:
* The following substructure contains information regarding
* the timing information for the model.
*/
struct {
uint16_T clockTick0;
time_T stepSize0;
uint16_T clockTick1;
SimTimeStep simTimeStep;
boolean_T stopRequestedFlag;
time_T *t;
time_T tArray[2];
} Timing;
};
/* Block signals (default storage) */
extern B_fuc_T fuc_B;
/* Continuous states (default storage) */
extern X_fuc_T fuc_X;
/* Model entry point functions */
extern void fuc_initialize(void);
extern void fuc_step(void);
extern void fuc_terminate(void);
/* Real-time Model object */
extern RT_MODEL_fuc_T *const fuc_M;
/*-
* These blocks were eliminated from the model due to optimizations:
*
* Block '<Root>/Scope' : Unused code path elimination
*/
/*-
* 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>' : 'fuc'
* '<S1>' : 'fuc/-u(3)//u(2)*u(1)^3+u(4)//u(2)'
* '<S2>' : 'fuc/Subsystem'
* '<S3>' : 'fuc/u'
* '<S4>' : 'fuc/u(1)//u(3)*u(2)^3'
* '<S5>' : 'fuc/u(2)+u(1)*u(3)-u(4)'
* '<S6>' : 'fuc/Subsystem/ddsint'
* '<S7>' : 'fuc/Subsystem/dsint'
* '<S8>' : 'fuc/Subsystem/sint'
*/
#endif /* RTW_HEADER_fuc_h_ */
/*
* File trailer for generated code.
*
* [EOF]
*/

View File

@@ -0,0 +1,45 @@
/*
* File: fuc_private.h
*
* Code generated for Simulink model 'fuc'.
*
* Model version : 1.18
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Sat Jan 6 10:24:46 2024
*
* Target selection: ert.tlc
* Embedded hardware selection: ARM Compatible->ARM 64-bit (LP64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#ifndef RTW_HEADER_fuc_private_h_
#define RTW_HEADER_fuc_private_h_
#include "rtwtypes.h"
#include "fuc_types.h"
/* Private macros used by the generated code to access rtModel */
#ifndef rtmIsMajorTimeStep
#define rtmIsMajorTimeStep(rtm) (((rtm)->Timing.simTimeStep) == MAJOR_TIME_STEP)
#endif
#ifndef rtmIsMinorTimeStep
#define rtmIsMinorTimeStep(rtm) (((rtm)->Timing.simTimeStep) == MINOR_TIME_STEP)
#endif
#ifndef rtmSetTPtr
#define rtmSetTPtr(rtm, val) ((rtm)->Timing.t = (val))
#endif
extern real_T rt_powd_snf(real_T u0, real_T u1);
/* private model entry point functions */
extern void fuc_derivatives(void);
#endif /* RTW_HEADER_fuc_private_h_ */
/*
* File trailer for generated code.
*
* [EOF]
*/

View File

@@ -0,0 +1,28 @@
/*
* File: fuc_types.h
*
* Code generated for Simulink model 'fuc'.
*
* Model version : 1.18
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Sat Jan 6 10:24:46 2024
*
* Target selection: ert.tlc
* Embedded hardware selection: ARM Compatible->ARM 64-bit (LP64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#ifndef RTW_HEADER_fuc_types_h_
#define RTW_HEADER_fuc_types_h_
/* Forward declaration for rtModel */
typedef struct tag_RTM_fuc_T RT_MODEL_fuc_T;
#endif /* RTW_HEADER_fuc_types_h_ */
/*
* File trailer for generated code.
*
* [EOF]
*/

View File

@@ -0,0 +1,96 @@
/*
* File: rtGetInf.c
*
* Code generated for Simulink model 'fuc'.
*
* Model version : 1.18
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Sat Jan 6 10:24:46 2024
*
* Target selection: ert.tlc
* Embedded hardware selection: ARM Compatible->ARM 64-bit (LP64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#include "rtwtypes.h"
#include "rtGetInf.h"
#include <stddef.h>
#include "rt_nonfinite.h"
#define NumBitsPerChar 8U
/*
* Initialize rtInf needed by the generated code.
* Inf is initialized as non-signaling. Assumes IEEE.
*/
real_T rtGetInf(void)
{
size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar);
real_T inf = 0.0;
if (bitsPerReal == 32U) {
inf = rtGetInfF();
} else {
union {
LittleEndianIEEEDouble bitVal;
real_T fltVal;
} tmpVal;
tmpVal.bitVal.words.wordH = 0x7FF00000U;
tmpVal.bitVal.words.wordL = 0x00000000U;
inf = tmpVal.fltVal;
}
return inf;
}
/*
* Initialize rtInfF needed by the generated code.
* Inf is initialized as non-signaling. Assumes IEEE.
*/
real32_T rtGetInfF(void)
{
IEEESingle infF;
infF.wordL.wordLuint = 0x7F800000U;
return infF.wordL.wordLreal;
}
/*
* Initialize rtMinusInf needed by the generated code.
* Inf is initialized as non-signaling. Assumes IEEE.
*/
real_T rtGetMinusInf(void)
{
size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar);
real_T minf = 0.0;
if (bitsPerReal == 32U) {
minf = rtGetMinusInfF();
} else {
union {
LittleEndianIEEEDouble bitVal;
real_T fltVal;
} tmpVal;
tmpVal.bitVal.words.wordH = 0xFFF00000U;
tmpVal.bitVal.words.wordL = 0x00000000U;
minf = tmpVal.fltVal;
}
return minf;
}
/*
* Initialize rtMinusInfF needed by the generated code.
* Inf is initialized as non-signaling. Assumes IEEE.
*/
real32_T rtGetMinusInfF(void)
{
IEEESingle minfF;
minfF.wordL.wordLuint = 0xFF800000U;
return minfF.wordL.wordLreal;
}
/*
* File trailer for generated code.
*
* [EOF]
*/

View File

@@ -0,0 +1,31 @@
/*
* File: rtGetInf.h
*
* Code generated for Simulink model 'fuc'.
*
* Model version : 1.18
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Sat Jan 6 10:24:46 2024
*
* Target selection: ert.tlc
* Embedded hardware selection: ARM Compatible->ARM 64-bit (LP64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#ifndef RTW_HEADER_rtGetInf_h_
#define RTW_HEADER_rtGetInf_h_
#include "rtwtypes.h"
extern real_T rtGetInf(void);
extern real32_T rtGetInfF(void);
extern real_T rtGetMinusInf(void);
extern real32_T rtGetMinusInfF(void);
#endif /* RTW_HEADER_rtGetInf_h_ */
/*
* File trailer for generated code.
*
* [EOF]
*/

View File

@@ -0,0 +1,62 @@
/*
* File: rtGetNaN.c
*
* Code generated for Simulink model 'fuc'.
*
* Model version : 1.18
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Sat Jan 6 10:24:46 2024
*
* Target selection: ert.tlc
* Embedded hardware selection: ARM Compatible->ARM 64-bit (LP64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#include "rtwtypes.h"
#include "rtGetNaN.h"
#include <stddef.h>
#include "rt_nonfinite.h"
#define NumBitsPerChar 8U
/*
* Initialize rtNaN needed by the generated code.
* NaN is initialized as non-signaling. Assumes IEEE.
*/
real_T rtGetNaN(void)
{
size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar);
real_T nan = 0.0;
if (bitsPerReal == 32U) {
nan = rtGetNaNF();
} else {
union {
LittleEndianIEEEDouble bitVal;
real_T fltVal;
} tmpVal;
tmpVal.bitVal.words.wordH = 0xFFF80000U;
tmpVal.bitVal.words.wordL = 0x00000000U;
nan = tmpVal.fltVal;
}
return nan;
}
/*
* Initialize rtNaNF needed by the generated code.
* NaN is initialized as non-signaling. Assumes IEEE.
*/
real32_T rtGetNaNF(void)
{
IEEESingle nanF = { { 0.0F } };
nanF.wordL.wordLuint = 0xFFC00000U;
return nanF.wordL.wordLreal;
}
/*
* File trailer for generated code.
*
* [EOF]
*/

View File

@@ -0,0 +1,29 @@
/*
* File: rtGetNaN.h
*
* Code generated for Simulink model 'fuc'.
*
* Model version : 1.18
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Sat Jan 6 10:24:46 2024
*
* Target selection: ert.tlc
* Embedded hardware selection: ARM Compatible->ARM 64-bit (LP64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#ifndef RTW_HEADER_rtGetNaN_h_
#define RTW_HEADER_rtGetNaN_h_
#include "rtwtypes.h"
extern real_T rtGetNaN(void);
extern real32_T rtGetNaNF(void);
#endif /* RTW_HEADER_rtGetNaN_h_ */
/*
* File trailer for generated code.
*
* [EOF]
*/

View File

@@ -0,0 +1,92 @@
/*
* File: rt_nonfinite.c
*
* Code generated for Simulink model 'fuc'.
*
* Model version : 1.18
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Sat Jan 6 10:24:46 2024
*
* Target selection: ert.tlc
* Embedded hardware selection: ARM Compatible->ARM 64-bit (LP64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#include "rtGetNaN.h"
#include "rtGetInf.h"
#include <stddef.h>
#include "rtwtypes.h"
#include "rt_nonfinite.h"
#define NumBitsPerChar 8U
real_T rtInf;
real_T rtMinusInf;
real_T rtNaN;
real32_T rtInfF;
real32_T rtMinusInfF;
real32_T rtNaNF;
/*
* Initialize the rtInf, rtMinusInf, and rtNaN needed by the
* generated code. NaN is initialized as non-signaling. Assumes IEEE.
*/
void rt_InitInfAndNaN(size_t realSize)
{
(void) (realSize);
rtNaN = rtGetNaN();
rtNaNF = rtGetNaNF();
rtInf = rtGetInf();
rtInfF = rtGetInfF();
rtMinusInf = rtGetMinusInf();
rtMinusInfF = rtGetMinusInfF();
}
/* Test if value is infinite */
boolean_T rtIsInf(real_T value)
{
return (boolean_T)((value==rtInf || value==rtMinusInf) ? 1U : 0U);
}
/* Test if single-precision value is infinite */
boolean_T rtIsInfF(real32_T value)
{
return (boolean_T)(((value)==rtInfF || (value)==rtMinusInfF) ? 1U : 0U);
}
/* Test if value is not a number */
boolean_T rtIsNaN(real_T value)
{
boolean_T result = (boolean_T) 0;
size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar);
if (bitsPerReal == 32U) {
result = rtIsNaNF((real32_T)value);
} else {
union {
LittleEndianIEEEDouble bitVal;
real_T fltVal;
} tmpVal;
tmpVal.fltVal = value;
result = (boolean_T)((tmpVal.bitVal.words.wordH & 0x7FF00000) == 0x7FF00000 &&
( (tmpVal.bitVal.words.wordH & 0x000FFFFF) != 0 ||
(tmpVal.bitVal.words.wordL != 0) ));
}
return result;
}
/* Test if single-precision value is not a number */
boolean_T rtIsNaNF(real32_T value)
{
IEEESingle tmp;
tmp.wordL.wordLreal = value;
return (boolean_T)( (tmp.wordL.wordLuint & 0x7F800000) == 0x7F800000 &&
(tmp.wordL.wordLuint & 0x007FFFFF) != 0 );
}
/*
* File trailer for generated code.
*
* [EOF]
*/

View File

@@ -0,0 +1,60 @@
/*
* File: rt_nonfinite.h
*
* Code generated for Simulink model 'fuc'.
*
* Model version : 1.18
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Sat Jan 6 10:24:46 2024
*
* Target selection: ert.tlc
* Embedded hardware selection: ARM Compatible->ARM 64-bit (LP64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#ifndef RTW_HEADER_rt_nonfinite_h_
#define RTW_HEADER_rt_nonfinite_h_
#include <stddef.h>
#include "rtwtypes.h"
#define NOT_USING_NONFINITE_LITERALS 1
extern real_T rtInf;
extern real_T rtMinusInf;
extern real_T rtNaN;
extern real32_T rtInfF;
extern real32_T rtMinusInfF;
extern real32_T rtNaNF;
extern void rt_InitInfAndNaN(size_t realSize);
extern boolean_T rtIsInf(real_T value);
extern boolean_T rtIsInfF(real32_T value);
extern boolean_T rtIsNaN(real_T value);
extern boolean_T rtIsNaNF(real32_T value);
typedef struct {
struct {
uint32_T wordH;
uint32_T wordL;
} words;
} BigEndianIEEEDouble;
typedef struct {
struct {
uint32_T wordL;
uint32_T wordH;
} words;
} LittleEndianIEEEDouble;
typedef struct {
union {
real32_T wordLreal;
uint32_T wordLuint;
} wordL;
} IEEESingle;
#endif /* RTW_HEADER_rt_nonfinite_h_ */
/*
* File trailer for generated code.
*
* [EOF]
*/

View File

@@ -0,0 +1,4 @@
Simulink Coder project for fuc using D:\Program Files\MATLAB\R2022b\toolbox\rtw\rtw\@RTW\MSVCBuild.m. 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\fuc\tmwinternal\binfo.mat

View File

@@ -0,0 +1,176 @@
/*
* File: rtwtypes.h
*
* Code generated for Simulink model 'fuc'.
*
* Model version : 1.18
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Sat Jan 6 10:24:46 2024
*
* Target selection: ert.tlc
* Embedded hardware selection: ARM Compatible->ARM 64-bit (LP64)
* 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: ARM Compatible->ARM 64-bit (LP64)
* Number of bits: char: 8 short: 16 int: 32
* long: 64 long long: 64
* 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 long int64_T;
typedef unsigned long uint64_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, ulonglong_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 unsigned long long ulonglong_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;
#define CINT64_T
typedef struct {
int64_T re;
int64_T im;
} cint64_T;
#define CUINT64_T
typedef struct {
uint64_T re;
uint64_T im;
} cuint64_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))
#define MAX_int64_T ((int64_T)(9223372036854775807L))
#define MIN_int64_T ((int64_T)(-9223372036854775807L-1L))
#define MAX_uint64_T ((uint64_T)(0xFFFFFFFFFFFFFFFFUL))
/* Block D-Work pointer type */
typedef void * pointer_T;
#endif /* RTWTYPES_H */
/*
* File trailer for generated code.
*
* [EOF]
*/

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,101 @@
/*
* File: ert_main.c
*
* Code generated for Simulink model 'led'.
*
* Model version : 1.1
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Wed Dec 27 10:44:19 2023
*
* Target selection: ert.tlc
* Embedded hardware selection: Custom Processor->Custom Processor
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#include <stddef.h>
#include <stdio.h> /* This example main program uses printf/fflush */
#include "led.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(led_M, "Overrun");
return;
}
OverrunFlag = true;
/* Save FPU context here (if necessary) */
/* Re-enable timer or interrupt here */
/* Set model inputs here */
/* Step the model */
led_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 */
led_initialize();
/* Attach rt_OneStep to a timer or interrupt service routine with
* period 0.2 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(led_M) == (NULL)) {
/* Perform application tasks here */
}
/* Terminate model */
led_terminate();
return 0;
}
/*
* 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 led.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 led.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,65 @@
/*
* File: led.c
*
* Code generated for Simulink model 'led'.
*
* Model version : 1.1
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Wed Dec 27 10:44:19 2023
*
* Target selection: ert.tlc
* Embedded hardware selection: Custom Processor->Custom Processor
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#include "led.h"
#include "rtwtypes.h"
/* Block states (default storage) */
DW_led_T led_DW;
/* External outputs (root outports fed by signals with default storage) */
ExtY_led_T led_Y;
/* Real-time model */
static RT_MODEL_led_T led_M_;
RT_MODEL_led_T *const led_M = &led_M_;
/* Model step function */
void led_step(void)
{
boolean_T rtb_Delay;
/* Delay: '<Root>/Delay' */
rtb_Delay = led_DW.Delay_DSTATE[0];
/* Outport: '<Root>/Out1' incorporates:
* Delay: '<Root>/Delay'
*/
led_Y.Out1 = led_DW.Delay_DSTATE[0];
/* Update for Delay: '<Root>/Delay' incorporates:
* Logic: '<Root>/Logical Operator'
*/
led_DW.Delay_DSTATE[0] = led_DW.Delay_DSTATE[1];
led_DW.Delay_DSTATE[1] = !rtb_Delay;
}
/* Model initialize function */
void led_initialize(void)
{
/* (no initialization code required) */
}
/* Model terminate function */
void led_terminate(void)
{
/* (no terminate code required) */
}
/*
* File trailer for generated code.
*
* [EOF]
*/

View File

@@ -0,0 +1,92 @@
/*
* File: led.h
*
* Code generated for Simulink model 'led'.
*
* Model version : 1.1
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Wed Dec 27 10:44:19 2023
*
* Target selection: ert.tlc
* Embedded hardware selection: Custom Processor->Custom Processor
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#ifndef RTW_HEADER_led_h_
#define RTW_HEADER_led_h_
#ifndef led_COMMON_INCLUDES_
#define led_COMMON_INCLUDES_
#include "rtwtypes.h"
#endif /* led_COMMON_INCLUDES_ */
/* 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
/* Forward declaration for rtModel */
typedef struct tag_RTM_led_T RT_MODEL_led_T;
/* Block states (default storage) for system '<Root>' */
typedef struct {
boolean_T Delay_DSTATE[2]; /* '<Root>/Delay' */
} DW_led_T;
/* External outputs (root outports fed by signals with default storage) */
typedef struct {
boolean_T Out1; /* '<Root>/Out1' */
} ExtY_led_T;
/* Real-time Model Data Structure */
struct tag_RTM_led_T {
const char_T * volatile errorStatus;
};
/* Block states (default storage) */
extern DW_led_T led_DW;
/* External outputs (root outports fed by signals with default storage) */
extern ExtY_led_T led_Y;
/* Model entry point functions */
extern void led_initialize(void);
extern void led_step(void);
extern void led_terminate(void);
/* Real-time Model object */
extern RT_MODEL_led_T *const led_M;
/*-
* These blocks were eliminated from the model due to optimizations:
*
* Block '<Root>/Scope' : Unused code path elimination
*/
/*-
* 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>' : 'led'
*/
#endif /* RTW_HEADER_led_h_ */
/*
* File trailer for generated code.
*
* [EOF]
*/

View File

@@ -0,0 +1,334 @@
###########################################################################
## Makefile generated for component 'led'.
##
## Makefile : led.mk
## Generated on : Wed Dec 27 10:44:28 2023
## Final product: $(RELATIVE_PATH_TO_ANCHOR)/led.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 = led
MAKEFILE = led.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/simulink
SOLVER =
SOLVER_OBJ =
CLASSIC_INTERFACE = 0
TGT_FCN_LIB = ISO_C
MODEL_HAS_DYNAMICALLY_LOADED_SFCNS = 0
RELATIVE_PATH_TO_ANCHOR = ..
CMD_FILE = led.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)/led.exe
PRODUCT_TYPE = "executable"
BUILD_TYPE = "Top-Level Standalone Executable"
###########################################################################
## INCLUDE PATHS
###########################################################################
INCLUDES_BUILDINFO = -I$(START_DIR) -I$(START_DIR)/led_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=led -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)/led_ert_rtw/led.c
MAIN_SRC = $(START_DIR)/led_ert_rtw/ert_main.c
ALL_SRCS = $(SRCS) $(MAIN_SRC)
###########################################################################
## OBJECTS
###########################################################################
OBJS = led.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)/led_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)/led_ert_rtw/ert_main.c
$(CC) $(CFLAGS) -Fo"$@" $(subst /,\,"$<")
led.obj : $(START_DIR)/led_ert_rtw/led.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
led.obj

View File

@@ -0,0 +1,4 @@
Simulink Coder project for led 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\led\tmwinternal\binfo.mat

View File

@@ -0,0 +1,156 @@
/*
* File: rtwtypes.h
*
* Code generated for Simulink model 'led'.
*
* Model version : 1.1
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Wed Dec 27 10:44:19 2023
*
* Target selection: ert.tlc
* Embedded hardware selection: Custom Processor->Custom Processor
* 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: Custom Processor->Custom Processor
* Number of bits: char: 8 short: 16 int: 32
* long: 32
* native word size: 32
* 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,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="7bdb0ba1-872d-4302-8f9e-8bf171dbb789">
<checksum>t587k1ya0Vk/sxGpVDbVaqCT87D5oJQ8oem+VHxJROFTR/iP2e1FnbEiKbCOpH+wV5o+NSgDKm5CANZnBZukkw==</checksum>
</slcache.FileAttributes>
</MF0>

Binary file not shown.

View File

@@ -0,0 +1,45 @@
% -------------------------------------------------------------------
% Generated by MATLAB on 29-Jan-2024 10:28:50
% MATLAB version: 9.13.0.2049777 (R2022b)
% -------------------------------------------------------------------
x = Simulink.Signal;
x.CoderInfo.StorageClass = 'Auto';
x.Description = '';
x.DataType = 'auto';
x.Min = [];
x.Max = [];
x.DocUnits = '';
x.Dimensions = -1;
x.DimensionsMode = 'auto';
x.Complexity = 'auto';
x.SampleTime = -1;
x.InitialValue = '';
y = Simulink.Signal;
y.CoderInfo.StorageClass = 'Auto';
y.Description = '';
y.DataType = 'auto';
y.Min = [];
y.Max = [];
y.DocUnits = '';
y.Dimensions = -1;
y.DimensionsMode = 'auto';
y.Complexity = 'auto';
y.SampleTime = -1;
y.InitialValue = '';
z = Simulink.Signal;
z.CoderInfo.StorageClass = 'Auto';
z.Description = '';
z.DataType = 'auto';
z.Min = [];
z.Max = [];
z.DocUnits = '';
z.Dimensions = -1;
z.DimensionsMode = 'auto';
z.Complexity = 'auto';
z.SampleTime = -1;
z.InitialValue = '';

Binary file not shown.

Binary file not shown.

Binary file not shown.

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>