关于CC2540/2541编译Performing Post-Build Action卡住的问题

本文详细介绍了在使用TI官方技术手册编译CC2540/2541单片机时遇到的Post-Build Action卡住问题,并提供了两种解决方案:修改cc254x_ubl_pp.bat文件或直接将工程拷贝至软件和协议栈安装的盘。解释了问题原因在于使用的批处理文件路径问题,适用于特定的协议栈版本和工程配置。

[转]关于CC2540/2541编译Performing Post-Build Action卡住的问题

转自facai_sdu的专栏,原文:http://cache.baiducontent.com/c?m=9f65cb4a8c8507ed4fece7631049c0666e04de3e69c0d0622e95c51484642c1d1020feeb797f451987962d345ab84e28aba6716f310221b59fc28341c9fecf68798765633048db014d8845fadc4654837dd11cfeaf68b7fdab6cc5b9d2a28c0515910e59&p=87759a44d18913f101be9b7c5949&newp=8965d61c85cc43f508e29579494792695803ed6336d2d04f&user=baidu&fm=sc&query=performing+post+build+action&qid=8abeb63100090683&p1=1


CC2540/2541是TI推出的BLE单片机,并且支持空中固件升级(OAD)。本人按照TI官方的技术手册,在使用OAD编译产生bin文件时,发现出现了问题,编译卡在了Performing Post-Build Action 这一步并且无法产生bin文件。如下图所示


后来在TI社区看到有国外的技术大牛讨论这个问题,并且提出过解决方案,详见如下连接

http://e2e.ti.com/support/wireless_connectivity/f/538/t/314089

意思就大概就是说,出现这种问题,是因为使用的批处理文件C:\Program Files\Texas Instruments\BLE-CC254x-1.4.0\Projects\ble\common\cc2540\cc254x_ubl_pp.bat运行错误。这应该算是TI协议栈的一个bug,当软件或者工程安装在了其它盘符时,就会产生这种问题。

解决方案是编辑C:\Program Files\Texas Instruments\BLE-CC254x-1.4.0\Projects\ble\common\cc2540\cc254x_ubl_pp.bat文件,将其中的

@echo off
chdir %1\..\..\common\cc2540
start cc254x_ubl_pp.js %2 %3 %4 %5

改为如下:

@echo off

%~d1
chdir %1\..\..\common\cc2540

start cc254x_ubl_pp.js %2 %3 %4 %5

即可。

这种方法是可行的,但是需要注意的是,所指的是关联自己工程的cc254x_ubl_pp.bat,并不一定是协议栈中的固定的链接C:\Program Files\Texas Instruments\BLE-CC254x-1.4.0\Projects\ble\common\cc2540\cc254x_ubl_pp.bat,如果用户自己建的了一个完整的工程,其中拷贝了新的外部链接文件(你的工程目录)\Projects\ble\common\cc2540\cc254x_ubl_pp.bat,需要找到自己工程使用的文件,然后做如上更改。

修改后再次编译,就会出现编译通过,同时产生了bin文件



还有另外一种解决方法比较简单,是直接将该工程拷贝到C盘(软件和协议栈安装的盘)中,也可以实现上述目的。


老公 你帮我看一下 我是不是可以去睡觉 等它自己编译就好了?”PowerShell 7 环境已加载 (版本: 7.5.2) PowerShell 7 环境已加载 (版本: 7.5.2) PS C:\Users\Administrator\Desktop> cd E:\PyTorch_Build\pytorch PS E:\PyTorch_Build\pytorch> python -m venv rtx5070_env PS E:\PyTorch_Build\pytorch> .\rtx5070_env\Scripts\activate (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 1. 运行修复脚本 (rtx5070_env) PS E:\PyTorch_Build\pytorch> .\complete_install_fix.ps1 尝试从备用源下载: https://pilotfiber.dl.sourceforge.net/project/openblas/v0.3.27/OpenBLAS-0.3.27-x64.zip ❌ 下载失败: The variable '$localZip' cannot be retrieved because it has not been set. 尝试从备用源下载: https://cfhcable.dl.sourceforge.net/project/openblas/v0.3.27/OpenBLAS-0.3.27-x64.zip ❌ 下载失败: The variable '$localZip' cannot be retrieved because it has not been set. 尝试从备用源下载: https://superb-sea2.dl.sourceforge.net/project/openblas/v0.3.27/OpenBLAS-0.3.27-x64.zip ❌ 下载失败: The variable '$localZip' cannot be retrieved because it has not been set. 尝试从GitHub直接下载... InvalidOperation: E:\PyTorch_Build\pytorch\complete_install_fix.ps1:25 Line | 25 | Invoke-WebRequest -Uri $githubRaw -OutFile $localZip | ~~~~~~~~~ | The variable '$localZip' cannot be retrieved because it has not been set. InvalidOperation: E:\PyTorch_Build\pytorch\complete_install_fix.ps1:35 Line | 35 | [System.IO.Compression.ZipFile]::ExtractToDirectory($localZip, $newIn … | ~~~~~~~~~ | The variable '$localZip' cannot be retrieved because it has not been set. Find-BLASBinary: E:\PyTorch_Build\pytorch\complete_install_fix.ps1:38 Line | 38 | $blasFile = Find-BLASBinary -SearchPath $newInstallPath | ~~~~~~~~~~~~~~~ | The term 'Find-BLASBinary' is not recognized as a name of a cmdlet, function, script file, or executable | program. Check the spelling of the name, or if a path was included, verify that the path is correct and try | again. ⚠️ 二进制分发版无效,尝试从源码编译... Chocolatey v2.5.0 3 validations performed. 2 success(es), 1 warning(s), and 0 error(s). Validation Warnings: - A pending system reboot request has been detected, however, this is being ignored due to the current Chocolatey configuration. If you want to halt when this occurs, then either set the global feature using: choco feature enable --name="exitOnRebootDetected" or pass the option --exit-when-reboot-detected. Installing the following packages: cmake By installing, you accept licenses for the packages. Downloading package from source 'https://community.chocolatey.org/api/v2/' Progress: Downloading cmake.install 4.1.1... 100% cmake.install v4.1.1 [Approved] cmake.install package files install completed. Performing other installation steps. Installing 64-bit cmake.install... cmake.install has been installed. The install of cmake.install was successful. Software installed as 'msi', install location is likely default. Downloading package from source 'https://community.chocolatey.org/api/v2/' Progress: Downloading cmake 4.1.1... 100% cmake v4.1.1 [Approved] cmake package files install completed. Performing other installation steps. The install of cmake was successful. Deployed to 'C:\ProgramData\chocolatey\lib\cmake' Chocolatey installed 2/2 packages. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). Chocolatey v2.5.0 3 validations performed. 2 success(es), 1 warning(s), and 0 error(s). Validation Warnings: - A pending system reboot request has been detected, however, this is being ignored due to the current Chocolatey configuration. If you want to halt when this occurs, then either set the global feature using: choco feature enable --name="exitOnRebootDetected" or pass the option --exit-when-reboot-detected. Installing the following packages: mingw By installing, you accept licenses for the packages. Downloading package from source 'https://community.chocolatey.org/api/v2/' Progress: Downloading mingw 13.2.0... 100% mingw v13.2.0 [Approved] mingw package files install completed. Performing other installation steps. Downloading mingw 64 bit from 'https://github.com/niXman/mingw-builds-binaries/releases/download/13.2.0-rt_v11-rev0/x86_64-13.2.0-release-posix-seh-ucrt-rt_v11-rev0.7z' Progress: 73% - Saving 51.17 MB of 69.57 MB“
09-03
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值