Basic CamelStudio User Guide

Basic CamelStudio User Guide.

Contents:


Starting CamelStudio

When you start CamelStudio, you see a screen as the following:

.

Back to Top

 


Creating a New Project

To creating a new project:

Select Project -> New Project

In the window that pops up, give the new project an appropriate name, for example Project1, the file extension is *.cms.

Click the Browse button and select an empty folder to save your project.

At the left bottom of the dialogue, select the technology for your application.

Click the OK button. This opens an empty file displayed in the project window.

Setup the Project

The syntax for the cms project file is equation liked: on the left side of the "=" is the keyword of the .cms file; on the right side of the "=" is the corresponding content of the keyword.

KEYWORD

Adding Files to Project

In the project file, the keywords after a double-slash comment are the files your project may include. You can type the full path of the source file or just the name of the source file if these files and the project file are under the same directory.

Back to Top

 


Opening Existing Project

Using the menu:

Project -> Open Project

In the window pops up, navigate to your memory stick and select the project file you want to open. Click Open

Back to Top

 


Saving the Project

To saving the project:

Select Project -> Project

Back to Top

 


Build the Project

To build an application, CMStudio provides two build options:

Click Build or Build Debug to compile all source files. The Application Output window displays errors, warnings, and build messages during the build process.

If AUTOLOAD keyword is set to true in the project file, once the code build successfully, CMStudio attempts to load the compiled binary file into MCU automatically as long as the connection between PC and testing board established. It spends some time loading the application. When CMstudio has finished loading, you see a message at the last line "load *** line code to ***".

Back to Top

 


Connecting UART Devices

CMStudio provide a Serial Port Window for UART communication with the mcu.

Click the Configure button, a Settings dialogue pops up allows setting the communication COM port, the baudrate and other parameters of the system.

Click the Apply button to make connection. You can see a message indicates the serial port status as following:

Back to Top

 


Communicating UART Devices

The command window CMD at the bottom of the view is used for communicating with the mcu. The commands you typed into CMD are transmitted to the mcu.

SUPPORTED COMMAND FORMAT

UART Communication Example

Back to Top

 


Debugging

CMStudio supports hardware debug for your program. After the connection between CMstudio and board being successfully established, you need to use Build Debug to build your application.

The debugger from CMStudio includes features like breakpoints, watch windows and execution control.

Debug Views

CMStudio offers different views into the source code and data comprise your application including code editor, core registers view, peripheral registers view, SRAM view, Flash view and serial port view.

Breakpoints

Before debugging a program, you should set breakpoints in your debug file. CMStudio currently allows up to two breakpoints during hardware debugging. You can use both GUI or command line to add breakpoint. A red dot indicates the breakpoint.

Start Debugging

Start debugging using the menu Debug -> Start Debugging(or ), the debugger starts and program pauses at the breakpoint you set.

Continue

when you select the menuDebug -> Continue(or ), the debugger resumes the execution and stopped at the next breakpoint.

Step Over

when you select the menuDebug -> Step Over(or ), the debugger executes one line of the program.

Step in

when you select the menuDebug -> Step in(), the debugger traces inside function calls.

Step Out

when you select the menuDebug -> Step in(), the debugger exit the function calls.

Stop Debugging

when you select the menuDebug -> Stop Debugging(), the debugging session terminated.

Back to Top

 


Demo

Back to Top