Difference between revisions of "User:Ctag/CCS"

From ArchWiki
Jump to navigation Jump to search
(Added disk usage note)
m (/car/ccs-root -> /var/ccs-root)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
There are three installation methods:
 +
* via PKGBUILD on AUR: https://aur.archlinux.org/packages/ccstudio/
 +
* via a binary repository with a pre-built package, by adding to pacman.conf: Server = http://arch.alexeicolin.com/arch/ti/$arch
 +
* or manually as described below.
 +
 +
== Manual installation guide ==
 +
 
Notes on installing Ti's Code Composer Studio V6.2
 
Notes on installing Ti's Code Composer Studio V6.2
  
Line 4: Line 11:
  
 
CCS is released for Linux, but since ~January 2017 it is broken on Archlinux because glibc has been updated. Rather than roll back my entire system, I'm running CCS in a chroot jail, which is something I've never done before and am learning about as I go.
 
CCS is released for Linux, but since ~January 2017 it is broken on Archlinux because glibc has been updated. Rather than roll back my entire system, I'm running CCS in a chroot jail, which is something I've never done before and am learning about as I go.
 +
 +
References in the wild:
 +
 +
http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/583306/2144268#pi316318=1
 +
 +
http://stackoverflow.com/questions/42960886/arch-linux-ccs-install-stuck-at-com-ti-debug
  
 
== How ==
 
== How ==
  
 
This method consumes ~6 gigabytes of space on my disk. FYI.
 
This method consumes ~6 gigabytes of space on my disk. FYI.
 +
 +
I'm using directions [http://mostlyanalog.blogspot.de/2017/01/code-composer-studio-ccs-v70-on-arch.html?m=1 from here] and modifying them to suite my needs.
  
 
Download CCS, good luck with Ti's POS website: http://processors.wiki.ti.com/index.php/Download_CCS#Code_Composer_Studio_Version_6_Downloads
 
Download CCS, good luck with Ti's POS website: http://processors.wiki.ti.com/index.php/Download_CCS#Code_Composer_Studio_Version_6_Downloads
 +
 +
Tip: it can get confusing when you're shelling multiple levels into a chroot (user -> root -> chroot -> new user) so to tell if you're in a chroot currently, run {{ic|ls -di /}} and if the root directory has an inode other than 2, then you're in a chroot!
 +
 +
Example:
 +
{{hc|1=In chroot|2=
 +
# ls -di /
 +
14286889 /
 +
}}
 +
 +
{{hc|1=Normal system|2=
 +
$ ls -di /
 +
2 /
 +
}}
  
 
Create a chroot:
 
Create a chroot:
 
{{bc|
 
{{bc|
#mkdir /var/ccs-root # create an empty folder
+
# mkdir /var/ccs-root           # create an empty folder
#pacstrap -d /var/ccs-root base # Install a base archlinux filesystem to the chroot
+
# pacstrap -d /var/ccs-root base # Install a base archlinux filesystem to the chroot
#arch-chroot /car/ccs-root # enter the chroot
+
# arch-chroot /var/ccs-root     # enter the chroot
##pacman -S vim # run this in the chroot
+
## pacman -S vim                 # run this in the chroot
 
}}
 
}}
  
Line 37: Line 65:
 
Still in the chroot:
 
Still in the chroot:
 
{{bc|
 
{{bc|
##pacman -Syyuu # force downgrade entire chroot jail
+
## pacman -Syyuu # force downgrade entire chroot jail
##pacman -U /var/cache/pacman/pkg/ca-certificates-utils-20170307-1-any.pkg.tar.xz # Retain newer certs in order to keep pacman working
+
## pacman -U /var/cache/pacman/pkg/ca-certificates-utils-20170307-1-any.pkg.tar.xz # Retain newer certs in order to keep pacman working
##pacman -S xterm base-devel libstdc++5 glibc unzip libcanberra python2 dbus-glib chromium libusb-compat libxss lib32-glibc
+
## pacman -S xterm base-devel libstdc++5 glibc unzip libcanberra python2 dbus-glib chromium libusb-compat libxss lib32-glibc
##cd /lib
+
## cd /lib
##ln -s libncursesw.so.6.0 libncurses.so.5
+
## ln -s libncursesw.so.6.0 libncurses.so.5
##useradd -m ctag
+
## useradd -m ctag
 
}}
 
}}
  
Line 49: Line 77:
 
On the host system:
 
On the host system:
 
{{bc|
 
{{bc|
$xhost +local: # run as _not_ root
+
$ xhost +local: # run as _not_ root
 
}}
 
}}
  
 
Now you should be able to open a window as the jailed user:
 
Now you should be able to open a window as the jailed user:
 
{{bc|
 
{{bc|
#$cd CCS6.2.0.00050_linux-x64/
+
#$ cd CCS6.2.0.00050_linux-x64/
#$./ccs_setup_linux64_6.2.0.00050.bin
+
#$ ./ccs_setup_linux64_6.2.0.00050.bin
 
}}
 
}}
  
 
From there you should be free to run the IDE from the chroot. It's not a perfect solution, but it should be a little lighter on system resources than running a VM.
 
From there you should be free to run the IDE from the chroot. It's not a perfect solution, but it should be a little lighter on system resources than running a VM.
 +
 +
To be able to upload/debug from the chroot jail. I had to copy the udev rules over to my host system, restart udev, and also put the jailed 'ctag' user in the uucp group.
 +
 +
To make launching CCS easier, here are some shell scripts:
 +
 +
In main system:
 +
{{hc|1=launch_ccs.sh|2=
 +
#!/bin/bash
 +
arch-chroot -u ctag:ctag /var/ccs-root /home/ctag/ccs.sh
 +
}}
 +
 +
{{hc|1=/home/ctag/ccs.sh|2=
 +
#!/bin/bash
 +
/home/ctag/ti/ccsv6/eclipse/ccstudio
 +
}}

Latest revision as of 12:46, 11 November 2017

There are three installation methods:

Manual installation guide

Notes on installing Ti's Code Composer Studio V6.2

Why

CCS is released for Linux, but since ~January 2017 it is broken on Archlinux because glibc has been updated. Rather than roll back my entire system, I'm running CCS in a chroot jail, which is something I've never done before and am learning about as I go.

References in the wild:

http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/583306/2144268#pi316318=1

http://stackoverflow.com/questions/42960886/arch-linux-ccs-install-stuck-at-com-ti-debug

How

This method consumes ~6 gigabytes of space on my disk. FYI.

I'm using directions from here and modifying them to suite my needs.

Download CCS, good luck with Ti's POS website: http://processors.wiki.ti.com/index.php/Download_CCS#Code_Composer_Studio_Version_6_Downloads

Tip: it can get confusing when you're shelling multiple levels into a chroot (user -> root -> chroot -> new user) so to tell if you're in a chroot currently, run ls -di / and if the root directory has an inode other than 2, then you're in a chroot!

Example:

In chroot
# ls -di /
14286889 /
Normal system
$ ls -di /
2 /

Create a chroot:

# mkdir /var/ccs-root            # create an empty folder
# pacstrap -d /var/ccs-root base # Install a base archlinux filesystem to the chroot
# arch-chroot /var/ccs-root      # enter the chroot
## pacman -S vim                 # run this in the chroot

In the chroot, edit /etc/pacman.d/mirrorlist to use Archlinux Archive:

/etc/pacman.d/mirrorlist
################################################################################
################# Arch Linux mirrorlist generated by Reflector #################
################################################################################

# With:       reflector --verbose --latest 40 --number 10 --sort rate --protocol http --save /etc/pacman.d/mirrorlist
# When:       2017-03-16 21:58:20 UTC
# From:       https://www.archlinux.org/mirrors/status/json/
# Retrieved:  2017-03-16 21:57:43 UTC
# Last Check: 2017-03-16 21:17:08 UTC

Server = https://archive.archlinux.org/repos/2016/12/05/$repo/os/$arch

Here I've set my chroot's system to be 'stuck' in December 2016. You can try different year/month/day values in that url.

Still in the chroot:

## pacman -Syyuu # force downgrade entire chroot jail
## pacman -U /var/cache/pacman/pkg/ca-certificates-utils-20170307-1-any.pkg.tar.xz # Retain newer certs in order to keep pacman working
## pacman -S xterm base-devel libstdc++5 glibc unzip libcanberra python2 dbus-glib chromium libusb-compat libxss lib32-glibc
## cd /lib
## ln -s libncursesw.so.6.0 libncurses.so.5
## useradd -m ctag

Copy the CCS tarball (web or standalone) into the new user's home directory. Chown it to the user, and then unpack it as the user.

On the host system:

$ xhost +local: # run as _not_ root

Now you should be able to open a window as the jailed user:

#$ cd CCS6.2.0.00050_linux-x64/
#$ ./ccs_setup_linux64_6.2.0.00050.bin

From there you should be free to run the IDE from the chroot. It's not a perfect solution, but it should be a little lighter on system resources than running a VM.

To be able to upload/debug from the chroot jail. I had to copy the udev rules over to my host system, restart udev, and also put the jailed 'ctag' user in the uucp group.

To make launching CCS easier, here are some shell scripts:

In main system:

launch_ccs.sh
#!/bin/bash
arch-chroot -u ctag:ctag /var/ccs-root /home/ctag/ccs.sh
/home/ctag/ccs.sh
#!/bin/bash
/home/ctag/ti/ccsv6/eclipse/ccstudio