dswl
Members-
Posts
7 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
I am trying to get one of the demos to work on OS X. The object files are finally linked, but can not be successfully transformed from an ELF into an executable file. objcopy fails with Creating .build/demotest.hex objcopy: .build/demotest.hex: address 0x00000001000016b0 out of range for Intel Hex file objcopy:.build/demotest.hex: Bad value My Makefile is ugfx/boards/base/OSX/example with GFXLIB set, but OPT_OS is set to osx64 as suggested in this post. As objcopy does not ship with OS X by default, I installed it via homebrew (GNU objcopy 2.29) as it seemed to be required by make. I use uGFX 2.7 on OS X 10.11.6. I appreciate any help. Regards
-
Thank you for pointing this out. The GFXDEMO variable was totally out of my view...
-
Thank you very much. This solved this problem. To my defense, I'm quite new to make. Unfortunately my series of problems with compiling this demo doesn’t stop. Could you please have a look at the follow up problem I described here?
-
I’m still trying to get one of the demos to work on OS X. Unfortunately I get a duplicate symbol error, but strangely for just one file. duplicate symbol _main in: .build/obj/GFXLIB/demos/modules/gdisp/basics/main.o ld: 1 duplicate symbol for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [.build/demotest.elf] Error 1 The linking ultimately fails. There is no other file than the modified example makefile from `ugfx/boards/base/OSX/example` in the project folder: No second main.c or any other custom file I wrote containing the main symbol. The C compiler options: C Compiler Options.... gcc -c -L/usr/local/lib -lSDL2 -I/usr/local/include/SDL2 -D_THREAD_SAFE -I/usr/local/include/SDL2 -D_THREAD_SAFE -ggdb -O0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.11 -m64 -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm -MMD -MP -MF .build/dep/fakefile.o.d -I. -I../ugfx/demos/modules/gdisp/basics -I../ugfx -I../ugfx/3rdparty/tinygl-0.4-ugfx/include -I../ugfx/boards/base/OSX -I../ugfx/drivers/multiple/SDL -I../ugfx/demos/modules/gdisp/basics -DGFX_USE_OS_OSX=TRUE -DGFX_OS_PRE_INIT_FUNCTION=sdl_driver_init fakefile.c -o .build/obj/fakefile.o The linker command: Linker Options........ gcc -L/usr/local/lib -lSDL2 -I/usr/local/include/SDL2 -D_THREAD_SAFE -pthread -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.11 -m64 -nostartfiles .build/obj/fakefile.o -o .build/demotest.elf I modified the example makefile from `ugfx/boards/base/OSX/example` as follows: # 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 = osx64 OPT_LINK_OPTIMIZE = no # uGFX settings # See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the list of variables GFXLIB = ../ugfx GFXBOARD = OSX GFXDEMO = modules/gdisp/basics # OSX settings # See $(GFXLIB)/tools/gmake_scripts/os_osx.mk for the list of variables OSX_SDK = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk OSX_ARCH = -mmacosx-version-min=10.11 ############################################################################################## # Set these for your project # ARCH = SRCFLAGS = -ggdb -O0 CFLAGS = `sdl2-config --libs --cflags` CXXFLAGS = ASFLAGS = LDFLAGS = SRC = OBJS = DEFS = LIBS = INCPATH = LIBPATH = ############################################################################################## # These should be at the end # include $(GFXLIB)/demos/modules/gwin/widgets/demo.mk 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 *** I use uGFX 2.7 on OS X 10.11.6. I appreciate any help pointing me out to what I'm doing wrong. Regards
-
Thanks for your kind reply! Removing GFXSRC and GFXINC indeed removed the error, but unfortunately I ran into another problem. As it is unrelated, I created a new thread here: I would appreciate your help.
-
I'm trying to get one of the demos to work on OS X. I followed every step on the "Getting Started" page and created a `os_osx64.mk` file as suggested by inmarket in this post to compile on x64 OS X. Unfortunately ld yields errors about many ignored files that were built for i386 instead of x86_64. ld: warning: ld: warning: ignoring file .build/obj/GFXLIB/src/gfile/gfile_fs_native.o, file was built for i386 which is not the architecture being linked (x86_64): .build/obj/GFXLIB/src/gfile/gfile_fs_native.oignoring file .build/obj/GFXLIB/src/gfile/gfile_fs_ram.o, file was built for i386 which is not the architecture being linked (x86_64): .build/obj/GFXLIB/src/gfile/gfile_fs_ram.old: warning: The linking ultimately fails. The C compiler options (Note the -m64 flag, which should to my understanding prevent the files from being compiled for i386): gcc -c -L/usr/local/lib -lSDL2 -I/usr/local/include/SDL2 -D_THREAD_SAFE -I/usr/local/include/SDL2 -D_THREAD_SAFE -I/usr/local/include/SDL2 -D_THREAD_SAFE -ggdb -O0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.11 -m64 -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm -MMD -MP -MF .build/dep/fakefile.o.d -I. -I../ugfx -I../ugfx/3rdparty/tinygl-0.4-ugfx/include -I../ugfx/boards/base/OSX -I../ugfx/drivers/multiple/SDL -I../ugfx/demos/modules/gdisp/basics -I../ugfx/demos/modules/gdisp/basics -I../ugfx -I../ugfx/3rdparty/tinygl-0.4-ugfx/include -I../ugfx/boards/base/OSX -I../ugfx/drivers/multiple/SDL -I../ugfx/demos/modules/gdisp/basics -DGFX_USE_OS_OSX=TRUE -DGFX_OS_PRE_INIT_FUNCTION=sdl_driver_init -DGFX_USE_OS_OSX=TRUE -DGFX_OS_PRE_INIT_FUNCTION=sdl_driver_init fakefile.c -o .build/obj/fakefile.o The linker command: Linker Options........ gcc -L/usr/local/lib -lSDL2 -I/usr/local/include/SDL2 -D_THREAD_SAFE -L/usr/local/lib -lSDL2 -I/usr/local/include/SDL2 -D_THREAD_SAFE -pthread -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.11 -m64 -nostartfiles .build/obj/fakefile.o -o .build/demotest.elf I modified the example makefile from `ugfx/boards/base/OSX/example` as follows: # 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 = osx64 OPT_LINK_OPTIMIZE = no # uGFX settings # See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the list of variables GFXLIB = ../ugfx GFXBOARD = OSX GFXDEMO = modules/gdisp/basics # OSX settings # See $(GFXLIB)/tools/gmake_scripts/os_osx.mk for the list of variables OSX_SDK = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk OSX_ARCH = -mmacosx-version-min=10.11 ############################################################################################## # Set these for your project # ARCH = SRCFLAGS = -ggdb -O0 CFLAGS = `sdl2-config --libs --cflags` # removed "--libs" flag, because of linker complaint CXXFLAGS = ASFLAGS = LDFLAGS = SRC = OBJS = DEFS = LIBS = INCPATH = LIBPATH = ############################################################################################## # These should be at the end # include $(GFXLIB)/gfx.mk include $(GFXLIB)/demos/modules/gwin/widgets/demo.mk 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 *** I use uGFX 2.7 on OS X 10.11.6. `gfxconf.example.h` is copied to my project folder, renamed to `gfxconf.h` and further untouched. I appreciate any help pointing me out to what I'm doing wrong. Regards
-
Hello, I'm trying to get one of the demos to work on OS X. I followed every step on the "Getting Started" page and created a `os_osx64.mk` file as suggested by inmarket in this post to compile on x64 OS X. The make gives the following error: make: *** No rule to make target `.build/obj/GFXSRC.o', needed by `.build/demotest.elf'. Stop. The C compiler options: C Compiler Options.... gcc -c -L/usr/local/lib -lSDL2 -I/usr/local/include/SDL2 -D_THREAD_SAFE -I/usr/local/include/SDL2 -D_THREAD_SAFE -I/usr/local/include/SDL2 -D_THREAD_SAFE -ggdb -O0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.11 -m64 -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm -MMD -MP -MF .build/dep/fakefile.o.d -I. -IGFXINC -I../ugfx -I../ugfx/3rdparty/tinygl-0.4-ugfx/include -I../ugfx/boards/base/OSX -I../ugfx/drivers/multiple/SDL -I../ugfx/demos/modules/gdisp/basics -I../ugfx/demos/modules/gdisp/basics -I../ugfx -I../ugfx/3rdparty/tinygl-0.4-ugfx/include -I../ugfx/boards/base/OSX -I../ugfx/drivers/multiple/SDL -I../ugfx/demos/modules/gdisp/basics -DGFX_USE_OS_OSX=TRUE -DGFX_OS_PRE_INIT_FUNCTION=sdl_driver_init -DGFX_USE_OS_OSX=TRUE -DGFX_OS_PRE_INIT_FUNCTION=sdl_driver_init fakefile.c -o .build/obj/fakefile.o The linker command: Linker Options........ gcc -L/usr/local/lib -lSDL2 -I/usr/local/include/SDL2 -D_THREAD_SAFE -L/usr/local/lib -lSDL2 -I/usr/local/include/SDL2 -D_THREAD_SAFE -pthread -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.11 -m64 -nostartfiles .build/obj/fakefile.o -o .build/demotest.elf I modified the Makefile from `ugfx/boards/base/OSX` as follows: # 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 = osx64 OPT_LINK_OPTIMIZE = no # uGFX settings # See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the list of variables GFXLIB = ../ugfx GFXBOARD = OSX GFXDEMO = modules/gdisp/basics # OSX settings # See $(GFXLIB)/tools/gmake_scripts/os_osx.mk for the list of variables OSX_SDK = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk OSX_ARCH = -mmacosx-version-min=10.11 ############################################################################################## # Set these for your project # ARCH = SRCFLAGS = -ggdb -O0 CFLAGS = `sdl2-config --libs --cflags` CXXFLAGS = ASFLAGS = LDFLAGS = SRC = GFXSRC OBJS = DEFS = LIBS = INCPATH = GFXINC LIBPATH = ############################################################################################## # These should be at the end # include $(GFXLIB)/gfx.mk include $(GFXLIB)/demos/modules/gwin/widgets/demo.mk 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 *** I use uGFX 2.7 on OS X 10.11.6. `gfxconf.example.h` is copied to my project folder, renamed to `gfxconf.h` and further untouched. I appreciate any help pointing me out to what I'm doing wrong. Regards