STM32F3 Discovery on Windows with Eclipse and OpenOCD

Hi!

Because of a lot of requests, I have decided to make the Windows version of the tutorial for setting up STM32F3-Discovery board, with free tools.

First, download ST-LINK V2 driver from here. Open the archive and install what is in it.
Then plug the device and let the driver install.
Now, get the latest OpenOCD installer from here and extract it somewhere. Copy <openocd_path>\scripts\board\stm32f3discovery.cfg to <openocd_path>\bin folder
Now you should be able to connect to the board in Command Prompt like this:
D:\embedded\openocd-0.7.0-dev-121112115725\bin>openocd-0.7.0-dev-121112115725.ex
e -f stm32f3discovery.cfg
Open On-Chip Debugger 0.7.0-dev-00079-g08ddb19 (2012-11-12-17:14)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
adapter speed: 1000 kHz
srst_only separate srst_nogate srst_open_drain
Info : clock speed 1000 kHz
Info : stm32f3x.cpu: hardware has 6 breakpoints, 4 watchpoints
Now close the Command Prompt.

Download latest Eclipse.
Go to Eclipse download page and download Eclipse IDE for C/C++ developers. Extract it and start eclipse.exe. Go to Workbench.

Set up Eclipse.
Go to Help->Install New Software, select All Available Sites in Work With dropdown list. Enter "GDB Hardware Debugging" in the search box and install the package. Download Arm Eclipse Plugin from here and then go to Help->Install New Software in Eclipse. Click Add and then click archive and select the previous downloaded file. Then select the packet and install it.

Install GCC Arm Embedded toolchain from here.

Now we need some Linux tools like make and rm for Windows. Download Cygwin from here. Select whichever mirror you want. Search for "make" and select the binary from Devel dropdown. Click next and wait for it to install.
Now, download this project and import it in Eclipse Workspace. Right click project and select  Properties->C/C++ Build->Environment. Here, check if PATH variable has link to toolchain and to Cygwin binaries folders. Here, you can add <gcc-arm-none-eabi-4_6-2012q4/arm-none-eabi/include> path for the Eclipse IDE to find some headers like stdint.h.
If everything  was installed correctly you should be able to clean the project and to build it.

With the project selected, click Run->External Tools->External Tools Configurations and select from the left the configuration named OpenOCD(win). Check if the path for OpenOCD at top is correct.
Now, click Run.

After this, click Run->Debug Configurations and select from the left Navigation-debug. In the Debugger tab check if the arm-none-eabi-gdb.exe path is correct. Now click Debug and you should see the Debug Window from Eclipse and the Program counter pointing at the first instruction from main().

STM32F3-Discovery Usart with printf

Hi,

The next step after setting up the Development Environment for STM32F3-Discovery was to communicate with computer via serial port.
I have added usart support to my board using USART2 module, which had TX connected to PA2 pin and RX to PA3 pin(both with alternate function set to 7).

The next step was to connect the pins to PC serial port. I have used a MAX3232 module(note that you need a chip with 3.3V support).

After using printf function I have noticed that linker asks for some functions like _write which are used internally. I have added a file newlib_subs.c to implement these function.

You can download the example project from here.
The settings for usart communication are:
baudrate: 115200
parity: none
data bits: 8
stop bits: 1
flow control: none

If you want to use interrupts to read from USART you can use the code from here.

You can check my project via svn from my repository using:
svn checkout http://andrei-development.googlecode.com/svn/branches/dev/stm32f3-discovery


Paket Audio Mobil SQ Gladen dan Scanspeak

Paket Audio Mobil gladen RS100c4 dan Speaker Scanspeak Discovery R6.2
ini adalah racikan yang sangat tepat untuk menghasilkan kualitas Sound
Quality terbaik dalam audio mobil anda. Spesifikasi : Power Amplifier 4
Channel Gladen RS100c4 Speaker Scanspeak Discovery R6.2 Daptkan harga
spesial untuk paket ini : Harga NormalRp. 8.750.000,- Harga PaketRp.
7.750.000,- (Hemat hingga 1 Juta

Free ARM toolchain with floating point unit support

Hi,

The previous post(STM32F3 Discovery + Eclipse + OpenOCD) was based on the CodeSourcery Lite toolchain, which doesn't support floating point unit.
I have found an alternative: gcc-arm-embedded

You just have to download the Linux installation tarball and unpack it somewhere. After this, you have to edit the file Makefile from the project from this or this post and set TC variable to the new toolchain.
You have to set it like this:
TC = /path_to_toolchain/gcc-arm-none-eabi-x_x-xxxxqx/bin/arm-none-eabi
There is another way, like I did. Enter in Terminal:
gedit ~/.bashrc
add the line at the end of the file:
PATH=$PATH:/path_to_toolchain/gcc-arm-none-eabi-x_x-xxxxqx/bin/
then save and close the file and then enter in Terminal:
source ~/.bashrc
Now you can run arm-none-eabi-gcc in every folder you like. For this case, you should set the TC just like in the picture above.

Then, you have to scroll down and find FPU variable
and set it like this:
FPU = -mfpu=fpv4-sp-d16 -mfloat-abi=hard

Now you are ready to develop great things.

Happy coding!

STM32F3 Discovery + Eclipse + OpenOCD

Hi,

ST launched in September a very interesting development board(STM32F3-Discovery). It is a very cheap one(I have got myself one for ~10$). It has a debugger integrated(STLINK) and also some great sensors:
- ST MEMS LSM303DLHC, which contains 3 axis accelerometer(to measure acceleration intensity on each axis) and 3 axis magnetometer(to measure angles to a fixed point - the Earth's magnetic North)
- ST MEMS L3GD20, which has 3 axis gyrometer(to measure rotation speed)
This board is very good for automated pilot controller projects.

After unpacking the board I have found that it was supported just by commercial software and tools. As I am an opensource kind of guy I have struggled myself some time to get this working with Eclipse, OpenOCD and a free toolchain, on Linux.
I have used Ubuntu, but I think the process is the same on every distribution. Also, with little adjustments it can work on Windows.

Here are some steps, that you have to follow to get the led blinking example to work:
1. Install Java Runtime Environment. Here are some steps for Ubuntu:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

2. Install Eclipse. Get Eclipse IDE from here (grab the Eclipse IDE for C/C++ Developers) and unpack it somewhere

3. Install GDB Hardware Debugging. Open Eclipse go to Help->Install New Software and then search for GDB Hardware Debugging and install it.

   Install GNU ARM Eclipse plugin. Get it from here and install it from Help->Install New Software->Add->Archive and select the downloaded .zip file.

4. Install some dependencies. Paste following text in Terminal:
sudo apt-get install git zlib1g-dev libtool flex bison libgmp3-dev libmpfr-dev libncurses5-dev libmpc-dev autoconf texinfo build-essential libftdi-dev libusb-1.0.0-dev

5. Install OpenOCD(version>0.6.1). Get it from here and unpack it. Then, navigate to the extracted folder and type in Terminal:
./configure --enable-maintainer-mode --enable-stlink 
make 
sudo make install

6. Add rule for Stlink to be accessed without sudo. Type in Terminal:
sudo gedit /etc/udev/rules.d/99-stlink.rules
Paste the following text:
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", MODE="0666"
Type in Terminal:
sudo udevadm control --reload-rules
Now, with the board connected to PC you can enter  in Terminal:
openocd -f /usr/local/share/openocd/scripts/board/stm32f3discovery.cfg
The following text should appear:
Open On-Chip Debugger 0.6.1 (2012-10-29-22:02)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.sourceforge.net/doc/doxygen/bugs.html
adapter speed: 1000 kHz
srst_only separate srst_nogate srst_open_drain
Info : clock speed 1000 kHz
Info : stm32f3x.cpu: hardware has 6 breakpoints, 4 watchpoints
You can close the Terminal now.

7. Install toolchain.  You can use Codesourcery toolchain, like described in this step, or you can use GCC Arm Embedded toolchain(from here) which has support for hardware floating point unit and which is free and it is easier to install.
For Codesourcery follow the next steps:
Go to Codesourcery and download IA32 GNU/Linux Installer. To install it open the Terminal and navigate to the folder where it is downloaded. Type:
chmod a+x arm-2012.03-56-arm-none-eabi.bin 
./arm-2012.03-56-arm-none-eabi.bin
Then select next at every step. 

8. Download sample project. Go to this page and download stm32f3.tar.gz file and unpack it.

9. Open the project in Eclipse. Open Eclipse and go to Workbench. Click File->Import and then select General->Existing Projects into Workspace. Select the downloaded project and click finish.
This is a makefile project, so you have to edit makefile if you want to change some project settings. The frst thing you should do is open the Makefile file and check at the very beginning if the toolchain path is correct. This should be like:
TC = <path_to_toolchain>/arm-none-eabi
Now you can build. right click on project name and select build. The correct output is in the Console tab from Eclipse(ignore the warnings and errors from Problems tab).

10. Debugging. After the project was builded correctly select Run->External Tools->External Tools Configuration. Select OpenOCD(restart) in the left tab and click run.
Now, right click project and select Debug as->Debug Configuration and then
select in the left stm32f3-debug and then click Debug.
Note: If you want to add more source files you can add them in the src folder. New headers should be added into hdr folder. If you want to add another folder you have to specify it like the LIB_SRCS in the Makefile and also create LIB_OBJS like variable in the Makefile.

Happy free coding and debugging! :-)

Subwoofer JL Audio 12W1V2

Subwoofer Audio Mobil Subwoofer JL Audio 12W1v2 subwoofer driver are
poised to establish a new standard for affordable bass excellence
thanks to technologies originally developed for our flagship W7 and
W6v2 subwoofers. These include JL Audio's patented VRC™, Elevated
Frame-Cooling and Floating Cone Attach Method™ technologies, along with
an innovative, insert-molded spider

Head Unit Kenwood DDX-7031BT

Head Unit Doubel Din Kenwood DDX-7031BT Head Unit Kenwood DDX7031 BT
deliver revolutionary car audio technology and progressive design that
deliver car entertainment experience beyond believe. Driven by "SMART"
Concept with five key points, ease of installation, connectivity to an
extensive range of entertainment devices, design that begins from
Graphic User Interface to sound

Head Unit Clarion CZ702A

Clarion CZ702A Jika ingin mendapatkan kualitas suara yang berkualitas
tinggi dalam audio mobil, atau ingin mengikuti berbagai kompetisi
audio, upgrade yang biasa dilakukan adalah dengan menambakah sound
processor sehingga setiap speaker dapat didrive secara aktif oleh power
amplifier. Kemampuan untuk melakukan tuning secara mendetail pada
processor terutama pada crossover, time alignment, dan

Tips Membeli Audio Mobil

Audio Mobil Memiliki mobil yang nyaman serta menyenangkan untuk
dikendarai merupakan hal yang diharapkan oleh para pemilik mobil.
Terdapat bagai jenis aksesories mobil yang dapat kita pilih untuk
mendapatkan kenyamanan dalam berkendara. Selain kenyamanan, hiburan di
dalam kendaraan juga penting untuk diperhatikan, salah satunya ialah
dengan meningkatkan kualitas audio mobil. Dengan feature

AUDISON VOCE AV 5.1K POWER AMPLIFIER 5 CHANNEL

Audison Voce AV 5.1K Power Amplifier Audison Voce AV 5.1k, 1650 W (RMS)
max, five-channels car audio power amplifier, with its hybrid design,
it is the specialist amplifier for front + rear + subwoofer or
multi-amplified front + subwoofer systems for your car audio. Its
high-quality AB Class output stage provides two channels with 250 W
(RMS), combined with another pair of A class

Noiseless Pirelli Tires

There is no doubt to the fact that tires are the ones which determine the life of a vehicle. Even if your vehicle is equipped with the high standard devices available, inferior quality tires would make your journey a task to be completed than a ride to be enjoyed. And noiseless tires come as the result of the efforts to make driving a real joy.

Tips to keep in mind while selecting car tires

Experience shows that the manufacturing of tires are constantly witnessing great innovations. And it is going to great heights day by day. At present, a car enthusiast is presented with a myriad of options irrespective of the specifications the owner has in mind about his dream car. If you are someone who travels frequently on quieter roads, noiseless tires are the ideal options worth considering.

The extent of noise depends on the design of treads and it varies from brand to brand. It would be ideal if you take your car to an expert salesperson to make sure that an informed decision is taken in the matter. A professional in the matter would be able to advise you on brands with less noise which does not compromise with the other essential features of a good tire.


The companies like Pirelli have come up with innovative designs which make sure that minimizing sound does not affect the other features like longevity and extreme performance irrespective of the weather conditions. Furthermore, you have to take care that you are opting for the tires which go well with the markings seen on them with regard to width, tire size etc. Another factor which deserves utmost concern is the profile of the tires. Even though tires with low profile may appear to be inexpensive, they are easy victims of being worn out and other damages. Opt for the tires which offer equal operability on dry and wet roads. It is highly recommended that you should acquire all-season tires which would be ideal if you are someone living in an area where climate remains unpredictable most of the time.

And to ensure that you are able to get what you want from the store, you should have an idea of what you expect from your car tires. Remember, the salesperson would never be in a position to understand your driving habits. Explain your driving requirements and he would be able to assist you to choose the one which is ideal for your vehicle.

If you follow these tips, you are well on your way to enjoying a safe time on the road. This combined with the decision to opt for noiseless tires would add up to the attempts to save the atmosphere from noise pollution.

If installing car audio is what you are opting for as a way of upgrading your car, opt for the brands like Pirelli which enjoys a great reputation in the market for supplying excellent quality noiseless tires ideal for car audio enthusiasts. Go ahead, opt for noiseless tires and enjoy a comfortable ride in the company of soothing music playing in the background.

BMW Genewa AUTOSHOW 2012

BMW logo is pictured on a car during the first media day of the Geneva Auto Show at the Palexpo in Geneva. THE PULSE OF A NEW GENERATION. the new A-classthe new product BMW 2012 has show at Palexpo at this march. ready on the road at this yearBMW mercedes benz Genewa AUTOSHOW 2012, luxury product car. the hotest car with red color of sportcar product for essential taste.

Ford Focus electric car AUTOSHOW genewa

yellow Ford Focus electric car AUTOSHOW genewa, there is the big car manufacture is very serious to make public the electric cars for the world. here they are show the FOCUS car model that safety environment and support green world.white 2012 Ford Focus electric car is displayed next to his charging station

2012 new Ferrari F12 Berlinetta Geneva Auto Show

here the special sportcars 2012-new Ferrari F12 Berlinetta Geneva Auto Show, the most visited by visitors and medias.most Visitors take pictures of the new Ferrari F12 Berlinetta car displayed on the car maker's booth during the first media dayFerrari CEO Luca Cordero di Montezemolo, Fiat Chairman John Elkann and Fiat-Chrysler CEO Sergio Marchionne (L to R) pose with the new Ferrari F12

2012 Bentley EXP 9 F concept car at Geneva Auto Show

at last we can see 2012 Bentley EXP 9 F concept car at Geneva Auto Show . the shape of true cars is not to different with the concept.2012 Bentley EXP 9 F back seating with luxury performaceBentley EXP 9 F front driver seating there is Bentley Mulsanne car is displayed on the car maker's booth during the first media day of the Geneva Auto Show at the Palexpo in Geneva Auto Show will take place

Peugeot 208 models 2012 Geneva Auto Show

2012 in march 6 biggest Geneva Auto Show attract the world for came and see the hot cars that release at 2012. crowded event, we can see Peugeot at the wall. attractive PEUGEOT hot car.2012 Geneva Auto Show at the Palexpo in Geneva, March 6, 2012, hot car new Peugeot 208 model car is displayed during the first medias. The Geneva Auto Show will take place from March 8 to 18, 2012. REUTERS/Denis

2013 2012 BMW M6 price

hot info about new BMW M6 release at 20122013 - in 2012 BMW M6 price already known in mediaAs News in LONDON - BMW has launched a two new Car variant that is present in two M6 Convertible and M6 Coupe. in fact, the BMW M6 Convertible is one of the variants and Coupe the fastest in the world.BMW M6 Convertible & Coupe also comes complete with prices in the UnitedKingdom has to offer. Autoevolution

Speeding up NTP, GPS Lock in Android

A pre-requisite of GPS location determination is an accurate clock.

Hence, all these smartphone devices sync up with NTP first before attempting to do GPS calculation. So when your GPS symbol blinks, and you are thinking your device is calculating your location, most of the time it is spending to reach the NTP servers, waiting to determine the time. So, it is very important that you choose the nearest NTP server, with the least RTT, to allow NTP to converge as fast as possible. Only then all the GPS signal calculation will start. It is likely that your ROM manufacturer has put a generic NTP server address (or one nearest to him) in your device. For me, it was set to europe.pool.ntp.org and here's the statistics (to get an accurate and practical result, you need to have a terminal emulator on your phone, also turn off wifi so it is forced to use GPRS/3G):
--- europe.pool.ntp.org ping statistics ---
5 packets transmitted, 4 received, 20% packet loss, time 13267ms
rtt min/avg/max/mdev = 244.080/507.072/1075.470/334.695 ms
When I changed it to something nearer:
--- in.pool.ntp.org ping statistics ---
5 packets transmitted, 3 received, 40% packet loss, time 13463ms
rtt min/avg/max/mdev = 108.429/111.602/116.333/3.431 ms
I wonder if the packet loss is a permanent phenomenon, but the round trip is much quicker. Instead of half second now it takes 1/10th of a second.

So what you need to do is to remount /system is "rw" mode (generally it is in "ro" for safety), and then edit /etc/gps.conf (copy out to your computer, edit and push back). Change the NTP_SERVER parameter to somewhere close to you. It may be country specific, like for India "in.pool.ntp.org"; if your country doesn't have any, use the continent pool like "asia.pool.ntp.org"; and as a last resort, use "pool.ntp.org" which is global.

This is why sometimes the GPS of my phone finds my location faster from my dining table (reaches NTP via wifi and DSL) than outdoor (where though GPS signal is stronger but NTP to be reached over GPRS).

Digital billboards

Perhaps with advancement of technology, we can have cheap, robust and energy efficient billboards on road showing advertisements. They'll probably show an HD image or a short video of a few seconds. This images can be targeted towards approaching cars. Half kilometer ahead, put a camera to profile the next lot of cars. If majority are SUVs, we can display ads of Rolex or Tag Heuer. If they are all compacts, maybe a snapdeal of discounted dinner would work. If you could identify the cars by number plates, trace it to the owners, from their lookup their facebook or google+ profile and find a common interest of next 10 cars, very likely you can display a meaningful advertisement. You'll get enough time to do so, in order of a few seconds to choose the ad, and a few more before the cars pass by. Same can happen at smaller scale. At railway station or airport, if you can find the common interest (or even interest of the guy(s) with maximum purchasing power) of the people who are sitting in the rows facing your display, ads can be tailored to them. How to identify them is a big question, though. Maybe their tickets or boarding pass will have RFID, from which we can look them up.

hot car in Tokyo Auto Salon 2012

in january 2012 at the 2012 tokyo auto salon, hot toyotas, ferrari ff attacks the slalom 2011 los angeles auto show 10 best cars at LA. Tokyo s tuner salon and driver car restoration today for hot rods that ruled once upon a time by: precision restorations honda is planning to surprise in tokyo auto salon 2012 .Tokyo auto salon 2011 nissan 370z roadster porsche panamera cocept hot topics troy

2012 Tokyo Auto Salon HQ car wallpaper

the begin january 2012 the big city TOKYO, car biggest produsen in the world has even for automotive world show - Tokyo Auto Salon 2012this is the collection of 2012 Tokyo Auto Salon High Quality car wallpaperThe 2012 edition of japans largest annual aftermarket event, the tokyo auto salon, will see nissan in cooperation with its in-house tuners autech japan.Im event coverage: tokyo auto salon

Esemka SUV models specification

mobil esemka type 1.5 i Rajawali SUV have luxury interior, this is the picture of the cars inside interiors. interest of SUV design.SPECIAL EDITION of Steering front interior audio carsEsemka SUV model specificationType Variants: Sport Utility Vehicle (SUV)Body Color: BlackPassengers capacity: 7 peoplePrice Range: 75 to 95 million dollars.Length: 5035 mmWidth: 1690 mmHeight: 1630 mmFuel:

hot luxury mobil esemka 2012

this car became hot topic in automotive industries in indonesia, asia. esemka car 2012 is rebuild by a student of SMK School, the most proudly by the country if this cars can became a national car product.the design of mobil esemka has include likes or same with other luxury other popular car produsen in the world have.kiat esemka is show for public and has already open to ordered by publiccar

Conviction is the Key

For best results, you have to convince yourself first about the greatness of the work. A startup will have a much higher chance of success if everyone there believes in heart that whatever they are working on, will change the world. Same is true even for bank robbery. If I have doubts in my mind about the legality or ethical correctness of the act, chances are I'll botch it up. Everyone in the team, starting from the top, have to believe in the fact whatever they are doing is the Right Thing. Obviously it comes from the top; otherwise will you work for a CEO who's not super excited about the product you're going to build? And as long as you are convinced, even if the authorities have a problem with it, it is their problem, you just accept is as an occupational hazard, but do not doubt your action. Not anymore Ganda hai par dhanda hai yeh.

It is the same reason even if I were a great singer, I'll never sound convincing when I sing "Jo bhaje Hari ko sada", because singing skills aside, I myself probably won't believe that's the way to achieve nirvana, or even the Param pada is attaining the nirvana itself. Maybe Pandit-ji trained himself to believe in the theory and hence could make the performance.

Maybe Kraftwerk really believes robots will churn out music in near future.