Jump to content

Porting uGFX for MQX RTOS on Keil for UC1608 GLCD controller


CSMG Sarma

Recommended Posts

Hi List,

I am trying to build uGFX library for my Freescale TWR-K64 board. The OS is MQX RTOS, IDE is Keil and the GLCD controller is UC1608 from Orient displays. Inspired with the help documentation I have started with the bare metal porting of uGFX library for GDISP module. Before starting  I have referred these links:

http://api.ugfx.io/modules.html

https://wiki.ugfx.io/index.php/Using_Keil_µVision_5_MDK-ARM  and followed the steps given here to build my project.

I am looking for a step to step guide for creating a Bare metal port for my TWR-64 board with UC1608 monochrome GLCD display. I have created a project which is compiling but while single stepping I see that gdisp_lld_init() and other related APIs are not called after   _gdispInit()[called from gfxInit() Call ] API is executed.          

 

I'd appreciate anyone sharing this info or point me to appropriate references.

 

Thanks in anticipation,
Sarma

 

Link to comment
Share on other sites

Hi List

Forgot to mention that I had created a bare metal project(Empyt Keil project for K64 series with Startup code), imported gfxconf.h, main.c to keil project from "..\ugfx_2.7\demos\modules\gdisp\basics" 

I am getting the following linker errors.

Did I miss adding any files having the definition of APIs listed here or I'll have to define them my self.

 

Best regards
Sarma

 

 

Link to comment
Share on other sites

Hello Sarma and welcome to the µGFX community!

 

1 hour ago, CSMG Sarma said:

I am looking for a step to step guide for creating a Bare metal port for my TWR-64 board with UC1608 monochrome GLCD display.

You don't have to create a port - there's already an existing bare-metal port that will work well on your hardware. Here's the documentation that explains how to use it: https://wiki.ugfx.io/index.php/BareMetal. In addition to that, you might want to set the GFX_CPU option in your configuration file to the one matching your target hardware as the baremetal port contains numerous processor dependent optimizations: https://wiki.ugfx.io/index.php/GOS#CPU.
Additionally I'd like to give you the following recommendation which might save you a lot of pain: Use the latest master branch of the µGFX repository instead of the latest stable release. The latest master is stable too and contains many improvements for the baremetal port.

When it comes to the display you'll have to write a new display driver. This is fairly straight forward. There's an entire article on the wiki that very extensively explains the different display driver models that µGFX supports. Furthermore, there are almost 40 existing drivers that you can take as a reference and if you have questions please don't hesitate to ask - we're happy to help wherever we can.

 

51 minutes ago, CSMG Sarma said:

I am getting the following linker errors.

Did I miss adding any files having the definition of APIs listed here or I'll have to define them my self.

Please attach a text file with the full compiler output (make a clean build!). There's nothing you have to define yourself. Following the Keil µVision guide should give you instant success. If you keep having problems you can also post a screenshot of your project files tree and the C/C++ include paths list. This way we can help you most effectively.

A general recommendation: Start off by not enabling any of the modules in your configuration file. This way you can check whether everything builds well and whether the µGFX core is working well. You can actually compile & run a µGFX application without any display just using the GOS module.

Link to comment
Share on other sites

It sounds to me from the symptoms you describe that you are getting a link error. When you said that you can't see gdisp_lld_init being called it made me wonder if you have added a display driver to the project?

A display driver will be required if you have enabled the GDISP module.

Link to comment
Share on other sites

HI List

Thanks for the inputs. Sorry for the delay.

@inmarket the display driver file was included. I had accidentally initialized GDISPVMT_OnlyOne with 0. Now I am able to initialize the GLCD with gdisp_lld_init  which in turn calls my custom code for GLCD initialization.

I also have some hardware issues to fix. My next trail would be to display text and images using GDISP libs which I am currently doing using my custom code. I have to cleanup the code before I post it here. That might take some time.

 

Best regards

Sarma

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...