当前位置:网站首页>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
边栏推荐
猜你喜欢
LeetCode 739. 每日温度
B - The Suspects
【无App Push 通用测试方案
【eolink】PC客户端安装
ICLR 2022 spotlight | analog transformer: time series anomaly detection method based on correlation difference
JMeter做接口测试,如何提取登录Cookie
LeetCode 732. 我的日程安排表 III
Pat (Grade B) 2022 summer exam
10M25DCF484C8G(FPGA) AMY-6M-0002 BGA GPS模块
LeetCode 731. 我的日程安排表 II
随机推荐
Is the test cycle compressed? Teach you 9 ways to deal with it
模拟卷Leetcode【普通】1219. 黄金矿工
【Postman】Collections配置运行过程
还在为如何编写Web自动化测试用例而烦恼嘛?资深测试工程师手把手教你Selenium 测试用例编写
leetcode 24. 两两交换链表中的节点
这些年用Keil遇到的坑
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
模拟卷Leetcode【普通】1091. 二进制矩阵中的最短路径
Left matching principle of joint index
Redis 核心技术与实战之 基本架构:一个键值数据库包含什么?
把el-tree选中的数组转换为数组对象
[postman] dynamic variable (also known as mock function)
MFC 动态创建的对话框及改变控件的大小和位置
曼哈顿距离与曼哈顿矩形-打印回字型矩阵
Expose the serial fraudster Liu Qing in the currency circle, and default hundreds of millions of Cheng Laolai
對數據安全的思考(轉載)
自定义指定路由上的Gateway过滤器工厂
Simulation volume leetcode [general] 1109 Flight reservation statistics
10m25dcf484c8g (FPGA) amy-6m-0002 BGA GPS module
模拟卷Leetcode【普通】1414. 和为 K 的最少斐波那契数字数目