CN102421004B - Debugging method and device for television software system - Google Patents

Debugging method and device for television software system Download PDF

Info

Publication number
CN102421004B
CN102421004B CN 201110340183 CN201110340183A CN102421004B CN 102421004 B CN102421004 B CN 102421004B CN 201110340183 CN201110340183 CN 201110340183 CN 201110340183 A CN201110340183 A CN 201110340183A CN 102421004 B CN102421004 B CN 102421004B
Authority
CN
Grant status
Grant
Patent type
Prior art keywords
device
serial
file
debugging
print information
Prior art date
Application number
CN 201110340183
Other languages
Chinese (zh)
Other versions
CN102421004A (en )
Inventor
张奇
王俊
袁彩凤
Original Assignee
深圳创维-Rgb电子有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Grant date

Links

Abstract

本发明公开一种电视机软件系统的调试方法,包括以下步骤:检测与电视机相连的USB设备其存储空间是否满足打印信息存储要求;当所述USB设备的存储空间满足打印信息存储要求时,开启调试进程,将存放在串口设备的打印信息输出至USB设备。 The present invention discloses a method for debugging software television system, comprising the steps of: detecting a television connected USB storage device which meets the requirements of the print information is stored; when the USB storage device storing print information satisfies the requirements, turn on debugging process, the information will be stored in the print output serial devices to a USB device. 本发明还公开一种电视机软件系统的调试装置。 The present invention also discloses a device for debugging software television system. 本发明不需要外接电脑就能保存打印信息,方便设计人员调试时发现问题并改进。 The present invention does not require an external computer will be able to save the print information to facilitate designers to find problems when debugging and improvement.

Description

电视机软件系统的调试方法及装置 Debugging method and apparatus for television software system

技术领域 FIELD

[0001] 本发明属于电视机技术领域,特别涉及一种可对电视机软件系统进行调试的方法 [0001] The method of the present invention is in TV technology, and particularly relates to a system for debugging the software of the television

及装置。 And devices.

背景技术 Background technique

[0002] 现在的电视一般都带有智能操作系统。 [0002] Now TV generally with smartphone operating system. 电视的功能越多或者越强大,相应的系统也越来越复杂。 The more TV function or the more powerful, the corresponding system has become increasingly complex. 对电视的操作系统进行调试或者维护时,分析系统输出的打印信息是最好的手段。 When the operating system for debugging or maintenance of television, print information analysis system output is the best means. 目前分析打印信息需要外接电脑,通过串口获取打印信息。 Analysis of the current print information requires an external computer, access to print information through the serial port. 但在一些地方,例如用户家中或者高温老化房等地方,电脑携带不便而且不好使用,获取打印信息较为困难。 But in some places, such as the user's home or high-temperature aging room and other places, the use of computers to carry inconvenient and unpleasant, it is difficult to obtain printed information.

发明内容 SUMMARY

[0003] 本发明的主要目的在于提供一种电视机软件系统的调试方法,旨在解决上述在环境中获取打印信息较为困难的技术问题。 [0003] The main object of the present invention to provide a method for debugging TV software system designed to address the acquired print information more difficult technical problems in the environment.

[0004] 为了实现发明目的,本发明提供一种电视机软件系统的调试方法,包括以下步骤: [0004] For the purpose of the invention, the present invention provides a method for debugging software television system, comprising the steps of:

[0005] 检测与电视机相连的USB设备其存储空间是否满足打印信息存储要求; [0005] connected to the TV USB device detected memory space which meets the requirements of the print information is stored;

[0006] 当所述USB设备的存储空间满足打印信息存储要求时,开启调试进程,将存放在串口设备的打印信息输出至USB设备。 [0006] When the storage space of the USB storage device to meet the required printing information, open debugging process, the print information stored in the serial output device to a USB device.

[0007] 优选地,在开启调试进程之前包括: [0007] Preferably, before turning on the debug process including:

[0008] 判断电视机的调试标识是否使能,若是,则进入开启调试进程的步骤;若否,则进入正常开机流程。 [0008] judgment television debugging is enabled identity, and if so, turn on debugging process step is to enter; if not, then enter the normal boot process.

[0009] 优选地,所述将存放在串口设备的打印信息输出至USB设备包括: [0009] Preferably, the print information stored in the device to a USB serial output apparatus comprising:

[0010] 启动预置在电视机中的定时器; [0010] start preset timer in the TV set;

[0011] 在USB设备中创建文件; [0011] create a file on the USB device;

[0012] 根据定时器预设的时间间隔,从串口设备的缓冲区中读取打印信息,并保存在所述文件中。 [0012] According to the timer preset time interval, information is read from the print buffer in the serial device, and stored in the file.

[0013] 优选地,所述从串口设备的缓冲区中读取打印信息,并保存在所述文件中包括: [0013] Preferably, the information is read from the print buffer in a serial device, and stored in a file comprising:

[0014] 如果USB设备空间已满,则用新数据覆盖已存储数据,同时设置空间满标识。 [0014] If a USB device is full, the new data is covered with the stored data, and set the space is full identity.

[0015] 优选地,在判断电视机的调试标识是否使能之前还包括: [0015] Preferably, prior to determining whether the television debug enable identification further comprising:

[0016] 将打印信息输出至串口; [0016] The print information is output to the serial port;

[0017] 定义文件描述符,打开串口文件,并将返回值赋给文件描述符; [0017] the file descriptor, a file open port, and the return value is assigned to the file descriptor;

[0018] 将串口文件中的数据读取到串口设备的缓冲区。 [0018] The serial data is read into the buffer file serial device.

[0019] 本发明另提供一种电视机软件系统的调试装置,其至少包括: [0019] The present invention further provides software debugging apparatus A television system, comprising at least:

[0020] USB设备检测模块,用于检测与电视机相连的USB设备其存储空间是否满足打印信息存储要求; [0020] USB device detection module, USB device for detecting television connected to the memory space storing printing information meets the requirements;

[0021] 调试模块,用于所述USB设备的存储空间满足打印信息存储要求时,开启调试进程,将存放在串口设备的打印信息输出至USB设备。 [0021] debug module, a storage space for the USB device storing print information satisfies the requirement to open the debugging process, the print information stored in the serial output device to a USB device.

[0022] 优选地,所述调试模块还用于: [0022] Preferably, said debug module is further configured to:

[0023] 判断电视机的调试标识是否使能,当所述USB设备的存储空间满足打印信息存储要求时,开启调试进程;若否,则进入正常开机流程。 [0023] It is determined whether the television identification debugging enabled, when the USB storage device storing print information satisfies requirements, open debugging process; if not, the process proceeds to the normal start-up procedure.

[0024] 优选地,上述调试调试模块包括: [0024] Preferably, the debugging debug module comprising:

[0025] 定时器启动单元,用于启动预置在电视机中的定时器; [0025] timer starting unit configured to start a timer preset in the television;

[0026] 文件创建单元,用于在USB设备中创建文件; [0026] The file creating unit for creating a file in a USB device;

[0027] 打印信息读取单元,用于根据定时器预设的时间间隔,从串口设备的缓冲区中读取打印信息,并保存在所述文件中。 [0027] The print information reading means, according to a timer for a preset time interval, information is read from the print buffer in a serial device, and stored in the file.

[0028] 优选地,所述打印信息读取单元进一步用于: [0028] Preferably, the print information reading unit is further configured to:

[0029] 如果空间已满,则用新数据覆盖已存储数据,同时设置空间满标识。 [0029] If the space is full, new data is covered with the stored data, and set identifier space is full.

[0030] 优选地,上述调试模块还包括Linux系统处理单元,所述Linux系统处理单元具体用于: [0030] Preferably, the debug module further comprises a Linux system processing unit, the Linux system processing unit configured to:

[0031] 将打印信息输出至串口; [0031] The print information is output to the serial port;

[0032] 定义文件描述符,打开串口文件,并将返回值赋给文件描述符; [0032] the file descriptor, a file open port, and the return value is assigned to the file descriptor;

[0033] 将串口文件中的数据读取到串口设备的缓冲区。 [0033] The serial data is read into the buffer file serial device.

[0034] 本发明使电视在正常运行的同时,将系统输出的打印信息保存到USB设备的文件中,同时具有自动检测USB空间大小和自动更新文件数据的功能,使电视等设备不需要外接电脑就能保存打印信息,方便设计人员调试时发现问题并改进,尤其适合高温高湿等不适合人长期停留的环境抓取随机问题数据。 [0034] The present invention allows the normal operation of the TV at the same time, to save the print output information to a file system of the USB device, the USB also has automatic detection and space data file is automatically updated, so that the television device does not require an external computer, etc. It can save print information, find it convenient to designers debug problems and improve, especially for high temperature and humidity, which are not suitable for human long-term stays environmental problems crawling random data.

附图说明 BRIEF DESCRIPTION

[0035] 图1为本发明电视机软件系统的调试方法一实施例的流程图; Debugging method [0035] FIG 1 a television system of the present invention is a software flow diagram of the embodiment;

[0036] 图2为本发明电视机软件系统的调试方法一实施例中启动调试进程进行调试的步骤流程图; Debugging method [0036] Figure 2 TV software system of the present invention is to start a debugging process steps in the flowchart for debugging;

[0037] 图3为本发明电视机软件系统的调试方法另一实施例的流程示意图; Process debugging method embodiment [0037] FIG. 3 TV software system to another embodiment of the present invention is a schematic diagram;

[0038] 图4为本发明电视机软件系统的调试装置一实施例的结构示意图; Commissioning device [0038] FIG 4 TV software system of the present invention is a schematic structural diagram of the embodiment;

[0039] 图5为本发明电视机软件系统的调试装置一实施例中调试模块的结构示意图。 A schematic structural diagram of an embodiment of the debug module of software debugging apparatus television system [0039] FIG. 5 of the present invention.

[0040] 本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。 [0040] achieve the object of the present invention, features and advantages of the embodiments in conjunction with embodiments, be further illustrated with reference to the accompanying drawings.

具体实施方式 detailed description

[0041] 应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。 [0041] It should be understood that the specific embodiments described herein are only intended to illustrate the present invention and are not intended to limit the present invention.

[0042] 参照图1,图1为本发明电视机软件系统的调试方法一实施例的流程图。 [0042] Referring to FIG. 1, FIG. 1 TV software debugging method flow diagram of an embodiment of the invention. 如图1所示,该流程包括以下步骤: As shown in FIG 1, the process comprising the steps of:

[0043] 步骤S10,检测与电视机相连的USB设备其存储空间是否满足打印信息存储要求; [0043] Step S10, the detection of the television connected to the USB device that stores print information storage space meets the requirements;

[0044] 本发明实施例中,在电视机开机时执行调试处理流程,具体如下: [0044] The embodiments of the present invention, the debugging of the TV power-processes as follows:

[0045] 首先,启动电视上的操作系统。 [0045] First, start the operating system on the TV. 操作系统完成必要的设备自检后,初始化串口设备,包括设定串口设备通讯协议,通讯速率,端口等信息,使串口能够工作。 After the operating system has completed the necessary self-test device, initialize the serial device information, the device comprises a serial communication protocol set, communication rate, port, so that the serial port can operate. 接着初始化USB设备,包括初始化USB通讯协议,规划缓冲区,安装USB驱动,再获取各端口所需的系统资源,包括内存、信号量和消息队列等。 Then initialize the USB device, comprising a USB communication protocol initialization, buffer planning, installation USB driver, and then obtain the required system resources for each port, including memory, message queues and semaphores. 待USB设备可以工作后,检测在USB接口上是否插有USB设备,即USB闪存或者硬盘等。 After the USB device functions to detect whether a USB device is inserted in the USB interface, i.e., USB flash memory or hard disk. 如果没有插入设备,则正常开机,进行后续的开机操作;如果插入有设备,检测设备空间大小,以及剩余可利用空间有多少;如果空间不足,则不进行调试进程,同样进行正常开机操作;如果空间满足要求,则转入步骤S20。 If the device is not inserted, the normal boot, subsequent boot operation; number if the device is inserted, the detection equipment space, and have a remaining available space; if the space is insufficient, the debugging process is not performed, the same normal start operation; if space to meet the requirements, the process proceeds to step S20.

[0046] 步骤S20,当所述USB设备的存储空间满足打印信息存储要求时,开启调试进程,将存放在串口设备的打印信息输出至USB设备。 [0046] step S20, the storage space when the USB storage device to meet the printing requirements of the information, open the debugging process, the print information stored in the serial output device to a USB device. 如果USB设备的空间满足打印信息存储要求,则由操作系统将系统输出的打印信息放到串口设备用于输出,然后将串口设备的打印信息输出至USB设备。 If space USB device information storing print information to meet the requirements of the system by the operating system into the serial output apparatus for outputting print information and then outputs the serial device to a USB device. 本发明实施例直接从串口读数据,不需要修改操作系统内核,既减小程序工作量又保证了系统稳定性。 Example embodiment data directly from the serial port of the present invention, no need to modify the operating system kernel, reducing both the program and ensures the stability of the system workload.

[0047] 本发明通过读取系统平台的串口设备的信息并保存在指定的USB设备中,以备程序员进一步调试系统软件的运行状态,可以很好的避开系统平台存储空间有限的问题,并且很好的确保多次读写操作导致的文件系统碎片不至于破坏嵌入式系统的正常运行。 [0047] The present invention is read by a serial device information Platform and saved in the USB device in order to prepare further programmers to debug software operating state, can be very good to avoid the limited storage space problem of the platform, and a good many times to ensure the normal operation of read and write operations caused by file system fragmentation does not destroy the embedded system. 该方法不仅可以应用在电视机中,只要具备嵌入式系统并且支持串口设备和USB设备的系统平台都适用。 This method can be applied not only in television, as long as with embedded systems and support serial and USB devices of the platform are applicable.

[0048] 参照图1,进一步的,上述实施例中,步骤S20之前包括: [0048] Referring to FIG 1, further, the above-described embodiments, prior to step S20 comprises:

[0049] 判断电视机的调试标识是否使能,若是,则执行步骤S20;若否,则进入正常开机流程。 [0049] It is determined whether the television identification debugging enabled, if yes, execute step S20; if not, the process proceeds to the normal start-up procedure. 例如,可在程序中定义Debug功能标识,用来区别电视是在调试状态还是产品状态,如果Debug功能标识没有使能,则进行正常开机操作,如果功能标识使能,则开启一个调试进程,转入到步骤S20。 For example, you can define in the program Debug function identifier is used to distinguish television products in the debug state or state, if the Debug function ID is not enabled, the normal boot operation, if the identification function is enabled, open a debugging process, turn into the step S20.

[0050] 参照图2,在本发明的另一个实施例中,上述步骤S20具体包括: [0050] Referring to FIG. 2, for example, the step S20 comprises in a further embodiment of the present invention:

[0051] 步骤S21,启动预置在电视机中的定时器; [0051] step S21, the start timer preset in the television set;

[0052] 步骤S22,在USB设备中创建文件; [0052] Step S22, create a file on the USB device;

[0053] 步骤S23,根据定时器预设的时间间隔,从串口设备的缓冲区中读取打印信息,并保存在文件中。 [0053] Step S23, the timer according to the preset time interval, information is read from the print buffer in a serial device, and stored in a file.

[0054] 读取串口设备的信息成功后,启动一个定时器,间隔时间具体可设置为Ims中断一次,然后在USB设备上创建文件,以将从串口设备读取的打印信息放到文件中。 [0054] After information reading device serial success, start a timer can be set to a specific time interval Ims interrupted once, and then create a file on a USB device, printing information from a serial device to read into the file. 为了不断读取串口的数据,每次定时时间到就读取串口设备的缓冲区信息,将其增加到USB设备的文件数据中。 In order to continuously read the serial data, each time the timing information is read into the buffer of the serial device, the USB device to increase the data file.

[0055] 进一步的,上述步骤S23可包括: [0055] Further, the above step S23 may comprise:

[0056] 不断检测USB设备的剩余空间大小; [0056] USB device continues detecting the remaining space;

[0057] 如果USB设备空间已满,则用新数据覆盖已存储数据,同时设置空间满标识。 [0057] If a USB device is full, the new data with the stored data is covered, while a space full identity.

[0058] 从串口设备的缓冲区读取打印信息并保存在文件中的同时检测USB设备的剩余空间大小,如果空间不足,则不再增加文件信息,而是覆盖原来的文件数据,同时设置空间满标志,这样可以保证读取到最新的数据。 [0058] The information read from the print buffer in a serial device and stored in the file is detected while the remaining space of the USB device, if space is insufficient, the file information does not increase, but covers the original document data, and set the space full flag, so it can ensure to read the latest data. 需要说明的是,定时器设置的时间必须小于串口缓冲区刷新时间,不然就会漏掉一部分数据。 It should be noted that the timer setting must be less than the serial buffer refresh time, or you will miss part of the data.

[0059] 参照图3,在一实施例中,在判断电视机的调试标识是否使能之前包括: [0059] Referring to FIG 3, in one embodiment, it is determined whether the television debug enable previous identification comprising:

[0060] 步骤A,将打印信息输出至串口; [0060] Step A, the print information is output to the serial port;

[0061] 步骤B,定义文件描述符,打开串口文件,并将返回值赋给文件描述符; [0061] Procedure B, the file descriptor, serial port open file, the file descriptor and returns the value assigned;

[0062] 步骤C,将串口文件中的数据读取到串口设备的缓冲区。 [0062] Procedure C, the serial read data file to the device serial buffer. [0063] 本实施例针对Linux操作系统,如果是Linux操作系统,可以用一个函数来读取和保存信息,函数中首先定义一个文件描述符,使用open函数来打开串口文件,并将返回值赋给文件描述符,接着调用read函数将数据读取到缓冲区,最后关闭文件描述符。 [0063] The present embodiment is directed to the Linux operating system, the Linux operating system if it is, a function can be used to read and save the information, first define a file descriptor function, using the file open function to open the port, and the return value assigned a file descriptor, then calls the read function will read data to the buffer, and finally close the file descriptor.

[0064] 本发明电视机软件系统的调试方法同样适用于电视机在正常开机状态下的调试处理,例如,如果电视已经正常开机,只要Debug功能标识使能,那么检测到USB设备插入后,检测空间足够,同样可以在正常的进程外再创建一个上述调试进程,将串口的数据保存到USB设备的文件中,这样既能正常运行系统,又能保存打印信息。 [0064] The method of the TV software debugging system of the present invention is equally applicable to television debugging process in a normal power-on state, e.g., if the television has been normally turned on, as long as the function identifier Debug is enabled, then after detecting that the USB device is inserted, the detection space enough, the same can re-create one of the debugging process outside the normal process, save data to a file USB serial device, so that both the normal operation of the system, but also save print information.

[0065] 本发明另提出一种电视机软件系统的调试装置,可实现上述方法流程。 [0065] The present invention further provides an apparatus for debugging software system of a television, the method described above may be implemented process. 参照图4,图4为本发明电视机软件系统的调试装置一实施例的结构示意图。 Referring to FIG. 4, FIG. 4 is a software debugging apparatus television system schematic structural diagram of an embodiment of the invention. 如图4所示,本发明电视机软件系统的调试装置包括: 4, the television software debugging apparatus of the present invention comprises:

[0066] USB设备检测模块10,用于检测与电视机相连的USB设备其存储空间是否满足打印信息存储要求;在电视机操作系统初始化串口设备和USB设备后,USB设备检测模块10检测在USB接口上是否插有USB设备,即USB闪存或者硬盘等。 [0066] USB device detection module 10, a USB device connected to the TV detects whether print information storage to meet the storage requirements; operating system initialization after the television serial and USB devices, USB device detection module 10 detects USB Are plug a USB device interface that USB flash memory or a hard disk. 如果没有插入设备,则正常开机,进行后续的开机操作;如果插入有设备,检测设备空间大小,以及剩余可利用空间有多少;如果空间不足,则不进行调试进程,同样进行正常开机操作;如果空间满足要求,则启动调试模块20。 If the device is not inserted, the normal boot, subsequent boot operation; if inserted much equipment, testing equipment space, and the remaining space can be used; if the space is insufficient, the debugging process is not performed, the same normal start operation; if space to meet the requirements, then start debugging module 20.

[0067] 调试模块20,用于USB设备的存储空间满足打印信息存储要求时,开启调试进程,将存放在串口设备的打印信息输出至USB设备。 [0067] debug module 20, a storage space for USB devices to meet the print information storage requirements, open the debugging process, the information will be stored in the output print serial devices to a USB device. 如果USB设备的空间满足打印信息存储要求,则由操作系统将系统输出的打印信息放到串口设备用于输出,然后调试模块20将串口设备的打印信息输出至USB设备。 If space USB device information storing print information to meet the requirements of the system by the operating system into the serial output apparatus for outputting print information and debug module 20 outputs serial devices to the USB device. 本发明实施例直接从串口读数据,不需要修改操作系统内核,既减小程序工作量又保证了系统稳定性。 Example embodiment data directly from the serial port of the present invention, no need to modify the operating system kernel, reducing both the program and ensures the stability of the system workload.

[0068] 本发明通过读取系统平台的串口设备的信息并保存在指定的USB设备中,以备程序员进一步调试系统软件的运行状态,可以很好的避开系统平台存储空间有限的问题,并且很好的确保多次读写操作导致的文件系统碎片不至于破坏嵌入式系统的正常运行。 [0068] The present invention is read by a serial device information Platform and saved in the USB device in order to prepare further programmers to debug software operating state, can be very good to avoid the limited storage space problem of the platform, and a good many times to ensure the normal operation of read and write operations caused by file system fragmentation does not destroy the embedded system. 该方法不仅可以应用在电视机中,只要具备嵌入式系统并且支持串口设备和USB设备的系统平台都适用。 This method can be applied not only in television, as long as with embedded systems and support serial and USB devices of the platform are applicable.

[0069] 进一步的,调试模块20还用于: [0069] Further, debug module 20 is further configured to:

[0070] 判断电视机的调试标识是否使能,当所述USB设备的存储空间满足打印信息存储要求时,开启调试进程;若否,则进入正常开机流程。 [0070] It is determined whether the television identification debugging enabled, when the USB storage device storing print information satisfies requirements, open debugging process; if not, the process proceeds to the normal start-up procedure. 例如,调试模块20可在程序中定义Debug功能标识,用来区别电视是在调试状态还是产品状态,调试过程中,如果Debug功能标识没有使能,则进行正常开机操作,如果功能标识使能,则开启一个调试进程。 For example, debug module 20 may be defined in the program Debug function identifier is used to distinguish between the television or the product status, the debugging process, if the Debug function identifier is not enabled, then the normal start operation in a debug mode, if the function identifier is enabled, then open a debugging process.

[0071 ] 优选地,参照图5,上述调试模块20包括: [0071] Preferably, with reference to FIG. 5, debug module 20 described above comprises:

[0072] 定时器启动单元21,用于启动预置在电视机中的定时器; [0072] The timer unit 21 starts, in a television set for starting the preset timer;

[0073] 文件创建单元22,用于在USB设备中创建文件; [0073] The file creating unit 22 for creating a file in a USB device;

[0074] 打印信息读取单元23,用于根据定时器预设的时间间隔,从串口设备的缓冲区中读取打印信息,并保存在所述文件中。 [0074] The print information reading unit 23, according to a timer for a preset time interval, information is read from the print buffer in a serial device, and stored in the file.

[0075] 操作系统读取串口设备的信息成功后,定时器启动单元21启动一个预置的定时器,定时器的间隔时间具体可设置为Ims中断一次,然后文件创建单元22在USB设备上创建文件,以供打印信息读取单元23将从串口设备读取的打印信息放到文件中。 [0075] After the operating system information reading serial devices successfully, start the timer unit 21 starts a preset timer, interval timer can be set to a specific Ims interrupted once, and then file creation unit 22 is created on the USB device document information reading unit for printing print information from the serial device 23 is read into the file. 为了不断读取串口的数据,每次定时时间到就读取串口设备的缓冲区信息,将其增加到USB设备的文件数据中。 In order to continuously read the serial data, each time the timing information is read into the buffer of the serial device, the USB device to increase the data file.

[0076] 上述打印信息读取单元23可进一步用于: [0076] The print information reading unit 23 may be further configured to:

[0077] 不断检测USB设备的剩余空间大小; [0077] USB device continues detecting the remaining space;

[0078] 如果USB设备空间已满,则用新数据覆盖已存储数据,同时设置空间满标识。 [0078] If a USB device is full, the new data is covered with the stored data, and set the space is full identity. 打印信息读取单元23从串口设备的缓冲区读取打印信息并保存在文件中,同时检测USB设备的剩余空间大小,如果空间不足,则不再增加文件信息,而是覆盖原来的文件数据,同时设置空间满标志,这样可以保证读取到最新的数据。 Print information reading unit 23 reads the print information from the buffer and serial device stored in a file, while the free space of the USB device is detected, and if the space is insufficient, the file information does not increase, but covers the original data file, At the same time a space full flag, so it can ensure to read the latest data. 需要说明的是,定时器设置的时间必须小于串口缓冲区刷新时间,不然就会漏掉一部分数据。 It should be noted that the timer setting must be less than the serial buffer refresh time, or you will miss part of the data.

[0079] 优选地,在一实施例中,上述调试模块还可包括Linux系统处理单元24,该Linux系统处理单元24具体用于: [0079] Preferably, in one embodiment, the debug module further comprises a Linux system processing unit 24, processing unit 24 of the Linux system is specifically configured to:

[0080] 将打印信息输出至串口; [0080] The print information is output to the serial port;

[0081] 定义文件描述符,打开串口文件,并将返回值赋给文件描述符; [0081] the file descriptor, a file open port, and the return value is assigned to the file descriptor;

[0082] 将串口文件中的数据读取到串口设备的缓冲区。 [0082] The serial data is read into the buffer file serial device.

[0083] 本实施例针对Linux操作系统,如果是Linux操作系统,可以用一个函数来读取和保存信息,函数中首先定义一个文件描述符,使用open函数来打开串口文件,并将返回值赋给文件描述符,接着调用read函数将数据读取到缓冲区,最后关闭文件描述符。 [0083] The present embodiment is directed to the Linux operating system, the Linux operating system if it is, a function can be used to read and save the information, first define a file descriptor function, using the file open function to open the port, and the return value assigned a file descriptor, then calls the read function will read data to the buffer, and finally close the file descriptor.

[0084] 以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。 [0084] The above description is only preferred embodiments of the present invention, not intended to limit the scope of the present invention, all utilize the present specification and drawings taken equivalent structures or equivalent process, or applied directly or indirectly to other related technical fields shall fall within the scope of protection of the present invention.

Claims (4)

  1. 1.一种电视机软件系统的调试方法,其特征在于,包括以下步骤: 判断电视机的调试标识是否使能,若是,则进入开启调试进程的步骤;若否,则进入正常开机流程; 检测与电视机相连的USB设备其存储空间是否满足打印信息存储要求; 当所述USB设备的存储空间满足打印信息存储要求时,开启调试进程,将存放在串口设备的打印信息输出至USB设备; 所述将存放在串口设备的打印信息输出至USB设备包括: 启动预置在电视机中的定时器; 在USB设备中创建文件; 根据定时器预设的时间间隔,从串口设备的缓冲区中读取打印信息,并保存在所述文件中;所述从串口设备的缓冲区中读取打印信息,并保存在所述文件中包括: 如果USB设备空间已满,则用新数据覆盖已存储数据,同时设置空间满标识。 CLAIMS 1. A television debugging software system, characterized by comprising the steps of: determining whether the identified television debugging enabled, if step, the process proceeds to open the debugging process; if not, the process proceeds to the normal start-up procedure; detecting whether the TV connected to the USB storage device which satisfies the requirements storing print information; when the USB storage device storing print information to meet the requirements, open debugging process, the print information stored in the serial output device to the USB device; the said information will be stored in the print output serial devices to USB devices include: pre-start timer in the TV set; create files in the USB device; according to the timer preset time interval, read from the buffer serial device up print information and stored in the file; print information from the read buffer serial device and stored in said file comprises: If the USB device is full, with the stored data with the new data while a space full identity.
  2. 2.如权利要求1所述的方法,其特征在于,在判断电视机的调试标识是否使能之前还包括: 将打印信息输出至串口; 定义文件描述符,打开串口文件,并将返回值赋给文件描述符; 将串口文件中的数据读取到串口设备的缓冲区。 2. The method according to claim 1, characterized in that, prior to determining whether the television debug enable identification further comprising: print information is output to the serial port; the file descriptor, a file open port, and the return value assigned a file descriptor; serial read data file to the device serial buffer.
  3. 3.—种电视机软件系统的调试装置,其特征在于,至少包括: USB设备检测模块,用于检测与电视机相连的USB设备其存储空间是否满足打印信息存储要求; 调试模块,用于当所述USB设备的存储空间满足打印信息存储要求时,开启调试进程,将存放在串口设备的打印信息输出至USB设备; 所述调试模块还用于: 判断电视机的调试标识是否使能,当所述USB设备的存储空间满足打印信息存储要求时,开启调试进程;若否,则进入正常开机流程; 所述调试模块包括: 定时器启动单元,用于启动预置在电视机中的定时器; 文件创建单元,用于在USB设备中创建文件; 打印信息读取单元,用于根据定时器预设的时间间隔,从串口设备的缓冲区中读取打印信息,并保存在所述文件中;所述打印信息读取单元进一步用于: 如果USB设备空间已满,则用新数据覆盖已存储数据 3.- kinds of television software debugging apparatus system, characterized in that, comprising at least: USB device detection module configured to detect a USB device connected to the TV whether the print information stored in the storage space to meet the requirement; debug module, configured to, when when the USB storage device storing print information to meet the requirements, open debugging process, the print information stored in the serial output device to the USB device; said debug module is further for: determining whether the identified television debugging enabled, when the USB storage device storing print information satisfies the requirement, open debugging process; if not, the process proceeds to the normal start-up procedure; said debug module comprising: starting a timer means for starting a timer in a television set preset ; file creation unit for creating a file in a USB device; print information reading means, according to a timer for a preset time interval, information is read from the print buffer in a serial device, and stored in the file ; print the information reading unit is further configured to: if the USB device is full, new data is covered with the stored data 同时设置空间满标识。 At the same time set the space is full identity.
  4. 4.如权利要求3所述的调试装置,其特征在于,所述调试模块还包括Linux系统处理单元,所述Linux系统处理单元具体用于: 将打印信息输出至串口; 定义文件描述符,打开串口文件,并将返回值赋给文件描述符; 将串口文件中的数据读取到串口设备的缓冲区。 4. The debugging device according to claim 3, wherein said debug module further comprises a Linux system processing unit, the processing unit is configured Linux system: the print information is output to the serial port; the file descriptor, open serial file, and returns the value assigned to the file descriptor; serial read data file to the device serial buffer.
CN 201110340183 2011-11-01 2011-11-01 Debugging method and device for television software system CN102421004B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110340183 CN102421004B (en) 2011-11-01 2011-11-01 Debugging method and device for television software system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110340183 CN102421004B (en) 2011-11-01 2011-11-01 Debugging method and device for television software system

Publications (2)

Publication Number Publication Date
CN102421004A true CN102421004A (en) 2012-04-18
CN102421004B true CN102421004B (en) 2014-09-03

Family

ID=45945205

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110340183 CN102421004B (en) 2011-11-01 2011-11-01 Debugging method and device for television software system

Country Status (1)

Country Link
CN (1) CN102421004B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1753507A (en) 2005-08-25 2006-03-29 深圳创维-Rgb电子有限公司 Adjusting and testing method of embedded type set top box
CN101316314A (en) 2007-05-29 2008-12-03 青岛海信电器股份有限公司 Method and interface for upgrading flash through USB interface for digital LCD TV
CN101382915A (en) 2008-10-23 2009-03-11 北京中星微电子有限公司 Software debugging system and debugging method
CN101645033A (en) 2009-05-15 2010-02-10 上海闻泰电子科技有限公司 Debugging method in abnormality of mobile phone software
CN201497985U (en) 2009-07-31 2010-06-02 广东浩兆信息科技发展有限公司 Embedded equipment auxiliary failure analytical tool
CN101800843A (en) 2010-04-22 2010-08-11 四川长虹电器股份有限公司 Set top box capturing printing information method
CN101826049A (en) 2009-03-06 2010-09-08 上海摩波彼克半导体有限公司 Implementation method for debugging information output in embedded system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0690378A1 (en) * 1994-06-30 1996-01-03 Tandem Computers Incorporated Tool and method for diagnosing and correcting errors in a computer programm
KR101126171B1 (en) * 2007-07-24 2012-03-23 삼성전자주식회사 Scan device, image forming apparatus and control method thereof
US7818619B2 (en) * 2007-08-30 2010-10-19 International Business Machines Corporation Method and apparatus for debugging application software in information handling systems over a memory mapping I/O bus
CN101505331A (en) * 2008-02-04 2009-08-12 希姆通信息技术(上海)有限公司 Method and apparatus for updating system software of smart phone
CN102123313B (en) * 2010-11-26 2013-03-27 青岛海信信芯科技有限公司 Software upgrading method and device, television and television set top box

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1753507A (en) 2005-08-25 2006-03-29 深圳创维-Rgb电子有限公司 Adjusting and testing method of embedded type set top box
CN101316314A (en) 2007-05-29 2008-12-03 青岛海信电器股份有限公司 Method and interface for upgrading flash through USB interface for digital LCD TV
CN101382915A (en) 2008-10-23 2009-03-11 北京中星微电子有限公司 Software debugging system and debugging method
CN101826049A (en) 2009-03-06 2010-09-08 上海摩波彼克半导体有限公司 Implementation method for debugging information output in embedded system
CN101645033A (en) 2009-05-15 2010-02-10 上海闻泰电子科技有限公司 Debugging method in abnormality of mobile phone software
CN201497985U (en) 2009-07-31 2010-06-02 广东浩兆信息科技发展有限公司 Embedded equipment auxiliary failure analytical tool
CN101800843A (en) 2010-04-22 2010-08-11 四川长虹电器股份有限公司 Set top box capturing printing information method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JP特开平8-83197A 1996.03.26

Also Published As

Publication number Publication date Type
CN102421004A (en) 2012-04-18 application

Similar Documents

Publication Publication Date Title
US20120239918A1 (en) Expedited computer boot system and method
US20130185789A1 (en) Method and apparatus for protecting a password of a computer having a non-volatile memory
US5634132A (en) Operating system independent support for mixed voltage devices
US20060085630A1 (en) Enabling attestation during return from S4 state with standard TCG hardware
US20140129818A1 (en) Electronic device and booting method
US8607040B2 (en) Method of provisioning firmware in an operating system (OS) absent services environment
US20110022832A1 (en) Multi-operating system (os) booting apparatus, multi-os booting program, recording medium, and multi-os booting method
JP2002244874A (en) Information processor and firmware updating method
US20080244167A1 (en) Electronic device and method for installing software
US20150106660A1 (en) Controller access to host memory
US20080215870A1 (en) Method and apparatus for loading boot code
US20130138934A1 (en) Loading configuration information
CN1540503A (en) System of capable of identifying cold boot and warm boot, and method for quickenning speed of starting up system
US20150081829A1 (en) Out-of-band replicating bios setting data across computers
US20100274986A1 (en) Control apparatus and control method therefor
US8874953B2 (en) System and method of cloud testing and remote monitoring for integrated circuit components in system validation
CN103425592A (en) Memory management method and device for multiprocess system
US20140208089A1 (en) System and Method for Dynamically Changing System Behavior by Modifying Boot Configuration Data and Registry Entries
CN101183331A (en) Tasks stack overflow detection method, device and computer system thereof
US20150331694A1 (en) Installation of operating system on host computer using virtual storage of bmc
US20150006487A1 (en) Method and apparatus for checkpointing and restarting container status
CN103389898A (en) Method for managing mobile terminal software and mobile terminal
CN103760950A (en) Wireless routing equipment management method and device
CN101419843A (en) Flash memory recognition method, recognition device and chip controller
CN102841802A (en) Software upgrading method for mobile terminal

Legal Events

Date Code Title Description
C06 Publication
C10 Request of examination as to substance
C14 Granted