How to use STM32 Library Examples
in
ATOLLIC TrueSTUDIO Lite





Home Page
STM32 home page
STM32 Tutorials




Suggested reading:


Preconditions:
  • The PC operating system is Windows XP SP3.
  • In the PC is installed the free Atollic software (TrueSTUSIO STM32 Lite 1.4.0).
  • For test the example below is used the STM32 Discovery.
  • We use the STM32 Library 3.3.0 that are in the directory:
    …\Librerie_3.3.0
  • We have created a directory named:
    …\Lib_3.3.0_IOtoggling_STM32Discovery_Atollic
  • We want to use the Library example:
    GPIO --> IOToggle
  • What does the example:
    The program will flash the two LEDs (green and blue) present on STM32 Discovery. 
Click here to get this SW Example ready to use (Example How to use STM32 examples in ATOLLIC)



STEP n.1

Go to library directory:

…\Librerie_3.3.0

and copy all, files and directory, into the directory:

...\Lib_3.3.0_IOtoggling_STM32Discovery_Atollic

See the fig.1

fig.1



STEP n.2

Select the directory:

...\Lib_3.3.0_IOtoggling_STM32Discovery_Atollic

And press on it with the right mouse key and select Properties (fig.2)

fig.2

Next deselect the Read-only and click Apply (fig.3)

fig.3

A new windows will appear, press OK (fig.4)

fig.4

And then you are back to fig.3, press OK again.



STEP n.3

Go to directory:

…\Lib_3.3.0_IOtoggling_STM32Discovery_Atollic\Project\STM32F10x_StdPeriph_Examples\GPIO\IOToggle

And copy all files into the directory:

…\Lib_3.3.0_IOtoggling_STM32Discovery_Atollic\Project\STM32F10x_StdPeriph_Template

See fig.5

fig.5



STEP n.4

Run the ATOLLIC TrueSTUDIO Lite.
From the window that appear press on BROWSE button and select:
…\Lib_3.3.0_IOtoggling_STM32Discovery_Atollic\Project\STM32F10x_StdPeriph_Template\TrueSTUDIO

Next press OK (fig.6)


fig.6


From the new window that appear press: Start using TrueSTUDIO (fig.7)

fig.7


STEP n.5
Be sure to be in:
…\Lib_3.3.0_IOtoggling_STM32Discovery_Atollic\Project\STM32F10x_StdPeriph_Template\TrueSTUDIO
If you are not sure, do this:
Click on File-->Switch Workspace-->Other (fig.8)

fig.8

and browse to:

…\Lib_3.3.0_IOtoggling_STM32Discovery_Atollic\Project\STM32F10x_StdPeriph_Template\TrueSTUDIO

It is TrueSTUDIO workspace directory (fig.9)

fig.9


STEP n.6

Now Click on File-->Import, select General-->Existing Projects into Workspace and then click Next. (fig.10)

fig.10


Now Browse to the TrueSTUDIO workspace directory, select the STM32100B-EVAL project and click OK. (fig.11)

fig.11


Next press Finish (fig.12)
fig.12



STEP n.7


Now open the: stm32f10x.h, see fig.13

fig.13


Remove comment from line 52 and insert comment in the line 54, see fig.14

fig.14



Now open the file: stm32f10x_conf.h and remove the comment from the line 45, see fig.15.

fig.15


Now press the icon  for compile the project.



If all is OK, you must see in the Console window: Build complete for project STM32100B-EVAL, see Fig.16.

fig.16






STEP n.8


Now it is a time for debugging our program.
Select STM32100V-EVAL and click on the Debug toolbar button (the insect icon  ) or the F11 key to start the debug session.
A new window appear, press OK.
See fig.17.

fig.17


The first time debugging is started for a project, Atollic TrueSTUDIO display a dialog box that enable developers to confirm the debug configuration before launching the debug session.
The fig.18 appear and you must per OK and next Cancel.

fig.18


Next, will appear the fig.19, verify that the Debug menu is setted like below and click on the OK button to start the debug session.

fig.19


Atollic TrueSTUDIO launches the debugger, and switches to the Debug Perspective, which provides a number of docking views and windows suitable for debugging (fig.20) .

fig.20


A number of execution control functions are now available from the Run menu.

Alternatively, use the corresponding execution control commands in the Run control toolbar.


Variables:
The Global Variables are automatically displayed in the Variable Window, fig.9, see on top and right.
For add a Global Variable to the Window Variable do this:
click inside it with the right button of mouse and from the popup windows select:
Add Global Variables
Another way to add a Global Variable is clik on the icon:




Breakpoint
For insert Breakpoint click twice near the number of the line, see fig.20 red circle.
For remove Breakpoint click twice on it.

ASM
For see the ASM code click on the icon

Stop Debug
When the debug session is completed, the running application must be stopped by clicking on the icon: 
Atollic TrueSTUDIO now automatically switch to the C/C++ editing perspective.



Go Up


Home Page
STM32 home page