Jump to content

Cannot Compile Mikromedia Example (ChibiStudio), Linker Issue


newbornsun

Recommended Posts

MAKEFILE:

# 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-STM32-M4-ILI9341
    GFXDEMO                    = modules/gdisp/basics

# 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/$(GFXBOARD)/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
# *** EOF ***


####################################################################################################################################################################################################################################################################################################################################################################################



CONSOLE OUTPUT:

Linking .build/mikromedia.elf
`chThdExit' referenced in section `.text' of C:\Users\Alex\AppData\Local\Temp\cc80uPp4.ltrans2.ltrans.o: defined in discarded section `.text' of .build/obj/CHIBIOS/os/kernel/src/chthreads.o (symbol from plugin)
collect2.exe: error: ld returned 1 exit status
make: *** [.build/mikromedia.elf] Error 1


 

NOTES:

I can fix this error by using LDFLAGS = -u chThdExit in the makefile, however this compiled and flashed program just gives me blank white screen on my Mikromedia STM32 M4 dev board..

 

Any suggestions?

Edited by Joel Bodenmann
Using code boxes
Link to comment
Share on other sites

I am using chibios_v2.x example under ChibiStudio\ugfx\boards\base\Mikromedia-STM32-M4-ILI9341\example_chibios_2.x and I in the makefile, I am using CHIBI_VERSION 2 and CHIBIOS_VERSION        = 2   and  CHIBIOS                = ../../chibios26  which points to the folder under ChibiStudio --> chibios26.

 

Therefore I believe everything is set to being version 2.6. I have tried mixing up the versions and CHIBIOS point folder and nothing compiles

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