November 23, 2024, 05:33:08 PM

Problem with FATFS project on STM32-P103

Started by redon, April 24, 2013, 08:05:14 PM

Previous topic - Next topic

redon

Hello ,

I try to program a STM32-P103 board on Windows .
I use Olimex ARM-USB-OCD-H device + OpenODS ( eclipse + OpenOCD  + Yagarto ... ) .

all  function well , I tested with STM32-P103_blink_FLASH project example existing on OpenODS .

I wont run FAT-Module on STM32-P103 board , I use demo project FATFS from http://elm-chan.org

the project is downloaded from here :

FAT-Module with STM32 SPI

http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/arm_memcards/index.html#chanfat_stm32

When I run the project, it does not function. In the board, the former project starts. like if the new project has not been sent.
the project is builded correctly but when I run the project on the board it does not function ,


run log on eclipse :

http://pastebin.com/dehzZZjV

debugger log :

http://pastebin.com/CrMnvVQ1

builder log on eclipse :

http://pastebin.com/Aq9gjT4p

main.c :

http://pastebin.com/6L2g8DW9

my makefile :
http://pastebin.com/baPPeLUL

I added .


.
.
BOARD   = STM32_P103
.
.


my platform_config.h :

http://pastebin.com/CgyRbTjp

I added .



#if !defined (USE_STM3210B_EVAL) && !defined (USE_STM3210E_EVAL) && \
    !defined (USE_EK_STM32F) && !defined(USE_MINI_STM32) && !defined(USE_STM32_P103)
.
.
.
.
.

#elif defined(USE_STM32_P103)
// Olimex STM32-P103 not tested!
#define GPIOx                     GPIOA
#define RCC_APB2Periph_GPIOx      RCC_APB2Periph_GPIOA
#define GPIO_TxPin                GPIO_Pin_2
#define GPIO_RxPin                GPIO_Pin_3
#define GPIO_LED                  GPIOC
#define RCC_APB2Periph_GPIO_LED   RCC_APB2Periph_GPIOC
#define GPIO_Pin_LED1             GPIO_Pin_0
#define GPIO_Pin_LED2             GPIO_Pin_1
#define GPIO_Pin_LED3             GPIO_Pin_2
#define GPIO_Pin_LED4             GPIO_Pin_3
#define GPIO_Pin_Stat             GPIO_Pin_12



maria_olimex

Hello redon,

your compilation and debugger are all fine, the only problem is that your main.bin file is created in a subfolder, while the debugger searches for it in the main project folder. Change your makefile so that it creates just main.bin rather than ./FLASH_RUN/main.bin and the debug configuration will find the file (right now it says can't open).

Best Regards,
Maria/OLIMEX
Software developer at Olimex

redon

Thanks maria_olimex

the problem is resolved, the debugging works fine now ;)

I can now control stat led  . but now I have problem with serial config USART2 !!  :(


main.c :


http://pastebin.com/dfzPHsPb




redon