1.1k views
in System Integration by
Hello there,

now that the eval licences is for free, I started to program with my STM32F7 Disco. But i have some troubles to run EmWi with my operations system. Is is it possible to post a tutorial for this problem to?

I use a FreeRTOS version.

Best regards

1 Answer

0 votes
by

Hello Duke,

the dependencies between an Embedded Wizard Platform Package and an operating system are very low - as a result, the adaptation is very simple and only a few functions have to be adapted.

Your current STM32Fx Platform Package is running bare-metal - this means there is no operating system in use. Therefore we added the TLSF memory manager in order to have a dynamic memory manager. In case you are using FreeRTOS, you can use the dynamic memory manager of the operating system.

Please have a look into the file \PlatformPackage\RTE\ewextrte.c - the following functions have to be adapted to use the corresponding FreeRTOS services:

  • EwAlloc() - This function has to reserve a new memory block with the given size aSize. The function has to return a pointer to the memory block or NULL if there is no memory available.
  • EwFree() - This function has to free the given memory area.
  • EwPrint() - The function EwPrint() prints formatted output to the debug console. This function works similary to the ANSI 'C' printf() function. This function should be implemented in order to output trace messages on the debug console.
  • EwGetTicks() - The function EwGetTicks() should return the number of milliseconds that have been elapsed since the system was started. It is limited to the resolution of the system timer. The ticks are used as base for EmWi timers.
  • EwGetTime() - This function should return the current time as the number of seconds elapsed since midnight 1.1.1970. If possible the real time clock should be queried in order to determinate the current time. This function is used by the Mosaic class Core::Time and should be adapted to the real time clock or to the system timer. If no real time/date is needed, this function can simply return 0.

That's all. :-)

by
Thanks for the quick answer!

But, is there no need to implement an cyclic update function, similar to the function in the examples to redraw the screen? Or is this automatically trigger in EmWi?
by

Of course, there is still the need to have a main loop that drives the entire UI application. This is currently done within the main.c file in every example.

For details concerning this main loop, please see http://ask.embedded-wizard.de/174/main-loop-how-to-integrate-the-generated-ui-application.

This loop is more or less always the same - independent from the used operating system.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...