TWI833495B - Cloud system for developing controller, controller development method and controller - Google Patents
Cloud system for developing controller, controller development method and controller Download PDFInfo
- Publication number
- TWI833495B TWI833495B TW111147362A TW111147362A TWI833495B TW I833495 B TWI833495 B TW I833495B TW 111147362 A TW111147362 A TW 111147362A TW 111147362 A TW111147362 A TW 111147362A TW I833495 B TWI833495 B TW I833495B
- Authority
- TW
- Taiwan
- Prior art keywords
- controller
- platform server
- data
- program code
- terminal device
- Prior art date
Links
- 238000011161 development Methods 0.000 title claims description 26
- 238000000034 method Methods 0.000 title claims description 15
- 230000002093 peripheral effect Effects 0.000 claims abstract description 21
- 230000006870 function Effects 0.000 claims description 51
- 238000012545 processing Methods 0.000 claims description 18
- 238000004891 communication Methods 0.000 claims description 10
- 238000013145 classification model Methods 0.000 claims description 8
- 238000004364 calculation method Methods 0.000 claims description 6
- 238000010801 machine learning Methods 0.000 claims description 5
- 238000013480 data collection Methods 0.000 claims description 4
- 238000012549 training Methods 0.000 claims description 4
- 230000005540 biological transmission Effects 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 12
- 238000005516 engineering process Methods 0.000 description 8
- 238000013528 artificial neural network Methods 0.000 description 4
- 238000013461 design Methods 0.000 description 3
- VYZAMTAEIAYCRO-UHFFFAOYSA-N Chromium Chemical compound [Cr] VYZAMTAEIAYCRO-UHFFFAOYSA-N 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45504—Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Computing Systems (AREA)
- Stored Programmes (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
本發明是有關於一種開發控制器的技術,且特別是有關於一種透過平台伺服器提供的網頁服務來進行控制器開發的雲端系統、控制器開發方法以及配合本發明之控制器開發技術而設計的控制器。 The present invention relates to a technology for developing a controller, and in particular, to a cloud system for developing a controller through a web service provided by a platform server, a controller development method, and a controller development technology designed in conjunction with the present invention. controller.
現有市面上的微控制器單元(Micro Controller Unit,MCU)為可程式化的控制器,其可以透過韌體程式碼來更新與修改其功能。然而,控制器需要由開發者自行撰寫程式碼來實現特定功能,因此控制器的開發會變得耗時較久,且開發成本也難以下降。再者,開發者的終端裝置還必須要安裝可以除錯與開發上述程式碼的除錯與開發相關軟體,且除錯與開發相關軟體對於終端裝置的規格與運算能力都有一定程度要求。換言之,開發者難以使用類似上網本這類的低運算能力的終端裝置來進行控制器的開發。 Micro Controller Units (MCUs) currently on the market are programmable controllers, and their functions can be updated and modified through firmware codes. However, controllers require developers to write their own codes to implement specific functions, so the development of controllers becomes time-consuming and the development costs are difficult to reduce. Furthermore, the developer's terminal device must also install debugging and development-related software that can debug and develop the above-mentioned program codes, and debugging and development-related software has certain requirements on the specifications and computing power of the terminal device. In other words, it is difficult for developers to develop controllers using terminal devices with low computing power, such as netbooks.
除了上述技術問題之外,多數可程式化控制器受限於其處理單元的計算能力不夠快速,與/或受限於其作為儲存空間的記憶體或暫存器之容量不夠龐大,開發者難以在本地端運用控制器設計大量運算的控制功能,例如實現類神經網路、卷積類神經網路與顯示控制器等。 In addition to the above technical problems, most programmable controllers are limited by the computing power of their processing units that are not fast enough, and/or are limited by the memory or register used as storage space that is not large enough, making it difficult for developers to Use the controller on the local side to design control functions for a large number of operations, such as implementing neural networks, convolutional neural networks, and display controllers.
由上述描述可以理解,本發明需要解決的技術問題是如何提供一不用安裝除錯與開發相關軟體於終端裝置的雲端系統給開發者進行控制器的開發,且此雲端系統可以減少開發者撰寫程式碼的時間,甚至讓控制器可以實現大量運算才能開發出來的功能。 It can be understood from the above description that the technical problem to be solved by the present invention is how to provide a cloud system for developers to develop controllers without installing debugging and development-related software on terminal devices, and this cloud system can reduce the number of developers writing programs. The coding time even allows the controller to implement functions that can only be developed with a lot of calculations.
為了解決上述的習知問題,本發明的實施例提供一種用於開發控制器的雲端系統,其包括控制器、終端裝置與平台伺服器。控制器操作於程式碼寫入模式或模擬器模式,其中於程式碼寫入模式中,控制器允許程式碼的寫入,以及於模擬器模式,控制器進行程式碼對應的第一韌體的功能。終端裝置連接於控制器,且具有支援網頁存取周邊裝置功能的瀏覽器。平台伺服器通訊連接終端裝置,用於提供網頁及對應網頁的服務給使用終端裝置的開發者進行第二韌體的開發,其中平台伺服器透過網頁存取周邊裝置功能對控制器進行資料存取。 In order to solve the above-mentioned conventional problems, embodiments of the present invention provide a cloud system for developing a controller, which includes a controller, a terminal device and a platform server. The controller operates in a program code writing mode or a simulator mode. In the program code writing mode, the controller allows the writing of the program code, and in the simulator mode, the controller performs the first firmware corresponding to the program code. Function. The terminal device is connected to the controller and has a browser that supports web page access to peripheral device functions. The platform server communicates with the terminal device and is used to provide web pages and corresponding web page services to developers using the terminal device to develop second firmware. The platform server accesses data from the controller through the web page access peripheral device function. .
為了解決上述的習知問題,本發明的實施例還提供一種控制器開發方法,其包括以下步驟。控制器與具有網頁存取周邊裝置功能的終端裝置建立連接。終端裝置與平台伺服器建立通訊連接。控制器進入程式碼寫入模式。開發者透過對終端裝置之瀏覽器的操作操作使用平台伺服器提供網頁的服務,使平台伺服器將程式碼寫入至控制器。控制器進入模擬器模式。控制器進行程式碼對應的第一韌體之功能,且將產生的第一資料傳送給平台伺服器。平台伺服器對控制器的第一資料進行運算處理,並產生第二資料傳送給控制器,以使控制器等效上具有開發者透過平台伺服器提供網頁的服務所開發的第二韌體的功能。 In order to solve the above-mentioned conventional problems, embodiments of the present invention also provide a controller development method, which includes the following steps. The controller establishes a connection with a terminal device having a web page access peripheral device function. The terminal device establishes a communication connection with the platform server. The controller enters code writing mode. Developers use the platform server to provide web page services by operating the browser of the terminal device, allowing the platform server to write program code to the controller. The controller enters emulator mode. The controller performs the function of the first firmware corresponding to the program code and transmits the generated first data to the platform server. The platform server performs calculations on the first data of the controller and generates second data to send to the controller, so that the controller is equivalent to having the second firmware developed by the developer through the platform server to provide web services. Function.
為了解決上述的習知問題,本發明的實施例提供一種控制器,其包括模式控制器、可程式化處理單元與儲存空間。模式控制器用於使控制器進入程式碼寫入模式或模擬器模式。於程式碼寫入模式中,程式碼被寫入於可程式化處理單元,以及於模擬器模式,可程式化處理單元進行程式碼對應的第一韌體的功能,並產生第一資料。儲存空間用於暫存第一資料與第二資料。控制器與具有網頁存取周邊裝置功能的終端裝置建立連接,以使與終端裝置通訊連接的平台伺服器用於將程式碼傳輸給控制器,以及使控制器將第一資料傳輸給平台伺服器,平台伺服器對控制器的第一資料進行運算處理,並產生第二資料傳送給控制器,以使控制器等效上具有第二韌體的功能。 In order to solve the above-mentioned conventional problems, embodiments of the present invention provide a controller, which includes a mode controller, a programmable processing unit and a storage space. The mode controller is used to put the controller into code writing mode or simulator mode. In the program code writing mode, the program code is written in the programmable processing unit, and in the simulator mode, the programmable processing unit performs the function of the first firmware corresponding to the program code and generates the first data. The storage space is used to temporarily store the first data and the second data. The controller establishes a connection with a terminal device having a webpage access peripheral device function, so that the platform server connected to the terminal device is used to transmit the program code to the controller, and the controller transmits the first data to the platform server , the platform server performs calculation processing on the first data of the controller, and generates second data to send to the controller, so that the controller has the equivalent function of the second firmware.
承上所述,本發明提供之開發控制器的技術可以支援更多且免費的使用者介面程式庫(User Interface library,UI library),且平台伺服器可以自行更新使用者圖形介面與提供的程式碼,而不需終端裝置做任何的更新,甚至本發明之開發控制器的技術可以具有跨平台的優點與支援更多種類的周邊裝置。 Based on the above, the technology for developing controllers provided by the present invention can support more free user interface libraries (UI libraries), and the platform server can update the user graphical interface and provided programs by itself. code without requiring any update of the terminal device. Even the technology of developing the controller of the present invention can have cross-platform advantages and support more types of peripheral devices.
1:雲端系統 1: Cloud system
10:控制器 10:Controller
101:模式控制器 101:Mode controller
102:可程式化處理單元 102: Programmable processing unit
103、2011、301、302:儲存空間 103, 2011, 301, 302: storage space
20:終端裝置 20:Terminal device
201:瀏覽器 201: Browser
30:平台伺服器 30:Platform server
LK1:連接 LK1: connection
LK2:通訊連接 LK2: Communication connection
MR1、MR5~MR7:標示處 MR1, MR5~MR7: marked place
S601~S607:步驟 S601~S607: steps
為讓本發明之上述和其他目的、特徵、優點與實施例能更明顯易懂,所附圖式之說明如下:圖1是本發明實施例的用於開發控制器的雲端系統的方塊圖;圖2是本發明實施例的雲端系統呈現給開發者的其中一個網頁的示意圖;圖3是本發明實施例的雲端系統呈現給開發者的其中一個網頁的示意圖;圖4是本發明實施例的雲端系統呈現給開發者的其中一個網頁的示意圖;以及 圖5是本發明實施例的控制器開發方法的流程圖。 In order to make the above and other objects, features, advantages and embodiments of the present invention more obvious and understandable, the accompanying drawings are described as follows: Figure 1 is a block diagram of a cloud system for developing a controller according to an embodiment of the present invention; Figure 2 is a schematic diagram of one of the web pages presented to developers by the cloud system according to the embodiment of the present invention; Figure 3 is a schematic diagram of one of the web pages presented to developers by the cloud system according to the embodiment of the present invention; Figure 4 is a schematic diagram of one of the web pages presented to developers by the cloud system according to the embodiment of the present invention; A diagram of one of the web pages presented to developers by the cloud system; and Figure 5 is a flow chart of a controller development method according to an embodiment of the present invention.
有鑑於上述待克服的技術問題,本發明實施例提供一種透過雲端的平台伺服器提供的網頁服務來進行控制器開發的雲端系統、控制器開發方法以及配合本發明之控制器開發技術而設計的控制器。進一步地說,雲端系統包括平台伺服器、終端裝置(例如但不限定是上網本、平板電腦、筆記型電腦或個人電腦)與控制器(例如但不限定以開發板樣式呈現)。控制器與具有網頁存取周邊裝置功能(例如但不限定網頁通用序列匯流排(Web USB)來實現此功能)的終端裝置建立連接,以及終端裝置與平台伺服器建立通訊連接,因此,平台伺服器可以直接透過終端裝置對控制器進行存取(包括平台伺服器將資料與程式碼傳送給控制器與控制器將資料傳送給平台伺服器)。平台伺服器還供開發者透過瀏覽網頁的方式進行程式碼的撰寫、產生與編輯。 In view of the above technical problems to be overcome, embodiments of the present invention provide a cloud system for controller development through web services provided by a cloud platform server, a controller development method, and a controller designed in conjunction with the controller development technology of the present invention. controller. Furthermore, the cloud system includes a platform server, a terminal device (such as, but not limited to, a netbook, a tablet, a laptop or a personal computer) and a controller (such as, but not limited to, presented in the form of a development board). The controller establishes a connection with a terminal device that has a web page access peripheral device function (for example, but is not limited to Web USB to implement this function), and the terminal device establishes a communication connection with the platform server. Therefore, the platform server The server can access the controller directly through the terminal device (including the platform server transmitting data and program code to the controller and the controller transmitting data to the platform server). The platform server also allows developers to write, generate and edit code by browsing the web.
控制器被設計成可以操作於兩種模式,一種模式為程式碼寫入模式,而另一種模式為模擬器模式。於程式碼寫入模式中,控制器被寫入對應於第一韌體的程式碼。於模擬器模式中,控制器進行第一韌體的功能,以產生資料,並透過終端裝置將其資料傳送給平台伺服器。接著,平台伺服器對終端裝置產生的資料進行處理,並產生另一資料給控制器,以藉此讓控制器等效上具有第二韌體的功能。舉例來說,第二韌體用於實現機器學習的功能,其可以用於實現分類模型的訓練與分類,第一韌體則用於實現資料採集控制。 The controller is designed to operate in two modes, one mode is code writing mode, and the other mode is simulator mode. In the code writing mode, the controller is written with code corresponding to the first firmware. In the simulator mode, the controller performs the functions of the first firmware to generate data and transmits the data to the platform server through the terminal device. Then, the platform server processes the data generated by the terminal device and generates another data to the controller, thereby allowing the controller to have the equivalent function of the second firmware. For example, the second firmware is used to implement machine learning functions, which can be used to implement training and classification of classification models, while the first firmware is used to implement data collection control.
另外一方面,雲端系統的平台伺服器提供的網頁還可以讓開發者透過瀏覽器針對控制器的之暫存器的數值、腳位的信號與各種資料進行監控。 在一個實施例中,可以獲取控制器之特定位址的暫存器的數值,來判斷控制器設定的輸入輸出介面類型(例如,通用非同步收發傳輸器(UART)、區域互聯網路(LIN)、RS486、單線傳輸與紅外通訊技術)。在一個實施例中,可以獲取控制器之特定位址的暫存器的數值來判斷控制器之各腳位的功能。在一個實施例中,可以獲取控制器中用於儲存時脈選擇信號的暫存器的數值,並藉此將控制器的各時脈以時脈樹的圖表顯示給開發者知悉。 On the other hand, the web page provided by the platform server of the cloud system also allows developers to monitor the register values, pin signals and various data of the controller through the browser. In one embodiment, the value of the register at a specific address of the controller can be obtained to determine the input and output interface type set by the controller (for example, universal asynchronous transceiver transmitter (UART), local area network (LIN) , RS486, single-wire transmission and infrared communication technology). In one embodiment, the value of a register at a specific address of the controller can be obtained to determine the function of each pin of the controller. In one embodiment, the value of the register used to store the clock selection signal in the controller can be obtained, and thereby each clock of the controller is displayed to the developer in a clock tree diagram.
請參照圖1,圖1是本發明實施例的用於開發控制器的雲端系統的方塊圖。雲端系統1包括控制器10、終端裝置20與平台伺服器30,其中終端裝置20具有網頁存取周邊裝置功能,例如網頁通用序列匯流排(Web USB)的功能,其以JavaScript應用介面(API)的形式被嵌入於瀏覽器201中,例如谷哥的Chrome瀏覽器即支援此功能。終端裝置20與控制器10建立連接LK1,以及終端裝置20與平台伺服器30建立通訊連接LK2。由於終端裝置20具有網頁存取周邊裝置功能,因此,開發者可以透過終端裝置20的瀏覽器201操作使用平台伺服器30提供的網頁,且平台伺服器30可以透過終端裝置20對控制器10進行資料存取。 Please refer to FIG. 1 , which is a block diagram of a cloud system for developing a controller according to an embodiment of the present invention. The cloud system 1 includes a controller 10, a terminal device 20 and a platform server 30. The terminal device 20 has a web page access peripheral device function, such as a Web USB Universal Serial Bus (Web USB) function, which uses a JavaScript application interface (API). The form is embedded in the browser 201. For example, Google's Chrome browser supports this feature. The terminal device 20 establishes a connection LK1 with the controller 10 , and the terminal device 20 establishes a communication connection LK2 with the platform server 30 . Since the terminal device 20 has a web page access peripheral device function, the developer can operate and use the web page provided by the platform server 30 through the browser 201 of the terminal device 20, and the platform server 30 can perform operations on the controller 10 through the terminal device 20. Data access.
控制器10是一個包括模式控制器101、可程式化處理單元102與多個暫存器形成之儲存空間103的開發板,以讓開發者開發其欲實現的韌體的功能,其中可程式化處理單元102連接模式控制器101及儲存空間103。控制器10可以是微控制器單元的開發板,且本發明不以此為限制。模式控制器101用於使控制器10操作於程式碼寫入模式或模擬器模式。終端裝置20會為瀏覽器201配置相應的儲存空間2011以藉此暫存來自於終端裝置10與平台伺服器30傳輸的資料。平台伺服器30會為提供之網頁的服務配置儲存空間301、302,儲 存空間301用於暫存程式碼,以及儲存空間302用於暫存來自於控制器10傳輸的資料。平台伺服器30通常來說具有較大的運算能力,然而,控制器10的運算能力與儲存空間103可能因應成本或電力需求,而有限制,但本發明不以此為限制。 The controller 10 is a development board including a mode controller 101, a programmable processing unit 102 and a storage space 103 formed by a plurality of registers, allowing developers to develop the functions of the firmware they want to implement, wherein the programmable The processing unit 102 is connected to the mode controller 101 and the storage space 103 . The controller 10 may be a development board of a microcontroller unit, and the present invention is not limited thereto. The mode controller 101 is used to make the controller 10 operate in a code writing mode or a simulator mode. The terminal device 20 configures a corresponding storage space 2011 for the browser 201 to temporarily store data transmitted from the terminal device 10 and the platform server 30 . The platform server 30 will configure storage spaces 301 and 302 for the web page services provided. The storage space 301 is used to temporarily store program codes, and the storage space 302 is used to temporarily store data transmitted from the controller 10 . Generally speaking, the platform server 30 has relatively large computing power. However, the computing power and storage space 103 of the controller 10 may be limited due to cost or power requirements, but the present invention is not limited by this.
當控制器10操作於程式碼寫入模式時,開發者可以直接透過終端裝置20的瀏覽器201,使用平台伺服器30呈現的網頁(web page)上的功能來產生、撰寫與編輯程式碼(依照控制器10的類型,程式碼可能是韌體程式碼、軟體程式碼或硬體描述語言程式碼)。平台伺服器30產生的程式碼除了界定韌體的功能外,更界定控制器10之時脈與腳位的設定等。儲存空間301暫存的程式碼可以是一種範本程式碼,以供開發者編輯改寫。平台伺服器30會將開發者決定的程式碼傳送給終端裝置20,並儲存於終端裝置20為瀏覽器201配置的儲存空間2011內。 When the controller 10 operates in the program code writing mode, the developer can directly use the functions on the web page (web page) presented by the platform server 30 to generate, write and edit the program code through the browser 201 of the terminal device 20 ( Depending on the type of controller 10, the code may be firmware code, software code, or hardware description language code). The program code generated by the platform server 30 not only defines the functions of the firmware, but also defines the clock and pin settings of the controller 10 . The program code temporarily stored in the storage space 301 may be a template program code for developers to edit and rewrite. The platform server 30 will send the program code determined by the developer to the terminal device 20 and store it in the storage space 2011 configured by the terminal device 20 for the browser 201.
由於瀏覽器201可以支援網頁存取周邊裝置功能,因此,瀏覽器201可以讀寫控制器10的儲存空間103,並且控制器10會將程式碼會被寫入至控制器10的可程式化處理單元102中,其中上述程式碼對應於第一韌體。第二韌體是開發者所要開發並實現的功能,可程式化處理單元102根據寫入的程式碼等效上可以進行第二韌體的功能。簡單地說,開發者透過網頁僅需要進行第二韌體的設計,而平台伺服器則會依照控制器10的資源(計算能力與儲存能力),自動地產生第二韌體的程式碼,開發者使得資源有限的控制器10實現計算量龐大的第二韌體開發工作。 Since the browser 201 can support web page access peripheral device functions, the browser 201 can read and write the storage space 103 of the controller 10 , and the controller 10 will write the program code into the programmable processing of the controller 10 In unit 102, the above program code corresponds to the first firmware. The second firmware is a function that the developer wants to develop and implement. The programmable processing unit 102 can equivalently perform the functions of the second firmware according to the written program code. Simply put, developers only need to design the second firmware through the web page, and the platform server will automatically generate the code for the second firmware according to the resources (computing power and storage capacity) of the controller 10 to develop This allows the controller 10 with limited resources to implement the second firmware development work with a huge amount of calculation.
由於控制器10的運算能力與儲存空間有限,因此,在控制器10進入模擬器模式時,僅根據程式碼實現第一韌體的功能。此時,控制器10產生 的資料會先被暫存到儲存空間2011,並接著被送到平台伺服器30的儲存空間302。平台伺服器30對儲存空間302的資料再次進行處理後,送至暫存到儲存空間2011暫存,然後,這些平台伺服器30處理後的資料被傳送到控制器10,以藉此讓控制器10等效上實現了第二韌體的功能。在另一個實施例中,平台伺服器30不處理控制器10產生的資料。 Since the computing power and storage space of the controller 10 are limited, when the controller 10 enters the simulator mode, the function of the first firmware is only implemented based on the program code. At this time, the controller 10 generates The data will first be temporarily stored in the storage space 2011, and then sent to the storage space 302 of the platform server 30. After the platform server 30 processes the data in the storage space 302 again, it is sent to the storage space 2011 for temporary storage. Then, the data processed by the platform server 30 is sent to the controller 10 so that the controller can 10 is equivalent to realizing the function of the second firmware. In another embodiment, platform server 30 does not process data generated by controller 10 .
在一種使用情境下,第二韌體是用於實現機器學習的功能,例如類神經網路,第一韌體用於實現具有分類模型的分類器與資料採集控制裝置。第一韌體獲取外接感測器(透過例如UART或其他輸入輸出介面與控制器10連接)的感測資料,並使用分類模型根據採集的資料產生分類結果,但不進行分類模型(類神經網路)的訓練。控制器10會將外接感測器採集的資料送到平台伺服器30,平台伺服器30在蒐集到一定時間或一定數量的資料後,會重新訓練分類模型。此時,在開發者使控制器10再次進入到程式碼寫入模式時,平台伺服器30可以對控制器10的可程式化處理單元102重新寫入程式碼,以藉此更新分類模型。 In one usage scenario, the second firmware is used to implement machine learning functions, such as a neural network, and the first firmware is used to implement a classifier and a data collection control device with a classification model. The first firmware acquires sensing data from an external sensor (connected to the controller 10 through, for example, UART or other input/output interfaces), and uses a classification model to generate classification results based on the collected data, but does not perform a classification model (like a neural network). road) training. The controller 10 will send the data collected by the external sensor to the platform server 30. After collecting a certain amount of data for a certain period of time or a certain amount, the platform server 30 will retrain the classification model. At this time, when the developer makes the controller 10 enter the program code writing mode again, the platform server 30 can rewrite the program code to the programmable processing unit 102 of the controller 10 to thereby update the classification model.
在另一種使用情境下,第二韌體用於實現機器學習的功能,例如類神經網路,以及第一韌體用於實現資料採集控制。第一韌體用於取得外接感測器(透過例如UART或其他輸入輸出介面與控制器10連接)獲取的資料,平台伺服器30除了訓練分類模型之外,更可以根據控制器10傳輸的感測資料進行分類,以產生分類結果的資料給控制器10。 In another usage scenario, the second firmware is used to implement machine learning functions, such as neural networks, and the first firmware is used to implement data collection control. The first firmware is used to obtain data from an external sensor (connected to the controller 10 through, for example, UART or other input/output interfaces). In addition to training the classification model, the platform server 30 can also use the sensor data transmitted by the controller 10 to The measured data is classified to generate data of classification results to the controller 10.
簡單地說,在控制器10操作於程式碼寫入模式時,透過平台伺服器30提供的網頁服務,開發者可以使用對話選單與豐富的使用者圖形介面(Graphic User Interface,GUI)來設計開發控制器10,且開發者不用特定地在終端 裝置20安裝特定的除錯與開發相關軟體,甚至,開發者可以減少撰寫程式碼的時間。在控制器10操作於模擬器模式時,控制器10可以與平台伺服器30協同作業,以藉此讓計算能力與儲存空間有限的控制器10得以實現高運算量的硬體電路之功能,並讓控制器10可以連接使用更多種類的周邊裝置。另外,在模擬器模式時,平台伺服器30還可以提供使用者圖形介面給開發者選取調閱控制器10之腳位上之信號、暫存器的數值與各時脈之間關係。再者,在模擬器模式時,控制器10可以讀取數值或映射表來獲取控制器之周邊裝置的選項資訊。 Simply put, when the controller 10 operates in the program code writing mode, through the web service provided by the platform server 30, the developer can use the dialog menu and the rich graphical user interface (Graphic User Interface, GUI) to design and develop. Controller 10, and developers do not need to specifically The device 20 installs specific debugging and development-related software, and even allows developers to reduce the time spent writing code. When the controller 10 operates in the emulator mode, the controller 10 can cooperate with the platform server 30 to allow the controller 10 with limited computing power and storage space to implement the functions of a high-computation hardware circuit, and This allows the controller 10 to be connected and used with more types of peripheral devices. In addition, in the simulator mode, the platform server 30 can also provide a user graphical interface for the developer to select and read the relationship between the signals on the pins of the controller 10, the values of the registers, and each clock. Furthermore, in the simulator mode, the controller 10 can read values or mapping tables to obtain option information of peripheral devices of the controller.
請接著參照圖1、圖2,圖2是本發明實施例的雲端系統呈現給開發者的其中一個網頁的示意圖。在設計開發控制器10時,如標示處MR1所示,開發者可以透過平台伺服器30的網頁選取控制器10之輸入輸出介面類型(例如,通用非同步收發傳輸器(UART)、區域互聯網路(LIN)、RS486、單線傳輸與紅外通訊技術)。換言之,控制器10在被寫入程式碼時,除了可程式化處理單元102的功能會被程式碼界定外,控制器10之輸入輸出介面類型也會被界定。 Please refer to Figures 1 and 2. Figure 2 is a schematic diagram of one of the web pages presented to developers by the cloud system according to an embodiment of the present invention. When designing and developing the controller 10, as indicated by the mark MR1, the developer can select the input and output interface type of the controller 10 (for example, universal asynchronous transceiver (UART), local Internet) through the web page of the platform server 30 (LIN), RS486, single-wire transmission and infrared communication technology). In other words, when the controller 10 is written into program code, in addition to the functions of the programmable processing unit 102 being defined by the program code, the input and output interface types of the controller 10 are also defined.
請接著參照圖1、圖3,圖3是本發明實施例的雲端系統呈現給開發者的其中一個網頁的示意圖。在模擬器模式時,如標示處MR5,網頁顯示了控制器10之儲存GPA腳位之設定值(共4個位元)的暫存器的數值,且此數值用於將GPA腳位映射至對應的功能,如標示處MR6,網頁顯示了控制器10之儲存GPB腳位之設定值(共4個位元)的暫存器的數值,且此數值用於將GPB腳位映射至對應的功能。 Please refer to Figures 1 and 3. Figure 3 is a schematic diagram of one of the web pages presented to developers by the cloud system according to an embodiment of the present invention. In the simulator mode, as marked at MR5, the webpage displays the value of the register of the controller 10 that stores the setting value of the GPA pin (a total of 4 bits), and this value is used to map the GPA pin to The corresponding function, such as marked MR6, the webpage shows the value of the register of the controller 10 that stores the setting value of the GPB pin (a total of 4 bits), and this value is used to map the GPB pin to the corresponding Function.
請接著參照圖1、圖4,圖4是本發明實施例的雲端系統呈現給開發者的其中一個網頁的示意圖。在模擬器模式時,如標示處MR7,網頁顯示了控制器10之儲存時脈選取信號CLKSEL0之設定值的暫存器的數值,於此例子中,時脈選取信號CLKSEL0之設定值的數值為F,且網頁以時脈樹的圖表顯示相應的各時脈關係。 Please refer to Figure 1 and Figure 4. Figure 4 is a schematic diagram of one of the web pages presented to developers by the cloud system according to an embodiment of the present invention. In the simulator mode, as marked at MR7, the web page displays the value of the register of the controller 10 that stores the setting value of the clock selection signal CLKSEL0. In this example, the value of the setting value of the clock selection signal CLKSEL0 is F, and the web page displays the corresponding clock relationships in a clock tree diagram.
請接著參照圖1、圖5,圖5是本發明實施例的控制器開發方法的流程圖。控制器開發方法可以透過圖1的雲端系統1來執行,但本發明的控制器開發方法不以圖1的雲端系統為限制。在步驟S601中,控制器10與具有網頁存取周邊裝置功能的終端裝置20建立連接,例如終端裝置20的瀏覽器支援Web USB,且終端裝置20與控制器10以通用序列匯流排(USB)連接。在步驟S602,終端裝置20與平台伺服器30建立通訊連接,例如透過有線或無線的通訊方式。在此請注意,步驟S601與步驟S602的順序可以對調,或者,步驟S601可以在步驟S603與S604之間執行,只要在將程式碼寫入到控制器10前,執行步驟S601即可。 Please refer next to Figures 1 and 5. Figure 5 is a flow chart of a controller development method according to an embodiment of the present invention. The controller development method can be executed through the cloud system 1 in Figure 1, but the controller development method of the present invention is not limited to the cloud system in Figure 1. In step S601, the controller 10 establishes a connection with the terminal device 20 having a web page access peripheral device function. For example, the browser of the terminal device 20 supports Web USB, and the terminal device 20 and the controller 10 use Universal Serial Bus (USB). connection. In step S602, the terminal device 20 establishes a communication connection with the platform server 30, for example, through wired or wireless communication. Please note here that the order of step S601 and step S602 can be reversed, or step S601 can be executed between steps S603 and S604, as long as step S601 is executed before writing the program code to the controller 10 .
然後,在步驟S603中,控制器10進入程式碼寫入模式。接著,在步驟S604中,開發者透過對終端裝置20之瀏覽器201的操作使用平台伺服器30提供網頁的服務,使平台伺服器30將程式碼寫入至控制器10中,進一步地,平台伺服器30產生的程式碼先傳送至對應於瀏覽器201的儲存空間2011,接著,終端裝置20將程式碼傳送給控制器10進行程式碼的寫入。之後,在步驟S605中,控制器10進入模擬器模式。在步驟S606中,控制器10進行程式碼對應的第一韌體之功能,且將產生的資料傳送給平台伺服器30的儲存空間302。 Then, in step S603, the controller 10 enters the program code writing mode. Next, in step S604, the developer uses the platform server 30 to provide web page services by operating the browser 201 of the terminal device 20, causing the platform server 30 to write the program code into the controller 10. Further, the platform The program code generated by the server 30 is first sent to the storage space 2011 corresponding to the browser 201. Then, the terminal device 20 sends the program code to the controller 10 for writing the program code. After that, in step S605, the controller 10 enters the simulator mode. In step S606, the controller 10 performs the function of the first firmware corresponding to the program code and transmits the generated data to the storage space 302 of the platform server 30.
接著,在步驟S607中,平台伺服器30對控制器10的資料進行運算處理,並產生另一資料傳送給控制器10,以使控制器10等效上具有第二韌體的功能。進一步地,平台伺服器30將另一資料先傳輸給終端裝置20之瀏覽器201的儲存空間2011,接著,終端裝置20將此另一資料傳輸給控制器10的儲存空間103。另一方面,除了圖6之步驟S601~S607外,本發明的控制器開發方法更包括透過平台伺服器30提供的網頁服務讓開發者設定控制器10之各輸入 輸出介面、調閱控制器10之各暫存器的數值與/或調閱控制器10之各時脈間的關係(例如以時脈樹的圖表呈現)。 Next, in step S607, the platform server 30 performs calculation processing on the data of the controller 10, and generates another data to send to the controller 10, so that the controller 10 effectively has the function of the second firmware. Further, the platform server 30 first transmits another data to the storage space 2011 of the browser 201 of the terminal device 20, and then the terminal device 20 transmits the other data to the storage space 103 of the controller 10. On the other hand, in addition to steps S601 to S607 in FIG. 6 , the controller development method of the present invention further includes allowing developers to set various inputs of the controller 10 through the web service provided by the platform server 30 The relationship between the output interface, the values of the registers of the call controller 10 and/or the clocks of the call controller 10 (for example, presented in a clock tree diagram).
綜合以上所述,本發明實施例提供一種不用安裝除錯與開發相關軟體於終端裝置的雲端系統給開發者進行控制器的開發,且此雲端系統可以減少開發者撰寫程式碼的時間,甚至讓控制器可以等效上實現大量運算。進一步地,本發明主要是透過具有網頁存取周邊裝置功能的終端裝置與控制器建立連接,並透過終端裝置使用平台伺服器提供的網頁來進行程式碼的產生、編輯與撰寫,不但可以達到跨平台的優勢外,更可以減少更新終端裝置的更新時間。再者,透過本發明的開發控制器之技術,還可以讓控制器支援更多種類的周邊裝置。 Based on the above, embodiments of the present invention provide a cloud system for developers to develop controllers without installing debugging and development-related software on terminal devices, and this cloud system can reduce the time developers spend writing code, and even allow developers to The controller can effectively implement a large number of operations. Furthermore, the present invention mainly establishes a connection with the controller through a terminal device with a web page access peripheral device function, and uses the web page provided by the platform server through the terminal device to generate, edit and write the program code, which not only achieves cross-border In addition to the advantages of the platform, it can also reduce the update time of updating terminal devices. Furthermore, through the controller development technology of the present invention, the controller can also support more types of peripheral devices.
本發明在本文中僅以較佳實施例揭露,然任何熟習本技術領域者應能理解的是,上述實施例僅用於描述本發明,並非用以限定本發明所主張之專利權利範圍。舉凡與上述實施例均等或等效之變化或置換,皆應解讀為涵蓋於本發明之精神或範疇內。因此,本發明之保護範圍應以下述之申請專利範圍所界定者為基準。 The present invention is disclosed in this article only through preferred embodiments. However, anyone familiar with the art should understand that the above embodiments are only used to describe the present invention and are not intended to limit the scope of the patent rights claimed by the present invention. Any changes or substitutions that are equal or equivalent to the above embodiments should be construed as being within the spirit or scope of the present invention. Therefore, the protection scope of the present invention should be based on what is defined in the following patent application scope.
1:雲端系統 1: Cloud system
10:控制器 10:Controller
101:模式控制器 101:Mode controller
102:可程式化處理單元 102: Programmable processing unit
103、2011、301、302:儲存空間 103, 2011, 301, 302: storage space
20:終端裝置 20:Terminal device
201:瀏覽器 201: Browser
30:平台伺服器 30:Platform server
LK1:連接 LK1: connection
LK2:通訊連接 LK2: Communication connection
Claims (10)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW111147362A TWI833495B (en) | 2022-12-09 | 2022-12-09 | Cloud system for developing controller, controller development method and controller |
CN202311581638.4A CN118170352A (en) | 2022-12-09 | 2023-11-23 | Cloud system for developing controller, controller development method and controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW111147362A TWI833495B (en) | 2022-12-09 | 2022-12-09 | Cloud system for developing controller, controller development method and controller |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI833495B true TWI833495B (en) | 2024-02-21 |
TW202424759A TW202424759A (en) | 2024-06-16 |
Family
ID=90824988
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW111147362A TWI833495B (en) | 2022-12-09 | 2022-12-09 | Cloud system for developing controller, controller development method and controller |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN118170352A (en) |
TW (1) | TWI833495B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200743956A (en) * | 2006-05-29 | 2007-12-01 | Sunplus Technology Co Ltd | Configurable multi-interface in-circuit emulator and operating method thereof |
TW202123091A (en) * | 2019-12-05 | 2021-06-16 | 新唐科技股份有限公司 | Microcontroller updating system and method |
CN113254372A (en) * | 2020-08-07 | 2021-08-13 | 广东高云半导体科技股份有限公司 | Method and system for providing a programmable microcontroller with a two-stage configuration process |
TW202203208A (en) * | 2020-02-28 | 2022-01-16 | 美商奈米創尼克影像公司 | Method, systems and apparatus for intelligently emulating factory control systems and simulating response data |
TWI775702B (en) * | 2021-12-29 | 2022-08-21 | 新唐科技股份有限公司 | Control circuit and in-system programming method thereof |
-
2022
- 2022-12-09 TW TW111147362A patent/TWI833495B/en active
-
2023
- 2023-11-23 CN CN202311581638.4A patent/CN118170352A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200743956A (en) * | 2006-05-29 | 2007-12-01 | Sunplus Technology Co Ltd | Configurable multi-interface in-circuit emulator and operating method thereof |
TW202123091A (en) * | 2019-12-05 | 2021-06-16 | 新唐科技股份有限公司 | Microcontroller updating system and method |
TW202203208A (en) * | 2020-02-28 | 2022-01-16 | 美商奈米創尼克影像公司 | Method, systems and apparatus for intelligently emulating factory control systems and simulating response data |
CN113254372A (en) * | 2020-08-07 | 2021-08-13 | 广东高云半导体科技股份有限公司 | Method and system for providing a programmable microcontroller with a two-stage configuration process |
TWI775702B (en) * | 2021-12-29 | 2022-08-21 | 新唐科技股份有限公司 | Control circuit and in-system programming method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN118170352A (en) | 2024-06-11 |
TW202424759A (en) | 2024-06-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019144681A1 (en) | Automated testing method and apparatus, storage medium and electronic device | |
AU2022202647C1 (en) | Quantum neural network training method and apparatus, electronic device and medium | |
KR101635237B1 (en) | Interactive design environments to visually model, debug and execute resource oriented programs | |
WO2016190973A1 (en) | Data binding dependency analysis | |
CN113849433B (en) | Execution method and device of bus controller, computer equipment and storage medium | |
US11675945B2 (en) | Reset crossing and clock crossing interface for integrated circuit generation | |
CN111444609A (en) | Data processing method and simulation system | |
CN100489777C (en) | Intelligent platform management interface firmware architecture and method of building the same | |
CN112579508A (en) | Data processing method, data processing device, equipment and storage medium | |
WO2023000938A1 (en) | Method for drawing pipelined cpu architecture diagram, and terminal device | |
TWI833495B (en) | Cloud system for developing controller, controller development method and controller | |
CN102508757A (en) | Serial port debugging realization method of Linux system | |
JP2019533252A (en) | Debugging system and method | |
CN100416512C (en) | Embedded apparatus debugging method and debugging tool therefor | |
JP2022129520A (en) | Test support system, test support method and program | |
CN116431546B (en) | Parameter configuration method, electronic device, storage medium, and program product | |
CN108984457A (en) | A kind of USB Host HID experimental method based on STM32F7 | |
CN1312583C (en) | Simulation apparatus, simulation program, and recording medium | |
CN110765060A (en) | Method, device, equipment and medium for converting MDIO bus into parallel bus | |
CN116996429A (en) | Automatic test method, system, device, equipment and medium for communication instrument | |
CN112069015B (en) | Instruction execution method and device for instruction simulator, terminal equipment and storage medium | |
JP2012155519A (en) | Simulation device, simulation method and computer program thereof | |
CN113778622A (en) | Cloud desktop keyboard event processing method, device, equipment and storage medium | |
CN111831539B (en) | Test method and related product | |
CN203117963U (en) | Debugging system and device for providing graphical pin interface |