Debugging a record stm32

..\..\SYSTEM\usart\usart.c(1): error:  #5: cannot open source input file "sys.h": No such file or directory

#include ".. \ sys \ sys.h" so that you can find a path

Compile a problem again

.. \ .. \ SYSTEM \ usart \ .. \ sys \ sys.h (3): error: # 5: can not open source input file "stm32f10x_lib.h": No such file or directory is not stm32f10x_lib.h this library function

How to do? ? ?

Internet search a lot of information, said the new version of MDK stm32f10x_lib.h this document has become
stm32f10x.h up. And he has said to stm32f10x.h into stm32f10x_lib.h, but how to change it but
did not explain. First, find the file in the installation folder path
Note must be a Backup.001 inside the ARM to find this, and only this STM32F10x the
folder only "stm32f10x_lib.h", when there is no other place. Then STM32F10x this file
members throughout the copy down. Paste the project file, just the path, but it must be something else, and the project
in the same folder

As long as this .. \ .. \ linux with trying to be difficult and the following cd .. /../ ..

The directory structure so we can solve this problem


But inside my computer is not the first document, I compile again difficulties arise? ? ? ? ?

Later, I see a post on the Internet found that only an older version of the new version requires only the use of stm32f10x.h on it


Later there was a .. \ SYSTEM \ sys \ sys.c (76): error: # 136: struct "<unnamed>" has no field "IPR"


..\HARDWARE\EXTI\exti.c(65): error:  #20: identifier "EXTI15_10_IRQn" is undefined

Instead of the direct use of 40

..\HARDWARE\EXTI\exti.c - 0 Error(s), 0 Warning(s).


..\HARDWARE\TIMER\timer.c(42): error:  #20: identifier "TIM4_IRQn" is undefined

30 instead of directly with

..\HARDWARE\TIMER\timer.c(85): error:  #20: identifier "TIM3_IRQn" is undefined

Instead of the direct use of 29

..\HARDWARE\TIMER\timer.c - 0 Error(s), 0 Warning(s).



// configured to scale #ifdef VECT_TAB_RAM  

MY_NVIC_SetVectorTable(NVIC_VectTab_RAM, 0x0);
#else  
MY_NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0);
#endif

..\SYSTEM\sys\sys.c(127): error:  #20: identifier "NVIC_VectTab_FLASH" is undefined

用8位的单片机,一般C语言中可以对某寄存器或输出端口进行移位操作和位取反操作,可以使LED灯流水或闪烁.
我想问下:
1. STM32对GPIO操作一般用库函数,那么怎么使某一位端口取反?怎么使某口移位流水? 请写个示范代码.

2.我见一个例子中对PC6端口某个LED闪烁代码如下,不知是什么意思? 是不是取反操作?为什么要先读出位?
GPIO_WriteBit(GPIOC, GPIO_Pin_6, (BitAction)(1 -GPIO_ReadOutputDataBit(GPIOC, GPIO_Pin_6)));

3.中断向量表是不是都是固定如下的?还是某些情况要重设?
/* Set the Vector Table base location at 0x20000000 */ 
  NVIC_SetVectorTable(NVIC_VectTab_RAM, 0x0); 
#else  /* VECT_TAB_FLASH  */
  /* Set the Vector Table base location at 0x08000000 */ 
  NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0);

转载于:https://www.cnblogs.com/AI-Algorithms/p/3870058.html

Guess you like

Origin blog.csdn.net/weixin_34043301/article/details/94506359