微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI WIFI设计交流 > A bug in wlan_station example when using GCC optimization

A bug in wlan_station example when using GCC optimization

时间:10-02 整理:3721RD 点击:

The example defined a global variable "g_ulStatus" to set network event flags in simplelink task and the user task will check this flag to know if events happened. while a volatile keyword is missing which will cause the flag set/check failed, and the example cannot run with expected result. Please fix this issue, thanks!

volatile unsigned long  g_ulStatus = 0;//SimpleLink Status

Very Good。对于不停变化,又在程序中不去改变,只作为读取操作的变量,如果不设置为volatile必然会被系统优化掉。。。除非你的编译器没有开启优化功能。

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top