如何在泰凌微官方SDK基础上构建自己工程
1.选择工作空间
打开Telink IDE1.3时选择B85M_SINGLE_BLE_SDK
2.导入工程
File->Import..->General->Exist Projects into Worksapces
Select root directory->Browse…->B85M_SINGLE_BLE_SDK\b85_ble_sdk
3.新建8258_ble_demo工程
步骤1
Project->Properties->C/C++ Build->Setting ->Manage Configurations…->New…
Name:825x_ble_demo
Existing configuration:825x_ble_sample(选择想要参考的已有工程)
OK
选择825x_ble_demo->Set Active
OK
步骤2
TC32 Compliler->Symbols
双击__PROJECT_8258_BLE_XXX__=1 将其编辑为 PROJECT_8258_BLE_DEMO=1
OK
步骤3
TC32 Create Extended Listing->General
Output Filename:825x_ble_demo.lst
Apply
步骤4
TC32 Create Flash image->General
Output Filename:825x_ble_demo.bin
Apply->OK
步骤5
复制文件夹b85m_ble_sample到vendor/,重命名为b85m_ble_demo,右键refresh
步骤6
在vendor/common/user_config.h中添加:
1 |
步骤7
在8258_ble_demo/app_config.h中:
1 |
改为:
1 |
步骤8
选中b85m_ble_demo,右键->Resource Configurations->Exclude from Build,除b85m_ble_demo外都划勾->OK
选中b85m_ble_sample,右键->Resource Configurations->Exclude from Build,其它不动,给b85m_ble_demo划勾->OK
常见问题
不要使用中文路径,可能引起编译报错
如何更改字体大小?
Window->Preferences->General->Appearance->Colors and Fonts->C/C++->Editor
可以使用中文进行注释,但是必须是utf-8格式, IDE默认使用GBK编码,需要修改为utf-8
Project->Properties->Resource->Text file encoding->Other:UTF-8
IDE跳转错误如何解决?
Project->Properties->C/C++ General->Indexer 勾选 Enable project specific settings、Store settings with project 和 Use a fixed build configuration Apply->OK
选中b85m_ble_sample,右键->Clean Project
选中b85_ble_sdk,右键->Index->Rebuild
重新编译如何自动保存更改的代码?
Window->Preferences搜save
General->Workspace勾选Save automatically before build
Apply->OK如何添加头文件目录?
Project->Properties->C/C++ General->Paths and Symbols->Includes->GNU C->Add
仿照其他路径输入并勾选is a workspace path如何添加库文件目录?
Project->Properties->C/C++ General->Paths and Symbols->Libraries->Add