Jump to content

newbornsun

Members
  • Posts

    8
  • Joined

  • Last visited

  1. Thanks for the help Joel! I had not set SCL to opendrain. Did the trick. Thanks again, Alex
  2. Hello, I am having some issues with I2C drivers in ChibiStudio. This might be unrelated to uGFX but thought someone might know whats going on. In halconf.h I have defined "HAL_USE_I2C" as TRUE, however, when I checkout i2c_lld.h in os/hal/platforms/stm32/i2cv1 , the part under "#if HAL_USE_I2C" is grayed out indicating that that statement is not true (see picture). WHy is this the case if I have defined in halconf.h?? I am using logic analyzer and there is no action on the SCL line, just solid high when running the following code: txbuf[0] = 0x00; /* register address */ i2cAcquireBus(&I2CD1); status = i2cMasterTransmitTimeout(&I2CD1, adxl345_addr, txbuf, 1, rxbuf, 1, tmo); i2cReleaseBus(&I2CD1); I am thinking it has to do with the above observation. Any ideas?
  3. Hi, I figured out the problem. Had to set OPT_LINK_OPTIMIZE = no for some reason... Took out -u chThdExit and works like a charm. Thanks for the help.
  4. Hi thanks for the reply. I believe it is the one with ILI9341, as listed on the website. Is there any way to deterministically check? Haven't seen a Mikromedia STM32 M4 with a different driver... Also, I should note, that I was only able to compile the above example by including the following in my makefile: LDFLAGS = -u chThdExit Otherwise wont compile and have linking issues as mentioned in a different thread.
  5. 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
  6. 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?
  7. Perhaps I should include my console output: 11:41:09 **** Build of configuration Default for project Mikromedia-example **** make -j4 all . C Compiler Options.... Compiling ../../uGFX/src/gfx.c Compiling ../../uGFX/src/gos/gos_chibios.c arm-none-eabi-gcc -c -ggdb -O1 -mcpu=cortex-m4 -falign-functions=16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm -ffunction-sections -fdata-sections -fno-common -flto -MMD -MP -MF .build/dep/fakethumbfile.o.d -I. -I../../uGFX -I../../uGFX/3rdparty/tinygl-0.4-ugfx/include -I../../uGFX/boards/base/Mikromedia-STM32-M4-ILI9341 -I../../uGFX/drivers/gdisp/ILI9341 -I../../uGFX/drivers/gaudio/vs1053 -I../../uGFX/demos/applications/notepad -I../../chibios26/os/ports/common/ARMCMx/CMSIS/include -I../../chibios26/os/ports/common/ARMCMx -I../../chibios26/os/ports/GCC/ARMCMx -I../../chibios26/os/ports/GCC/ARMCMx/STM32F4xx -I../../chibios26/os/kernel/include -I../../chibios26/os/hal/include -I../../chibios26/os/hal/platforms/STM32F4xx -I../../chibios26/os/hal/platforms/STM32 -I../../chibios26/os/hal/platforms/STM32/GPIOv2 -I../../chibios26/os/hal/platforms/STM32/I2Cv1 -I../../chibios26/os/hal/platforms/STM32/OTGv1 -I../../chibios26/os/hal/platforms/STM32/RTCv2 -I../../chibios26/os/hal/platforms/STM32/SPIv1 -I../../chibios26/os/hal/platforms/STM32/TIMv1 -I../../chibios26/os/hal/platforms/STM32/USARTv1 -I../../uGFX/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board -DGFX_USE_OS_CHIBIOS=TRUE -DGFX_USE_OS_CHIBIOS=TRUE -DCORTEX_USE_FPU=TRUE -DUSE_FPU=hard -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB fakethumbfile.c -o .build/obj/fakethumbfile.o . Linker Options........ Compiling ../../uGFX/src/gos/gos_freertos.c arm-none-eabi-gcc -u chThdExit -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 -Wl,--gc-sections -T../../chibios26/os/ports/GCC/ARMCMx/STM32F4xx/ld/STM32F407xG.ld -lm .build/obj/fakethumbfile.o -o .build/Mikromedia-example.elf In file included from ../../uGFX/src/../gfx.h:185:0, from ../../uGFX/src/gfx.c:16: ../../uGFX/src/../src/gdisp/gdisp_rules.h:65:6: warning: #warning "GDISP: GDISP_NEED_ANTIALIAS has been set but your hardware does not support reading back pixels. Anti-aliasing will only occur for filled characters." [-Wcpp] #warning "GDISP: GDISP_NEED_ANTIALIAS has been set but your hardware does not support reading back pixels. Anti-aliasing will only occur for filled characters." ^ . Compiling ../../uGFX/src/gos/gos_win32.c Compiling ../../uGFX/src/gos/gos_linux.c Compiling ../../uGFX/src/gos/gos_osx.c ... Compiling ../../chibios26/os/hal/platforms/STM32/TIMv1/pwm_lld.c Compiling ../../chibios26/os/hal/platforms/STM32/USARTv1/serial_lld.c Compiling ../../chibios26/os/hal/platforms/STM32/USARTv1/uart_lld.c Compiling ../../uGFX/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/board.c Compiling ../../uGFX/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c Linking .build/Mikromedia-example.elf Creating .build/Mikromedia-example.hex Creating .build/Mikromedia-example.bin Creating .build/Mikromedia-example.dmp . text data bss dec hex filename 26920 0 6036 32956 80bc .build/Mikromedia-example.elf 11:41:20 Build Finished (took 11s.638ms)
  8. Hello, I am attempting to compile and flash a uGFX Mikromedia-STM32-M4-ILI9341 example program to my Mikromedia devboard. I am able to successfully compile and therefore create a .hex file in ChibiStudio using the tetris uGFX example file (by setting GFXDEMO = games/tetris in the makefile). As noted, this all compiles fine and dandy, however, when I try to flash the .hex file using ST-Link utility or other .hex flasher, it works, the board successfully flashes, however, only a blank white screen appears upon startup of the dev board. I am wondering if you might happen to know why this is the case or if you can provide me with further assistance. Thank you!
×
×
  • Create New...