Friday, November 25, 2016

How to switch GCC version on Ububtu

I had installed GCC version 4.9 and 5.4 from the Ubuntu repositories. How to switch GCC version?
You can switch the symlinks yourself manually, but using "update-alternatives" makes it easy.

[ ]$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9
[ ]$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 50 --slave /usr/bin/g++ g++ /usr/bin/g++-5 

Now you can switch between these versions by using:

[ ]$ sudo update-alternatives --config gcc

Change GCC 9 (Ubuntu 22.04)

[ ]$ sudo apt install gcc-9
[ ]$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100

Tuesday, October 18, 2016

The 2 Good Books

System on Chip Interfaces for Low Power Design (PDF)

Paperback: 406 pages
Publisher: Morgan Kaufmann; 1 edition (December 22, 2015)
Language: English
ISBN-10: 0128016302
ISBN-13: 978-0128016305

Digital Design and Computer Architecture. ARM Edition (PDF)

Paperback: 584 pages
Publisher: Morgan Kaufmann; 1 edition (May 6, 2015)
Language: English
ISBN-10: 0128000562
ISBN-13: 978-0128000564

Saturday, July 30, 2016

Cortex-M on Mac OS


Build Toolchain

Copy the src release package into ~/mac-build/ directory
$ cp gcc-arm-none-eabi-5_3-2016q1-20160330-src.tar.bz2 ~/mac-build 

Prepare source codes
$ cd ~/mac-build
$ tar xjf gcc-arm-none-eabi-5_3-2016q1-20160330-src.tar.bz2
$ cd ./gcc-arm-none-eabi-5_3-2016q1-20160330/src
$ find . -name '*.tar.*' | xargs -I% tar -xf %
$ cd ..
  • Build the toolchain
Start building the toolchain.
$ ./build-prerequisites.sh
$ ./build-toolchain.sh


Cortex-M Platform

[TTBD] TI, NXP, ?

Sunday, January 3, 2016

逝去的 2015

Po 文驟減的一年、沒了閒情逸致。庸庸碌碌的 2015 ...