Using libjpeg in STM32F4 DISCOVERY

If you look at the current ARM development boards from different manufacturers STM32F4 Discovery is the best to consider .here is why
1: Too cheap near bout Rs 1600.00 at kitsnspares .
2: speed is quite high up to 168Mhz.
3: Low power near about 38ma at 168Mhz.
4: Up to 192KB RAM .Note 64KB of those is CCM RAM .will be discussed in another tutorial
5: Cortex M4 core from ARM which is latest from M series(if you are thinking to run android then please consider some chips from Cortex A series.)
if you have ever worked with AVR you could imagine why i highlighted those numbers.
So lets start the main topic. in order to complete  this tutorial  you need some tools here are those.
1 : CooCox Co IDE                                     Free
2 : Discovery Board                             ~Rs1600
3 : USB cable Type A to Mini B            ~Rs100
4 : Color LCD  Board   From   ~ Rs830
5 : STM32F4-Discovery_FW_V1.1.0        Free
6 : I have edited some files in libjpeg      Download it from below
File Size: 312 kb
File Type: zip

Download File


Now onto the C programming .
open IO_Toggle project from the examples projects in STM32F4-Discovery_FW_V1.1.0
there is a main.c file inside the libjpegfor324 .Exclude that from build by right clicking on it.
This file comes with libjpeg so avoid it.
Below is a jpeg file saved into an array  you can copy that to main.c file

you need to connect the  LCD to FSMC of stm32f4.  following contents are from sram.c  create this file where main is present. and copy the following code into it.You don’t need to edit this unless you are changing the driver code.


here is the portions of my  main code. Sorry I can’t post all my project here but this much is enough for displaying a JPEG image.
Here are some examples running on same code but with different board.This board isn’t the same board that you would find on ebay linked above.This board is another one that i have designed specifically for stm32f4 discovery.


I do what I love. There is a famous quote "Love the process not the product " & I think this is what differentiates developers from consumers .