| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 11289 人关注过本帖
标题:Not enough information to list image symbols.
只看楼主 加入收藏
zjfzdzc
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2020-4-29
结帖率:100%
收藏
 问题点数:0 回复次数:2 
Not enough information to list image symbols.
错误提示:
main.c(12): warning:  #223-D: function "GPIO_ResetBits" declared implicitly
      GPIO_ResetBits(GPIOC,GPIO_Pin_6);
main.c(13): warning:  #61-D: integer operation result is out of range
      GPIOC->CRL &=~(0x0F<<(uint32_t)4*7);
main.c(15): warning:  #223-D: function "GPIO_SetBits" declared implicitly
      GPIO_SetBits(GPIOC,GPIO_Pin_7);
main.c: 3 warnings, 0 errors
linking...
.\Objects\jcqld.axf: Error: L6218E: Undefined symbol GPIO_ResetBits (referred from main.o).
.\Objects\jcqld.axf: Error: L6218E: Undefined symbol GPIO_SetBits (referred from main.o).
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.
Finished: 2 information, 0 warning and 2 error messages.
".\Objects\jcqld.axf" - 2 Error(s), 3 Warning(s).
Target not created.
Build Time Elapsed:  00:00:01

以下编写的代码,结合自己的板子,参照网上视频,查找了些相关问题的网页,没有解决
////////main函数///////
#include "stm32f10x_gpio.h"
#include "stm32f10x.h"
int main(void)
{
 RCC->APB2ENR |=(1<<4);
 GPIOC->CRL &=~(0x0F<<4*6);
 GPIOC->CRL |=(1<<4*6);
// GPIOC->ODR |=(1<<6);
    GPIO_ResetBits(GPIOC,GPIO_Pin_6);
    GPIOC->CRL &=~(0x0F<<(uint32_t)4*7);
 GPIOC->CRL |=(1<<4*7);
    GPIO_SetBits(GPIOC,GPIO_Pin_7);
}

///////stm32f10x.h///////
#ifndef __STM32F10X_H
#define __STM32F10X_H

typedef unsigned int uint32_t;  //定义数据类型
typedef unsigned short uint16_t;

#define PERIPH_BASE ((unsigned int)0x40000000)
#define APB2PERIPH_BASE (PERIPH_BASE+0x10000)
#define AHBPERIPH_BASE (PERIPH_BASE+0x20000)   //总线地址变量定义
#define RCC_BASE (AHBPERIPH_BASE+0x1000)//端口时钟地址变量定义
#define GPIOC_BASE  (APB2PERIPH_BASE+0x1000)//端口C地址变量定义
  
typedef struct     //定义GPIO结构体
{
  uint32_t CRL;
    uint32_t CRH;
    uint32_t IDR;
    uint32_t ODR;
    uint32_t BSRR;
    uint32_t BRR;
}GPIO_TypeDef;

typedef struct  //定义RCC结构体
{
  uint32_t CR;
    uint32_t CFGR;
    uint32_t CIR;
    uint32_t APB2RSTR;
    uint32_t APB1RSTR;
    uint32_t AHBENR;
    uint32_t APB2ENR;
}RCC_TypeDef;

#define RCC ((RCC_TypeDef*)RCC_BASE)   //定义RCC基地址为RCC结构体
#define GPIOC ((GPIO_TypeDef*)GPIOC_BASE) //定义GPIO基地址类型为GPIO

#endif

///////stm32f10x_gpio.h///////
#ifndef __STM32F10X_GPIO_H
#define __STM32F10X_GPIO_H
#include "stm32f10x.h"

#define GPIO_Pin_0  (uint16_t)0x0001  //二进制:0b0000 0001
#define GPIO_Pin_1  (uint16_t)0x0002  //二进制:0b0000 0010
#define GPIO_Pin_2  (uint16_t)0x0004  //二进制:0b0000 0100
#define GPIO_Pin_3  (uint16_t)0x0008
#define GPIO_Pin_4  (uint16_t)0x0010
#define GPIO_Pin_5  (uint16_t)0x0020
#define GPIO_Pin_6  (uint16_t)0x0040
#define GPIO_Pin_7  (uint16_t)0x0080
#define GPIO_Pin_8  (uint16_t)0x0100
#define GPIO_Pin_9  (uint16_t)0x0200
#define GPIO_Pin_10 (uint16_t)0x0400
#define GPIO_Pin_11 (uint16_t)0x0800
#define GPIO_Pin_12 (uint16_t)0x1000
#define GPIO_Pin_13 (uint16_t)0x2000
#define GPIO_Pin_14 (uint16_t)0x4000
#define GPIO_Pin_15 (uint16_t)0x8000
#define GPIO_Pin_all(uint16_t)0xFFFF

 void GPIO_Setbits(GPIO_TypeDef *GPIOx,uint16_t GPIO_pin);
 void GPIO_Resetbits(GPIO_TypeDef *GPIOx,uint16_t GPIO_pin);

#endif

///////stm32f10x_gpio.c///////
#include "stm32f10x_gpio.h"

void GPIO_Setbits(GPIO_TypeDef *GPIOx,uint16_t GPIO_pin)
{
    GPIOx->BSRR |=GPIO_pin;
}
void GPIO_Resetbits(GPIO_TypeDef *GPIOx,uint16_t GPIO_pin)
{
    GPIOx->BSRR |=GPIO_pin;
}
搜索更多相关主题的帖子: warning main 定义 define Not 
2020-05-10 22:23
JabinZ
Rank: 3Rank: 3
等 级:论坛游侠
威 望:2
帖 子:34
专家分:180
注 册:2020-5-7
收藏
得分:0 
你这个是不是没有把 stm32f10x_gpio.c 与 main.c 放在一起编译? 错误明显提示你没有找到GPIO_ResetBits 与 GPIO_SetBits 方法的实现
收到的鲜花
  • 静夜思2020-06-01 19:11 送鲜花  1朵  
2020-05-31 23:06
q1123
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2020-7-20
收藏
得分:0 
工程配置挂了
2020-07-20 16:32
快速回复:Not enough information to list image symbols.
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016075 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved