A Complete Guide through Building Your First Ever Project on CloudX CloudX

  • img
Project Details

 

Perhaps, you are relatively new to the CloudX; this little exercise is to simply get you up to speed as regards effectively building your first ever project on the platform. 

CloudX MCU Make-up
CloudX MCU Make-up

 

Complete CloudX Programming Path

 

 

Here, a simple “Hello, World!” and LED project is created to demonstrate how CloudX package works. The project is organized in stages: 

  • (i) the section showing the steps involved in creating a .c file (source file) using the CloudX Programming Editor;
  • (ii) the file Compiling section;
  • (iii) and the generated hex file-loading into the CloudX Microcontroller.

 

 

 

Stage I

                                .c File (source file) Creation

 

  • Go to the directory where your CloudX Programming Editor is located on your computer. For our case study, it is located on the Desktop (the shortcut) for ease of access.
CloudX IDE shortcut

 

  • Click it Open.
CloudX IDE

 

  • Then, click on the File button and select New from the drop-down menu to open a new file.
  • Alternatively, click on the button on the Standard Tools Bar to open a new project.
Creating New Project

 

New button

 

 

  • It opens to the default workspace as shown below.
New workspace

 

 

From the menu bar, click on the Add Library button to #include the library header files of interest to your project. In our case, the LCD and CloudX-M633 library header files are to be included.

Adding Library

 

AutoCorrect Hint made available by the CloudX Editor aids ease of typing; and minimizes possible syntax error(s).

Auto-correct

 

 

  • At the time the code writing is completed, click on the Save button on the menu bar to save your work in a desired folder.

 

(Alternatively, save process could automatically commence at the click of the Build button.)

 

Save button

 

  • While saving a work in a desired folder, it is recommended that the location selected be a one that can easily be remembered. Thus, pick a parent folder where all your subsequent works could always be saved in a more organized manner; and easily traceable too.

With that comes the creation of your source file finally completed.

Saving Your Project

 

NB

However, it is pertinent to note that a valid file-name here is the one without any white space(s) in-between. 

Good Project Naming

 

Wrong way of file naming:

Wrong Project Naming

 

 

 

Stage II

                  Compiling Your Code with CloudX IDE

 

  • To initiate compiling the code, click on the Select Device on the menu bar to select the active MCU series in the project.
Selecting Device

 

Device Selected

 

  • Then, click on the Build button on the menu bar to compile the project/code.
Build button
  •  
  •  
  • Now, it is noteworthy that the compiler, while processing the file into a machine code, checks to ensure that the raw code (ie. source file) itself is error free. Thus, as it is literally Cleaning and Building your project, it will either return a BUILD FAILED alongside some hint error messages, or a BUILD SUCCESSFUL.
  •  
  • Moreover, if per adventure, the current project is not yet saved and the Build button is hit, the build process automatically engages the save routine.

 

  • View below for a typical successfully compiled project.
Successfully Built Project

 

The pictorial view below tries to simulate an error into the project and sees how it pans out.

Unsuccessfully Built Project

 

Expectedly, it fails the Build process!

Error Hint

 

 

 

Stage III

 

 .hex File (Hex Compiled File) Loading into CloudX Microcontroller

 

  • At this point, it is now left for the Hex file to be loaded into the microcontroller board so as to bring to life -at last, our hardware project. Here, the CloudX Code Loader comes into play.
  •  
  • Click on it to initiate the process.
Upload button

 

  • Interestingly enough, the on-board Loader app automatically searches and thereby detects the Com Port to which the CloudX Microcontroller is connected (via the softcard). It flags up an error message, in case something goes wrong along the way. See the snippet below.
Code Loader Dialog Box

 

 

  • Browse for the already created Hex file ─(following the previous stage of Compilation).
Browse button

 

To conveniently do that, just navigate through your computer directory on that window to select your project folder; and then follow the below path in order to finally access the Hex file.

Project Source Location

 

 

  • Then, click the Upload button to finally burn the .hex file into the microcontroller.
Upload button

 

The hex file burning into the CloudX hardware processes as depicted below.

Project Loading into the Hardware

 

  And voila, your hardware circuit application comes on alive!

                                    Congratulations!

 

 

---------------------------------------------------------------------------------------------------------------------...culled from CloudX User-Guide

-------------------------------------------------------------------------------------------------------------------

Share this with friends