STM32F4 Discovery with Cerberus firmware

I got STM32F4 Discovery board, STM32F4DIS-BB extension board and STM32F4DIS-LCD.
This is the configuration without the camera:

This is what I did so far:

  1. Downloaded and installed all the software and the drivers from here:

  2. According to this page:
    I downloaded the hex files from here:
    I downloaded compiled hex files, becouse I don’t know much about porting and will takes loooong time to do it.

  3. I erased my board, loaded Tinybooter.hex by STM32 ST-LINK Utility

  4. Deployed ER_CONFIG and ER_FLASH with MFDeploy.exe

  5. After rebooting the device it can be recognised by VS and FEZ Config software gives me this info for device version:
    Connecting to device…Cerb-Family_Gadgeteer
    Loader (TinyBooter) Version:
    Firmware (TinyCLR) Version:

I successfully created new console application on netmf 4.2, VS2010, and the onboard leds, user button and the serial ports are working fine.

But when I tried to create new Gadgeteer app (netmf 4.2) and debug it without adding any code, just with the default Debug.Print(“Program Started”), I got the following error:

[quote] Assembly: GHI.OSHW.Hardware ( ***********************************************************************

  • ERROR!!! Firmware version does not match managed code version!!! *
  • Invalid native checksum: GHI.OSHW.Hardware 0xF75E8662!=0xF0D4135D *
    The debugging target runtime is loading the application assemblies and starting execution.
    Cannot find any entrypoint!

My main target is working LCD display with the touch screen.

My questions are:

  1. Why I get this error and how can I avoid it?
  2. Can I use gadgeteer templates somehow or I have to implement the LCD by myself?
  3. If I cant use gadgeteer, can anyone link me some examples for starters for any similar LCD (16 bit parallel interface for the display and I2C/SPI interface for the touch).
    The display uses SSD2119 microcontroller.

Answer for the 1st question and error.
The firmware files from is outdated.

1 Like

Thank you for the response.
As I saw, there wasn’t any compiled hex files with the new firmware for discovery so I did the hardware modifications.
With STMicroelectronics’ DFU_File_manager I converted the .dfu file
C:\Program Files\GHI Electronics\GHI OSHW NETMF v4.2 SDK\FEZ Cerb Family\Firmware\TinyBooter_4_2_5_0.dfu to hex file and reloaded the firmware on the board

Now gadgeteer project debugging is OK!

Now I guess I have to start new Gadgeteer Mainboard project to configure the discovery board properly.

So now the main question for me is: Are there any examples or templates for any similar LCD to this STM4F32DIS-LCD.
As I read in the documentation it is 16 bit parallel interface for the display and I2C/SPI interface for the touch.
The display uses SSD2119 microcontroller.

@ Mincho - I’m trying to write a driver for SSD1963 (16bit GPIO on port E, G) in a stm32f407zg board. The native code is working but including it in the NETMF firmware build is an other story.

Sorry about that. I’ve been meaning to recompile the latest firmware and update that ZIP file but I haven’t had time.

To get the display working, you’ll have to implement the LCD functions. Come hang out in the native section of the forum and check on @ dobova’s progress. You’ll need to set up an environment for working with the porting kit, so you’ll need either MDK or GCC set up, in addition to the build tree. It is by no means a simple task, but once you get it figured out, you’ll be writing native interops for everything and loving it.

I’ve implemented all the needed interfaces and working under simlulation code with Keil MDK. I finally I’ve my solution created and compiling. Now I need to manage settings, itemgroups and hundreds of netmf fancy includes for the build. I see tonight and/or tomorrow to run some test.
I’ve implemented also BitBltEx as per specification, but I don’t think will work in NETMF …
Need some better solution there.

PS: I’m little astonish to see my board running little faster than original Cerberus … Uh is it possible ? The chip is the same family, set to 168mhz with 25mhz oscillator. I’ve just discovered that I’m using “THUMB2FP” config and not the cerb “THUMB2”. May be Keil compiler is making some better FP code ?
I’ve not time to make benchmark now, but is there some ready fp bench program for netmf?

You can use the PI suite from Duke Nukem. The latest result he posted for the current firmware can be found in the following post

Here is his test suite

@ taylorza - Thank you, I will test soon.

@ dobova - It will be interested to see your results.

Note that according to that form post GHI are still not compiling with native FP support so I would not be overly surprised if your build is faster, it would be interesting to see by how much.

Uh I get:

Program Started
Timelapse: 00:03:01.7405510
Il thread '<Nessun nome>' (0x1) è terminato con il codice 0 (0x0).

But with VS2012 in debug and cerberus base firmware from codeplex in release mode. I used Debug.Print becouse I haven’t a display working (for now ach!).

That was for 200 digits of PI?

@ taylorza - Yep

I think the test is only reliable for testing updates for the particular user as to a degree it is environment dependant…i get 2.41 for 200 digits…

@ Justin - I got the idea looking same program running on both the board (cerb vs my board). But I will check better tomorrow comparing the 2 board. I tried with led on/off without VS debug and it’s lot less (on 2:35 but manually measured). I think it is comparable with your result.

In any case it’s not important, I’m engaged on other things

Thanks for the replays.
Native code is kinda unknown for me, so I’ll try with the existing cerberus port and will try to handle with the managed code only for now :).
I’m still digging in the documentation and the schematics to understand pin’s usage for the display.
I don’t have much experience in netmf, only in .net and .netcf.
Windows apps and windows phone apps are very close and hardware knowledge wasn’t necessary, but netmf is kinda different.

Anyway, keep posting, I appreciate every advice and help and will try to understand all step by step.

@ dobova - i removed the display and button fluff and kicked off an new thread to do the 200 digits with a debug.print of the result

@ Justin - And you get 2.41? In this way I get little more, 2:44.
So I think I got an erroneus impression.

@ dobova - yes 2.41 on the Octopus which us the same as the Cerb.

Ok my final test side by side Cerberus (stock fw w/eth) vs my board (compiled Keil FP-on v4.70 w/eth), “process(200)” , VS2012 in debug mode, no threads, just main program:

Cerberus: 234 sec

My board: 207 sec

Exactly same program, same binary, same dll, same deploy PC, same VS2012 for both boars. The difference I felt is real, more than 10%. But this morning I’m far from Justin values, probably due to eth fw.
So I don’t waste more time on this topic, I need to get LCD working and lot of other stuff.