Jump to content

SW4STM32 IDE & uGFX configuration


Michal

Recommended Posts

Great to see that you managed to get everything working!

Note that it is never a good idea to modify the library's source files in any way. I know that you sometimes can get it working that way, but you are always doing something fundamentally wrong in your project and that will always lead to problems eventually.

6 hours ago, Oshel said:

I do not know how eclipse is linking the files but it just "started" to work at some point. I dunno wtf.

The linking of the project is done by the linker script you provided. You don't have to worry about that. Just get gcc to compile everything correctly and you should be good.

In your screenshots you first posted I don't see the stm32f7xx_hal_conf.h file. This is necessary for the HAL-libraries to function. Also this way you can exclude unused modules to narrow down the problem and shrink code size.
The errors you were seeing are most likely caused by the red, green and blue color conflicts as explained in my previous posts. Why do you get other errors? Well compilers aren't perfect and can give very different errors than the ones that are causing problems.

If you have any other problems don't hesitate to ask!!!

Link to comment
Share on other sites

  • Replies 56
  • Created
  • Last Reply

Top Posters In This Topic

I had my HAL configuration file done correctly. At some point, after messing with includes in the files provided for the board (to make it similar to the working example posted in download section) all these HAL type error disappeared. But these 2 errors- typedef errors- were still there. I wrote before that I do not know what have I done to make it work- now I can tell, but I do not see any sense in that. I rentered to Includes in Symbol and Paths tab in Properties window and I made a little change (move include up or something like that, doesnt matter, coese after that I moved it back to the state from before). It made the compiler to recompile whole thing once more, like really recompile, because before of course I was cleaning the project and I was updating it every single way. I have noticed that every time I am making a change in gfx_conf file the whole project has to be treated that way because not every file is updated with new definitions. Maybe I am missing something? The library is now original- no changes.

Of course I know that messing with library source code is bad. I was only doing that to make it work.

The workaround with colors was added in the main file- just like in the example.

P.S.
You should update the library with the board files which are compatible with the HAL files. Or maybe it is updated? I have 2.7 version of the library.

Edited by Oshel
Link to comment
Share on other sites

uGFX predates any interaction with the STM32 HAL. It was originally ChibiOS only and has become much more cross-platform over time.

The RED, GREEN & BLUE macros were in uGFX well before the STM32 became a platform option. In retrospect those macro names are not the best either in uGFX or in STM32 HAL however they have needed to be maintained in uGFX for API compatibility reasons.

So, from V3.x those macro names have been deprecated. They are still included by default in order to maintain compatibility with the uGFX V2.x API but that can be easily turned off with a setting in gfxconf.h

In V3.x there are new names for these colors in uGFX.

uGFX V3.0 will be released sometime in the next few months.

Link to comment
Share on other sites

  • 2 weeks later...

Hello again,

I am (again) having a hard time on the conflict between uGFX and HAL libraries. I am trying to run create a project with:

  • FreeRTOS,
  • USB Host with Mass Storage class,
  • custom FatFs,
  • uGFX

...but after adding uGFX library I am getting these weird color errors. Here is my project:

https://drive.google.com/file/d/0BzNqKTMmGSjXMlJaQnJ0TkNUVDQ/view?usp=sharing

It is quite heavy due to all the libraries. Could you please take a look at it? I am undefing colors in main.h but I was trying to do this in X other ways and it still doesnt compile.

Link to comment
Share on other sites

Ok I got your project to compile. First of all: Use the git version of µGFX please!!!
There are some error that pop up because you are using an outdated version µGFX. The stm32f746 board files have changed alot since µGFX v2.7.

Second problem is as mentioned here:

The naming schemes overlap. Just excluding the unused HAL-components fix this already and save you alot of code space.

I also added "FATFS USBH_fatfs;" to your main as it was missing.

Lastly I had to delete the ffconf.h file from the µGFX root directory as it was trying to used it as the configuration file for the FatFS.

If you have any other questions don't hesitate to ask!

_f7_disc_usbh.zip

Link to comment
Share on other sites

  • 3 weeks later...

Hello!

Sorry for no contact- I was on holiday for 2 weeks. Now I am back.

Thank you very much for solving the problem. Youre the best :) I will try to compile it as soon as I dig myself out of e-mails and hot jobs.

I guess I was using the latest library from download section on the site. But true- git sourcing is a better solution. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...