How to build BusConductor GitHub project?
I am failing to build following project
https://github.com/PLCnext/BusConductor
I clone this repository and executed plcncli generate code in projects root directory and got following error
chandola:BusConductor$ plcncli generate code
Generating all files with the 'code' generator for /home/chandola/disk/PLCNext/2020.0.1_LTS/src/PLCNext_github/BusConductor.
The project in /home/chandola/disk/PLCNext/2020.0.1_LTS/src/PLCNext_github/BusConductor does not contain a valid target. Without a valid target port structures from within the SDK can not be generated and automatic include detection will not work as well.
Successfully generated all files with the 'code' generator for /home/chandola/disk/PLCNext/2020.0.1_LTS/src/PLCNext_github/BusConductor.
I tried to add target but got following error
chandola:BusConductor$ plcncli set target --add -n AXCF2152
Could not find the target 'AXCF2152', because no targets with that name are available.
chandola:BusConductor$ plcncli set target --add -n axcf2152
Could not find the target 'axcf2152', because no targets with that name are available.
Can you please tell how to resolve this?
plcncli version :plcncli 20.0.0.243 (20.0.0.243)
SDK version :2020.0.1_LTS
Comments
Hi Vikash,
What is the result of the following commands:
and
If you do not see a suitable target, then the SDK may not have been installed correctly.
~ Martin.
Hi Martin,
Thanks for your response.
I am getting empty responses while executing above commands
chandola:SDK$ plcncli get targets
{
"targets": []
}
chandola:SDK$ plcncli get sdks
{
"sdks": []
}
chandola:SDK$ ls
cmake
environment-setup-cortexa9t2hf-neon-pxc-linux-gnueabi
site-config-cortexa9t2hf-neon-pxc-linux-gnueabi
sysroots
toolchain.cmake
version-cortexa9t2hf-neon-pxc-linux-gnueabi
I had installed SDK by executing pxc-glibc-x86_64-axcf2152-image-sdk-cortexa9t2hf-neon-axcf2152-toolchain-2020.0.sh from PLCnCLI_SDK_2020.0_Linux_AXC_F_2152.zip. With this SDK I have been able to successfully compile Part -02 of SampleRuntime with this SDK.
plcncli and sdk were separate installations so is there any provision to configure SDK related parameter in plcncli configuration. I tried to do this with plcncli set commands but that failed.
What should i do to correct this problem. Shall I reinstall the whole SDK?
Hi Vikash,
For the SDK to be recognised by plcncli, it must be installed using the
plcncli install sdk
command.If you have had no luck getting the SDK recognised using this command:
... then you will need to install the SDK again, using the plcncli command.
~ Martin.
Hi,
I was able to add sdks and targets with command you provided. However project building failed with same error
chandola:BusConductor$ plcncli generate code
Generating all files with the 'code' generator for /home/chandola/disk/PLCNext/2020.0.1_LTS/src/PLCNext_github/BusConductor.
The project in /home/chandola/disk/PLCNext/2020.0.1_LTS/src/PLCNext_github/BusConductor does not contain a valid target. Without a valid target port structures from within the SDK can not be generated and automatic include detection will not work as well.
Successfully generated all files with the 'code' generator for /home/chandola/disk/PLCNext/2020.0.1_LTS/src/PLCNext_github/BusConductor.
chandola:BusConductor$ plcncli get targets
{
"targets": [
{
"name": "AXCF2152",
"version": "20.0.0.24752",
"longVersion": "2020.0 LTS (20.0.0.24752)",
"shortVersion": "20.0.0",
"available": null
}
]
}
chandola:BusConductor$ plcncli get sdks
{
"sdks": [
{
"path": "/home/chandola/disk/PLCNext/2020.0.1_LTS/SDK"
}
]
}
chandola:BusConductor$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
I removed sdk and tried to install with plcncli but installation failed with following error
Hi Vikash,
The file you need to provide to the
plcncli install sdk
command is the.sh
file, not the.zip
file.Please try again with the .sh file and let us know how you get on.
~ Martin.
Hi Martin,
I reinstalled SDK using .sh file as you mentioned however the problem doesn't get resolved. Please refer following snippet
Please let me know how to proceed from here to resolve the issue.
Hi Vikash,
It looks like the target has not been set for the project.
Have you executed this command?
Setting target for the project helped. Now I am able to generate code and config(first two steps for building project). However I failed to build project(plcncli build). It is throwing following error while executing plcncli build.
Could not find the version '2019.3 (19.3.0.18509 )' of the target 'AXCF2152'. Available versions are: 20.0.0.24752.
I have installed 2020.0.1 SDK in my development environment. Seems like project is supposed to be build with 2019.03 SDK. Is it mandatory to install 2019.3 for using this project? How can i make it work for 2020 sdk? I tried to set SDK with plcncli set sdk, but it it turns our sdk is not a valid verb for this command.
The project was designed using SDK version 2019.3, but it should be possible to build it with other SDK versions.
Please look in the file
plcnext.proj
in the project root directory. You should see entries for the SDKs that it is expecting to be built with. You should be able to delete the complete line that includes this text:... and then try building again.