EMS,硬件设计文件以及软件功能验证程序
This commit is contained in:
BIN
1.Software/Verify/EMS.zip
Normal file
BIN
1.Software/Verify/EMS.zip
Normal file
Binary file not shown.
126
1.Software/Verify/EMS/RS232.py
Normal file
126
1.Software/Verify/EMS/RS232.py
Normal file
@@ -0,0 +1,126 @@
|
||||
import serial
|
||||
import time
|
||||
import threading
|
||||
import logging
|
||||
import os
|
||||
import fcntl
|
||||
|
||||
# 设置日志记录
|
||||
logging.basicConfig(filename='/home/topeet/EMS/logfile.log', level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
||||
|
||||
class UartException(Exception):
|
||||
pass
|
||||
|
||||
class Uart:
|
||||
def __init__(self, port='COM1', baudrate=115200, ctrl_port='PIN2'):
|
||||
"""
|
||||
初始化UART对象,允许自定义端口和波特率。
|
||||
"""
|
||||
self.port = port
|
||||
self.baudrate = baudrate
|
||||
self.ser = None
|
||||
self.lock = threading.Lock() # 添加线程锁
|
||||
self._init_serial()
|
||||
# 打开485控制设备
|
||||
self.fd2 = self._open_ctrl_device(ctrl_port)
|
||||
|
||||
def _open_ctrl_device(self, ctrl_port):
|
||||
"""
|
||||
打开485控制设备,失败时抛出UartException。
|
||||
"""
|
||||
fd = os.open(ctrl_port, os.O_RDWR | os.O_NOCTTY | os.O_NDELAY)
|
||||
if fd < 0:
|
||||
raise UartException("Open max485_ctl failed")
|
||||
return fd
|
||||
|
||||
def _init_serial(self):
|
||||
"""
|
||||
尝试初始化串口。
|
||||
"""
|
||||
try:
|
||||
self.ser = serial.Serial(port=self.port, baudrate=self.baudrate, timeout=1)
|
||||
logging.info(f"{self.port} 端口初始化成功,波特率为 {self.baudrate}")
|
||||
except Exception as e:
|
||||
logging.error(f"{self.port} 端口初始化失败: {e}")
|
||||
raise
|
||||
|
||||
def send_data(self, data="ABCDEFG\r\n"):
|
||||
"""
|
||||
向串口发送数据并打印发送的字节数。
|
||||
"""
|
||||
with self.lock:
|
||||
try:
|
||||
fcntl.ioctl(self.fd2, 0, 1)
|
||||
write_len = self.ser.write(data.encode('utf-8'))
|
||||
while self.ser.out_waiting: # 等待输出缓冲区清空
|
||||
time.sleep(0.01) # 短暂等待
|
||||
time.sleep(0.1)
|
||||
logging.info(f"串口发出 {write_len} 个字节。")
|
||||
except Exception as e:
|
||||
logging.error(f"发送数据时出错: {e}")
|
||||
|
||||
def receive_data(self):
|
||||
"""
|
||||
从串口接收一行数据,直到遇到换行符或超时。
|
||||
"""
|
||||
with self.lock:
|
||||
try:
|
||||
fcntl.ioctl(self.fd2, 0, 0)
|
||||
if self.ser.in_waiting > 0:
|
||||
data = self.ser.read(self.ser.in_waiting).decode('utf-8', 'ignore').rstrip('\r\n')
|
||||
return data
|
||||
except Exception as e:
|
||||
logging.error(f"接收数据时出错: {e}")
|
||||
return None
|
||||
|
||||
def start_receiving(self, callback=None, exit_event=None):
|
||||
"""
|
||||
持续循环接收数据,直到外部信号指示停止。
|
||||
"""
|
||||
try:
|
||||
logging.info("开始循环接收数据...")
|
||||
while not exit_event or not exit_event.is_set():
|
||||
received_str = self.receive_data()
|
||||
if received_str:
|
||||
try:
|
||||
callback(received_str)
|
||||
except Exception as e:
|
||||
logging.error(f"数据处理回调出错: {e}")
|
||||
except KeyboardInterrupt:
|
||||
logging.info("\n接收循环被用户中断。")
|
||||
self.close_port() # 中断时确保资源被释放
|
||||
except Exception as e:
|
||||
logging.error(f"接收数据时出错: {e}")
|
||||
finally:
|
||||
logging.info("接收循环已停止。")
|
||||
def close_port(self):
|
||||
"""手动关闭串口。"""
|
||||
if self.ser and self.ser.is_open:
|
||||
self.ser.close()
|
||||
os.close(self.fd2)
|
||||
print(f"{self.port} 端口已关闭。")
|
||||
|
||||
def data_handler(data):
|
||||
print(f"RS232接收数据: {data}")
|
||||
|
||||
uart_instance = Uart('/dev/ttyS7', 115200, '/dev/rs485_ctl') # 创建Uart实例
|
||||
exit_flag = threading.Event() # 创建一个Event对象用于控制循环退出
|
||||
|
||||
# 启动一个线程来执行循环接收,以便不影响主线程
|
||||
receiver_thread = threading.Thread(target=uart_instance.start_receiving, args=(data_handler, exit_flag))
|
||||
receiver_thread.start()
|
||||
|
||||
try:
|
||||
# 主线程可以继续执行其他任务,或者等待某个条件来发送数据
|
||||
while True:
|
||||
# 假设我们每5秒发送一次数据
|
||||
data_to_send = "控制器RS232发送数据:" + time.strftime("%H:%M:%S", time.localtime()) + "\r\n"
|
||||
uart_instance.send_data(data_to_send)
|
||||
time.sleep(1) # 等待5秒后再次发送
|
||||
except KeyboardInterrupt:
|
||||
print("主程序被中断,准备退出...")
|
||||
exit_flag.set() # 设置事件,通知接收线程退出
|
||||
receiver_thread.join() # 等待接收线程结束
|
||||
finally:
|
||||
uart_instance.close_port() # 最后记得关闭串口
|
||||
print("程序结束。")
|
||||
126
1.Software/Verify/EMS/RS485.py
Normal file
126
1.Software/Verify/EMS/RS485.py
Normal file
@@ -0,0 +1,126 @@
|
||||
import serial
|
||||
import time
|
||||
import threading
|
||||
import logging
|
||||
import os
|
||||
import fcntl
|
||||
|
||||
# 设置日志记录
|
||||
logging.basicConfig(filename='/home/topeet/EMS/logfile.log', level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
||||
|
||||
class UartException(Exception):
|
||||
pass
|
||||
|
||||
class Uart:
|
||||
def __init__(self, port='COM1', baudrate=115200, ctrl_port='PIN2'):
|
||||
"""
|
||||
初始化UART对象,允许自定义端口和波特率。
|
||||
"""
|
||||
self.port = port
|
||||
self.baudrate = baudrate
|
||||
self.ser = None
|
||||
self.lock = threading.Lock() # 添加线程锁
|
||||
self._init_serial()
|
||||
# 打开485控制设备
|
||||
self.fd2 = self._open_ctrl_device(ctrl_port)
|
||||
|
||||
def _open_ctrl_device(self, ctrl_port):
|
||||
"""
|
||||
打开485控制设备,失败时抛出UartException。
|
||||
"""
|
||||
fd = os.open(ctrl_port, os.O_RDWR | os.O_NOCTTY | os.O_NDELAY)
|
||||
if fd < 0:
|
||||
raise UartException("Open max485_ctl failed")
|
||||
return fd
|
||||
|
||||
def _init_serial(self):
|
||||
"""
|
||||
尝试初始化串口。
|
||||
"""
|
||||
try:
|
||||
self.ser = serial.Serial(port=self.port, baudrate=self.baudrate, timeout=1)
|
||||
logging.info(f"{self.port} 端口初始化成功,波特率为 {self.baudrate}")
|
||||
except Exception as e:
|
||||
logging.error(f"{self.port} 端口初始化失败: {e}")
|
||||
raise
|
||||
|
||||
def send_data(self, data="ABCDEFG\r\n"):
|
||||
"""
|
||||
向串口发送数据并打印发送的字节数。
|
||||
"""
|
||||
with self.lock:
|
||||
try:
|
||||
fcntl.ioctl(self.fd2, 0, 1)
|
||||
write_len = self.ser.write(data.encode('utf-8'))
|
||||
while self.ser.out_waiting: # 等待输出缓冲区清空
|
||||
time.sleep(0.01) # 短暂等待
|
||||
time.sleep(0.1)
|
||||
logging.info(f"串口发出 {write_len} 个字节。")
|
||||
except Exception as e:
|
||||
logging.error(f"发送数据时出错: {e}")
|
||||
|
||||
def receive_data(self):
|
||||
"""
|
||||
从串口接收一行数据,直到遇到换行符或超时。
|
||||
"""
|
||||
with self.lock:
|
||||
try:
|
||||
fcntl.ioctl(self.fd2, 0, 0)
|
||||
if self.ser.in_waiting > 0:
|
||||
data = self.ser.read(self.ser.in_waiting).decode('utf-8', 'ignore').rstrip('\r\n')
|
||||
return data
|
||||
except Exception as e:
|
||||
logging.error(f"接收数据时出错: {e}")
|
||||
return None
|
||||
|
||||
def start_receiving(self, callback=None, exit_event=None):
|
||||
"""
|
||||
持续循环接收数据,直到外部信号指示停止。
|
||||
"""
|
||||
try:
|
||||
logging.info("开始循环接收数据...")
|
||||
while not exit_event or not exit_event.is_set():
|
||||
received_str = self.receive_data()
|
||||
if received_str:
|
||||
try:
|
||||
callback(received_str)
|
||||
except Exception as e:
|
||||
logging.error(f"数据处理回调出错: {e}")
|
||||
except KeyboardInterrupt:
|
||||
logging.info("\n接收循环被用户中断。")
|
||||
self.close_port() # 中断时确保资源被释放
|
||||
except Exception as e:
|
||||
logging.error(f"接收数据时出错: {e}")
|
||||
finally:
|
||||
logging.info("接收循环已停止。")
|
||||
def close_port(self):
|
||||
"""手动关闭串口。"""
|
||||
if self.ser and self.ser.is_open:
|
||||
self.ser.close()
|
||||
os.close(self.fd2)
|
||||
print(f"{self.port} 端口已关闭。")
|
||||
|
||||
def data_handler(data):
|
||||
print(f"接收数据: {data}")
|
||||
|
||||
uart_instance = Uart('/dev/ttyS7', 115200, '/dev/rs485_ctl') # 创建Uart实例
|
||||
exit_flag = threading.Event() # 创建一个Event对象用于控制循环退出
|
||||
|
||||
# 启动一个线程来执行循环接收,以便不影响主线程
|
||||
receiver_thread = threading.Thread(target=uart_instance.start_receiving, args=(data_handler, exit_flag))
|
||||
receiver_thread.start()
|
||||
|
||||
try:
|
||||
# 主线程可以继续执行其他任务,或者等待某个条件来发送数据
|
||||
while True:
|
||||
# 假设我们每5秒发送一次数据
|
||||
data_to_send = "发送数据" + time.strftime("%H:%M:%S", time.localtime()) + "\r\n"
|
||||
uart_instance.send_data(data_to_send)
|
||||
time.sleep(1) # 等待5秒后再次发送
|
||||
except KeyboardInterrupt:
|
||||
print("主程序被中断,准备退出...")
|
||||
exit_flag.set() # 设置事件,通知接收线程退出
|
||||
receiver_thread.join() # 等待接收线程结束
|
||||
finally:
|
||||
uart_instance.close_port() # 最后记得关闭串口
|
||||
print("程序结束。")
|
||||
115
1.Software/Verify/EMS/UART.py
Normal file
115
1.Software/Verify/EMS/UART.py
Normal file
@@ -0,0 +1,115 @@
|
||||
import serial
|
||||
import threading
|
||||
import logging
|
||||
import os
|
||||
import fcntl
|
||||
import selectors
|
||||
|
||||
# 设置日志记录
|
||||
logging.basicConfig(filename='/home/topeet/samba/EMS/logfile.log', level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
||||
|
||||
class UartException(Exception):
|
||||
pass
|
||||
|
||||
class Uart:
|
||||
def __init__(self, port='COM1', baudrate=115200, ctrl_port='PIN2'):
|
||||
"""
|
||||
初始化UART对象,允许自定义端口和波特率。
|
||||
"""
|
||||
self.port = port
|
||||
self.baudrate = baudrate
|
||||
self.ser = None
|
||||
self.lock = threading.Lock() # 添加线程锁
|
||||
self._init_serial()
|
||||
# 打开485控制设备
|
||||
self.fd2 = self._open_ctrl_device(ctrl_port)
|
||||
|
||||
def _open_ctrl_device(self, ctrl_port):
|
||||
"""
|
||||
打开485控制设备,失败时抛出UartException。
|
||||
"""
|
||||
fd = os.open(ctrl_port, os.O_RDWR | os.O_NOCTTY | os.O_NDELAY)
|
||||
if fd < 0:
|
||||
raise UartException("Open max485_ctl failed")
|
||||
return fd
|
||||
|
||||
def _init_serial(self):
|
||||
"""
|
||||
尝试初始化串口。
|
||||
"""
|
||||
try:
|
||||
self.ser = serial.Serial(port=self.port, baudrate=self.baudrate, timeout=1)
|
||||
logging.info(f"{self.port} 端口初始化成功,波特率为 {self.baudrate}")
|
||||
except Exception as e:
|
||||
logging.error(f"{self.port} 端口初始化失败: {e}")
|
||||
raise
|
||||
|
||||
def send_data(self, data="ABCDEFG\r\n"):
|
||||
"""
|
||||
向串口发送数据并打印发送的字节数。
|
||||
"""
|
||||
with self.lock:
|
||||
try:
|
||||
fcntl.ioctl(self.fd2, 0, 1)
|
||||
write_len = self.ser.write(data.encode('utf-8'))
|
||||
logging.info(f"串口发出 {write_len} 个字节。")
|
||||
except Exception as e:
|
||||
logging.error(f"发送数据时出错: {e}")
|
||||
|
||||
def receive_data(self):
|
||||
"""
|
||||
从串口接收一行数据,直到遇到换行符或超时。
|
||||
"""
|
||||
with self.lock:
|
||||
try:
|
||||
fcntl.ioctl(self.fd2, 0, 0)
|
||||
if self.ser.in_waiting > 0:
|
||||
data = self.ser.read(self.ser.in_waiting).decode('utf-8', 'ignore').rstrip('\r\n')
|
||||
return data
|
||||
except Exception as e:
|
||||
logging.error(f"接收数据时出错: {e}")
|
||||
return None
|
||||
def close_port(self):
|
||||
"""手动关闭串口。"""
|
||||
if self.ser and self.ser.is_open:
|
||||
self.ser.close()
|
||||
os.close(self.fd2)
|
||||
print(f"{self.port} 端口已关闭。")
|
||||
|
||||
def start_event_driven_receiving(self, callback):
|
||||
"""
|
||||
开始事件驱动的接收循环,当有数据可读时调用callback处理数据。
|
||||
"""
|
||||
sel = selectors.DefaultSelector()
|
||||
sel.register(self.ser.fileno(), selectors.EVENT_READ, data=self.ser)
|
||||
|
||||
try:
|
||||
while True:
|
||||
events = sel.select()
|
||||
for key, mask in events:
|
||||
if mask & selectors.EVENT_READ:
|
||||
data = key.data.read(key.data.in_waiting).decode('utf-8', 'ignore').rstrip('\r\n')
|
||||
if data:
|
||||
callback(data)
|
||||
except KeyboardInterrupt:
|
||||
print("接收循环被用户中断。")
|
||||
except Exception as e:
|
||||
logging.error(f"接收数据时出错: {e}")
|
||||
finally:
|
||||
sel.close()
|
||||
logging.info("接收循环已停止。")
|
||||
|
||||
# ... 其他原有代码保持不变 ...
|
||||
|
||||
def data_handler(data):
|
||||
print(f"接收到数据: {data}")
|
||||
|
||||
uart_instance = Uart('/dev/ttyS4', 115200, '/dev/rs485_ctl') # 创建Uart实例
|
||||
|
||||
try:
|
||||
uart_instance.start_event_driven_receiving(data_handler)
|
||||
except KeyboardInterrupt:
|
||||
print("主程序被中断,准备退出...")
|
||||
finally:
|
||||
uart_instance.close_port() # 最后记得关闭串口
|
||||
print("程序结束。")
|
||||
93
1.Software/Verify/EMS/can_recv_send.c
Normal file
93
1.Software/Verify/EMS/can_recv_send.c
Normal file
@@ -0,0 +1,93 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <net/if.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/can.h>
|
||||
#include <linux/can/raw.h>
|
||||
|
||||
void print_can_frame(struct can_frame *frame) {
|
||||
printf("CAN ID: 0x%X\n", frame->can_id);
|
||||
printf("Data Length: %d\n", frame->can_dlc);
|
||||
printf("Data: ");
|
||||
for (int i = 0; i < frame->can_dlc; ++i) {
|
||||
printf("%02X ", frame->data[i]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
if (argc != 3) {
|
||||
printf("Usage: %s <CAN interface> <operation: recv or send>\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
const char *can_interface = argv[1];
|
||||
const char *operation = argv[2];
|
||||
|
||||
// Create a socket
|
||||
int s = socket(PF_CAN, SOCK_RAW, CAN_RAW);
|
||||
if (s == -1) {
|
||||
perror("socket");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Get the interface index
|
||||
struct ifreq ifr;
|
||||
strcpy(ifr.ifr_name, can_interface);
|
||||
ioctl(s, SIOCGIFINDEX, &ifr);
|
||||
|
||||
// Bind the socket to the CAN interface
|
||||
struct sockaddr_can addr;
|
||||
addr.can_family = AF_CAN;
|
||||
addr.can_ifindex = ifr.ifr_ifindex;
|
||||
if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
|
||||
perror("bind");
|
||||
close(s);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (strcmp(operation, "recv") == 0) {
|
||||
// Receive mode
|
||||
struct can_frame frame;
|
||||
while (1) {
|
||||
// Receive a CAN frame
|
||||
ssize_t nbytes = read(s, &frame, sizeof(struct can_frame));
|
||||
if (nbytes < 0) {
|
||||
perror("read");
|
||||
close(s);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Print the received CAN frame
|
||||
printf("Received CAN Frame:\n");
|
||||
print_can_frame(&frame);
|
||||
}
|
||||
} else if (strcmp(operation, "send") == 0) {
|
||||
// Send mode
|
||||
struct can_frame frame;
|
||||
frame.can_id = 0x123; // Example CAN ID
|
||||
frame.can_dlc = 8; // Example data length
|
||||
memset(frame.data, 0xAA, 8); // Example data
|
||||
|
||||
// Send the CAN frame
|
||||
ssize_t nbytes = write(s, &frame, sizeof(struct can_frame));
|
||||
if (nbytes < 0) {
|
||||
perror("write");
|
||||
close(s);
|
||||
return 1;
|
||||
}
|
||||
|
||||
printf("Sent CAN Frame:\n");
|
||||
print_can_frame(&frame);
|
||||
} else {
|
||||
printf("Invalid operation. Use 'recv' or 'send'.\n");
|
||||
}
|
||||
|
||||
close(s);
|
||||
return 0;
|
||||
}
|
||||
|
||||
70
1.Software/Verify/EMS/gpio.c
Normal file
70
1.Software/Verify/EMS/gpio.c
Normal file
@@ -0,0 +1,70 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
char gpio_path[100]; // 存放GPIO路径
|
||||
|
||||
int gpio_ctrl(char *arg, char *val) // 控制GPIO输出高低电平
|
||||
{
|
||||
char file_path[100]; // 存放文件路径
|
||||
int fd, len, ret;
|
||||
|
||||
sprintf(file_path, "%s/%s", gpio_path, arg); // 将文件路径拼接起来
|
||||
fd = open(file_path, O_WRONLY); // 以只写方式打开文件
|
||||
if (fd < 0)
|
||||
{
|
||||
printf("无法打开文件: %s\n", file_path); // 打开文件失败
|
||||
return -1;
|
||||
}
|
||||
|
||||
len = strlen(val);
|
||||
ret = write(fd, val, len); // 向文件中写入val内容
|
||||
if (ret < 0)
|
||||
{
|
||||
printf("无法写入文件: %s\n", file_path); // 写入文件失败
|
||||
close(fd); // 关闭文件描述符
|
||||
return -1;
|
||||
}
|
||||
|
||||
close(fd); // 关闭文件描述符
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) // 主函数
|
||||
{
|
||||
sprintf(gpio_path, "/sys/class/gpio/gpio%s", argv[1]); // 将GPIO路径存放到gpio_path中
|
||||
|
||||
// 如果 GPIO 没有被导出,则导出 GPIO
|
||||
if (access(gpio_path, F_OK)) // 判断是否存在gpio_path指向的路径
|
||||
{
|
||||
int fd, len, ret;
|
||||
|
||||
fd = open("/sys/class/gpio/export", O_WRONLY); // 打开export文件
|
||||
if (fd < 0)
|
||||
{
|
||||
printf("无法打开文件: /sys/class/gpio/export\n"); // 打开文件失败
|
||||
return -1;
|
||||
}
|
||||
|
||||
len = strlen(argv[1]);
|
||||
ret = write(fd, argv[1], len); // 向文件中写入argv[1]的内容
|
||||
if (ret < 0)
|
||||
{
|
||||
printf("无法写入文件: /sys/class/gpio/export\n"); // 写入文件失败
|
||||
close(fd); // 关闭文件描述符
|
||||
return -1;
|
||||
}
|
||||
|
||||
close(fd); // 关闭文件描述符
|
||||
}
|
||||
|
||||
gpio_ctrl("direction", "out"); // 配置GPIO为输出模式
|
||||
gpio_ctrl("active_low", "0"); // 设置极性
|
||||
gpio_ctrl("value", argv[2]); // 控制GPIO输出高低电平
|
||||
|
||||
return 0; // 返回0表示程序正常退出
|
||||
}
|
||||
87
1.Software/Verify/EMS/gpioin.c
Normal file
87
1.Software/Verify/EMS/gpioin.c
Normal file
@@ -0,0 +1,87 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
char gpio_path[100];
|
||||
|
||||
int gpio_ctrl(char *arg, char *val) {
|
||||
char file_path[100];
|
||||
int fd, len, ret;
|
||||
sprintf(file_path, "%s/%s", gpio_path, arg);
|
||||
fd = open(file_path, O_WRONLY);
|
||||
if (fd < 0) {
|
||||
printf("Open error: %s\n", file_path);
|
||||
return -1;
|
||||
}
|
||||
len = strlen(val);
|
||||
ret = write(fd, val, len);
|
||||
if (ret < 0) {
|
||||
printf("Write error: %s\n", file_path);
|
||||
return -1;
|
||||
}
|
||||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int gpio_read(char *arg) {
|
||||
char file_path[100];
|
||||
char value;
|
||||
int fd;
|
||||
|
||||
sprintf(file_path, "%s/%s", gpio_path, arg);
|
||||
fd = open(file_path, O_RDONLY);
|
||||
if (fd < 0) {
|
||||
printf("Open error: %s\n", file_path);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (read(fd, &value, 1) < 0) {
|
||||
printf("Read error: %s\n", file_path);
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
close(fd);
|
||||
return value - '0'; // 将字符转换为整数
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
if (argc != 2) {
|
||||
printf("Usage: %s <GPIO_number>\n", argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
sprintf(gpio_path, "/sys/class/gpio/gpio%s", argv[1]);
|
||||
|
||||
// 检查GPIO是否已导出,若未导出则导出该GPIO
|
||||
if (access(gpio_path, F_OK)) {
|
||||
int fd,len,ret;
|
||||
fd = open("/sys/class/gpio/export", O_WRONLY);
|
||||
if (fd < 0) {
|
||||
printf("Open error: /sys/class/gpio/export\n");
|
||||
return -1;
|
||||
}
|
||||
len = strlen(argv[1]);
|
||||
ret = write(fd, argv[1], len);
|
||||
if (ret < 0) {
|
||||
printf("Write error: /sys/class/gpio/export\n");
|
||||
return -1;
|
||||
}
|
||||
close(fd);
|
||||
}
|
||||
|
||||
gpio_ctrl("direction", "in"); // 配置为输入模式
|
||||
|
||||
// 读取GPIO值并打印
|
||||
int value = gpio_read("value");
|
||||
if (value < 0) {
|
||||
return -1; // 读取出错
|
||||
}
|
||||
|
||||
printf("GPIO %s input value: %d\n", argv[1], value);
|
||||
return 0;
|
||||
}
|
||||
58
1.Software/Verify/EMS/gpioout.c
Normal file
58
1.Software/Verify/EMS/gpioout.c
Normal file
@@ -0,0 +1,58 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
char gpio_path[100];
|
||||
int gpio_ctrl(char *arg,char *val)
|
||||
{
|
||||
char file_path[100];
|
||||
int fd,len,ret;
|
||||
sprintf(file_path, "%s/%s",gpio_path,arg);
|
||||
fd = open(file_path, O_WRONLY);
|
||||
if(fd < 0)
|
||||
{
|
||||
printf("open error\n");
|
||||
return -1;
|
||||
}
|
||||
len = strlen(val);
|
||||
ret = write(fd, val, len);
|
||||
if(ret < 0)
|
||||
{
|
||||
printf("write error\n");
|
||||
return -1;
|
||||
}
|
||||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc,char *argv[] )
|
||||
{
|
||||
sprintf(gpio_path, "/sys/class/gpio/gpio%s", argv[1]);
|
||||
if (access(gpio_path, F_OK)) {
|
||||
int fd,len,ret;
|
||||
fd = open("/sys/class/gpio/export", O_WRONLY);
|
||||
if(fd < 0)
|
||||
{
|
||||
printf("open error\n");
|
||||
return -1;
|
||||
}
|
||||
len = strlen(argv[1]);
|
||||
ret = write(fd, argv[1], len);
|
||||
if(ret < 0)
|
||||
{
|
||||
printf("write error\n");
|
||||
return -1;
|
||||
}
|
||||
close(fd);
|
||||
}
|
||||
gpio_ctrl("direction", "out");// 配置为输出模式
|
||||
gpio_ctrl("active_low", "0"); // 极性设置
|
||||
gpio_ctrl("value", argv[2]); // 控制 GPIO 输出高低电平
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
83
1.Software/Verify/EMS/test_485.c
Normal file
83
1.Software/Verify/EMS/test_485.c
Normal file
@@ -0,0 +1,83 @@
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <termios.h>
|
||||
#include <sys/ioctl.h>
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int fd,ret,fd2;
|
||||
char *max485_ctl = "/dev/rs485_ctl";
|
||||
struct termios old_cfg={0}; //用于保存终端配置之前的参数
|
||||
struct termios new_cfg={0}; //用于保存终端新配置的参数
|
||||
speed_t speed = B115200; //定义波特率为115200
|
||||
/*第一步,串口初始化*/
|
||||
fd = open(argv[1],O_RDWR | O_NOCTTY | O_NDELAY);//O_NOCTTY 标志,告知系统该节点不会成为进程的控制终端
|
||||
if(fd < 0){
|
||||
printf("uart device open error\n");
|
||||
return -1;
|
||||
}
|
||||
/*打开485控制设备*/
|
||||
fd2=open("/dev/rs485_ctl", O_RDWR|O_NOCTTY|O_NDELAY);
|
||||
if(fd2 < 0){
|
||||
printf("Open max485_ctl faild\n");
|
||||
return -1;
|
||||
}
|
||||
ret = tcgetattr(fd, &old_cfg);
|
||||
if(ret < 0){
|
||||
printf("tcgetattr error\n");
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
/*第二步,配置串口参数*/
|
||||
cfmakeraw(&new_cfg);//设置为原始模式
|
||||
new_cfg.c_cflag |= CREAD;// 使能接收
|
||||
cfsetspeed(&new_cfg, speed);//将波特率设置为115200
|
||||
new_cfg.c_cflag &= ~CSIZE; //将数据位相关的比特位清零
|
||||
new_cfg.c_cflag |= CS8; //将数据位数设置为8位
|
||||
new_cfg.c_cflag &= ~PARENB;
|
||||
new_cfg.c_iflag &= ~INPCK;//设置为无校验模式
|
||||
new_cfg.c_cflag &= ~CSTOPB;//将停止位设置为1位
|
||||
new_cfg.c_cc[VTIME] = 0;// 将 MIN 和 TIME 设置为 0
|
||||
new_cfg.c_cc[VMIN] = 0;
|
||||
ret = tcflush(fd, TCIOFLUSH);//清空缓冲区域
|
||||
if(ret < 0){
|
||||
printf("tcflush error\n");
|
||||
return -1;
|
||||
}
|
||||
ret = tcsetattr(fd, TCSANOW, &new_cfg);//写入配置、使配置生效
|
||||
if(ret < 0){
|
||||
printf("tcsetattr error\n");
|
||||
return -1;
|
||||
}
|
||||
if(!strcmp(argv[2], "send"))
|
||||
{
|
||||
ioctl(fd2, 0, 1);
|
||||
char buff[100] = {"iTOP-RK3568 UART TEST\n"};
|
||||
while(1){ //循环向串口写入数据
|
||||
write(fd, buff, sizeof(buff));
|
||||
sleep(1); //间隔 1 秒钟
|
||||
}
|
||||
}
|
||||
else if(!strcmp(argv[2], "recv")){
|
||||
ioctl(fd2, 0, 0);
|
||||
char buff[100];
|
||||
while(1){
|
||||
ret = read(fd, buff, sizeof(buff)-1);
|
||||
buff[ret] = 0;
|
||||
if (ret < 0){
|
||||
printf("read failed\n");
|
||||
}
|
||||
else if (ret > 0){
|
||||
printf("read message is %s\n", buff);
|
||||
sleep(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
tcsetattr(fd, TCSANOW, &old_cfg);//恢复到之前的配置
|
||||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
31
1.Software/Verify/EMSProgram20240109/UART.py
Normal file
31
1.Software/Verify/EMSProgram20240109/UART.py
Normal file
@@ -0,0 +1,31 @@
|
||||
#测试Python控制RK3568开发板的串口功能:
|
||||
#①发送和接收功能
|
||||
#②需要完成接收的异步操作,且选择占用最小的方式
|
||||
|
||||
import time
|
||||
import serial
|
||||
import serial.tools.list_ports
|
||||
|
||||
class Uart:
|
||||
def SerialSet(self, port, baudrate):
|
||||
ser = serial.Serial(port, baudrate, 8, 'N', 1)
|
||||
flag = ser.is_open
|
||||
|
||||
if flag:
|
||||
print('success')
|
||||
return ser
|
||||
else:
|
||||
print('Open Error')
|
||||
|
||||
def SerialSend(self, ser):
|
||||
# 串口发送 ABCDEFG,并输出发送的字节数。
|
||||
write_len = ser.write("ABCDEFG\r\n".encode('utf-8'))
|
||||
print("串口发出{}个字节。".format(write_len))
|
||||
|
||||
# ser.close()
|
||||
|
||||
uart = Uart()
|
||||
ser = uart.SerialSet("/dev/ttyS4", 115200)
|
||||
while True:
|
||||
uart.SerialSend(ser)
|
||||
time.sleep(1)
|
||||
3
1.Software/Verify/matlab/test1.m
Normal file
3
1.Software/Verify/matlab/test1.m
Normal file
@@ -0,0 +1,3 @@
|
||||
function c=test1(a,b)
|
||||
c=a*b;
|
||||
end
|
||||
945
1.Software/Verify/matlab/test1.prj
Normal file
945
1.Software/Verify/matlab/test1.prj
Normal file
@@ -0,0 +1,945 @@
|
||||
<deployment-project plugin="plugin.coder" plugin-version="R2021a">
|
||||
<configuration build-checksum="257820048" file="F:\desktop\EMS(能量管理系统)\matlab\test1.prj" location="F:\desktop\EMS(能量管理系统)\matlab" name="test1" target="target.unifiedcoder" target-name="MATLAB Coder">
|
||||
<profile key="profile.mex">
|
||||
<param.BuiltInstrumentedMex>false</param.BuiltInstrumentedMex>
|
||||
<param.RanInstrumentedMex>false</param.RanInstrumentedMex>
|
||||
<param.WorkingFolder>option.WorkingFolder.Project</param.WorkingFolder>
|
||||
<param.SpecifiedWorkingFolder />
|
||||
<param.BuildFolder>option.BuildFolder.Project</param.BuildFolder>
|
||||
<param.SpecifiedBuildFolder />
|
||||
<param.SearchPaths />
|
||||
<var.SimdQueryHardwareVendor>Generic</var.SimdQueryHardwareVendor>
|
||||
<var.SimdQueryHardwareType>MATLAB Host Computer</var.SimdQueryHardwareType>
|
||||
<param.InstructionSetExtensionsAvailableInUI>true</param.InstructionSetExtensionsAvailableInUI>
|
||||
<param.InstructionSetExtensions>None</param.InstructionSetExtensions>
|
||||
<param.ResponsivenessChecks>true</param.ResponsivenessChecks>
|
||||
<param.ExtrinsicCalls>true</param.ExtrinsicCalls>
|
||||
<param.IntegrityChecks>true</param.IntegrityChecks>
|
||||
<param.SaturateOnIntegerOverflow>true</param.SaturateOnIntegerOverflow>
|
||||
<param.EnableAutoParallelization>false</param.EnableAutoParallelization>
|
||||
<param.NumberOfCpuThreads>0</param.NumberOfCpuThreads>
|
||||
<param.OptimizeReductions>false</param.OptimizeReductions>
|
||||
<param.GlobalDataSyncMethod>option.GlobalDataSyncMethod.SyncAlways</param.GlobalDataSyncMethod>
|
||||
<param.EnableVariableSizing>true</param.EnableVariableSizing>
|
||||
<param.DynamicMemoryAllocation>option.DynamicMemoryAllocation.Threshold</param.DynamicMemoryAllocation>
|
||||
<param.DynamicMemoryAllocationThreshold>65536</param.DynamicMemoryAllocationThreshold>
|
||||
<param.DynamicMemoryAllocationInterface>option.DynamicMemoryAllocationInterface.AUTO</param.DynamicMemoryAllocationInterface>
|
||||
<param.RowMajor>option.RowMajor.ColumnMajor</param.RowMajor>
|
||||
<param.HighlightPotentialRowMajorIssues>true</param.HighlightPotentialRowMajorIssues>
|
||||
<param.PreserveArrayDimensions>false</param.PreserveArrayDimensions>
|
||||
<param.EliminateSingleDimensions>false</param.EliminateSingleDimensions>
|
||||
<param.StackUsageMax>200000</param.StackUsageMax>
|
||||
<param.FilePartitionMethod>option.FilePartitionMethod.MapMFileToCFile</param.FilePartitionMethod>
|
||||
<param.GenerateComments>true</param.GenerateComments>
|
||||
<param.MATLABSourceComments>false</param.MATLABSourceComments>
|
||||
<param.MATLABSourceCommentLineNumbers>true</param.MATLABSourceCommentLineNumbers>
|
||||
<param.CodeFormattingTool>option.CodeFormattingTool.Auto</param.CodeFormattingTool>
|
||||
<param.ReservedNameArray />
|
||||
<param.CppStyleConst>true</param.CppStyleConst>
|
||||
<param.EnableDebugging>false</param.EnableDebugging>
|
||||
<param.Verbosity>option.Verbosity.Info</param.Verbosity>
|
||||
<param.ReportPotentialDifferences>false</param.ReportPotentialDifferences>
|
||||
<param.GenerateReport>true</param.GenerateReport>
|
||||
<param.HighlightImplicitExpansionIssues>true</param.HighlightImplicitExpansionIssues>
|
||||
<param.HighlightLoopControlIssues>false</param.HighlightLoopControlIssues>
|
||||
<param.LaunchReport>false</param.LaunchReport>
|
||||
<param.ReportInfoVarName />
|
||||
<param.DefaultTestFile />
|
||||
<param.MergeInstrumentationResults>false</param.MergeInstrumentationResults>
|
||||
<param.VerificationMode>option.VerificationMode.None</param.VerificationMode>
|
||||
<param.VerificationStatus>option.VerificationStatus.FailedTest</param.VerificationStatus>
|
||||
<param.EnableMexProfiling>false</param.EnableMexProfiling>
|
||||
<var.BuiltWithMexProfiling>false</var.BuiltWithMexProfiling>
|
||||
<param.CustomSourceCode />
|
||||
<param.CustomHeaderCode />
|
||||
<param.CustomInitializer />
|
||||
<param.CustomTerminator />
|
||||
<param.CustomInclude />
|
||||
<param.CustomSource />
|
||||
<param.CustomLibrary />
|
||||
<param.PostCodeGenCommand />
|
||||
<param.mex.GenCodeOnly>false</param.mex.GenCodeOnly>
|
||||
<param.ConstantFoldingTimeout>40000</param.ConstantFoldingTimeout>
|
||||
<param.CompileTimeRecursionLimit>50</param.CompileTimeRecursionLimit>
|
||||
<param.EnableRuntimeRecursion>true</param.EnableRuntimeRecursion>
|
||||
<param.PreserveVariableNames>option.PreserveVariableNames.None</param.PreserveVariableNames>
|
||||
<param.EchoExpressions>true</param.EchoExpressions>
|
||||
<param.InlineThreshold>10</param.InlineThreshold>
|
||||
<param.InlineThresholdMax>200</param.InlineThresholdMax>
|
||||
<param.InlineStackLimit>1000000</param.InlineStackLimit>
|
||||
<param.InlineBetweenUserFunctions>option.InlineBetweenUserFunctions.Speed</param.InlineBetweenUserFunctions>
|
||||
<param.InlineBetweenUserAndMathWorksFunctions>option.InlineBetweenUserAndMathWorksFunctions.Speed</param.InlineBetweenUserAndMathWorksFunctions>
|
||||
<param.InlineBetweenMathWorksFunctions>option.InlineBetweenMathWorksFunctions.Speed</param.InlineBetweenMathWorksFunctions>
|
||||
<param.EnableMemcpy>true</param.EnableMemcpy>
|
||||
<param.MemcpyThreshold>64</param.MemcpyThreshold>
|
||||
<param.EnableOpenMP>true</param.EnableOpenMP>
|
||||
<param.InitFltsAndDblsToZero>true</param.InitFltsAndDblsToZero>
|
||||
<param.ConstantInputs>option.ConstantInputs.CheckValues</param.ConstantInputs>
|
||||
<param.EnableCRICodeCoverage>true</param.EnableCRICodeCoverage>
|
||||
<param.EnableAutoParallelizationReporting>true</param.EnableAutoParallelizationReporting>
|
||||
<param.CacheDynamicArrayDataPointer>true</param.CacheDynamicArrayDataPointer>
|
||||
<param.EnableJIT>false</param.EnableJIT>
|
||||
<param.EnableJITSilentBailOut>false</param.EnableJITSilentBailOut>
|
||||
<param.CheckForIssuesJIT>true</param.CheckForIssuesJIT>
|
||||
<param.EnableGitSupport>false</param.EnableGitSupport>
|
||||
<param.EnableAutoCommit>true</param.EnableAutoCommit>
|
||||
<param.RepositoryStyle>option.RepositoryStyle.Auto</param.RepositoryStyle>
|
||||
<unset>
|
||||
<param.BuiltInstrumentedMex />
|
||||
<param.RanInstrumentedMex />
|
||||
<param.WorkingFolder />
|
||||
<param.SpecifiedWorkingFolder />
|
||||
<param.BuildFolder />
|
||||
<param.SpecifiedBuildFolder />
|
||||
<param.SearchPaths />
|
||||
<var.SimdQueryHardwareVendor />
|
||||
<var.SimdQueryHardwareType />
|
||||
<param.InstructionSetExtensionsAvailableInUI />
|
||||
<param.InstructionSetExtensions />
|
||||
<param.ResponsivenessChecks />
|
||||
<param.ExtrinsicCalls />
|
||||
<param.IntegrityChecks />
|
||||
<param.SaturateOnIntegerOverflow />
|
||||
<param.EnableAutoParallelization />
|
||||
<param.NumberOfCpuThreads />
|
||||
<param.OptimizeReductions />
|
||||
<param.GlobalDataSyncMethod />
|
||||
<param.EnableVariableSizing />
|
||||
<param.DynamicMemoryAllocation />
|
||||
<param.DynamicMemoryAllocationThreshold />
|
||||
<param.DynamicMemoryAllocationInterface />
|
||||
<param.RowMajor />
|
||||
<param.HighlightPotentialRowMajorIssues />
|
||||
<param.PreserveArrayDimensions />
|
||||
<param.EliminateSingleDimensions />
|
||||
<param.StackUsageMax />
|
||||
<param.FilePartitionMethod />
|
||||
<param.GenerateComments />
|
||||
<param.MATLABSourceComments />
|
||||
<param.MATLABSourceCommentLineNumbers />
|
||||
<param.CodeFormattingTool />
|
||||
<param.ReservedNameArray />
|
||||
<param.CppStyleConst />
|
||||
<param.EnableDebugging />
|
||||
<param.Verbosity />
|
||||
<param.ReportPotentialDifferences />
|
||||
<param.GenerateReport />
|
||||
<param.HighlightImplicitExpansionIssues />
|
||||
<param.HighlightLoopControlIssues />
|
||||
<param.LaunchReport />
|
||||
<param.ReportInfoVarName />
|
||||
<param.DefaultTestFile />
|
||||
<param.MergeInstrumentationResults />
|
||||
<param.VerificationMode />
|
||||
<param.EnableMexProfiling />
|
||||
<var.BuiltWithMexProfiling />
|
||||
<param.CustomSourceCode />
|
||||
<param.CustomHeaderCode />
|
||||
<param.CustomInitializer />
|
||||
<param.CustomTerminator />
|
||||
<param.CustomInclude />
|
||||
<param.CustomSource />
|
||||
<param.CustomLibrary />
|
||||
<param.PostCodeGenCommand />
|
||||
<param.mex.GenCodeOnly />
|
||||
<param.ConstantFoldingTimeout />
|
||||
<param.CompileTimeRecursionLimit />
|
||||
<param.EnableRuntimeRecursion />
|
||||
<param.PreserveVariableNames />
|
||||
<param.EchoExpressions />
|
||||
<param.InlineThreshold />
|
||||
<param.InlineThresholdMax />
|
||||
<param.InlineStackLimit />
|
||||
<param.InlineBetweenUserFunctions />
|
||||
<param.InlineBetweenUserAndMathWorksFunctions />
|
||||
<param.InlineBetweenMathWorksFunctions />
|
||||
<param.EnableMemcpy />
|
||||
<param.MemcpyThreshold />
|
||||
<param.EnableOpenMP />
|
||||
<param.InitFltsAndDblsToZero />
|
||||
<param.ConstantInputs />
|
||||
<param.EnableCRICodeCoverage />
|
||||
<param.EnableAutoParallelizationReporting />
|
||||
<param.CacheDynamicArrayDataPointer />
|
||||
<param.EnableJIT />
|
||||
<param.EnableJITSilentBailOut />
|
||||
<param.CheckForIssuesJIT />
|
||||
<param.EnableGitSupport />
|
||||
<param.EnableAutoCommit />
|
||||
<param.RepositoryStyle />
|
||||
</unset>
|
||||
</profile>
|
||||
<profile key="profile.c">
|
||||
<param.WorkingFolder>option.WorkingFolder.Project</param.WorkingFolder>
|
||||
<param.SpecifiedWorkingFolder />
|
||||
<param.BuildFolder>option.BuildFolder.Project</param.BuildFolder>
|
||||
<param.SpecifiedBuildFolder />
|
||||
<param.SearchPaths />
|
||||
<var.SimdQueryHardwareVendor>Generic</var.SimdQueryHardwareVendor>
|
||||
<var.SimdQueryHardwareType>MATLAB Host Computer</var.SimdQueryHardwareType>
|
||||
<param.InstructionSetExtensionsAvailableInUI>true</param.InstructionSetExtensionsAvailableInUI>
|
||||
<param.InstructionSetExtensions>None</param.InstructionSetExtensions>
|
||||
<param.SaturateOnIntegerOverflow>true</param.SaturateOnIntegerOverflow>
|
||||
<param.PurelyIntegerCode>false</param.PurelyIntegerCode>
|
||||
<param.SupportNonFinite>true</param.SupportNonFinite>
|
||||
<param.LoopUnrollThreshold>5</param.LoopUnrollThreshold>
|
||||
<param.EnableAutoParallelization>false</param.EnableAutoParallelization>
|
||||
<param.NumberOfCpuThreads>0</param.NumberOfCpuThreads>
|
||||
<param.OptimizeReductions>false</param.OptimizeReductions>
|
||||
<param.EnableVariableSizing>true</param.EnableVariableSizing>
|
||||
<param.DynamicMemoryAllocation>option.DynamicMemoryAllocation.Threshold</param.DynamicMemoryAllocation>
|
||||
<param.DynamicMemoryAllocationThreshold>65536</param.DynamicMemoryAllocationThreshold>
|
||||
<param.DynamicMemoryAllocationInterface>option.DynamicMemoryAllocationInterface.AUTO</param.DynamicMemoryAllocationInterface>
|
||||
<param.RowMajor>option.RowMajor.ColumnMajor</param.RowMajor>
|
||||
<param.HighlightPotentialRowMajorIssues>true</param.HighlightPotentialRowMajorIssues>
|
||||
<param.PreserveArrayDimensions>false</param.PreserveArrayDimensions>
|
||||
<param.EliminateSingleDimensions>false</param.EliminateSingleDimensions>
|
||||
<param.StackUsageMax>200000</param.StackUsageMax>
|
||||
<param.MultiInstanceCode>false</param.MultiInstanceCode>
|
||||
<param.PreserveUnusedStructFields>false</param.PreserveUnusedStructFields>
|
||||
<param.FilePartitionMethod>option.FilePartitionMethod.MapMFileToCFile</param.FilePartitionMethod>
|
||||
<param.GenerateComments>true</param.GenerateComments>
|
||||
<param.CommentStyle>option.CommentStyle.Auto</param.CommentStyle>
|
||||
<param.MATLABSourceComments>false</param.MATLABSourceComments>
|
||||
<param.MATLABSourceCommentLineNumbers>true</param.MATLABSourceCommentLineNumbers>
|
||||
<param.MATLABFcnDesc>true</param.MATLABFcnDesc>
|
||||
<param.ReqsInCode>false</param.ReqsInCode>
|
||||
<param.ConvertIfToSwitch>false</param.ConvertIfToSwitch>
|
||||
<param.PreserveExternInFcnDecls>true</param.PreserveExternInFcnDecls>
|
||||
<param.EnableSignedLeftShifts>true</param.EnableSignedLeftShifts>
|
||||
<param.EnableSignedRightShifts>true</param.EnableSignedRightShifts>
|
||||
<param.ParenthesesLevel>option.ParenthesesLevel.Nominal</param.ParenthesesLevel>
|
||||
<param.MaxIdLength>31</param.MaxIdLength>
|
||||
<param.HeaderGuardStyle>option.HeaderGuardStyle.UseIncludeGuard</param.HeaderGuardStyle>
|
||||
<param.CodeFormattingTool>option.CodeFormattingTool.Auto</param.CodeFormattingTool>
|
||||
<param.ClangFormatFile>option.ClangFormatFile.Generate</param.ClangFormatFile>
|
||||
<param.DataTypeReplacement>option.DataTypeReplacement.CBuiltIn</param.DataTypeReplacement>
|
||||
<param.EnableCustomReplacementTypes>false</param.EnableCustomReplacementTypes>
|
||||
<param.ReplacementTypes.double />
|
||||
<param.ReplacementTypes.single />
|
||||
<param.ReplacementTypes.uint8 />
|
||||
<param.ReplacementTypes.uint16 />
|
||||
<param.ReplacementTypes.uint32 />
|
||||
<param.ReplacementTypes.uint64 />
|
||||
<param.ReplacementTypes.int8 />
|
||||
<param.ReplacementTypes.int16 />
|
||||
<param.ReplacementTypes.int32 />
|
||||
<param.ReplacementTypes.int64 />
|
||||
<param.ReplacementTypes.char />
|
||||
<param.ReplacementTypes.logical />
|
||||
<param.ReplacementTypes.ImportCustomTypes>false</param.ReplacementTypes.ImportCustomTypes>
|
||||
<param.ReplacementTypes.HeaderFiles />
|
||||
<param.CppInterfaceStyle>option.CppInterfaceStyle.Functions</param.CppInterfaceStyle>
|
||||
<param.CppInterfaceClassName />
|
||||
<param.CustomFileNameStr>$N$M</param.CustomFileNameStr>
|
||||
<param.CustomSymbolStrGlobalVar>$M$N</param.CustomSymbolStrGlobalVar>
|
||||
<param.CustomSymbolStrType>$M$N</param.CustomSymbolStrType>
|
||||
<param.CustomSymbolStrField>$M$N</param.CustomSymbolStrField>
|
||||
<param.CustomSymbolStrFcn>$M$N</param.CustomSymbolStrFcn>
|
||||
<param.CustomSymbolStrTmpVar>$M$N</param.CustomSymbolStrTmpVar>
|
||||
<param.CustomSymbolStrMacro>$M$N</param.CustomSymbolStrMacro>
|
||||
<param.CustomSymbolStrEMXArray>emxArray_$M$N</param.CustomSymbolStrEMXArray>
|
||||
<param.CustomSymbolStrEMXArrayFcn>emx$M$N</param.CustomSymbolStrEMXArrayFcn>
|
||||
<param.ReservedNameArray />
|
||||
<param.CppStyleConst>true</param.CppStyleConst>
|
||||
<param.RuntimeChecks>false</param.RuntimeChecks>
|
||||
<param.Verbose>false</param.Verbose>
|
||||
<param.Verbosity>option.Verbosity.Info</param.Verbosity>
|
||||
<param.ReportPotentialDifferences>false</param.ReportPotentialDifferences>
|
||||
<param.GenerateReport>true</param.GenerateReport>
|
||||
<param.GenerateCodeMetricsReport>false</param.GenerateCodeMetricsReport>
|
||||
<param.GenerateCodeReplacementReport>false</param.GenerateCodeReplacementReport>
|
||||
<param.HighlightPotentialDataTypeIssues>false</param.HighlightPotentialDataTypeIssues>
|
||||
<param.HighlightImplicitExpansionIssues>true</param.HighlightImplicitExpansionIssues>
|
||||
<param.HighlightLoopControlIssues>false</param.HighlightLoopControlIssues>
|
||||
<param.LaunchReport>false</param.LaunchReport>
|
||||
<param.ReportInfoVarName />
|
||||
<param.SILDebugging>false</param.SILDebugging>
|
||||
<param.SILPILCheckConstantInputs>true</param.SILPILCheckConstantInputs>
|
||||
<param.SILPILSyncGlobalData>true</param.SILPILSyncGlobalData>
|
||||
<param.CodeExecutionProfiling>false</param.CodeExecutionProfiling>
|
||||
<param.CodeProfilingInstrumentation>false</param.CodeProfilingInstrumentation>
|
||||
<param.CodeStackProfiling>false</param.CodeStackProfiling>
|
||||
<param.DefaultTestFile />
|
||||
<param.MergeInstrumentationResults>false</param.MergeInstrumentationResults>
|
||||
<param.RanPilSilVerification>false</param.RanPilSilVerification>
|
||||
<param.VerificationMode>option.VerificationMode.None</param.VerificationMode>
|
||||
<param.VerificationStatus>option.VerificationStatus.Inactive</param.VerificationStatus>
|
||||
<param.CustomSourceCode />
|
||||
<param.CustomHeaderCode />
|
||||
<param.CustomInitializer />
|
||||
<param.CustomTerminator />
|
||||
<param.CustomInclude />
|
||||
<param.CustomSource />
|
||||
<param.CustomLibrary />
|
||||
<param.PostCodeGenCommand />
|
||||
<param.TargetLangStandard>Auto</param.TargetLangStandard>
|
||||
<param.CodeReplacementLibrary>None</param.CodeReplacementLibrary>
|
||||
<param.DeprecatedCRLFlag>false</param.DeprecatedCRLFlag>
|
||||
<param.SameHardware>true</param.SameHardware>
|
||||
<param.Toolchain>Automatically locate an installed toolchain</param.Toolchain>
|
||||
<param.BuildConfiguration>Faster Runs</param.BuildConfiguration>
|
||||
<param.CustomToolchainOptions />
|
||||
<var.ToolchainSettingsVisible>true</var.ToolchainSettingsVisible>
|
||||
<param.target.Data><?xml version="1.0" encoding="UTF-8" standalone="yes"?><ctdata><configuredHardware/></ctdata></param.target.Data>
|
||||
<param.target.ActiveType>option.target.TargetType.MatlabHost</param.target.ActiveType>
|
||||
<param.target.ActiveTarget />
|
||||
<param.HardwareVendor.Production>Generic</param.HardwareVendor.Production>
|
||||
<param.HardwareType.Production>MATLAB Host Computer</param.HardwareType.Production>
|
||||
<param.HWDeviceType.Production>Generic->MATLAB Host Computer</param.HWDeviceType.Production>
|
||||
<var.instance.enabled.Production>true</var.instance.enabled.Production>
|
||||
<param.HardwareSizeChar.Production>8</param.HardwareSizeChar.Production>
|
||||
<param.HardwareSizeShort.Production>16</param.HardwareSizeShort.Production>
|
||||
<param.HardwareSizeInt.Production>32</param.HardwareSizeInt.Production>
|
||||
<param.HardwareSizeLong.Production>32</param.HardwareSizeLong.Production>
|
||||
<param.HardwareSizeLongLong.Production>64</param.HardwareSizeLongLong.Production>
|
||||
<param.HardwareSizeFloat.Production>32</param.HardwareSizeFloat.Production>
|
||||
<param.HardwareSizeDouble.Production>64</param.HardwareSizeDouble.Production>
|
||||
<param.HardwareSizeWord.Production>64</param.HardwareSizeWord.Production>
|
||||
<param.HardwareSizePointer.Production>64</param.HardwareSizePointer.Production>
|
||||
<param.HardwareSizeSizeT.Production>64</param.HardwareSizeSizeT.Production>
|
||||
<param.HardwareSizePtrDiffT.Production>64</param.HardwareSizePtrDiffT.Production>
|
||||
<param.HardwareEndianness.Production>option.HardwareEndianness.Little</param.HardwareEndianness.Production>
|
||||
<param.HardwareArithmeticRightShift.Production>true</param.HardwareArithmeticRightShift.Production>
|
||||
<param.HardwareLongLongMode.Production>true</param.HardwareLongLongMode.Production>
|
||||
<param.HardwareAtomicIntegerSize.Production>option.HardwareAtomicIntegerSize.Char</param.HardwareAtomicIntegerSize.Production>
|
||||
<param.HardwareAtomicFloatSize.Production>option.HardwareAtomicFloatSize.None</param.HardwareAtomicFloatSize.Production>
|
||||
<param.HardwareDivisionRounding.Production>option.HardwareDivisionRounding.Zero</param.HardwareDivisionRounding.Production>
|
||||
<param.HardwareVendor.Target>Generic</param.HardwareVendor.Target>
|
||||
<param.HardwareType.Target>MATLAB Host Computer</param.HardwareType.Target>
|
||||
<param.HWDeviceType.Target>Generic->MATLAB Host Computer</param.HWDeviceType.Target>
|
||||
<var.instance.enabled.Target>false</var.instance.enabled.Target>
|
||||
<param.HardwareSizeChar.Target>8</param.HardwareSizeChar.Target>
|
||||
<param.HardwareSizeShort.Target>16</param.HardwareSizeShort.Target>
|
||||
<param.HardwareSizeInt.Target>32</param.HardwareSizeInt.Target>
|
||||
<param.HardwareSizeLong.Target>32</param.HardwareSizeLong.Target>
|
||||
<param.HardwareSizeLongLong.Target>64</param.HardwareSizeLongLong.Target>
|
||||
<param.HardwareSizeFloat.Target>32</param.HardwareSizeFloat.Target>
|
||||
<param.HardwareSizeDouble.Target>64</param.HardwareSizeDouble.Target>
|
||||
<param.HardwareSizeWord.Target>64</param.HardwareSizeWord.Target>
|
||||
<param.HardwareSizePointer.Target>64</param.HardwareSizePointer.Target>
|
||||
<param.HardwareSizeSizeT.Target>64</param.HardwareSizeSizeT.Target>
|
||||
<param.HardwareSizePtrDiffT.Target>64</param.HardwareSizePtrDiffT.Target>
|
||||
<param.HardwareEndianness.Target>option.HardwareEndianness.Little</param.HardwareEndianness.Target>
|
||||
<param.HardwareArithmeticRightShift.Target>true</param.HardwareArithmeticRightShift.Target>
|
||||
<param.HardwareLongLongMode.Target>true</param.HardwareLongLongMode.Target>
|
||||
<param.HardwareAtomicIntegerSize.Target>option.HardwareAtomicIntegerSize.Char</param.HardwareAtomicIntegerSize.Target>
|
||||
<param.HardwareAtomicFloatSize.Target>option.HardwareAtomicFloatSize.None</param.HardwareAtomicFloatSize.Target>
|
||||
<param.HardwareDivisionRounding.Target>option.HardwareDivisionRounding.Zero</param.HardwareDivisionRounding.Target>
|
||||
<var.SuppressHardwareChange>false</var.SuppressHardwareChange>
|
||||
<param.CastingMode>option.CastingMode.Nominal</param.CastingMode>
|
||||
<param.IndentStyle>option.IndentStyle.K&R</param.IndentStyle>
|
||||
<param.IndentSize>2</param.IndentSize>
|
||||
<param.ColumnLimit>80</param.ColumnLimit>
|
||||
<param.grt.GenCodeOnly>true</param.grt.GenCodeOnly>
|
||||
<param.ConstantFoldingTimeout>40000</param.ConstantFoldingTimeout>
|
||||
<param.CompileTimeRecursionLimit>50</param.CompileTimeRecursionLimit>
|
||||
<param.EnableRuntimeRecursion>true</param.EnableRuntimeRecursion>
|
||||
<param.RunInitializeFcn>true</param.RunInitializeFcn>
|
||||
<param.IncludeInitializeFcn>true</param.IncludeInitializeFcn>
|
||||
<param.IncludeTerminateFcn>true</param.IncludeTerminateFcn>
|
||||
<param.GenerateExampleMain>option.GenerateExampleMain.GenerateCodeOnly</param.GenerateExampleMain>
|
||||
<param.PreserveVariableNames>option.PreserveVariableNames.None</param.PreserveVariableNames>
|
||||
<param.GenerateMakefile>true</param.GenerateMakefile>
|
||||
<param.BuildToolEnable>false</param.BuildToolEnable>
|
||||
<param.BuildToolConfiguration />
|
||||
<param.InlineThreshold>10</param.InlineThreshold>
|
||||
<param.InlineThresholdMax>200</param.InlineThresholdMax>
|
||||
<param.InlineStackLimit>1000000</param.InlineStackLimit>
|
||||
<param.InlineBetweenUserFunctions>option.InlineBetweenUserFunctions.Speed</param.InlineBetweenUserFunctions>
|
||||
<param.InlineBetweenUserAndMathWorksFunctions>option.InlineBetweenUserAndMathWorksFunctions.Speed</param.InlineBetweenUserAndMathWorksFunctions>
|
||||
<param.InlineBetweenMathWorksFunctions>option.InlineBetweenMathWorksFunctions.Speed</param.InlineBetweenMathWorksFunctions>
|
||||
<param.EnableStrengthReduction>false</param.EnableStrengthReduction>
|
||||
<param.EnableMemcpy>true</param.EnableMemcpy>
|
||||
<param.MemcpyThreshold>64</param.MemcpyThreshold>
|
||||
<param.EnableOpenMP>true</param.EnableOpenMP>
|
||||
<param.InitFltsAndDblsToZero>true</param.InitFltsAndDblsToZero>
|
||||
<param.GenerateNonFiniteFilesIfUsed>true</param.GenerateNonFiniteFilesIfUsed>
|
||||
<param.PassStructByReference>true</param.PassStructByReference>
|
||||
<param.CustomLAPACKCallback />
|
||||
<param.CustomFFTCallback />
|
||||
<param.CustomBLASCallback />
|
||||
<param.EnableAutoParallelizationReporting>true</param.EnableAutoParallelizationReporting>
|
||||
<param.CacheDynamicArrayDataPointer>true</param.CacheDynamicArrayDataPointer>
|
||||
<param.GenerateDefaultInSwitch>false</param.GenerateDefaultInSwitch>
|
||||
<param.EnableTraceability>true</param.EnableTraceability>
|
||||
<param.SILPILVerbosity>option.SILPILVerbosity.off</param.SILPILVerbosity>
|
||||
<param.UseECoderFeatures>true</param.UseECoderFeatures>
|
||||
<param.EnableGitSupport>false</param.EnableGitSupport>
|
||||
<param.EnableAutoCommit>true</param.EnableAutoCommit>
|
||||
<param.RepositoryStyle>option.RepositoryStyle.Auto</param.RepositoryStyle>
|
||||
<param.psCustomPrjState>false</param.psCustomPrjState>
|
||||
<param.psCustomProjectFile />
|
||||
<param.psCheckConfValue>option.psCheckConfValue.onWarnCheckConfDlg</param.psCheckConfValue>
|
||||
<param.psUniqueOutPutState>true</param.psUniqueOutPutState>
|
||||
<param.psOpenResultsState>true</param.psOpenResultsState>
|
||||
<param.psProductModeValue>option.psProductModeValue.codeProver</param.psProductModeValue>
|
||||
<param.psQuickConfValue>option.psQuickConfValue.proj</param.psQuickConfValue>
|
||||
<param.psOutputFolder>results_$codegenName$</param.psOutputFolder>
|
||||
<unset>
|
||||
<param.WorkingFolder />
|
||||
<param.SpecifiedWorkingFolder />
|
||||
<param.BuildFolder />
|
||||
<param.SpecifiedBuildFolder />
|
||||
<param.SearchPaths />
|
||||
<var.SimdQueryHardwareVendor />
|
||||
<var.SimdQueryHardwareType />
|
||||
<param.InstructionSetExtensionsAvailableInUI />
|
||||
<param.InstructionSetExtensions />
|
||||
<param.SaturateOnIntegerOverflow />
|
||||
<param.PurelyIntegerCode />
|
||||
<param.SupportNonFinite />
|
||||
<param.LoopUnrollThreshold />
|
||||
<param.EnableAutoParallelization />
|
||||
<param.NumberOfCpuThreads />
|
||||
<param.OptimizeReductions />
|
||||
<param.EnableVariableSizing />
|
||||
<param.DynamicMemoryAllocation />
|
||||
<param.DynamicMemoryAllocationThreshold />
|
||||
<param.DynamicMemoryAllocationInterface />
|
||||
<param.RowMajor />
|
||||
<param.HighlightPotentialRowMajorIssues />
|
||||
<param.PreserveArrayDimensions />
|
||||
<param.EliminateSingleDimensions />
|
||||
<param.StackUsageMax />
|
||||
<param.MultiInstanceCode />
|
||||
<param.PreserveUnusedStructFields />
|
||||
<param.FilePartitionMethod />
|
||||
<param.GenerateComments />
|
||||
<param.CommentStyle />
|
||||
<param.MATLABSourceComments />
|
||||
<param.MATLABSourceCommentLineNumbers />
|
||||
<param.MATLABFcnDesc />
|
||||
<param.ReqsInCode />
|
||||
<param.ConvertIfToSwitch />
|
||||
<param.PreserveExternInFcnDecls />
|
||||
<param.EnableSignedLeftShifts />
|
||||
<param.EnableSignedRightShifts />
|
||||
<param.ParenthesesLevel />
|
||||
<param.MaxIdLength />
|
||||
<param.HeaderGuardStyle />
|
||||
<param.CodeFormattingTool />
|
||||
<param.ClangFormatFile />
|
||||
<param.DataTypeReplacement />
|
||||
<param.EnableCustomReplacementTypes />
|
||||
<param.ReplacementTypes.double />
|
||||
<param.ReplacementTypes.single />
|
||||
<param.ReplacementTypes.uint8 />
|
||||
<param.ReplacementTypes.uint16 />
|
||||
<param.ReplacementTypes.uint32 />
|
||||
<param.ReplacementTypes.uint64 />
|
||||
<param.ReplacementTypes.int8 />
|
||||
<param.ReplacementTypes.int16 />
|
||||
<param.ReplacementTypes.int32 />
|
||||
<param.ReplacementTypes.int64 />
|
||||
<param.ReplacementTypes.char />
|
||||
<param.ReplacementTypes.logical />
|
||||
<param.ReplacementTypes.ImportCustomTypes />
|
||||
<param.ReplacementTypes.HeaderFiles />
|
||||
<param.CppInterfaceStyle />
|
||||
<param.CppInterfaceClassName />
|
||||
<param.CustomFileNameStr />
|
||||
<param.CustomSymbolStrGlobalVar />
|
||||
<param.CustomSymbolStrType />
|
||||
<param.CustomSymbolStrField />
|
||||
<param.CustomSymbolStrFcn />
|
||||
<param.CustomSymbolStrTmpVar />
|
||||
<param.CustomSymbolStrMacro />
|
||||
<param.CustomSymbolStrEMXArray />
|
||||
<param.CustomSymbolStrEMXArrayFcn />
|
||||
<param.ReservedNameArray />
|
||||
<param.CppStyleConst />
|
||||
<param.RuntimeChecks />
|
||||
<param.Verbose />
|
||||
<param.Verbosity />
|
||||
<param.ReportPotentialDifferences />
|
||||
<param.GenerateReport />
|
||||
<param.GenerateCodeMetricsReport />
|
||||
<param.GenerateCodeReplacementReport />
|
||||
<param.HighlightPotentialDataTypeIssues />
|
||||
<param.HighlightImplicitExpansionIssues />
|
||||
<param.HighlightLoopControlIssues />
|
||||
<param.LaunchReport />
|
||||
<param.ReportInfoVarName />
|
||||
<param.SILDebugging />
|
||||
<param.SILPILCheckConstantInputs />
|
||||
<param.SILPILSyncGlobalData />
|
||||
<param.CodeExecutionProfiling />
|
||||
<param.CodeProfilingInstrumentation />
|
||||
<param.CodeStackProfiling />
|
||||
<param.DefaultTestFile />
|
||||
<param.MergeInstrumentationResults />
|
||||
<param.RanPilSilVerification />
|
||||
<param.VerificationMode />
|
||||
<param.VerificationStatus />
|
||||
<param.CustomSourceCode />
|
||||
<param.CustomHeaderCode />
|
||||
<param.CustomInitializer />
|
||||
<param.CustomTerminator />
|
||||
<param.CustomInclude />
|
||||
<param.CustomSource />
|
||||
<param.CustomLibrary />
|
||||
<param.PostCodeGenCommand />
|
||||
<param.TargetLangStandard />
|
||||
<param.CodeReplacementLibrary />
|
||||
<param.DeprecatedCRLFlag />
|
||||
<param.SameHardware />
|
||||
<param.Toolchain />
|
||||
<param.BuildConfiguration />
|
||||
<param.CustomToolchainOptions />
|
||||
<var.ToolchainSettingsVisible />
|
||||
<param.target.ActiveType />
|
||||
<param.target.ActiveTarget />
|
||||
<param.HardwareVendor.Production />
|
||||
<param.HardwareType.Production />
|
||||
<param.HWDeviceType.Production />
|
||||
<var.instance.enabled.Production />
|
||||
<param.HardwareSizeChar.Production />
|
||||
<param.HardwareSizeShort.Production />
|
||||
<param.HardwareSizeInt.Production />
|
||||
<param.HardwareSizeLong.Production />
|
||||
<param.HardwareSizeLongLong.Production />
|
||||
<param.HardwareSizeFloat.Production />
|
||||
<param.HardwareSizeDouble.Production />
|
||||
<param.HardwareEndianness.Production />
|
||||
<param.HardwareAtomicIntegerSize.Production />
|
||||
<param.HardwareAtomicFloatSize.Production />
|
||||
<param.HardwareVendor.Target />
|
||||
<param.HardwareType.Target />
|
||||
<param.HWDeviceType.Target />
|
||||
<var.instance.enabled.Target />
|
||||
<param.HardwareSizeChar.Target />
|
||||
<param.HardwareSizeShort.Target />
|
||||
<param.HardwareSizeInt.Target />
|
||||
<param.HardwareSizeLong.Target />
|
||||
<param.HardwareSizeLongLong.Target />
|
||||
<param.HardwareSizeFloat.Target />
|
||||
<param.HardwareSizeDouble.Target />
|
||||
<param.HardwareEndianness.Target />
|
||||
<param.HardwareAtomicIntegerSize.Target />
|
||||
<param.HardwareAtomicFloatSize.Target />
|
||||
<var.SuppressHardwareChange />
|
||||
<param.CastingMode />
|
||||
<param.IndentStyle />
|
||||
<param.IndentSize />
|
||||
<param.ColumnLimit />
|
||||
<param.ConstantFoldingTimeout />
|
||||
<param.CompileTimeRecursionLimit />
|
||||
<param.EnableRuntimeRecursion />
|
||||
<param.RunInitializeFcn />
|
||||
<param.IncludeInitializeFcn />
|
||||
<param.IncludeTerminateFcn />
|
||||
<param.GenerateExampleMain />
|
||||
<param.PreserveVariableNames />
|
||||
<param.GenerateMakefile />
|
||||
<param.BuildToolEnable />
|
||||
<param.BuildToolConfiguration />
|
||||
<param.InlineThreshold />
|
||||
<param.InlineThresholdMax />
|
||||
<param.InlineStackLimit />
|
||||
<param.InlineBetweenUserFunctions />
|
||||
<param.InlineBetweenUserAndMathWorksFunctions />
|
||||
<param.InlineBetweenMathWorksFunctions />
|
||||
<param.EnableStrengthReduction />
|
||||
<param.EnableMemcpy />
|
||||
<param.MemcpyThreshold />
|
||||
<param.EnableOpenMP />
|
||||
<param.InitFltsAndDblsToZero />
|
||||
<param.GenerateNonFiniteFilesIfUsed />
|
||||
<param.PassStructByReference />
|
||||
<param.CustomLAPACKCallback />
|
||||
<param.CustomFFTCallback />
|
||||
<param.CustomBLASCallback />
|
||||
<param.EnableAutoParallelizationReporting />
|
||||
<param.CacheDynamicArrayDataPointer />
|
||||
<param.GenerateDefaultInSwitch />
|
||||
<param.EnableTraceability />
|
||||
<param.SILPILVerbosity />
|
||||
<param.UseECoderFeatures />
|
||||
<param.EnableGitSupport />
|
||||
<param.EnableAutoCommit />
|
||||
<param.RepositoryStyle />
|
||||
<param.psCustomPrjState />
|
||||
<param.psCustomProjectFile />
|
||||
<param.psCheckConfValue />
|
||||
<param.psUniqueOutPutState />
|
||||
<param.psOpenResultsState />
|
||||
<param.psProductModeValue />
|
||||
<param.psQuickConfValue />
|
||||
<param.psOutputFolder />
|
||||
</unset>
|
||||
</profile>
|
||||
<param.objective>option.objective.c</param.objective>
|
||||
<param.WorkflowStep>generateCode</param.WorkflowStep>
|
||||
<param.TestSnippets>
|
||||
<item>test1(1,1)</item>
|
||||
</param.TestSnippets>
|
||||
<param.ExternalFcnMajority>column</param.ExternalFcnMajority>
|
||||
<param.UseGlobals>option.UseGlobals.No</param.UseGlobals>
|
||||
<param.outputfile>${PROJECT_ROOT}\codegen\lib\test1\test1.lib</param.outputfile>
|
||||
<param.version>R2012a</param.version>
|
||||
<param.HasECoderFeatures>true</param.HasECoderFeatures>
|
||||
<param.HasGpuCoder>true</param.HasGpuCoder>
|
||||
<var.HasNeuralNetworkToolbox>true</var.HasNeuralNetworkToolbox>
|
||||
<param.mex.mainhtml />
|
||||
<param.grt.mainhtml />
|
||||
<param.CallGeneratedCodeFromTest>true</param.CallGeneratedCodeFromTest>
|
||||
<param.AutoInferDefaultFile />
|
||||
<param.AutoInferUseVariableSize>false</param.AutoInferUseVariableSize>
|
||||
<param.AutoInferUseUnboundedSize>false</param.AutoInferUseUnboundedSize>
|
||||
<param.AutoInferVariableSizeThreshold>1024</param.AutoInferVariableSizeThreshold>
|
||||
<param.AutoInferUnboundedSizeThreshold>2048</param.AutoInferUnboundedSizeThreshold>
|
||||
<param.EnableFixedPointStep>false</param.EnableFixedPointStep>
|
||||
<param.EnableScreener>true</param.EnableScreener>
|
||||
<param.AnnotationChecksum>1442665491</param.AnnotationChecksum>
|
||||
<var.LegacyTarget />
|
||||
<var.MirrorOnOpen>false</var.MirrorOnOpen>
|
||||
<param.FixedPointEnabled>false</param.FixedPointEnabled>
|
||||
<var.redirectedInputTypeData />
|
||||
<var.DismissScreener>false</var.DismissScreener>
|
||||
<param.unifiedParamStorage />
|
||||
<param.hdlParamStorage />
|
||||
<var.gc.lastOutputRoot>codegen\lib\test1</var.gc.lastOutputRoot>
|
||||
<var.gc.lastOutputType>C_CODE</var.gc.lastOutputType>
|
||||
<var.gc.preBuildChecksum>3265917544</var.gc.preBuildChecksum>
|
||||
<var.cfi.lastOutputRoot>codegen\mex\test1</var.cfi.lastOutputRoot>
|
||||
<var.cfi.preBuildChecksum>2058654794</var.cfi.preBuildChecksum>
|
||||
<var.lastCfiTestSnippet>test1(1,1)</var.lastCfiTestSnippet>
|
||||
<var.outdatedOnRestore>false</var.outdatedOnRestore>
|
||||
<var.lastUserSourceChecksum><?xml version="1.0" encoding="UTF-8" standalone="yes"?><checksum><includedFiles><file>F:\desktop\EMS(能量管理系统)\matlab\test1.m</file></includedFiles><value>836753573</value></checksum></var.lastUserSourceChecksum>
|
||||
<var.sourceSetState><?xml version="1.0" encoding="UTF-8" standalone="yes"?><sourceModel><primarySourceFiles><file>F:\desktop\EMS(能量管理系统)\matlab\test1.m</file></primarySourceFiles><fixedPointSourceFiles/><fixedPointSourceRegistered>false</fixedPointSourceRegistered><fixedPointSourceSelected>false</fixedPointSourceSelected></sourceModel></var.sourceSetState>
|
||||
<param.forceMexBuild>false</param.forceMexBuild>
|
||||
<param.NoDefaultJIT>false</param.NoDefaultJIT>
|
||||
<param.configImportActive>false</param.configImportActive>
|
||||
<var.isGpuCoder>false</var.isGpuCoder>
|
||||
<var.notGpuCoder>true</var.notGpuCoder>
|
||||
<var.boundToGui>true</var.boundToGui>
|
||||
<var.isConfigDialog>false</var.isConfigDialog>
|
||||
<var.ecoderEnabled>true</var.ecoderEnabled>
|
||||
<param.AlwaysGenerateTypedefGuards>false</param.AlwaysGenerateTypedefGuards>
|
||||
<param.RemoveDuplicateFunctionsAndTypes>true</param.RemoveDuplicateFunctionsAndTypes>
|
||||
<param.EnableStructExplosion>true</param.EnableStructExplosion>
|
||||
<param.ForceANSIC>false</param.ForceANSIC>
|
||||
<param.NumCompileJobs>1</param.NumCompileJobs>
|
||||
<param.mex.outputfile>test1_mex</param.mex.outputfile>
|
||||
<param.grt.outputfile>test1</param.grt.outputfile>
|
||||
<param.artifact>option.target.artifact.lib</param.artifact>
|
||||
<param.outputfile>${PROJECT_ROOT}\codegen\lib\test1\test1.lib</param.outputfile>
|
||||
<param.CppNamespace />
|
||||
<param.CppPackagesToNamespaces>true</param.CppPackagesToNamespaces>
|
||||
<param.CppNamespaceForMathworksCode>coder</param.CppNamespaceForMathworksCode>
|
||||
<param.CppPreserveClasses>true</param.CppPreserveClasses>
|
||||
<param.CppGenerateEnumClass>true</param.CppGenerateEnumClass>
|
||||
<param.gpu.Enabled>false</param.gpu.Enabled>
|
||||
<param.gpu.SelectCudaDevice>-1</param.gpu.SelectCudaDevice>
|
||||
<param.gpu.ComputeCapability>3.5</param.gpu.ComputeCapability>
|
||||
<param.gpu.CustomComputeCapability />
|
||||
<param.gpu.MallocMode>discrete</param.gpu.MallocMode>
|
||||
<param.gpu.MallocThreshold>200</param.gpu.MallocThreshold>
|
||||
<param.gpu.StackLimitPerThread>1024</param.gpu.StackLimitPerThread>
|
||||
<param.gpu.MaximumBlocksPerKernel>0</param.gpu.MaximumBlocksPerKernel>
|
||||
<param.gpu.Benchmarking>false</param.gpu.Benchmarking>
|
||||
<param.gpu.SafeBuild>false</param.gpu.SafeBuild>
|
||||
<param.gpu.KernelNamePrefix />
|
||||
<param.gpu.CompilerFlags />
|
||||
<param.gpu.EnableCUBLAS>true</param.gpu.EnableCUBLAS>
|
||||
<param.gpu.EnableCUSOLVER>true</param.gpu.EnableCUSOLVER>
|
||||
<param.gpu.EnableCUFFT>true</param.gpu.EnableCUFFT>
|
||||
<param.gpu.EnableMemoryManager>false</param.gpu.EnableMemoryManager>
|
||||
<param.gpu.BlockAlignment>256</param.gpu.BlockAlignment>
|
||||
<param.gpu.FreeMode>Never</param.gpu.FreeMode>
|
||||
<param.gpu.MinPoolSize>8</param.gpu.MinPoolSize>
|
||||
<param.gpu.MaxPoolSize>2048</param.gpu.MaxPoolSize>
|
||||
<var.checkIssuesGpu>false</var.checkIssuesGpu>
|
||||
<var.hasGpu>false</var.hasGpu>
|
||||
<var.isDeepLearningForMatlabCoderEnabled>true</var.isDeepLearningForMatlabCoderEnabled>
|
||||
<param.deeplearning.EnableDeepLearning>false</param.deeplearning.EnableDeepLearning>
|
||||
<param.deeplearning.DeepLearningCustomCallback />
|
||||
<param.deeplearning.TargetLib>option.deeplearning.targetlibrary.none</param.deeplearning.TargetLib>
|
||||
<var.cfiTargetLibSuppression>false</var.cfiTargetLibSuppression>
|
||||
<var.hasMatlabDeepLearningSupportPackage>true</var.hasMatlabDeepLearningSupportPackage>
|
||||
<var.hasGpuDeepLearningSupportPackage>true</var.hasGpuDeepLearningSupportPackage>
|
||||
<param.tensorrt.DataType>option.tensorrt.datatype.fp32</param.tensorrt.DataType>
|
||||
<param.tensorrt.DataPath />
|
||||
<param.tensorrt.NumCalibrationBatches>0</param.tensorrt.NumCalibrationBatches>
|
||||
<param.cudnn.AutoTuning>true</param.cudnn.AutoTuning>
|
||||
<param.cudnn.DataType>option.cudnn.datatype.fp32</param.cudnn.DataType>
|
||||
<param.cudnn.CalibrationResultFile />
|
||||
<param.arm-compute.ArmComputeVersion>option.arm-compute.version.20_02_1</param.arm-compute.ArmComputeVersion>
|
||||
<param.arm-compute.ArmArchitecture>option.arm-compute.architecture.unspecified</param.arm-compute.ArmArchitecture>
|
||||
<param.arm-compute.DataType>option.arm-compute.datatype.fp32</param.arm-compute.DataType>
|
||||
<param.arm-compute.CalibrationResultFile />
|
||||
<param.cmsis-nn.DataType>option.arm-compute.datatype.int8</param.cmsis-nn.DataType>
|
||||
<param.cmsis-nn.CalibrationResultFile />
|
||||
<param.TargetLang>option.TargetLang.C</param.TargetLang>
|
||||
<param.EnableAutoExtrinsicCalls>true</param.EnableAutoExtrinsicCalls>
|
||||
<param.EnableImplicitExpansion>true</param.EnableImplicitExpansion>
|
||||
<param.UsePreconditions>false</param.UsePreconditions>
|
||||
<param.FeatureFlags />
|
||||
<param.FixedPointMode>option.FixedPointMode.None</param.FixedPointMode>
|
||||
<param.AutoScaleLoopIndexVariables>false</param.AutoScaleLoopIndexVariables>
|
||||
<param.ComputedFixedPointData />
|
||||
<param.UserFixedPointData />
|
||||
<param.DefaultWordLength>16</param.DefaultWordLength>
|
||||
<param.DefaultFractionLength>4</param.DefaultFractionLength>
|
||||
<param.FixedPointSafetyMargin>0</param.FixedPointSafetyMargin>
|
||||
<param.FixedPointFimath>fimath('RoundingMethod', 'Floor', 'OverflowAction', 'Wrap', 'ProductMode', 'FullPrecision', 'MaxProductWordLength', 128, 'SumMode', 'FullPrecision', 'MaxSumWordLength', 128)</param.FixedPointFimath>
|
||||
<param.FixedPointTypeSource>option.FixedPointTypeSource.SimAndDerived</param.FixedPointTypeSource>
|
||||
<param.StaticAnalysisTimeout />
|
||||
<param.StaticAnalysisGlobalRangesOnly>false</param.StaticAnalysisGlobalRangesOnly>
|
||||
<param.LogAllIOValues>false</param.LogAllIOValues>
|
||||
<param.DetectOverflows>false</param.DetectOverflows>
|
||||
<param.LogHistogram>false</param.LogHistogram>
|
||||
<param.ShowCoverage>true</param.ShowCoverage>
|
||||
<param.ExcludedFixedPointVerificationFiles />
|
||||
<param.ExcludedFixedPointSimulationFiles />
|
||||
<param.InstrumentedBuildChecksum />
|
||||
<param.FixedPointStaticAnalysisChecksum />
|
||||
<param.InstrumentedMexFile />
|
||||
<param.FixedPointValidationChecksum />
|
||||
<param.FixedPointSourceCodeChecksum />
|
||||
<param.FixedPointFunctionReplacements />
|
||||
<param.OptimizeWholeNumbers>true</param.OptimizeWholeNumbers>
|
||||
<param.ContainerTypes>false</param.ContainerTypes>
|
||||
<param.GeneratedFixedPointFileSuffix>_fixpt</param.GeneratedFixedPointFileSuffix>
|
||||
<param.PlotFunction />
|
||||
<param.SDIPlot>false</param.SDIPlot>
|
||||
<param.EnableCodeEfficiencyChecks>false</param.EnableCodeEfficiencyChecks>
|
||||
<param.DefaultFixedPointSignedness>option.DefaultFixedPointSignedness.Automatic</param.DefaultFixedPointSignedness>
|
||||
<param.FixedPointTypeProposalMode>option.FixedPointTypeProposalMode.ProposeFractionLengths</param.FixedPointTypeProposalMode>
|
||||
<param.EnableFixedPointStep>false</param.EnableFixedPointStep>
|
||||
<var.lastFixedPointAction>option.fixedPointAction.none</var.lastFixedPointAction>
|
||||
<var.lastSimContext />
|
||||
<var.lastVerifyContext />
|
||||
<param.fpDataRoot />
|
||||
<param.fpUserFileChecksum />
|
||||
<var.snapshotChecksum />
|
||||
<param.fpLastConvertChecksum />
|
||||
<var.functionBlockSid />
|
||||
<param.fptSignedness>false</param.fptSignedness>
|
||||
<var.FixedPointAnalysisMode>option.FixedPointAnalysisMode.Sim</var.FixedPointAnalysisMode>
|
||||
<param.FixedPointUseDesignRanges>false</param.FixedPointUseDesignRanges>
|
||||
<unset>
|
||||
<param.objective />
|
||||
<param.ExternalFcnMajority />
|
||||
<param.UseGlobals />
|
||||
<param.outputfile />
|
||||
<param.version />
|
||||
<param.HasECoderFeatures />
|
||||
<param.HasGpuCoder />
|
||||
<var.HasNeuralNetworkToolbox />
|
||||
<param.mex.mainhtml />
|
||||
<param.grt.mainhtml />
|
||||
<param.CallGeneratedCodeFromTest />
|
||||
<param.AutoInferDefaultFile />
|
||||
<param.AutoInferUseVariableSize />
|
||||
<param.AutoInferUseUnboundedSize />
|
||||
<param.AutoInferVariableSizeThreshold />
|
||||
<param.AutoInferUnboundedSizeThreshold />
|
||||
<param.EnableFixedPointStep />
|
||||
<param.EnableScreener />
|
||||
<var.LegacyTarget />
|
||||
<var.MirrorOnOpen />
|
||||
<param.FixedPointEnabled />
|
||||
<var.redirectedInputTypeData />
|
||||
<var.DismissScreener />
|
||||
<param.unifiedParamStorage />
|
||||
<param.hdlParamStorage />
|
||||
<var.outdatedOnRestore />
|
||||
<param.forceMexBuild />
|
||||
<param.NoDefaultJIT />
|
||||
<param.configImportActive />
|
||||
<var.isGpuCoder />
|
||||
<var.notGpuCoder />
|
||||
<var.isConfigDialog />
|
||||
<var.ecoderEnabled />
|
||||
<param.AlwaysGenerateTypedefGuards />
|
||||
<param.RemoveDuplicateFunctionsAndTypes />
|
||||
<param.EnableStructExplosion />
|
||||
<param.ForceANSIC />
|
||||
<param.NumCompileJobs />
|
||||
<param.mex.outputfile />
|
||||
<param.grt.outputfile />
|
||||
<param.CppNamespace />
|
||||
<param.CppPackagesToNamespaces />
|
||||
<param.CppNamespaceForMathworksCode />
|
||||
<param.CppPreserveClasses />
|
||||
<param.CppGenerateEnumClass />
|
||||
<param.gpu.Enabled />
|
||||
<param.gpu.SelectCudaDevice />
|
||||
<param.gpu.ComputeCapability />
|
||||
<param.gpu.CustomComputeCapability />
|
||||
<param.gpu.MallocMode />
|
||||
<param.gpu.MallocThreshold />
|
||||
<param.gpu.StackLimitPerThread />
|
||||
<param.gpu.MaximumBlocksPerKernel />
|
||||
<param.gpu.Benchmarking />
|
||||
<param.gpu.SafeBuild />
|
||||
<param.gpu.KernelNamePrefix />
|
||||
<param.gpu.CompilerFlags />
|
||||
<param.gpu.EnableCUBLAS />
|
||||
<param.gpu.EnableCUSOLVER />
|
||||
<param.gpu.EnableCUFFT />
|
||||
<param.gpu.EnableMemoryManager />
|
||||
<param.gpu.BlockAlignment />
|
||||
<param.gpu.FreeMode />
|
||||
<param.gpu.MinPoolSize />
|
||||
<param.gpu.MaxPoolSize />
|
||||
<var.checkIssuesGpu />
|
||||
<var.hasGpu />
|
||||
<var.isDeepLearningForMatlabCoderEnabled />
|
||||
<param.deeplearning.EnableDeepLearning />
|
||||
<param.deeplearning.DeepLearningCustomCallback />
|
||||
<param.deeplearning.TargetLib />
|
||||
<var.cfiTargetLibSuppression />
|
||||
<var.hasMatlabDeepLearningSupportPackage />
|
||||
<var.hasGpuDeepLearningSupportPackage />
|
||||
<param.tensorrt.DataType />
|
||||
<param.tensorrt.DataPath />
|
||||
<param.tensorrt.NumCalibrationBatches />
|
||||
<param.cudnn.AutoTuning />
|
||||
<param.cudnn.DataType />
|
||||
<param.cudnn.CalibrationResultFile />
|
||||
<param.arm-compute.ArmComputeVersion />
|
||||
<param.arm-compute.ArmArchitecture />
|
||||
<param.arm-compute.DataType />
|
||||
<param.arm-compute.CalibrationResultFile />
|
||||
<param.cmsis-nn.DataType />
|
||||
<param.cmsis-nn.CalibrationResultFile />
|
||||
<param.TargetLang />
|
||||
<param.EnableAutoExtrinsicCalls />
|
||||
<param.EnableImplicitExpansion />
|
||||
<param.UsePreconditions />
|
||||
<param.FeatureFlags />
|
||||
<param.FixedPointMode />
|
||||
<param.AutoScaleLoopIndexVariables />
|
||||
<param.ComputedFixedPointData />
|
||||
<param.UserFixedPointData />
|
||||
<param.DefaultWordLength />
|
||||
<param.DefaultFractionLength />
|
||||
<param.FixedPointSafetyMargin />
|
||||
<param.FixedPointFimath />
|
||||
<param.FixedPointTypeSource />
|
||||
<param.StaticAnalysisTimeout />
|
||||
<param.StaticAnalysisGlobalRangesOnly />
|
||||
<param.LogAllIOValues />
|
||||
<param.DetectOverflows />
|
||||
<param.LogHistogram />
|
||||
<param.ShowCoverage />
|
||||
<param.ExcludedFixedPointVerificationFiles />
|
||||
<param.ExcludedFixedPointSimulationFiles />
|
||||
<param.InstrumentedBuildChecksum />
|
||||
<param.FixedPointStaticAnalysisChecksum />
|
||||
<param.InstrumentedMexFile />
|
||||
<param.FixedPointValidationChecksum />
|
||||
<param.FixedPointSourceCodeChecksum />
|
||||
<param.FixedPointFunctionReplacements />
|
||||
<param.OptimizeWholeNumbers />
|
||||
<param.ContainerTypes />
|
||||
<param.GeneratedFixedPointFileSuffix />
|
||||
<param.PlotFunction />
|
||||
<param.SDIPlot />
|
||||
<param.EnableCodeEfficiencyChecks />
|
||||
<param.DefaultFixedPointSignedness />
|
||||
<param.FixedPointTypeProposalMode />
|
||||
<var.lastFixedPointAction />
|
||||
<var.lastSimContext />
|
||||
<var.lastVerifyContext />
|
||||
<param.fpDataRoot />
|
||||
<param.fpUserFileChecksum />
|
||||
<var.snapshotChecksum />
|
||||
<param.fpLastConvertChecksum />
|
||||
<var.functionBlockSid />
|
||||
<param.fptSignedness />
|
||||
<var.FixedPointAnalysisMode />
|
||||
<param.FixedPointUseDesignRanges />
|
||||
</unset>
|
||||
<fileset.entrypoints>
|
||||
<file custom-data-expanded="false" value="${PROJECT_ROOT}\test1.m">
|
||||
<Marker>1705909603517</Marker>
|
||||
</file>
|
||||
</fileset.entrypoints>
|
||||
<fileset.testbench>
|
||||
<file>F:\desktop\test1.m</file>
|
||||
</fileset.testbench>
|
||||
<fileset.inputtypes>
|
||||
<file custom-data-expanded="false" value="${PROJECT_ROOT}\test1.m">
|
||||
<Inputs fileName="test1.m" functionName="test1">
|
||||
<Input Name="a" typeId="0" />
|
||||
<Input Name="b" typeId="0" />
|
||||
<idpTable>
|
||||
<type typeId="0">
|
||||
<Class>double</Class>
|
||||
<Size>1 x 1</Size>
|
||||
<Value />
|
||||
<InitialValue />
|
||||
<UserDefined>true</UserDefined>
|
||||
<Complex>false</Complex>
|
||||
<Sparse>false</Sparse>
|
||||
</type>
|
||||
</idpTable>
|
||||
</Inputs>
|
||||
</file>
|
||||
</fileset.inputtypes>
|
||||
<build-deliverables>
|
||||
<file location="${PROJECT_ROOT}\codegen\lib\test1" name="test1.lib" optional="false">F:\desktop\EMS(能量管理系统)\matlab\codegen\lib\test1\test1.lib</file>
|
||||
</build-deliverables>
|
||||
<workflow />
|
||||
<matlab>
|
||||
<root>D:\Program Files\MATLAB\R2022b</root>
|
||||
<toolboxes>
|
||||
<toolbox name="matlabcoder" />
|
||||
<toolbox name="embeddedcoder" />
|
||||
<toolbox name="gpucoder" />
|
||||
<toolbox name="fixedpoint" />
|
||||
<toolbox name="matlabhdlcoder" />
|
||||
<toolbox name="neuralnetwork" />
|
||||
</toolboxes>
|
||||
<toolbox>
|
||||
<matlabcoder>
|
||||
<enabled>true</enabled>
|
||||
</matlabcoder>
|
||||
</toolbox>
|
||||
<toolbox>
|
||||
<embeddedcoder>
|
||||
<enabled>true</enabled>
|
||||
</embeddedcoder>
|
||||
</toolbox>
|
||||
<toolbox>
|
||||
<gpucoder>
|
||||
<enabled>true</enabled>
|
||||
</gpucoder>
|
||||
</toolbox>
|
||||
<toolbox>
|
||||
<fixedpoint>
|
||||
<enabled>true</enabled>
|
||||
</fixedpoint>
|
||||
</toolbox>
|
||||
<toolbox>
|
||||
<matlabhdlcoder>
|
||||
<enabled>true</enabled>
|
||||
</matlabhdlcoder>
|
||||
</toolbox>
|
||||
<toolbox>
|
||||
<neuralnetwork>
|
||||
<enabled>true</enabled>
|
||||
</neuralnetwork>
|
||||
</toolbox>
|
||||
</matlab>
|
||||
<platform>
|
||||
<unix>false</unix>
|
||||
<mac>false</mac>
|
||||
<windows>true</windows>
|
||||
<win2k>false</win2k>
|
||||
<winxp>false</winxp>
|
||||
<vista>false</vista>
|
||||
<linux>false</linux>
|
||||
<solaris>false</solaris>
|
||||
<osver>10.0</osver>
|
||||
<os32>false</os32>
|
||||
<os64>true</os64>
|
||||
<arch>win64</arch>
|
||||
<matlab>true</matlab>
|
||||
</platform>
|
||||
</configuration>
|
||||
</deployment-project>
|
||||
BIN
1.Software/Verify/simulink/fuc.slx
Normal file
BIN
1.Software/Verify/simulink/fuc.slx
Normal file
Binary file not shown.
BIN
1.Software/Verify/simulink/fuc.slx.original
Normal file
BIN
1.Software/Verify/simulink/fuc.slx.original
Normal file
Binary file not shown.
BIN
1.Software/Verify/simulink/fuc_ert_rtw/buildInfo.mat
Normal file
BIN
1.Software/Verify/simulink/fuc_ert_rtw/buildInfo.mat
Normal file
Binary file not shown.
BIN
1.Software/Verify/simulink/fuc_ert_rtw/codeInfo.mat
Normal file
BIN
1.Software/Verify/simulink/fuc_ert_rtw/codeInfo.mat
Normal file
Binary file not shown.
BIN
1.Software/Verify/simulink/fuc_ert_rtw/codedescriptor.dmr
Normal file
BIN
1.Software/Verify/simulink/fuc_ert_rtw/codedescriptor.dmr
Normal file
Binary file not shown.
94
1.Software/Verify/simulink/fuc_ert_rtw/ert_main.c
Normal file
94
1.Software/Verify/simulink/fuc_ert_rtw/ert_main.c
Normal 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]
|
||||
*/
|
||||
328
1.Software/Verify/simulink/fuc_ert_rtw/fuc.c
Normal file
328
1.Software/Verify/simulink/fuc_ert_rtw/fuc.c
Normal 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]
|
||||
*/
|
||||
191
1.Software/Verify/simulink/fuc_ert_rtw/fuc.h
Normal file
191
1.Software/Verify/simulink/fuc_ert_rtw/fuc.h
Normal 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]
|
||||
*/
|
||||
45
1.Software/Verify/simulink/fuc_ert_rtw/fuc_private.h
Normal file
45
1.Software/Verify/simulink/fuc_ert_rtw/fuc_private.h
Normal 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]
|
||||
*/
|
||||
28
1.Software/Verify/simulink/fuc_ert_rtw/fuc_types.h
Normal file
28
1.Software/Verify/simulink/fuc_ert_rtw/fuc_types.h
Normal 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]
|
||||
*/
|
||||
96
1.Software/Verify/simulink/fuc_ert_rtw/rtGetInf.c
Normal file
96
1.Software/Verify/simulink/fuc_ert_rtw/rtGetInf.c
Normal 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]
|
||||
*/
|
||||
31
1.Software/Verify/simulink/fuc_ert_rtw/rtGetInf.h
Normal file
31
1.Software/Verify/simulink/fuc_ert_rtw/rtGetInf.h
Normal 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]
|
||||
*/
|
||||
62
1.Software/Verify/simulink/fuc_ert_rtw/rtGetNaN.c
Normal file
62
1.Software/Verify/simulink/fuc_ert_rtw/rtGetNaN.c
Normal 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]
|
||||
*/
|
||||
29
1.Software/Verify/simulink/fuc_ert_rtw/rtGetNaN.h
Normal file
29
1.Software/Verify/simulink/fuc_ert_rtw/rtGetNaN.h
Normal 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]
|
||||
*/
|
||||
92
1.Software/Verify/simulink/fuc_ert_rtw/rt_nonfinite.c
Normal file
92
1.Software/Verify/simulink/fuc_ert_rtw/rt_nonfinite.c
Normal 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]
|
||||
*/
|
||||
60
1.Software/Verify/simulink/fuc_ert_rtw/rt_nonfinite.h
Normal file
60
1.Software/Verify/simulink/fuc_ert_rtw/rt_nonfinite.h
Normal 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]
|
||||
*/
|
||||
4
1.Software/Verify/simulink/fuc_ert_rtw/rtw_proj.tmw
Normal file
4
1.Software/Verify/simulink/fuc_ert_rtw/rtw_proj.tmw
Normal 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
|
||||
176
1.Software/Verify/simulink/fuc_ert_rtw/rtwtypes.h
Normal file
176
1.Software/Verify/simulink/fuc_ert_rtw/rtwtypes.h
Normal 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]
|
||||
*/
|
||||
BIN
1.Software/Verify/simulink/fuc_ert_rtw/rtwtypeschksum.mat
Normal file
BIN
1.Software/Verify/simulink/fuc_ert_rtw/rtwtypeschksum.mat
Normal file
Binary file not shown.
BIN
1.Software/Verify/simulink/fuc_ert_rtw/tmwinternal/tr
Normal file
BIN
1.Software/Verify/simulink/fuc_ert_rtw/tmwinternal/tr
Normal file
Binary file not shown.
BIN
1.Software/Verify/simulink/led.slx
Normal file
BIN
1.Software/Verify/simulink/led.slx
Normal file
Binary file not shown.
BIN
1.Software/Verify/simulink/led_ert_rtw/buildInfo.mat
Normal file
BIN
1.Software/Verify/simulink/led_ert_rtw/buildInfo.mat
Normal file
Binary file not shown.
BIN
1.Software/Verify/simulink/led_ert_rtw/codeInfo.mat
Normal file
BIN
1.Software/Verify/simulink/led_ert_rtw/codeInfo.mat
Normal file
Binary file not shown.
BIN
1.Software/Verify/simulink/led_ert_rtw/codedescriptor.dmr
Normal file
BIN
1.Software/Verify/simulink/led_ert_rtw/codedescriptor.dmr
Normal file
Binary file not shown.
BIN
1.Software/Verify/simulink/led_ert_rtw/compileInfo.mat
Normal file
BIN
1.Software/Verify/simulink/led_ert_rtw/compileInfo.mat
Normal file
Binary file not shown.
101
1.Software/Verify/simulink/led_ert_rtw/ert_main.c
Normal file
101
1.Software/Verify/simulink/led_ert_rtw/ert_main.c
Normal 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]
|
||||
*/
|
||||
16
1.Software/Verify/simulink/led_ert_rtw/led.bat
Normal file
16
1.Software/Verify/simulink/led_ert_rtw/led.bat
Normal 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
|
||||
65
1.Software/Verify/simulink/led_ert_rtw/led.c
Normal file
65
1.Software/Verify/simulink/led_ert_rtw/led.c
Normal 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]
|
||||
*/
|
||||
92
1.Software/Verify/simulink/led_ert_rtw/led.h
Normal file
92
1.Software/Verify/simulink/led_ert_rtw/led.h
Normal 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]
|
||||
*/
|
||||
334
1.Software/Verify/simulink/led_ert_rtw/led.mk
Normal file
334
1.Software/Verify/simulink/led_ert_rtw/led.mk
Normal 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."
|
||||
|
||||
|
||||
2
1.Software/Verify/simulink/led_ert_rtw/led.rsp
Normal file
2
1.Software/Verify/simulink/led_ert_rtw/led.rsp
Normal file
@@ -0,0 +1,2 @@
|
||||
ert_main.obj
|
||||
led.obj
|
||||
0
1.Software/Verify/simulink/led_ert_rtw/led_ref.rsp
Normal file
0
1.Software/Verify/simulink/led_ert_rtw/led_ref.rsp
Normal file
4
1.Software/Verify/simulink/led_ert_rtw/rtw_proj.tmw
Normal file
4
1.Software/Verify/simulink/led_ert_rtw/rtw_proj.tmw
Normal 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
|
||||
156
1.Software/Verify/simulink/led_ert_rtw/rtwtypes.h
Normal file
156
1.Software/Verify/simulink/led_ert_rtw/rtwtypes.h
Normal 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]
|
||||
*/
|
||||
BIN
1.Software/Verify/simulink/led_ert_rtw/rtwtypeschksum.mat
Normal file
BIN
1.Software/Verify/simulink/led_ert_rtw/rtwtypeschksum.mat
Normal file
Binary file not shown.
@@ -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>
|
||||
BIN
1.Software/Verify/simulink/led_ert_rtw/tmwinternal/tr
Normal file
BIN
1.Software/Verify/simulink/led_ert_rtw/tmwinternal/tr
Normal file
Binary file not shown.
45
1.Software/Verify/simulink/my_data.m
Normal file
45
1.Software/Verify/simulink/my_data.m
Normal 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 = '';
|
||||
|
||||
BIN
1.Software/Verify/simulink/test1.slx
Normal file
BIN
1.Software/Verify/simulink/test1.slx
Normal file
Binary file not shown.
BIN
1.Software/Verify/simulink/test1.slx.original
Normal file
BIN
1.Software/Verify/simulink/test1.slx.original
Normal file
Binary file not shown.
BIN
1.Software/Verify/simulink/test1.zip
Normal file
BIN
1.Software/Verify/simulink/test1.zip
Normal file
Binary file not shown.
BIN
1.Software/Verify/simulink/test1_ert_rtw/buildInfo.mat
Normal file
BIN
1.Software/Verify/simulink/test1_ert_rtw/buildInfo.mat
Normal file
Binary file not shown.
BIN
1.Software/Verify/simulink/test1_ert_rtw/codeInfo.mat
Normal file
BIN
1.Software/Verify/simulink/test1_ert_rtw/codeInfo.mat
Normal file
Binary file not shown.
BIN
1.Software/Verify/simulink/test1_ert_rtw/codedescriptor.dmr
Normal file
BIN
1.Software/Verify/simulink/test1_ert_rtw/codedescriptor.dmr
Normal file
Binary file not shown.
BIN
1.Software/Verify/simulink/test1_ert_rtw/compileInfo.mat
Normal file
BIN
1.Software/Verify/simulink/test1_ert_rtw/compileInfo.mat
Normal file
Binary file not shown.
101
1.Software/Verify/simulink/test1_ert_rtw/ert_main.c
Normal file
101
1.Software/Verify/simulink/test1_ert_rtw/ert_main.c
Normal 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]
|
||||
*/
|
||||
57
1.Software/Verify/simulink/test1_ert_rtw/html/_internal.html
Normal file
57
1.Software/Verify/simulink/test1_ert_rtw/html/_internal.html
Normal 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
@@ -0,0 +1 @@
|
||||
var modelInfo = {model:"test1"};var modelHierarchy=[{model:"test1",relativePath:"_internal.html",parent:"null"},];
|
||||
@@ -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"]];
|
||||
32
1.Software/Verify/simulink/test1_ert_rtw/html/index.html
Normal file
32
1.Software/Verify/simulink/test1_ert_rtw/html/index.html
Normal 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 |
2068
1.Software/Verify/simulink/test1_ert_rtw/html/pages/rtwhilite2.js
Normal file
2068
1.Software/Verify/simulink/test1_ert_rtw/html/pages/rtwhilite2.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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%;
|
||||
}
|
||||
210
1.Software/Verify/simulink/test1_ert_rtw/html/pages/rtwshrink.js
Normal file
210
1.Software/Verify/simulink/test1_ert_rtw/html/pages/rtwshrink.js
Normal 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');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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">
|
||||
<Root>/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">
|
||||
<Root>/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">
|
||||
<Root>/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>
|
||||
@@ -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>配置参数 > 代码生成 > 报告</b>窗格中,选择<b>生成静态代码指标</b>。然后,重新编译模型。
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -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>
|
||||
@@ -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">
|
||||
<S1>
|
||||
</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>
|
||||
@@ -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>
|
||||
@@ -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>配置参数 > 代码生成 > 报告</b>窗格中,选择<b>已消除/虚拟模块</b>。然后,重新编译模型。</P>
|
||||
</BODY></HTML>
|
||||
BIN
1.Software/Verify/simulink/test1_ert_rtw/make_exception.mat
Normal file
BIN
1.Software/Verify/simulink/test1_ert_rtw/make_exception.mat
Normal file
Binary file not shown.
4
1.Software/Verify/simulink/test1_ert_rtw/rtw_proj.tmw
Normal file
4
1.Software/Verify/simulink/test1_ert_rtw/rtw_proj.tmw
Normal 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
|
||||
156
1.Software/Verify/simulink/test1_ert_rtw/rtwtypes.h
Normal file
156
1.Software/Verify/simulink/test1_ert_rtw/rtwtypes.h
Normal 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]
|
||||
*/
|
||||
BIN
1.Software/Verify/simulink/test1_ert_rtw/rtwtypeschksum.mat
Normal file
BIN
1.Software/Verify/simulink/test1_ert_rtw/rtwtypeschksum.mat
Normal file
Binary file not shown.
16
1.Software/Verify/simulink/test1_ert_rtw/test1.bat
Normal file
16
1.Software/Verify/simulink/test1_ert_rtw/test1.bat
Normal 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
|
||||
57
1.Software/Verify/simulink/test1_ert_rtw/test1.c
Normal file
57
1.Software/Verify/simulink/test1_ert_rtw/test1.c
Normal 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]
|
||||
*/
|
||||
77
1.Software/Verify/simulink/test1_ert_rtw/test1.h
Normal file
77
1.Software/Verify/simulink/test1_ert_rtw/test1.h
Normal 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]
|
||||
*/
|
||||
334
1.Software/Verify/simulink/test1_ert_rtw/test1.mk
Normal file
334
1.Software/Verify/simulink/test1_ert_rtw/test1.mk
Normal 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."
|
||||
|
||||
|
||||
2
1.Software/Verify/simulink/test1_ert_rtw/test1.rsp
Normal file
2
1.Software/Verify/simulink/test1_ert_rtw/test1.rsp
Normal file
@@ -0,0 +1,2 @@
|
||||
ert_main.obj
|
||||
test1.obj
|
||||
26
1.Software/Verify/simulink/test1_ert_rtw/test1_private.h
Normal file
26
1.Software/Verify/simulink/test1_ert_rtw/test1_private.h
Normal 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]
|
||||
*/
|
||||
28
1.Software/Verify/simulink/test1_ert_rtw/test1_types.h
Normal file
28
1.Software/Verify/simulink/test1_ert_rtw/test1_types.h
Normal 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]
|
||||
*/
|
||||
@@ -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>
|
||||
BIN
1.Software/Verify/simulink/test1_ert_rtw/tmwinternal/tr
Normal file
BIN
1.Software/Verify/simulink/test1_ert_rtw/tmwinternal/tr
Normal file
Binary file not shown.
BIN
1.Software/Verify/syslog
Normal file
BIN
1.Software/Verify/syslog
Normal file
Binary file not shown.
1815
1.Software/Verify/syslog (1)
Normal file
1815
1.Software/Verify/syslog (1)
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user