Jump to content

jithurbide

Members
  • Posts

    8
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. You are right ! I tested with just a spiStop() before all my spiStart() and now it's working. Thank's a lot. Julien
  2. Hello Tectu, Here are all the tests I have do now to be sure ... A) I create a file toto.txt on my computer and save it on the SD. I do a simple soft that read the file and display it on the screen. -> working correctly. B) I create a basis soft reading the allwrong.wav from ROMFS. -> working also like a charm C) Change the basis soft. Now I'm reading the SD card. I see that my soft read the file correctly (do some chprintf for debug). But it's seems that the audio part is not init correctly. I don't know how the audio driver is coding. But, I know the mikromedia card share the spi3 for audio and sd card. May the problem come from here. But, I can't find any solution. I try to do a spiStart() all time I change from accessing vs1053 codec and file without success. Have you any idea ? Julien
  3. Hello, I try to run a simple mp3 player. To do it, I first try to run the play-vs1053 demo with success. Secondly, I try to run my own soft (without the demo part) with success. Now I try to run the wav file from an SD card. We I use romfs, I can play the wav but when I try to read the file from the Sd I have no sound. I know that the SD card is reading because the file size is correct but there is no sound. I can't find why. I attached my code then you can see exactly what I do. I don't know why is not working. Coud you help me ? Julien MikroMedia-Basis.zip
  4. Hello, Just to inform you it's finally working!!! I successfully compile, download and run a demo on my board with chibistudio. Did you have any possibility to open me your wiki. I will do a step by step tutorial on how to use chibistudio. If not I will do it on my web server and provide here a link. I really need to run my own chibios on this board and I'll try to write all the step I do during my learning step. I will try also to provide you some patch because I modify some one step after other .... I just need one more information. I try to compile tetris and also bubbles examples. When I compile, I have some error message regards math function (like round,sinf and sqrt) . Did you know if I can do something to correct this ?
  5. Thanks for your answer. When you say openocd use is own driver, where I can find it? I try to find on opencd the driver and dont fint it. That the reason I intall the original one. Could you tell me if it is possible to do a debug session with the st-linkv2 mikroprog adaptor? I have now sucessfuly compile and transfer a simple program. But my screen stay white. I try to find witch model I use but I cant find it. Did you know how I can check I use correct board (with the correct screen)? Did someone use chibistudio? i have one issue with it. When I transfer the efl file, chibistudio tell me that he cant find source file and seems to stop. I dont have many time to test it, but I also try to use the USB as a serial port to be sure the soft is running. I still have an issue during the compilation... I cant really tell is the soft is running or not in my board. I know the soft was transfering because first I transfer a demo from mikroe. And after i compile/ download my soft the screen change to white.
  6. Ok, then I try today with chibios2. Now, I can compile my program. But. when I want to load the hex file to the board with openocd it doesn't work. I use the config file on the chibiosv2 folder. And I use the official st-linkv2. Did you have any idea why ... Open On-Chip Debugger 0.9.0-dev-00268-ga9c90a0 (2015-02-08-10:38) Licensed under GNU GPL v2 For bug reports, read http://openocd.sourceforge.net/doc/doxygen/bugs.html ##### Loading debugger... Warn : Interface already configured, ignoring Error: already specified hl_layout stlink ##### Loading CPU... WARNING: target/stm32f4x_stlink.cfg is deprecated, please switch to target/stm32f4x.cfg Error: session transport was not selected. Use 'transport select ' Info : session transport was not selected, defaulting to JTAG Error: Debug adapter doesn't support 'jtag' transport Runtime Error: embedded:startup.tcl:20: in procedure 'script' at file "embedded:startup.tcl", line 58 at file "C:\ChibiStudio\ugfx\boards\base\Mikromedia-STM32-M4-ILI9341\example_chibios_2.x\openocd.cfg", line 35 at file "C:/ChibiStudio/tools/openocd//scripts/target/stm32f4x_stlink.cfg", line 2 at file "C:/ChibiStudio/tools/openocd//scripts/target/stm32f4x.cfg", line 6 in procedure 'transport' called at file "C:/ChibiStudio/tools/openocd//scripts/target/swj-dp.tcl", line 23 in procedure 'ocd_bouncer' at file "embedded:startup.tcl", line 20
  7. Hello, Thanks for your answer. I have the mikromedia stm32f4 board. I still have some issue when I use only your files. First the file : chibios3\os\rt\ports\ARMCMx\compilers\GCC\mk\port_stm32f4xx.mk is not existing any more. I just create it (by coping the port_v7m.mk) but after that : ../../ChibiOS3/os/rt/ports/ARMCMx/chcore.h:70:22: fatal error: cmparams.h: No such file or directory Could you please tell me witch version of chibios3 you have using ? I'll download it and try with it. Julien
  8. Hello, I'm trying to use ugfx with chibios on mikromedia stm32 board. I can't compile a simple program with chibistudio. Can somebody help me? I setup a new project based on the rt-stm32f407-discovery. I copy the last ugfx code source on c:\chibistudio\ugfx I use the workspace3. I modified my Makefile like that : ############################################################################## # Build global options # NOTE: Can be overridden externally. # # Compiler options here. ifeq ($(USE_OPT),) # Replace -O0 with -O2 for a production build. -O2 just messes with the debugger. USE_OPT = -O0 -g -fomit-frame-pointer -falign-functions=16 endif # C specific options here (added to USE_OPT). ifeq ($(USE_COPT),) USE_COPT = endif # C++ specific options here (added to USE_OPT). ifeq ($(USE_CPPOPT),) USE_CPPOPT = -fno-rtti endif # Enable this if you want the linker to remove unused code and data ifeq ($(USE_LINK_GC),) USE_LINK_GC = yes endif # Linker extra options here. ifeq ($(USE_LDOPT),) USE_LDOPT = endif # Enable this if you want link time optimizations (LTO) ifeq ($(USE_LTO),) ### disable as can cause segfault USE_LTO = no endif # If enabled, this option allows to compile the application in THUMB mode. ifeq ($(USE_THUMB),) USE_THUMB = yes endif # Enable this if you want to see the full log while compiling. ifeq ($(USE_VERBOSE_COMPILE),) USE_VERBOSE_COMPILE = no endif # # Build global options ############################################################################## ############################################################################### # Architecture or project specific options # # Stack size to be allocated to the Cortex-M process stack. This stack is # the stack used by the main() thread. ifeq ($(USE_PROCESS_STACKSIZE),) USE_PROCESS_STACKSIZE = 0x400 endif # Stack size to the allocated to the Cortex-M main/exceptions stack. This # stack is used for processing interrupts and exceptions. ifeq ($(USE_EXCEPTIONS_STACKSIZE),) USE_EXCEPTIONS_STACKSIZE = 0x400 endif # Enables the use of FPU on Cortex-M4 (no, softfp, hard). ifeq ($(USE_FPU),) USE_FPU = no endif # # Architecture or project specific options ############################################################################## ############################################################################## # Project, sources and paths # SW = .. # Define project name here PROJECT = ch # Imported source files and paths CHIBIOS = ../../chibios3 GFXLIB = ../../ugfx #include $(CHIBIOS)/boards/MIKROMEDIA_STM32_M4/board.mk include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk # Not a standard ChibiOS supported board include $(CHIBIOS)/os/hal/hal.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk include $(GFXLIB)/boards/base/Mikromedia-STM32-M4-ILI9341/board.mk include $(CHIBIOS)/os/hal/osal/rt/osal.mk include $(CHIBIOS)/os/rt/rt.mk include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk include $(CHIBIOS)/test/rt/test.mk LDSCRIPT= $(PORTLD)/STM32F407xG.ld # Imported source files and paths for uGFX include $(GFXLIB)/boards/base/Mikromedia-STM32-M4-ILI9341/board.mk include $(GFXLIB)/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/board.mk # The replacement ChibiOS board files include $(GFXLIB)/gfx.mk # Where is our source code - alter these for your project. # Either just include the demo makefile or add your own definitions include $(GFXLIB)/demos/modules/gdisp/basics/demo.mk #MYFILES = my-project-directory #MYCSRC = $(MYFILES)/main.c #MYDEFS = # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. CSRC = $(STARTUPSRC) \ $(KERNSRC) \ $(PORTSRC) \ $(OSALSRC) \ $(HALSRC) \ $(PLATFORMSRC) \ $(BOARDSRC) \ $(TESTSRC) \ main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global # setting. CPPSRC = # C sources to be compiled in ARM mode regardless of the global setting. # NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler # option that results in lower performance and larger code size. ACSRC = # C++ sources to be compiled in ARM mode regardless of the global setting. # NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler # option that results in lower performance and larger code size. ACPPSRC = # C sources to be compiled in THUMB mode regardless of the global setting. # NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler # option that results in lower performance and larger code size. TCSRC = # C sources to be compiled in THUMB mode regardless of the global setting. # NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler # option that results in lower performance and larger code size. TCPPSRC = # List ASM source files here ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ $(CHIBIOS)/os/various # # Project, sources and paths ############################################################################## ############################################################################## # Compiler settings # MCU = cortex-m4 #TRGT = arm-elf- TRGT = arm-none-eabi- CC = $(TRGT)gcc CPPC = $(TRGT)g++ # Enable loading with g++ only if you need C++ runtime support. # NOTE: You can use C++ even without C++ support if you are careful. C++ # runtime support makes code size explode. LD = $(TRGT)gcc #LD = $(TRGT)g++ CP = $(TRGT)objcopy AS = $(TRGT)gcc -x assembler-with-cpp OD = $(TRGT)objdump SZ = $(TRGT)size HEX = $(CP) -O ihex BIN = $(CP) -O binary # ARM-specific options here AOPT = # THUMB-specific options here TOPT = -mthumb -DTHUMB # Define C warning options here CWARN = -Wall -Wextra -Wstrict-prototypes # Define C++ warning options here CPPWARN = -Wall -Wextra # # Compiler settings ############################################################################## ############################################################################## # Start of default section # # List all default C defines here, like -D_DEBUG=1 DDEFS = $(GFXDEFS) # List all default ASM defines here, like -D_DEBUG=1 DADEFS = # List all default directories to look for include files here DINCDIR = # List the default directory to look for the libraries here DLIBDIR = # List all default libraries here DLIBS = # # End of default section ############################################################################## ############################################################################## # Start of user section # # List all user C define here, like -D_DEBUG=1 UDEFS = # Define ASM defines here UADEFS = # List all user directories here UINCDIR = # List the user directory to look for the libraries here ULIBDIR = # List all user libraries here ULIBS = # # End of user defines ############################################################################## RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC include $(RULESPATH)/rules.mk please find the error I have : ------------------------------------------------------------------------ In file included from ../../chibios3/os/hal/include/hal.h:32:0, from ../../chibios3/os/hal/src/hal.c:25: ../../chibios3/os/hal/ports/STM32/STM32F4xx/hal_lld.h:1087:2: error: #error "STM32_PLLVCO outside acceptable range (STM32_PLLVCO_MIN...STM32_PLLVCO_MAX)" ../../chibios3/os/hal/ports/STM32/STM32F4xx/hal_lld.h:1099:2: error: #error "STM32_PLLCLKOUT outside acceptable range (STM32_PLLOUT_MIN...STM32_PLLOUT_MAX)" ../../chibios3/os/hal/ports/STM32/STM32F4xx/hal_lld.h:1119:2: error: #error "STM32_SYSCLK above maximum rated frequency (STM32_SYSCLK_MAX)" ../../chibios3/os/hal/ports/STM32/STM32F4xx/hal_lld.h:1198:2: error: #error "STM32_HCLK exceeding maximum frequency (STM32_SYSCLK_MAX)" ../../chibios3/os/hal/ports/STM32/STM32F4xx/hal_lld.h:1222:2: error: #error "STM32_PCLK1 exceeding maximum frequency (STM32_PCLK1_MAX)" ../../chibios3/os/hal/ports/STM32/STM32F4xx/hal_lld.h:1246:2: error: #error "STM32_PCLK2 exceeding maximum frequency (STM32_PCLK2_MAX)" In file included from ../../chibios3/os/hal/include/usb.h:362:0, from ../../chibios3/os/hal/include/hal.h:62, from ../../chibios3/os/hal/src/hal.c:25: ../../chibios3/os/hal/ports/STM32/LLD/OTGv1/usb_lld.h:188:2: error: #error "the USB OTG driver requires a 48MHz clock" make: *** [build/obj/hal.o] Error 1 make: *** Waiting for unfinished jobs.... Compiling hal_queues.c In file included from ../../chibios3/os/hal/include/hal.h:32:0, from ../../chibios3/os/hal/src/hal_queues.c:38: ../../chibios3/os/hal/ports/STM32/STM32F4xx/hal_lld.h:1087:2: error: #error "STM32_PLLVCO outside acceptable range (STM32_PLLVCO_MIN...STM32_PLLVCO_MAX)" ../../chibios3/os/hal/ports/STM32/STM32F4xx/hal_lld.h:1099:2: error: #error "STM32_PLLCLKOUT outside acceptable range (STM32_PLLOUT_MIN...STM32_PLLOUT_MAX)" ../../chibios3/os/hal/ports/STM32/STM32F4xx/hal_lld.h:1119:2: error: #error "STM32_SYSCLK above maximum rated frequency (STM32_SYSCLK_MAX)" ../../chibios3/os/hal/ports/STM32/STM32F4xx/hal_lld.h:1198:2: error: #error "STM32_HCLK exceeding maximum frequency (STM32_SYSCLK_MAX)" ../../chibios3/os/hal/ports/STM32/STM32F4xx/hal_lld.h:1222:2: error: #error "STM32_PCLK1 exceeding maximum frequency (STM32_PCLK1_MAX)" ../../chibios3/os/hal/ports/STM32/STM32F4xx/hal_lld.h:1246:2: error: #error "STM32_PCLK2 exceeding maximum frequency (STM32_PCLK2_MAX)" In file included from ../../chibios3/os/hal/include/usb.h:362:0, from ../../chibios3/os/hal/include/hal.h:62, from ../../chibios3/os/hal/src/hal_queues.c:38: ../../chibios3/os/hal/ports/STM32/LLD/OTGv1/usb_lld.h:188:2: error: #error "the USB OTG driver requires a 48MHz clock" make: *** [build/obj/hal_queues.o] Error 1 -------------------------------------------------------------------------------------------------------------------------------------------------------- If I modify the board file provided form : #if !defined(STM32_HSECLK) #define STM32_HSECLK 16000000 #endif to : #if !defined(STM32_HSECLK) #define STM32_HSECLK 8000000U #endif but now I have this : ------------------------------------------------------------------------------------------------------------------------------------------------------------- Compiling flash_memory.c ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c:14:1: error: unknown type name 'SPIConfig' ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c:16:3: warning: excess elements in scalar initializer [enabled by default] ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c:16:3: warning: (near initialization for 'flash_spicfg') [enabled by default] ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c:17:3: warning: excess elements in scalar initializer [enabled by default] ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c:17:3: warning: (near initialization for 'flash_spicfg') [enabled by default] ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c:19:1: warning: excess elements in scalar initializer [enabled by default] ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c:19:1: warning: (near initialization for 'flash_spicfg') [enabled by default] ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c: In function 'flash_is_write_busy': ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c:27:3: warning: implicit declaration of function 'spiAcquireBus' [-Wimplicit-function-declaration] ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c:27:18: error: 'SPID3' undeclared (first use in this function) ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c:27:18: note: each undeclared identifier is reported only once for each function it appears in ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c:28:3: warning: implicit declaration of function 'spiStart' [-Wimplicit-function-declaration] ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c:29:3: warning: implicit declaration of function 'spiSelect' [-Wimplicit-function-declaration] ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c:30:3: warning: implicit declaration of function 'spiSend' [-Wimplicit-function-declaration] ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c:31:3: warning: implicit declaration of function 'spiReceive' [-Wimplicit-function-declaration] ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c:32:3: warning: implicit declaration of function 'spiUnselect' [-Wimplicit-function-declaration] ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c:33:3: warning: implicit declaration of function 'spiReleaseBus' [-Wimplicit-function-declaration] ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c: In function 'flash_write_enable': ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c:39:18: error: 'SPID3' undeclared (first use in this function) ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c: In function 'flash_sector_erase': ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c:56:18: error: 'SPID3' undeclared (first use in this function) ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c: In function 'flash_read': ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c:74:18: error: 'SPID3' undeclared (first use in this function) ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c: In function 'flash_write': ../../ugfx/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c:93:18: error: 'SPID3' undeclared (first use in this function) make: *** [build/obj/flash_memory.o] Error 1 make: *** Waiting for unfinished jobs.... ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Can someone help me configuring chibios/ugfx woth mikromedia stm32 board ? Is there anyone successfully compile ugfx on this board? Regards, Julien
×
×
  • Create New...