I'm using CCS C command-line compiler in a bottle all by itself. It works fine if I do it all manually, But I'd like for MPLABX IDE to call it when I click compile. The IDE generates the command line arguments that cause the compiler to do the right thing. I have a bash script that I use to call the compiler and supply the arguments generated by the IDE.
#! /bin/bash
bottle="CCSC"
#/opt/cxoffice/bin/cxrun ccsc.exe @$@
rm "/home/glenn/MPLABXProjects/MDB-100.X/params.txt"
echo $@ >> "/home/glenn/MPLABXProjects/MDB-100.X/params.txt"
exec /opt/cxoffice/bin/cxrun ccsc.exe @
What I need now is the return value from CCSC on completion. Can someone share with me how I might do that?
I modified my script to:
#! /bin/bash
bottle="CCSC"
rm "/home/glenn/MPLABXProjects/MDB-100.X/params.txt"
echo $@ >> "/home/glenn/MPLABXProjects/MDB-100.X/params.txt"
echo /opt/cxoffice/bin/cxrun "/home/glenn/.wine/dosdevices/c:/Program Files (x86)/PICC/ccsc.exe" $@
echo
/opt/cxoffice/bin/cxrun "/home/glenn/.wine/dosdevices/c:/Program Files (x86)/PICC/ccsc.exe" $@
And the result from the command line is this:
glenn@glenn-LX6820:~/.cxoffice/CCSC/drive_c/Program Files (x86)/PICC$ ./ccsc +V
/opt/cxoffice/bin/cxrun /home/glenn/.wine/dosdevices/c:/Program Files (x86)/PICC/ccsc.exe +V
winewrapper.exe:error: cannot start L"/home/glenn/.wine/dosdevices/../drive_c/Program Files (x86)/PICC/ccsc.exe" (error 31)
I don't know where the 'L' is coming from?
Thanks
System:
CrossOver Linux 20.0.0
Install location: /opt/cxoffice
64-bit OS
Desktop session: ubuntu
Window manager: GNOME Shell
Locale: en_US.UTF-8
Contents of /etc/os-release:
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal