当前位置:网站首页>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
边栏推荐
- G - Supermarket
- F - True Liars (种类并查集+DP)
- Simulation volume leetcode [general] 1091 The shortest path in binary matrix
- Coordinatorlayout+nestedscrollview+recyclerview pull up the bottom display is incomplete
- E - 食物链
- 模拟卷Leetcode【普通】1405. 最长快乐字符串
- Manage configuration using Nacos
- Application of Lie group in gtsam
- oscp raven2靶机渗透过程
- D - How Many Answers Are Wrong
猜你喜欢
D - How Many Answers Are Wrong
win10无法操作(删除、剪切)文件
Hypothesis testing learning notes
Application of Lie group in gtsam
Summary of anomaly detection methods
【Postman】Collections-运行配置之导入数据文件
Fault, error, failure of functional safety
曼哈顿距离与曼哈顿矩形-打印回字型矩阵
Expose the serial fraudster Liu Qing in the currency circle, and default hundreds of millions of Cheng Laolai
[wechat applet] build a development tool environment
随机推荐
keil MDK中删除添加到watch1中的变量
Linux regularly backs up MySQL database
selenium源码通读·9 |DesiredCapabilities类分析
Detailed explanation of P problem, NP problem, NPC problem and NP hard problem
浅谈专项测试之弱网络测试
曼哈顿距离和-打印菱形
Interface test: what are the components of the URL in fiddler
php使用redis实现分布式锁
异常检测方法总结
Customize the gateway filter factory on the specified route
Eigen sparse matrix operation
MySQL之基础知识
【eolink】PC客户端安装
【Postman】动态变量(也称Mock函数)
The latest 2022 review of "graph classification research"
Full link voltage measurement: building three models
自定义指定路由上的Gateway过滤器工厂
Aike AI frontier promotion (2.13)
Win10 cannot operate (delete, cut) files
Technology sharing | common interface protocol analysis