keil go to查定义,显示 NO information available for the selected symbol

错误原因:路径中包含中文路径。

你用了ARM编译器V6,MDK会在加载项目的时候扫描全部文件,预生成Browse信息,这时候就可以使用go to查看定义了。但是,MDK中文支持一向不好,你只有在使用全英文路径、全英文项目名称的时候,才能生成和使用Browse信息。修改方法有两种:

第一种修改方法:将工程文件放置在全英文路径中,然后重新编译即可正常跳转函数。

第二种修改方法:在Keil中的project--->Option for Target--->Target--->ARM Compiler选项中选择:Use default compiler version 5

  • 5
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
This article is an update to my previous articles on the same topic. I started this utility to get some basic information about the hardware. After that I have received some emails from some of our fellow programmers, who are frequent visitors of this site, asking to extend this utility to spit out some more information. In this update I have added the information about CPU vendor (Intel, Cyrix, AMD, etc.) ,CPU speed, and Physical memory status of sustem . CPU Information: To get CPU information I could not find any direct and simple API call. Then I thought of our friendly Registry, which contains all the system information. And there it was all the information I wanted. If you look under HKEY_LOCAL_MACHINE/Hardware/Description/System/CentralProcessor/0 key in registry, you will find the answers to your questions. ~MHz subkey gives the CPU speed and VendorIdentifier gives the vendor information. We will make use of RegQueryValueEx API call to get the information. LONG RegQueryValueEx( HKEY hKey, // handle to key to query LPTSTR lpValueName, // address of name of value to query LPDWORD lpReserved, // reserved LPDWORD lpType, // address of buffer for value type LPBYTE lpData, // address of data buffer LPDWORD lpcbData // address of data buffer size ); Before making this call, it is necessary to create the handle to registry key which needs to be queried. For this make use of RegCreateKeyEx API call. This is how the code looks like in the included code for this utility. // Get the processor speed info. result = ::RegOpenKeyEx (HKEY_LOCAL_MACHINE, "Hardware\\Description\\System\\CentralProcessor\\0", 0, KEY_QUERY_VALUE, &hKey); // Check if the function has succeeded. if (result == ERROR_SUCCESS) { result = ::RegQueryValueEx (hKey, _T("~MHz"), NULL, NULL, (LPBYTE)&data, &dataSize); m_stCPUSpeed.Format ("%d", data); m_stCPUSpeed += _T (" MHz"); dataSize = sizeof (vendorData); result = ::RegQueryValueEx (hKey, _T("VendorIdentifier"), NULL, NULL, (LPBYTE)vendorData, &dataSize); m_stVendorInfo.Format ("%s", vendorData); } // Make sure to close the reg key RegCloseKey (hKey); Since I don't have access to any other CPU than Intel. So I couldn't test this code on CPU's from Cyrix, AMD, etc. Post a comment Email Article Print Article Share Articles Digg del.icio.us Newsvine Facebook Google LinkedIn MySpace Reddit Slashdot StumbleUpon Technorati Twitter Windows Live YahooBuzz FriendFeed Physical Memory Status: To get the information about the memory status of the system we can take routes. First one, which is not easy for a person who does not know assembly language, involves getting the required information from CMOS data. Second one which simply involves making GlobalMemoryStatus API call. And I chose the second one (Ofcourse I am not assembly language pro). VOID GlobalMemoryStatus ( LPMEMORYSTATUS lpBuffer // pointer to the memory status structure ); The information is returned in MEMORYSTATUS data structure. typedef struct _MEMORYSTATUS { // mst DWORD dwLength; // sizeof(MEMORYSTATUS) DWORD dwMemoryLoad; // percent of memory in use DWORD dwTotalPhys; // bytes of physical memory DWORD dwAvailPhys; // free physical memory bytes DWORD dwTotalPageFile; // bytes of paging file DWORD dwAvailPageFile; // free bytes of paging file DWORD dwTotalVirtual; // user bytes of address space DWORD dwAvailVirtual; // free user bytes } MEMORYSTATUS, *LPMEMORYSTATUS; The information returned by the GlobalMemoryStatus function is volatile. There is no guarantee that two sequential calls to this function will return the same information. This API call has been made in GetMemoryInfo function of the application attached. I gets the information for memory usage, total physical memory instaled, physical memory available, and total virtual memory. 来源: http://www.codeguru.com/cpp/w-p/system/hardwareinformation/article.php/c2833/

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值