Sinalco94 Posted August 23, 2017 Report Share Posted August 23, 2017 Hello, I have got a question. My Project based on ugfx with ChibiOS runs on an STM32F407VG with the Embest Base Board. I was able to make it run. But now (I didn't changed anything in my Project) it returns an Error when I compile it with ChibiStudio. It returns following error: .build/obj/GFXLIB/src/gfile/gfile.o:(.data+0x0): undefined reference to `FsROMVMT' I couldn't find anything on google about this error. So maybe someone can help me? Another question is about my Linker Options: arm-none-eabi-gcc -Wl,--defsym=__process_stack_size__=0x0F00 -Wl,--defsym=__main_stack_size__=0x0F00 -Wl,--defsym=__process_stack_size__=0x400 -Wl,--defsym=__main_stack_size__=0x400 -mcpu=cortex-m4 -falign-functions=16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -nostartfiles -mthumb -T../../chibios26/os/ports/GCC/ARMCMx/STM32F4xx/ld/STM32F407xG.ld -lm .build/obj/fakethumbfile.o -o .build/PowerSupply.elf . The question here is? Why is the process and main stack size declared two times? I declared it in my make file with 0x0F00, you can see it below #Makefile für UGFX Embest-STM32-DMSTF4BB #------------------------------------------------------------------------------ # Haupteinstellungen # # Einstellungen # Unter $(GFXLIB)/tools/gmake_scripts/readme.txt Liste der Variablen OPT_OS = chibios OPT_THUMB = yes OPT_LINK_OPTIMIZE = no OPT_CPU = stm32m4 # uGFX Einstellungen # Unter $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk Liste der Variablen GFXLIB = ../../ugfx GFXBOARD = Embest-STM32-DMSTF4BB GFXDEMO = modules/gdisp/basics # ChibiOS Einstellungen ifeq ($(OPT_OS),chibios) # Unter $(GFXLIB)/tools/gmake_scripts/os_chibios_x.mk Liste der Variablen CHIBIOS = ../../chibios26 CHIBIOS_VERSION = 2 CHIBIOS_BOARD = CHIBIOS_PLATFORM = STM32F4xx CHIBIOS_PORT = GCC/ARMCMx/STM32F4xx CHIBIOS_LDSCRIPT = STM32F407xG.ld endif ############################################################################################## # Weiteres für's Projekt # ARCH = arm-none-eabi- SRCFLAGS = -ggdb -O2 CFLAGS = CXXFLAGS = -fno-rtti ASFLAGS = LDFLAGS = -Wl,--defsym=__process_stack_size__=0x0F00 -Wl,--defsym=__main_stack_size__=0x0F00 SRC = OBJS = DEFS = LIBS = INCPATH = LIBPATH = LDSCRIPT = #------------------------------------------------------------------------------ # Includes immer am Ende einbinden # 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 # *** Ende *** I would be very happy if anyone can help me Thank you. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted August 23, 2017 Report Share Posted August 23, 2017 Regarding the build error: Did you perform a clean build? Regarding the linker options: The top-level makefile provided by µGFX that you're using comes with an entire API that is documented in /tools/gmake_scripts/readme.txt. Furthermore, the ChibiOS makefiles that are being included by the top-level one if OPT_OS = chibios feature some more chibios specific options which are also documented: # See readme.txt for the make API # Requirements: # # CHIBIOS The location of the ChibiOS code eg. CHIBIOS = ../chibios # CHIBIOS_PLATFORM The name of the ChibiOS platform eg. CHIBIOS_PLATFORM = AT91SAM7 # CHIBIOS_PORT The name of the ChibiOS port eg. CHIBIOS_PORT = GCC/ARM/AT91SAM7 # # Optional: # # CHIBIOS_LDSCRIPT The name of the loader script eg. CHIBIOS_LDSCRIPT = AT91SAM7X256.ld # CHIBIOS_BOARD The name of the ChibiOS board eg. CHIBIOS_BOARD = OLIMEX_SAM7_EX256 - if not specified you must include equivalent code yourself # CHIBIOS_VERSION Which version of ChibiOS is this (2 or 3) - default is 3 # CHIBIOS_STM32LIB Use the STM32 library source for drivers instead of native drivers (yes or no) - default no # CHIBIOS_PROCESS_STACKSIZE Size of the ChibiOS process stack. Only useful if the link script supports it - default is 0x400 # CHIBIOS_EXCEPTIONS_STACKSIZE Size of the ChibiOS exceptopms stack. Only useful if the link script supports it - default is 0x400 # As you can see, there are makefile variables for the stack sizes. You're adding "plain" variables via the LDFLAGS variable. Without remembering the details I'm pretty sure that they are just being appended which would explain the behavior that you're experiencing. Try using the proper variables documented above. Link to comment Share on other sites More sharing options...
Sinalco94 Posted August 23, 2017 Author Report Share Posted August 23, 2017 (edited) Ok, Thanks. I could solve the build Error. I did the build clean before, but that didn't helped. So I did a full chip eraese. That worked. For the stacksize problem: Do I understand this right that I have to add the options Chibios_process_stacksize and exceptions_stacksize to my makefile and the option 'LDFLAGS' should be empty? Edited August 23, 2017 by Sinalco94 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now