> Sford wiki > CHIP lessons

In order to compile C programs, you need to bring up the CHIP SDK. Here's a list of things the CHIP doc didn't tell me. Much of this info was derived from other posts to the CHIP forum. Thanks to all who shared! (An early version of this article is also in the forum, and I've been trying to keep this article up-to-date with good replies that have been posted.)


   sudo chown -R vagrant: /home/vagrant
This changes the files to be owned by the vagrant user.
- One specific reason to use "screen" instead of "cu" is that, by default, both "cu" and "ssl" use tilde (~) as the escape character. So if you want to exit "cu" and hit "~.", it actually exits completely out of the "vagrant ssl"
   screen /dev/ttyACM0 115200
Hit an extra return to get the login prompt. Log in with chip/chip.
   sudo nmtui
The "sudo" command may prompt you for the chip account password, chip.
   ifconfig
Ignore the "lo" section. The second line of the "wlan0" section shows the IP address after "inet addr:". Take note of that IP address, but also be aware that this address can change. If you need the IP address to stay constant, you'll have to configure it.
   cd CHIP-buildroot
   make chip_defconfig
   make nconfig
After building nconfig, it automatically runs it. Just enter F9 to exit. Then enter:
   make toolchain
This takes a few minutes to run, after which the compiler and linker are ready to go.
   /home/vagrant/CHIP-buildroot/output/host/usr/bin/arm-linux-gnueabihf-gcc \
       -I/home/vagrant/CHIP-buildroot/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/uapi \
       -I/home/vagrant/CHIP-buildroot/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include \
       -I/home/vagrant/CHIP-buildroot/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/uapi \
       -I/home/vagrant/CHIP-buildroot/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include \
       -I. -Os hello.c -o hello
   scp hello chip@10.0.0.20:
Retrieved from "http://wiki.geeky-boy.com/w/index.php?title=CHIP_lessons"