EEPROM neden koymamışlar ?

Başlatan muhittin_kaplan, 24 Ocak 2013, 17:37:18

Klein

http://www.st.com/internet/mcu/product/164487.jsp#SOFTWARE_AND_DEVELOPMENT_TOOLS

"Firmware" başlığının altında 2. sırada

proje ağacında bir sorun görünmüyor.  Eğer "eeprom.h" dosyasını "#include" etti isen sorun çıkmaması gerek. 

Mucit23

Hocam Şimdi kodu derlemeye çalışıyorum fakat bana şöyle hatalar veriyor.
.\inc\eeprom.h(73): error:  #20: identifier "uint16_t" is undefined
.\inc\eeprom.h(74): error:  #20: identifier "uint16_t" is undefined
.\inc\eeprom.h(74): error:  #20: identifier "uint16_t" is undefined
.\inc\eeprom.h(74): error:  #20: identifier "uint16_t" is undefined
.\inc\eeprom.h(75): error:  #20: identifier "uint16_t" is undefined
.\inc\eeprom.h(75): error:  #20: identifier "uint16_t" is undefined
.\inc\eeprom.h(75): error:  #20: identifier "uint16_t" is undefined
compiling stm32f10x_it.c...
compiling ks0108.c...
compiling ds18b20.c...
compiling eeprom.c...
.\inc\eeprom.h(73): error:  #20: identifier "uint16_t" is undefined
.\inc\eeprom.h(74): error:  #20: identifier "uint16_t" is undefined
.\inc\eeprom.h(74): error:  #20: identifier "uint16_t" is undefined
.\inc\eeprom.h(74): error:  #20: identifier "uint16_t" is undefined
.\inc\eeprom.h(75): error:  #20: identifier "uint16_t" is undefined
.\inc\eeprom.h(75): error:  #20: identifier "uint16_t" is undefined
.\inc\eeprom.h(75): error:  #20: identifier "uint16_t" is undefined
src\eeprom.c(33): error:  #20: identifier "uint16_t" is undefined
src\eeprom.c(36): error:  #20: identifier "uint16_t" is undefined
src\eeprom.c(36): error:  #20: identifier "uint8_t" is undefined
src\eeprom.c(36): error:  #18: expected a ")"
src\eeprom.c(41): error:  #20: identifier "uint16_t" is undefined
src\eeprom.c(41): error:  #757: "uint8_t" is not a type name
src\eeprom.c(42): error:  #20: identifier "uint16_t" is undefined
src\eeprom.c(42): error:  #20: identifier "uint16_t" is undefined
src\eeprom.c(42): error:  #20: identifier "uint16_t" is undefined
src\eeprom.c(43): error:  #20: identifier "uint16_t" is undefined
src\eeprom.c(43): error:  #20: identifier "uint16_t" is undefined
src\eeprom.c(43): error:  #20: identifier "uint16_t" is undefined
src\eeprom.c(52): error:  #20: identifier "uint16_t" is undefined
src\eeprom.c(54): error:  #20: identifier "uint16_t" is undefined
src\eeprom.c(55): error:  #20: identifier "uint16_t" is undefined
src\eeprom.c(56): error:  #20: identifier "uint16_t" is undefined
src\eeprom.c(57): error:  #20: identifier "int16_t" is undefined
src\eeprom.c(58): error:  #20: identifier "uint16_t" is undefined
src\eeprom.c(61): error:  #20: identifier "__IO" is undefined
src\eeprom.c(61): error:  #18: expected a ")"
src\eeprom.c(61): error:  #20: identifier "uint32_t" is undefined
src\eeprom.c(61): error:  #18: expected a ")"
src\eeprom.c(63): error:  #18: expected a ")"
assembling stm32f10x_vector.s...
Target not created


uint16_t şeklinde bir tanımlama yok diyor. Ben bu şekilde değişken adı nasıl belirlerim?

Erol YILMAZ

typedef ile tanımlarsın fakat bir eksiklik var   tanımlanmış olması lazım bir yerde....

Mucit23

hocam benim kendi programımda yok öyle bir tanımlama. Aslında bu durum keili güncelledikten sonra oldu. Bu tanımlamalar nereden yapılıyor

Klein

"stm32f4xx.h" dosyasını include et garanti olsun.

Mucit23

Hocam derlenmiş kütüphane kullanıyorum.

bu yüzden "stm32f10x_lib.h" eklemem gerekiyor programa.

<stdint.h> programa eklediğimde derleniyor ama yine aynı hataları veriyor.

Klein hocam STM32F107 ile uğraşıyorum. İyice kafam karıştı.  :o
Bu hatayı vermesinin derlenmiş kütüphane kullanmamdanmı kaynaklanıyor. St nin örneğinde böyle yapılmamış. Dediğiniz dosyayı programa dahil ettiğimdede sonuç değişmiyor...

Klein

#36
"stm32fxx.h" veya "stdint.h" header dosyasını ana programda değil , eeprom.h içerisinden include edeceksiniz.  @gerbay belirmişti zaten. 

Hata derlenmiş kütüpkaneden kaynaklanMıyor.  eeprom.c dosyası derlenirken , kaodlarde geçen bazı tanımların bulunamamasından kaynaklanıyor. 

Mucit23

Hocam atladığım biryerler var.
eeprom.h dosyasına dediğiniz gibi <stdint.h> dosyasını eeprom.h dosyasına ekliyorum.

eeprom.h böyle
/**
  ******************************************************************************
  * @file    EEPROM_Emulation/inc/eeprom.h 
  * @author  MCD Application Team
  * @version V3.1.0
  * @date    07/27/2009
  * @brief   This file contains all the functions prototypes for the EEPROM 
  *          emulation firmware library.
  ******************************************************************************
  * @copy
  *
  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  *
  * <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2>
  */


/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __EEPROM_H
#define __EEPROM_H

/* Includes ------------------------------------------------------------------*/
#include <stdint.h>
#include "stm32f10x_lib.h"
/* Exported constants --------------------------------------------------------*/
/* Define the STM32F10Xxx Flash page size depending on the used STM32 device */
#if defined (STM32F10X_LD) || defined (STM32F10X_MD)
  #define PAGE_SIZE  (uint16_t)0x400  /* Page size = 1KByte */
#elif defined (STM32F10X_HD) || defined (STM32F10X_CL)
  #define PAGE_SIZE  (uint16_t)0x800  /* Page size = 2KByte */
#endif

/* EEPROM start address in Flash */
#define EEPROM_START_ADDRESS    ((uint32_t)0x08010000) /* EEPROM emulation start address:
                                                  after 64KByte of used Flash memory */

/* Pages 0 and 1 base and end addresses */
#define PAGE0_BASE_ADDRESS      ((uint32_t)(EEPROM_START_ADDRESS + 0x000))
#define PAGE0_END_ADDRESS       ((uint32_t)(EEPROM_START_ADDRESS + (PAGE_SIZE - 1)))

#define PAGE1_BASE_ADDRESS      ((uint32_t)(EEPROM_START_ADDRESS + PAGE_SIZE))
#define PAGE1_END_ADDRESS       ((uint32_t)(EEPROM_START_ADDRESS + (2 * PAGE_SIZE - 1)))

/* Used Flash pages for EEPROM emulation */
#define PAGE0                   ((uint16_t)0x0000)
#define PAGE1                   ((uint16_t)0x0001)

/* No valid page define */
#define NO_VALID_PAGE           ((uint16_t)0x00AB)

/* Page status definitions */
#define ERASED                  ((uint16_t)0xFFFF)     /* PAGE is empty */
#define RECEIVE_DATA            ((uint16_t)0xEEEE)     /* PAGE is marked to receive data */
#define VALID_PAGE              ((uint16_t)0x0000)     /* PAGE containing valid data */

/* Valid pages in read and write defines */
#define READ_FROM_VALID_PAGE    ((uint8_t)0x00)
#define WRITE_IN_VALID_PAGE     ((uint8_t)0x01)

/* Page full define */
#define PAGE_FULL               ((uint8_t)0x80)

/* Variables' number */
#define NumbOfVar               ((uint8_t)0x03)

/* Exported types ------------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
uint16_t EE_Init(void);
uint16_t EE_ReadVariable(uint16_t VirtAddress, uint16_t* Data);
uint16_t EE_WriteVariable(uint16_t VirtAddress, uint16_t Data);

#endif /* __EEPROM_H */

/******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/


Proje ağacım ise yine aynı. Orada değişen birşey yok.
Aldığım hatalar azalıyor.
Rebuild target 'SST'
compiling main.c...
compiling stm32f10x_it.c...
compiling ks0108.c...
compiling ds18b20.c...
compiling eeprom.c...
src\eeprom.c(61): error:  #20: identifier "__IO" is undefined
src\eeprom.c(61): error:  #18: expected a ")"
src\eeprom.c(63): error:  #18: expected a ")"
src\eeprom.c(63): error:  #20: identifier "PAGE_SIZE" is undefined
src\eeprom.c(114): error:  #18: expected a ")"
src\eeprom.c(205): error:  #18: expected a ")"
src\eeprom.c(283): error:  #20: identifier "PAGE_SIZE" is undefined
src\eeprom.c(292): error:  #20: identifier "__IO" is undefined
src\eeprom.c(292): error:  #18: expected a ")"
src\eeprom.c(292): error:  #18: expected a ")"
src\eeprom.c(298): error:  #18: expected a ")"
src\eeprom.c(373): error:  #20: identifier "PAGE_SIZE" is undefined
src\eeprom.c(393): error:  #20: identifier "__IO" is undefined
src\eeprom.c(393): error:  #18: expected a ")"
src\eeprom.c(396): error:  #18: expected a ")"
src\eeprom.c(396): error:  #20: identifier "PAGE_SIZE" is undefined
src\eeprom.c(476): error:  #20: identifier "PAGE_SIZE" is undefined
src\eeprom.c(485): error:  #20: identifier "__IO" is undefined
src\eeprom.c(485): error:  #18: expected a ")"
src\eeprom.c(485): error:  #18: expected a ")"
src\eeprom.c(537): error:  #20: identifier "PAGE_SIZE" is undefined
src\eeprom.c(542): error:  #20: identifier "PAGE_SIZE" is undefined
assembling stm32f10x_vector.s...
Target not created

Klein

Aslında sorunun çözülmüş ama farkında değilsin.

İlk verdiğin hata mesajlarında  veri tipleri ile ilgilitanımları bulamadığı için "uint16_t" tipine hata veriyordu. "stdint.h" dosyasını include edince  sorunun düzeldi. Şimdi de bu dosyada olmayan bazı tanımları bulamadığı için hata veriyor. 
Bu sorunu yaşama diye "stm32f1xx.h" dosyasını include et  garanti olsun demiştim. ama etmemişsin.

Mucit23

Hocam yok onu include edince hatalar artıyor.

eeprom.h içerisinde şuanda bu ikisi tanımlı

#include <stdint.h>
#include "stm32f10x_lib.h"

bunun dışında "stm32f10x.h"  dosyasını ekleyince bu sefer çakışmalar yaşanıyor sanırım.

Klein

yok. bu kütüphanelerde çakışma olmaz. Çakışma için gerekli kodlar tüm başlıklarda mevcut.  "stm32f1xx.h" dosyasını include ettiğinde hatanın artması, hatanın buradan kaynaklandığı anlamına gelmez.  O durumda verdiği hatalar neler?

"stm32f10x_lib.h" içeriği nedir?

Mucit23

#41
Klein Hocam stm32f10x.h dosyasınıda eeprom.h içerisine include ettiğimde aşağıdaki hataları alıyorum. Çingene mahallesi mübarek

Rebuild target 'SST'
compiling main.c...
C:\Keil\ARM\CMSIS\Include\core_cm3.h(1219): warning:  #47-D: incompatible redefinition of macro "SCS_BASE" (declared at line 687 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\CMSIS\Include\core_cm3.h(1224): warning:  #47-D: incompatible redefinition of macro "SysTick_BASE" (declared at line 689 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\CMSIS\Include\core_cm3.h(1225): warning:  #47-D: incompatible redefinition of macro "NVIC_BASE" (declared at line 690 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\CMSIS\Include\core_cm3.h(1226): warning:  #47-D: incompatible redefinition of macro "SCB_BASE" (declared at line 691 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\CMSIS\Include\core_cm3.h(1229): warning:  #47-D: incompatible redefinition of macro "SCB" (declared at line 935 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\CMSIS\Include\core_cm3.h(1230): warning:  #47-D: incompatible redefinition of macro "SysTick" (declared at line 930 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\CMSIS\Include\core_cm3.h(1231): warning:  #47-D: incompatible redefinition of macro "NVIC" (declared at line 934 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(312): error:  #256: invalid redeclaration of type name "s32" (declared at line 23 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(316): error:  #256: invalid redeclaration of type name "sc32" (declared at line 27 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(320): error:  #256: invalid redeclaration of type name "vs32" (declared at line 31 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(324): error:  #256: invalid redeclaration of type name "vsc32" (declared at line 35 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(328): error:  #256: invalid redeclaration of type name "u32" (declared at line 39 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(332): error:  #256: invalid redeclaration of type name "uc32" (declared at line 43 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(336): error:  #256: invalid redeclaration of type name "vu32" (declared at line 47 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(340): error:  #256: invalid redeclaration of type name "vuc32" (declared at line 51 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(345): error:  #101: "FALSE" has already been declared in the current scope
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(345): error:  #101: "TRUE" has already been declared in the current scope
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(345): error:  #256: invalid redeclaration of type name "bool" (declared at line 55 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(348): error:  #101: "RESET" has already been declared in the current scope
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(348): error:  #101: "SET" has already been declared in the current scope
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(348): error:  #256: invalid redeclaration of type name "FlagStatus" (declared at line 57 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(348): error:  #256: invalid redeclaration of type name "ITStatus" (declared at line 57 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(350): error:  #101: "DISABLE" has already been declared in the current scope
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(350): error:  #101: "ENABLE" has already been declared in the current scope
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(350): error:  #256: invalid redeclaration of type name "FunctionalState" (declared at line 59 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(353): error:  #101: "ERROR" has already been declared in the current scope
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(353): error:  #101: "SUCCESS" has already been declared in the current scope
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(353): error:  #256: invalid redeclaration of type name "ErrorStatus" (declared at line 62 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(389): error:  #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 58 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(488): error:  #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 154 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(500): error:  #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 163 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(512): error:  #256: invalid redeclaration of type name "CAN_FIFOMailBox_TypeDef" (declared at line 171 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(522): error:  #256: invalid redeclaration of type name "CAN_FilterRegister_TypeDef" (declared at line 177 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(556): error:  #256: invalid redeclaration of type name "CAN_TypeDef" (declared at line 203 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(569): error:  #256: invalid redeclaration of type name "CRC_TypeDef" (declared at line 213 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(590): error:  #256: invalid redeclaration of type name "DAC_TypeDef" (declared at line 232 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(600): error:  #256: invalid redeclaration of type name "DBGMCU_TypeDef" (declared at line 239 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
compiling stm32f10x_it.c...
compiling ks0108.c...
compiling ds18b20.c...
compiling eeprom.c...
C:\Keil\ARM\CMSIS\Include\core_cm3.h(1219): warning:  #47-D: incompatible redefinition of macro "SCS_BASE" (declared at line 687 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\CMSIS\Include\core_cm3.h(1224): warning:  #47-D: incompatible redefinition of macro "SysTick_BASE" (declared at line 689 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\CMSIS\Include\core_cm3.h(1225): warning:  #47-D: incompatible redefinition of macro "NVIC_BASE" (declared at line 690 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\CMSIS\Include\core_cm3.h(1226): warning:  #47-D: incompatible redefinition of macro "SCB_BASE" (declared at line 691 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\CMSIS\Include\core_cm3.h(1229): warning:  #47-D: incompatible redefinition of macro "SCB" (declared at line 935 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\CMSIS\Include\core_cm3.h(1230): warning:  #47-D: incompatible redefinition of macro "SysTick" (declared at line 930 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\CMSIS\Include\core_cm3.h(1231): warning:  #47-D: incompatible redefinition of macro "NVIC" (declared at line 934 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(312): error:  #256: invalid redeclaration of type name "s32" (declared at line 23 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(316): error:  #256: invalid redeclaration of type name "sc32" (declared at line 27 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(320): error:  #256: invalid redeclaration of type name "vs32" (declared at line 31 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(324): error:  #256: invalid redeclaration of type name "vsc32" (declared at line 35 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(328): error:  #256: invalid redeclaration of type name "u32" (declared at line 39 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(332): error:  #256: invalid redeclaration of type name "uc32" (declared at line 43 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(336): error:  #256: invalid redeclaration of type name "vu32" (declared at line 47 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(340): error:  #256: invalid redeclaration of type name "vuc32" (declared at line 51 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(345): error:  #101: "FALSE" has already been declared in the current scope
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(345): error:  #101: "TRUE" has already been declared in the current scope
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(345): error:  #256: invalid redeclaration of type name "bool" (declared at line 55 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(348): error:  #101: "RESET" has already been declared in the current scope
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(348): error:  #101: "SET" has already been declared in the current scope
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(348): error:  #256: invalid redeclaration of type name "FlagStatus" (declared at line 57 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(348): error:  #256: invalid redeclaration of type name "ITStatus" (declared at line 57 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(350): error:  #101: "DISABLE" has already been declared in the current scope
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(350): error:  #101: "ENABLE" has already been declared in the current scope
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(350): error:  #256: invalid redeclaration of type name "FunctionalState" (declared at line 59 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(353): error:  #101: "ERROR" has already been declared in the current scope
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(353): error:  #101: "SUCCESS" has already been declared in the current scope
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(353): error:  #256: invalid redeclaration of type name "ErrorStatus" (declared at line 62 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(389): error:  #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 58 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(488): error:  #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 154 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(500): error:  #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 163 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(512): error:  #256: invalid redeclaration of type name "CAN_FIFOMailBox_TypeDef" (declared at line 171 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(522): error:  #256: invalid redeclaration of type name "CAN_FilterRegister_TypeDef" (declared at line 177 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(556): error:  #256: invalid redeclaration of type name "CAN_TypeDef" (declared at line 203 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(569): error:  #256: invalid redeclaration of type name "CRC_TypeDef" (declared at line 213 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(590): error:  #256: invalid redeclaration of type name "DAC_TypeDef" (declared at line 232 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h(600): error:  #256: invalid redeclaration of type name "DBGMCU_TypeDef" (declared at line 239 of "C:\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h")
assembling stm32f10x_vector.s...
Target not created


stm32f10x_lib.h içeriği ise şöyle..

/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
* File Name          : stm32f10x_lib.h
* Author             : MCD Application Team
* Version            : V2.0.1
* Date               : 06/13/2008
* Description        : This file includes the peripherals header files in the
*                      user application.
********************************************************************************
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*******************************************************************************/

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32F10x_LIB_H
#define __STM32F10x_LIB_H

/* Includes ------------------------------------------------------------------*/
#include "stm32f10x_map.h"

#ifdef _ADC
  #include "stm32f10x_adc.h"
#endif /*_ADC */

#ifdef _BKP
  #include "stm32f10x_bkp.h"
#endif /*_BKP */

#ifdef _CAN
  #include "stm32f10x_can.h"
#endif /*_CAN */

#ifdef _CRC
  #include "stm32f10x_crc.h"
#endif /*_CRC */

#ifdef _DAC
  #include "stm32f10x_dac.h"
#endif /*_DAC */

#ifdef _DBGMCU
  #include "stm32f10x_dbgmcu.h"
#endif /*_DBGMCU */

#ifdef _DMA
  #include "stm32f10x_dma.h"
#endif /*_DMA */

#ifdef _EXTI
  #include "stm32f10x_exti.h"
#endif /*_EXTI */

#ifdef _FLASH
  #include "stm32f10x_flash.h"
#endif /*_FLASH */

#ifdef _FSMC
  #include "stm32f10x_fsmc.h"
#endif /*_FSMC */

#ifdef _GPIO
  #include "stm32f10x_gpio.h"
#endif /*_GPIO */

#ifdef _I2C
  #include "stm32f10x_i2c.h"
#endif /*_I2C */

#ifdef _IWDG
  #include "stm32f10x_iwdg.h"
#endif /*_IWDG */

#ifdef _NVIC
  #include "stm32f10x_nvic.h"
#endif /*_NVIC */

#ifdef _PWR
  #include "stm32f10x_pwr.h"
#endif /*_PWR */

#ifdef _RCC
  #include "stm32f10x_rcc.h"
#endif /*_RCC */

#ifdef _RTC
  #include "stm32f10x_rtc.h"
#endif /*_RTC */

#ifdef _SDIO
  #include "stm32f10x_sdio.h"
#endif /*_SDIO */

#ifdef _SPI
  #include "stm32f10x_spi.h"
#endif /*_SPI */

#ifdef _SysTick
  #include "stm32f10x_systick.h"
#endif /*_SysTick */

#ifdef _TIM
  #include "stm32f10x_tim.h"
#endif /*_TIM */

#ifdef _USART
  #include "stm32f10x_usart.h"
#endif /*_USART */

#ifdef _WWDG
  #include "stm32f10x_wwdg.h"
#endif /*_WWDG */

/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
void debug(void);

#endif /* __STM32F10x_LIB_H */

/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/


Hocam sinir etti beni bu program. Acaba stm32f10x_type.h içerisine artık bu kütüphanede hangi tip değişken lazımsa onları tanımlasam olmazmı?


M_B

#42
Mucit23 hocam isterseniz ilgili dosyaları Keil hocama iletin bir de o derlesin.
Klein hocanın adına söylemiş gibi oldum :( Sorununuz bir an once cozulsun diye demek istedim.



Not: imla düzeltme.


İmkanın sınırlarını görmek için imkansızı denemek lazım.                                                             Fatih Sultan Mehmet

Klein

#43
Proje klasörünü olduğu gibi gönderirsen daha garantili olur.

mesaj birleştirme:: 02 Şubat 2013, 13:58:52

Sanırım sorunun derlenmiş kütüphane kullanıyor olmakla ilgili. Hiç derlenmiş kütüphane ile çalışmadığım için , derlenme esnasından dosyaların nasıl işlendiğini ve bağlandığını bilmiyorum.

#define     __IO    volatile             /*!< defines 'read / write' permissions              */

bu satırı core_cm3.h dosyasından aldım. eeprom.h içerisine bu tanımı koyarsan sorunun çözülür.

Bunı hallettikten sonra bir  sanaladres tablosunun bulunamadığına ilişkin bir hata alacaksın.

main.c içine

const  uint16_t VirtAddVarTab[] = {
		0x5500, 0x5501, 0x5502,0x5503, 0x5504, 0x5505,0x5506, 0x5507,
		0x5508, 0x5509, 0x550A,0x550B, 0x550C, 0x550D,0x550E, 0x550F
 };


kodunu eklemen gerek.  Flash'a kaydedecek kaç değişkenin varsa  dizide o kadar sanal adres olmalı. Adresler illa bu şekilde olmak zorunda değil. istediğin değeri verebilirsin.

Mucit23

Hocam Sağolun problemler çok azaldı.

Dediğiniz gibi yapınca hatalar çok azalıyor. Sadece PAGE_SIZE tanımlı değil diyor.

Rebuild target 'SST'
compiling main.c...
compiling stm32f10x_it.c...
compiling ks0108.c...
compiling ds18b20.c...
compiling eeprom.c...
src\eeprom.c(63): error:  #20: identifier "PAGE_SIZE" is undefined
src\eeprom.c(283): error:  #20: identifier "PAGE_SIZE" is undefined
src\eeprom.c(373): error:  #20: identifier "PAGE_SIZE" is undefined
src\eeprom.c(396): error:  #20: identifier "PAGE_SIZE" is undefined
src\eeprom.c(476): error:  #20: identifier "PAGE_SIZE" is undefined
src\eeprom.c(537): error:  #20: identifier "PAGE_SIZE" is undefined
src\eeprom.c(542): error:  #20: identifier "PAGE_SIZE" is undefined
assembling stm32f10x_vector.s...
Target not created


Dediğiniz gibi main.c içerisine sanal adres tablosu nu ekledim. Buna rağmen yine yukarıdaki hatayı veriyor. Aslında hatanın sanal adres tablsoyuyla ilgili yok galiba. hata üstüne tıklayınca hatanın olduğu satıra gidiyor ama orada hatayı göremiyorum. Atladığım kısım nedir?