Git Command Line Operations

git clone <https://repo>             Check out a repository
git add file                         Add a file to a repository
git add *                            Stage all changes for commitment
git comment -m <comment>             Commit a change to a repository
git submodule add <https://repo>     Add a repository as a submodule in current repo
git push                             Update remote repository

MSP-430 Compiler (for openmsp430 target)

# Compile file.c into object file file.o
msp430-elf-gcc -c <file.c> \     
               -o <file.o> 

# Link file.o under linker description linker.x into executable file.elf
msp430-elf-gcc -mmcu=msp430c1111 \
               -T linker.x       \
               <file.o>          \
               -o <file.elf>

# Create a library mylib.a out of object file1.o and file2.o
msp430-elf-ar r mylib.a file1.o file2.o

# Link file.o with mylib.a into executable file.elf
msp430-elf-gcc -mmcu=msp430c1111 \
               -T linker.x       \
               <file.o>          \
               -L<path-to-lib> -lmy \
               -o <file.elf>

# List section sizes of file.elf
msp430-elf-size <file.elf>

# Create an assembly listing file for executable file.elf
msp430-elf-objdump -dSt \
                   <file.elf> \
                   >file.lst 

# Create memory image in binary format for file.elf
msp430-elf-objcopy -I elf32-msp430 -O binary <file.elf> <file.bin>

Quartus

# Generate bitstream from myproject.qpf
quartus_sh --flow compile myproject.qpf

# Test board connectivity
jtagconfig

# Configure a bitstream
nios2-configure-sof -d 2 myproject.sof

Quartus Platform Designer

# Run the BSP editor
nios2-bsp-editor

# Generate and Compile BSP source code
nios2-bsp-generate-files --settings=hal_bsp/settings.bsp \
                         --bsp-dir=hal_bsp
cd hal_bsp
make
cd ..

# Generate application makefile
nios2-app-generate-makefile     \
             --bsp-dir=hal_bsp  \
             --src-files=main.c \
             --elf-name=main.elf

# Open a terminal on a JTAG UART
nios2-terminal

# Download and run bitstream
nios2-download --go main.elf