Use TinyCC to write C programs in the (milkv-duo) development board for debugging

TinyCC Debugging Tool - TinyCC

https://pan.baidu.com/s/1K9RVYnv8Wc3Ln8yc0oxwdg   Extract code: 9255

1. Uploading milkv-duo-tinycc.zip to the development board system installation through SSH


scp ./milkv-duo-tinycc.zip root@192.168.42.1:~/

2. Installing TinyCC


ssh root@192.168.42.1

cd ~/

unzip milkv-duo-tinycc.zip

cd milkv-duo-tinycc

./install.sh

cd ..

3. Writing and uploading a test program

Save the following code to a local test.c file


#!/usr/local/bin/tcc -run

#include <stdio.h> int main(int argc, char **argv) { printf("%s---\n", "hello milk-v!"); return 0; } scp ./test.c root@192.168.42.1:~/

4. Compiling and running the test program


cd ~/ tcc -o test test.c ./test

5. Interpreting and executing the test program


tcc -run test.c

6. Executing the test program script


chmod +x test.c ./test.c

7. Attaching the test program package tcc-examples.zip


scp ./tcc-examples.zip root@192.168.42.1:~/

cd ~/

unzip tcc-examples.zip

cd ./tcc-examples

./test.c

Note that this version needs to be executed on a musl-compiled kernel