Test Project Build
Let's test build with some examples provided by ST. First copy the GPIO/IOToggle source files to the project directory just created.
Then create a make file and linker script file for the project. In this state, you can build(F7) and clean the project as you typed in the previous post. Actually everything is done by make utility and CodeLite is just invoking it.
It would be nice you can navigate and edit each file. At the left Workspace pane, right click on the project name and select the "Import Files from Directory".
Then you can select directories(and files) you want to show on your Workspace pane, which will probably match the source list of your Makefile. If there is no (sub)directories to select, you can choose as many as you want by clicking the Browse button on the top right of the dialog.
Resulting directory structure probably matches the source list of your Makefile. Be sure to remember that this tree is created regardless of project structure itself and you are not suppose to compile each individual file.
Flash Utility Integration
You can bring up the external flash utilities by registering those as external tools. Select Plugins-> External tools ->Configure external tools or just click the corresponding button from the menu bar
Then you can register your flash program.
Surely it is not as convenient as a native flasher but it is still useful.
Showing posts with label IDE. Show all posts
Showing posts with label IDE. Show all posts
Monday, June 27, 2011
Sunday, June 26, 2011
STM32F GCC IDE on Windows(1)
You can easily build a GCC IDE for Cortex-M3 using a open source IDE. If you are not a big fan of Eclipse like me, you will probably like CodeLite or Geany. Both programs are cross platform, open source, and light-weight. Geany is more minimalistic of two. If you are familiar with Visual Studio, you will find CodeLite is more comfortable.
I'm going to use the following programs:
GCC and Make
For the CSG++ Lite, be sure to download the installer version(EABI). Install is straight forward. You don't have to change any settings. After install, you should add the following directory to your PATH.
> C:\Program Files\CodeSourcery\Sourcery G++ Lite\bin
You can verify that your PATH is set up correctly by running
> arm-none-eabi-gcc -v
on your console window.
Other than the compiler collection, you may need at least GNU make utility. You can install Cygwin for the make utility. But the simplest way is using GnuWin32. Download and install the GnuWin32 make package. You also have to add its bin directory to you PATH. You can install as many GnuWin32 packages as you need.
> C:\Program Files\GnuWin32\bin
STM32F Library and CodeLite Project
Download the library(stm32f10x_stdperiph_lib.zip) and extract it on your work directory. Then install CodeLite and fire it up to create initial workspace and project. For convenience, create a Codelite workspace under the STM32F library directory. (Workspace->New Workspace)
By selecting the workspace name and path as shown and deselecting the "Create the workspace under a separate directory" check box, you can use the STM32F library project directory as your workspace. But it is only for convenience sake. You can choose your workspace anywhere you like.
Now create a new project.(Workspace->New Project)
For the Categories, choose "Others" then you can select "Custom Makefile" type for the template. Type in your project name. And select compiler type. Compiler type here is not important because you will use your own build and compile command strings. Resulting directory structure would be
For now, there is no file under GpioTest directory except the CodeLite project file.
After the project creation, go to the project settings by right click on the project "GpioTest" and select the last menu item.
Go to "Customize" on the left, then check "Enable custom build". You want change "Working Directory" from $(WorkspacePath) to $(ProjectPath) where you have your own Makefile. Now fill in the Build Command with "make" and the Clean Command with "make clean". In this way, you can use your Makefile to build your project instead of CodeLite's own makefile.
I'm going to use the following programs:
- GCC - CodeSourcery G++ Lite (EABI - windows - installer version)
- GNU Make - GnuWin32 make package
- Library - ST32F10x_StdPeriph_Lib
- IDE - CodeLite
- Flasher(Serial) - ST Flash Loader
- Flasher(USB) - Segger jlink flasher
GCC and Make
For the CSG++ Lite, be sure to download the installer version(EABI). Install is straight forward. You don't have to change any settings. After install, you should add the following directory to your PATH.
> C:\Program Files\CodeSourcery\Sourcery G++ Lite\bin
You can verify that your PATH is set up correctly by running
> arm-none-eabi-gcc -v
on your console window.
Other than the compiler collection, you may need at least GNU make utility. You can install Cygwin for the make utility. But the simplest way is using GnuWin32. Download and install the GnuWin32 make package. You also have to add its bin directory to you PATH. You can install as many GnuWin32 packages as you need.
> C:\Program Files\GnuWin32\bin
STM32F Library and CodeLite Project
Download the library(stm32f10x_stdperiph_lib.zip) and extract it on your work directory. Then install CodeLite and fire it up to create initial workspace and project. For convenience, create a Codelite workspace under the STM32F library directory. (Workspace->New Workspace)
By selecting the workspace name and path as shown and deselecting the "Create the workspace under a separate directory" check box, you can use the STM32F library project directory as your workspace. But it is only for convenience sake. You can choose your workspace anywhere you like.
Now create a new project.(Workspace->New Project)
For the Categories, choose "Others" then you can select "Custom Makefile" type for the template. Type in your project name. And select compiler type. Compiler type here is not important because you will use your own build and compile command strings. Resulting directory structure would be
For now, there is no file under GpioTest directory except the CodeLite project file.
After the project creation, go to the project settings by right click on the project "GpioTest" and select the last menu item.
Go to "Customize" on the left, then check "Enable custom build". You want change "Working Directory" from $(WorkspacePath) to $(ProjectPath) where you have your own Makefile. Now fill in the Build Command with "make" and the Clean Command with "make clean". In this way, you can use your Makefile to build your project instead of CodeLite's own makefile.
Subscribe to:
Posts (Atom)








