2894 views|7 replies

30

Posts

0

Resources
The OP
 

I deliberately made two mistakes, but the program didn't report an error when I compiled it?! [Copy link]

I deliberately made two mistakes, but the program did not report an error when I compiled it? ! In the definition of stm32f10x.h, line 10, #define GPIOBCRL *(unsigned int *)(GPIOB_BASE +0X00) line 24, uint32 CRL; I defined CRL. Question 1: In mail.c, I deliberately made the label wrong as: GPIOBCRL2 in line 16. In line 22, I deliberately made the label wrong as: GPIOB->CR. The program did not report an error when I compiled it? ! Question 2: In stm32f10x.h, I defined the structure #define GPIOB ((GPIO_TypeDef *) GPIOB_BASE) but in mail.c, after I wrote GPIOB->, the element options in the structure did not pop up automatically? ! Normally, after writing the right arrow, the element options in the structure should pop up automatically? What's going on? The original program is here. 12.28.rar (228.25 KB, downloads: 0) 12.28.rar (228.25 KB, downloads: 0)



This post is from stm32/stm8

Latest reply

The * next to the file name  Details Published on 2017-12-29 15:54
 

200

Posts

1

Resources
2
 
Let's make a guess. If there is no error, it means that it is defined somewhere else, but you don't know it.
This post is from stm32/stm8
 
 

9720

Posts

24

Resources
3
 
Is the code optimized? Can I run to the wrong place during debugging?
This post is from stm32/stm8
 
 

12

Posts

0

Resources
4
 
I suggest you consolidate your C basics twice.
This post is from stm32/stm8
 
 
 

7462

Posts

2

Resources
5
 
Why is there an error? Your main.c is not saved. . .
This post is from stm32/stm8
 
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 

30

Posts

0

Resources
6
 
freebsder posted on 2017-12-29 09:07 Why is there an error? Your main.c is not saved. . .
Where can I see that there is no save? ?
This post is from stm32/stm8

Comments

The * next to the file name  Details Published on 2017-12-29 15:54
 
 
 

2002

Posts

24

Resources
7
 
csz9981 posted on 2017-12-29 14:36 Where can I see if there is no save? ?
The * next to the file name
This post is from stm32/stm8
 
 
 

30

Posts

0

Resources
8
 
Change else if to #elif , that's it, there's no # in the front. Thanks for everyone's responses.
This post is from stm32/stm8
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list