Jump to content

how to use GDAUIO?


cheater

Recommended Posts

Hi ugfx-Team,

i have the  http://www.mikroe.com/mikromedia/7/stm32f4/. I already got ugfx working with chibios.

The next big deal will be sounds. I cant even compile the 'play-vs1053' demo.

It gives me this error:

../../uGFX/drivers/gaudio/vs1053/gaudio_play_vs1053.c:184:1: error: unknown type name 'GTimer' several times.

this is my makefile, i edited some lines like the wiki mentioned.

Quote

# Possible Targets:    all clean Debug cleanDebug Release cleanRelease

##############################################################################################
# Settings
#

# General settings
    # See $(GFXLIB)/tools/gmake_scripts/readme.txt for the list of variables
    OPT_OS                    = chibios
    OPT_THUMB                = yes
    OPT_LINK_OPTIMIZE        = yes
    OPT_CPU                    = stm32m4

# uGFX settings
    # See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the list of variables
    GFXLIB                    = ../../uGFX
    GFXBOARD                = Mikromedia-Plus-STM32-M4
    GFXDEMO        = modules/gaudio/play-vs1053
    LDFLAGS         = -lm
    GFXSINGLEMAKE            = no

# ChibiOS settings
ifeq ($(OPT_OS),chibios)
    # See $(GFXLIB)/tools/gmake_scripts/os_chibios.mk for the list of variables
    CHIBIOS_VERSION        = 2
    CHIBIOS                = ../../chibios26
    CHIBIOS_BOARD        =
    CHIBIOS_PLATFORM    = STM32F4xx
    CHIBIOS_PORT        = GCC/ARMCMx/STM32F4xx
    CHIBIOS_LDSCRIPT    = STM32F407xG.ld
    # We define a non standard board script as this is not a standard ChibiOS supported board
    include $(GFXLIB)/boards/base/Mikromedia-Plus-STM32-M4/ChibiOS_Board/board.mk
endif

##############################################################################################
# Set these for your project
#

ARCH     = arm-none-eabi-
SRCFLAGS = -ggdb -O1
CFLAGS   =
CXXFLAGS = -fno-rtti
ASFLAGS  =
LDFLAGS  =

SRC      =
OBJS     =
DEFS     =
LIBS     =
INCPATH  =
LIBPATH  =
LDSCRIPT =

##############################################################################################
# These should be at the end
#

include $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk
include $(GFXLIB)/tools/gmake_scripts/os_$(OPT_OS).mk
include $(GFXLIB)/tools/gmake_scripts/compiler_gcc.mk
include $(GFXLIB)/drivers/gaudio/vs1053/driver.mk
# *** EOF ***
 

 

Link to comment
Share on other sites

This is strange. The rules set of the GAUDIO module should automatically turn GFX_USE_GTIMER on if you enable the GAUDIO module:

#if GFX_USE_GAUDIO
	#if GFX_USE_GEVENT && !GFX_USE_GTIMER
		#if GFX_DISPLAY_RULE_WARNINGS
			#warning "GAUDIO: GFX_USE_GTIMER is required if GFX_USE_GAUDIO and GFX_USE_GEVENT are TRUE. It has been turned on for you."
		#endif
		#undef GFX_USE_GTIMER
		#define	GFX_USE_GTIMER		TRUE
	#endif
#endif

Is there any way you can reproduce this problem?

Link to comment
Share on other sites

Hi Joel, if  #define GFX_USE_GTIMER  TRUE is missing, i got the error just out of the box.

 

But i have another Problem now, i cant access the sd-card. I added #define GFILE_NEED_FATFS        TRUE but then i get this:

Quote

Linking .build/cbike.elf
.build/obj/GFXLIB/src/gfile/gfile_fatfs_diskio_chibios.o: In function `disk_initialize':
C:\ChibiStudio\workspace26\cbike/../../uGFX/src/gfile/gfile_fatfs_diskio_chibios.c:51: undefined reference to `MMCD1'
C:\ChibiStudio\workspace26\cbike/../../uGFX/src/gfile/gfile_fatfs_diskio_chibios.c:51: undefined reference to `MMCD1'
.build/obj/GFXLIB/src/gfile/gfile_fatfs_diskio_chibios.o: In function `disk_status':
C:\ChibiStudio\workspace26\cbike/../../uGFX/src/gfile/gfile_fatfs_diskio_chibios.c:86: undefined reference to `MMCD1'
C:\ChibiStudio\workspace26\cbike/../../uGFX/src/gfile/gfile_fatfs_diskio_chibios.c:86: undefined reference to `MMCD1'
.build/obj/GFXLIB/src/gfile/gfile_fatfs_diskio_chibios.o: In function `disk_read':
C:\ChibiStudio\workspace26\cbike/../../uGFX/src/gfile/gfile_fatfs_diskio_chibios.c:120: undefined reference to `MMCD1'
.build/obj/GFXLIB/src/gfile/gfile_fatfs_diskio_chibios.o:C:\ChibiStudio\workspace26\cbike/../../uGFX/src/gfile/gfile_fatfs_diskio_chibios.c:120: more undefined references to `MMCD1' follow
collect2.exe: error: ld returned 1 exit status
make: *** [.build/cbike.elf] Error 1

any hints for me?
 

kind regards

cheater

Link to comment
Share on other sites

8 minutes ago, cheater said:

Hi Joel, if  #define GFX_USE_GTIMER  TRUE is missing, i got the error just out of the box.

We will investigate - this shouldn't happen. The GAUDIO module is supposed to automatically enable the GTIMER module and just showing a compilation warning.

 

8 minutes ago, cheater said:

any hints for me?

The file /src/gfile/gfile_fatfs_diskio_chibios.c implements a default disk interface that works with most ChibiOS/RT setups. You might need to modify it to your needs in case of you are using other card interfaces.
You will still have to enable all the required stuff in ChibiOS/RT itself (halconf.h and mcuconf.h files). µGFX can't enable the MMC or SDIO interfaces and other required stuff for you in the ChibiOS/RT files.
We strongly recommend getting your SD-Card up and running in a bare ChibiOS/RT project before you slap µGFX on top of it. That's way easier to debug. As soon as your SD-Card is working with ChibiOS/RT itself it will most likely just work out of the box with the GFILE module of µGFX.

I hope that helps :)

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