Compiler
The Compiler is a fully loaded IDE, designed to edit & compile GPC source code files with full-text formatting, find/replace, and real-time syntax highlighting. Includes a full debugging output window.
If you are upgrading from 16bit to 32bit Zen, please note that all 16bit scripts must be compiled using the Legacy 16bit compiler (you can enable the option in the Device Panel).
🔎 Find advanced script instructions in the GPC User Guide 👉 here: beta.cronusmax.com/gpc
The compiler tab bar allows you to select between different opened GPC scripts. You can rearrange the order of GPC scripts in the tab bar by drag and drop. If there are any changes to the source code an asterisk (*) will be displayed in the tab title, indicating the file has not been saved yet.
The compiler editor is designed to edit GPC source code files, allowing text formatting, search, and real-time syntax highlight. Highlighting ensures that the code elements are displayed in different colors based on the GPC language syntax, this greatly improves the readability of the code and makes it easier to spot and avoid mistakes.
The compiler output area shows the compilation result of the active GPC source code.
The results of a compilation process consist of: warnings and errors messages, the size of bytecode, and the amount of stack memory used by static variables and combos. Inside the parentheses, you can find the percentage used of the maximum memory allowed (Cronus Zen has 8 x 32k Memory Slots). Keep in mind that warning messages should be treated as errors. Even though they will compile, the code is most likely not formatted correctly or using deprecated code. For example, writing a value out of range into a variable may cause unexpected behaviors and be very hard to debug. It is highly advisable to find, and fix all warning problems as it may not be compatible with newer Zen firmware (bad scripts will cause Error Codes).
Customize the Editor Font Size by selecting Compiler 👉 Font Size and a sub-menu will open offering a number of available Font Sizes. The default is 10.
The command "Compile" (shortcut key F7), as its name implies, compiles the active GPC source code. It is primarily used to verify if the script has any errors and warnings - displayed in the Compiler Output window.
The command "Build and Run" (shortcut key F5) compiles the active GPC source code and loads it directly to RAM of the Cronus Zen device. Zen Studio's VM (Virtual Machine) will automatically run the loaded code, so you can test your script on-the-fly and check all the inputs and outputs using the Device Monitor.
Navigate to the Device panel, you will find an option to automatically open the Device Monitor whenever you select Build and Run.
🔎Find more detailed information for the Device Working Panel and Device Monitor 👉 here:
Device
You can share your GPC script with the Cronus Community by publishing it to our free GPC Library. The following conditions need to be met before you are able to use this feature.
- You must have an active Cronus Community Account.
- Your Cronus Zen must be registered.
- You must be connected to the internet.
Publish a script by selecting Compiler 👉 Publish Script and it will take you to a portal on our website using your default web browser. All fields must be completed, including categories and if the script is designed for CronusMAX or Cronus Zen.