Topic : Simplest STM32 printf in simulator?

Forum : ARM

Original Post
Post Information Post
March 9, 2009 - 8:53pm
Guest

Hello, I've downloaded Ride today and your ARM tool pack with high hopes, it looks very professional.

I am planning on porting an existing project from another mcu, it mostly does not touch much hardware - put it does need a printf output directed to the UART.

I am hoping that I can do most of the work and validation in your simulator before moving to real hardware target.

I tried making a new project for an STM32 variant, and included stdio.h and tried to printf a "Hello World" string.

Perhaps I was being a bit hopeful, but I was hoping for a text output in a simulator window somewhere. I tried to double click open the USART peripheral and I just get a register dump.

So, some specific questions..

Do I need to write some initialisation code that is specific for this processor variant within main() or are some defaults prepared for me, in crt0, before main is executed ? Things like main mcu clock setup and uart baud rate setup.

Where in the simulator can I view the output from stdio / printf / uart in a textual manner ?

Thank you in advance if you are able to give me a few hints.

Replies
Post Information Post
+1
0
-1
March 10, 2009 - 9:48am
Raisonance Support Team

Hi Steve,

You are right, there is no "UART view" in our STM32 Simulator.

We will develop this in the future, but it is not available at the moment: The hardware debugger on Cortex M3 chips is very efficient, which makes the debug very convenient (feels the same in debug or in simulation). So simulation is less critical than it used to be with older chip families.

One way to solve your problem is to buy a REva board with a STM32 starter kit (199 euros).
Another way is to develop using a STR7 chip (they have a "UART view" in the simulator) and change your device from STR7 to STM32 when you are satisfied with the simulation. But the code will not be the same, you may have few suprises.

I hope this helps,
Bruno