Friday, October 10, 2014

Tools Required

After some days trying to make the board working, I finally gather all tools required.

Mandatory for compiling:
RTOS: ChibiStudio
Compiler: GNUToolsARMEmbedded
Compiler tools/library: WinAVR-20100110
make: GnuWin32

Mandatory for flashing & debugging:
Programmer: STM32 ST-LINK Utility
Debugger: ST-LINK_gdbserver
Optional:
IDE: eclipse
Serial tool: hyperterminal

I will try to remember where I got all the files and will put all references, anyway I will share my dropbox folder so the files are more accessible and gathered in a single place.

Mandatory for compiling: 
RTOS: ChibiStudio
Unfortunately I did not find any Linux distribution for this device, so, I found this Chibi Real Time Operating System which looks a good option at the time, it is not hard to compile, it is well documented and support a variety of other devices.

Compiler: GNUToolsARMEmbedded
ARM based gcc toolchain arm-none-eabi-gcc.

Compiler tools/library: WinAVR-20100110
I had a hard time trying to compile the ChibiStudio, annoying errors and lots of strange issues in the make files, somehow I got to a page where say I should install this package, this is the only page that mention it.

make: GnuWin32

GNU make for windows.


Mandatory for flashing & debugging:
/Programmer: STM32 ST-LINK Utility
Tool for flashing STM32. 

Debugger: ST-LINK_gdbserver
In this page it is a working debugger, other pages say you have to download some package, extract some folder from the package, well, that solution does not work for me, bur this one.

Optional: 
IDE: eclipse I started using years ago when I worked at Sony to build and edit Sony Digital TV firmware, so, it may be slow some times but it is very powerful IDE.

Serial tool: hyperterminal
This program is not longer available natively in windows 7, so, you can use this program or any other you prefer.

Here is my dropbox links with all the files (but eclipse - it's big). 

Also, I copied all the files to a single folder, as I work with several projects at the same time I like to have all tools for a specific project separated, also, I use to format the computer time to time, so having everything isolated has proven more practical to me. In this case I have all files in a single folder

E:\MyWorkspace\STM32F4Discovery
 
In order to this to work correctly, environment variables must be set correctly (remember to change to your preferred path) and add those to your system:
E:\MyWorkspace\STM32F4Discovery\WinAVR-20100110\bin;E:\MyWorkspace\STM32F4Discovery\WinAVR-20100110\utils\bin;E:\MyWorkspace\STM32F4Discovery\GNUToolsARMEmbedded\4.8_2014q3\bin;E:\MyWorkspace\STM32F4Discovery\GnuWin32\bin

I am not giving step by step instructions, but my set up and files should me selt explanatory and enough to give you a very good idea how the set up has to be done.

After you got all the files, or at least the files needed to compile you must test your compilation setup, to do so, lets do a few things:
  1. Verify tool chain
  2. Verify make
  3. Compile sample source
1. Verify tool chain
Open a terminal and type: arm-none-eabi-gcc --version
If you get something like this:

Then, we are good to go.

2. Verify make
Open a terminal and type: make --ver
If you get something like this:
Then, we are good to go.

2. Compile sample source
Depending where you install the files go to a sample folder such as: E:\MyWorkspace\STM32F4Discovery\ChibiStudio\demos\ARMCM4-STM32F407-DISCOVERY
When you are in the desired folder, type: make
If you get something like this:
.
.
.
Then, we are good to go.

You have a healthy compilation environment for STM32F4-Discovery.



No comments:

Post a Comment