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.

🔎 Find advanced script instructions in the GPC User Guide 👉 here: gpc.cronusmax.com

Compiler Tab Bar

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.

Compiler Editor

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.

Compiler Output

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 find and fix all warning problems as it may not be compatible with a newer Zen firmware (bad scripts will cause Error Codes).

Compiler Menu

Font Size

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.

Compile

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.

Build and Run

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.

If you 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:

Publish Script

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.

  1. You must have an active Cronus Community Account

  2. Your Cronus Zen must be registered

  3. 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.

GPC Library - Publish Script Web Portal

🔎 Find out more about the Cronus Community and how to Register your Zen 👉 here: