当前位置:网站首页>The pit encountered by keil over the years
The pit encountered by keil over the years
2022-07-06 06:18:00 【Laobai 436196571】
1、 Adjust the program today , Array in function inBuf_32 Always unable to assign
This is a 3 The definition of an array
abc.c
That's not good
uint32_t EEPROM_FLASH_USER_DATA[FLASH_TOTAL_SIZE]={
0xFF};
uint32_t EEPROM_FLASH_REGCODE_DATA[FLASH_TOTAL_SIZE]={
0xaa};
static unsigned short p_InBuf_32=0;
static uint32_t inBuf_32[100];
It doesn't work :
static unsigned short p_InBuf_32=0;
uint32_t EEPROM_FLASH_USER_DATA[FLASH_TOTAL_SIZE]={
0xFF};
uint32_t EEPROM_FLASH_REGCODE_DATA[FLASH_TOTAL_SIZE]={
0xFF};
static uint32_t inBuf_32[100];
In this way, we can :
uint32_t EEPROM_FLASH_USER_DATA[FLASH_TOTAL_SIZE]={
0};// Initialize to 0
//uint32_t EEPROM_FLASH_USER_DATA[FLASH_TOTAL_SIZE];// Not initialized
uint32_t EEPROM_FLASH_REGCODE_DATA[FLASH_TOTAL_SIZE]={
0xaa};
static unsigned short p_InBuf_32=0;
static uint32_t inBuf_32[100];
.c In file , The first array defined , Can't initialize ? Or to initialize, it must also be 0?
Experience : Find the reason for this kind of problem from the previous array or pointer , The front pointer may be out of bounds .
2、 Function static Variable values cannot be saved , No problem after changing to global variables , This happens occasionally , It may also be related to initialization , Test it later . First mark Next
边栏推荐
- Testing and debugging of multithreaded applications
- Reading notes of effective managers
- 模拟卷Leetcode【普通】1414. 和为 K 的最少斐波那契数字数目
- 对数据安全的思考(转载)
- Online and offline problems
- Simulation volume leetcode [general] 1414 The minimum number of Fibonacci numbers with a sum of K
- 模拟卷Leetcode【普通】1062. 最长重复子串
- LeetCode 731. 我的日程安排表 II
- Nodejs realizes the third-party login of Weibo
- 全程实现单点登录功能和请求被取消报错“cancelToken“ of undefined的解决方法
猜你喜欢
调用链监控Zipkin、sleuth搭建与整合
Expose the serial fraudster Liu Qing in the currency circle, and default hundreds of millions of Cheng Laolai
JDBC Requset 对应内容及功能介绍
isam2运行流程
在uni-app中使用腾讯视频插件播放视频
Application du Groupe Li dans gtsam
What are the test sites for tunnel engineering?
sourceInsight中文乱码
全链路压测:构建三大模型
Detailed explanation of P problem, NP problem, NPC problem and NP hard problem
随机推荐
二维码的前世今生 与 六大测试点梳理
P问题、NP问题、NPC问题、NP-hard问题详解
把el-tree选中的数组转换为数组对象
自定义指定路由上的Gateway过滤器工厂
Amazon Engineer: eight important experiences I learned in my career
模拟卷Leetcode【普通】1219. 黄金矿工
MFC关于长字符串unsigned char与CString转换及显示问题
Simulation volume leetcode [general] 1249 Remove invalid parentheses
模拟卷Leetcode【普通】1143. 最长公共子序列
Isam2 and incrementalfixedlagsmooth instructions in gtsam
Overview of three core areas of Mathematics: geometry
對數據安全的思考(轉載)
Idea new UI usage
Reading notes of effective managers
模拟卷Leetcode【普通】1405. 最长快乐字符串
Technology sharing | common interface protocol analysis
Understanding of processes and threads
Is the test cycle compressed? Teach you 9 ways to deal with it
[wechat applet] build a development tool environment
JMeter做接口测试,如何提取登录Cookie