Jump to content
Sign in to follow this  
chankour

undefined reference to `GMOUSEVMT_OnlyOne'

Recommended Posts

 

Arduino Due with RA8875 SPI LCD and FT5206 capacitive touchscreen driver.

The RA8875 is working fine, I tried adding support for touch input:

1.  I initialed the FT5206 controller and read the touch coordinates independently from uGFX without an issue (using I2C commands directly), so the hardware is working.

2. I added  gmouse_IId_FT5x06.c and gmouse_IID_FT5x06_board.h  to gfx\ugfx\drivers\ginput\touch\FT5x06

3. I added under gfx  driver_FT5x06.c (That's where my other working driver_RA8875.c file is) with a single line pointing to the above #include "ugfx/drivers/ginput/touch/FT5x06/gmouse_lld_FT5x06.c".

4. I have a #define GMOUSE_DRIVER_VMT        GMOUSEVMT_FT5x06 in gmouse_IID_FT5x06_board.h

5. I set both GFX_USE_GINPUT  and GINPUT_NEED_MOUSE to true in gxfconf.h

When I build, I get:

libraries\gfx\gfx.c.o: In function `_gmouseInit':

<...>\Documents\Arduino\libraries\gfx\ugfx/src/ginput/ginput_mouse.c:653: undefined reference to `GMOUSEVMT_OnlyOne'

After searching and reading through the threads, the general reason behind this error is usually that I enabled the mouse input, but didn't define/add files for the driver/board. I believe that I did, but I am sure I missed something in the process.

I looked at ugfx\boards\addons\ginput\touch and there seem to be an MCU and ADS7843 folders there, since I could not find any documentation, I tried creating an FT5x06 folder there and putting my board.h file there, but how do I include it in the build(like done in step 3. above).

Any help would be appreciated. Thanks,

Wahran.

 

 

 


 

 

 

Share this post


Link to post
Share on other sites
On 12/20/2017 at 20:42, chankour said:

2. I added  gmouse_IId_FT5x06.c and gmouse_IID_FT5x06_board.h  to gfx\ugfx\drivers\ginput\touch\FT5x06

Be careful with upper and lower case mixing in the llD/lld. The gmouse_lld_FT5x06.c file is already written in present in that folder. Any reason why you are rewriting it? You should only have to write the board file.

 

On 12/20/2017 at 20:42, chankour said:

3. I added under gfx  driver_FT5x06.c (That's where my other working driver_RA8875.c file is) with a single line pointing to the above #include "ugfx/drivers/ginput/touch/FT5x06/gmouse_lld_FT5x06.c".

Is gfx the root folder of the µGFX library? Because you should not inlcude files this way. Normally you include source files and headers files through you IDE or your makefile.

On 12/20/2017 at 20:42, chankour said:

4. I have a #define GMOUSE_DRIVER_VMT        GMOUSEVMT_FT5x06 in gmouse_IID_FT5x06_board.h

This is already defined in the gmouse_lld_FT5x06.c file. You should not redefine it as it will give you errors like the one you are getting now.

Share this post


Link to post
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
Sign in to follow this  

×