本文参考了一些资料
1,龙芯1c开源板一步一步玩hello (新手必看,包教包会)。http://www.openloongson.org/forum.php?mod=viewthread&tid=142
2,孙老师的git和网盘(很多资料,包括《一步步跟我学智龙》) https://github.com/sundm75/Loongson-Smartloong-V2.0,
3,智龙开发板手册2015.10.21更新。http://www.openloongson.org/forum.php?mod=viewthread&tid=142
4,龙芯ls1b开发板 基础操作。https://blog.csdn.net/tongxin1101124/article/details/90213727
1,在ubuntu 18.04里下载和解压缩gcc-4.3-ls232.tar.gz,并设置路径PATH的值。
下载地址:http://ftp.loongnix.org/embedd/ls1b/toolchain/
tar zxvf gcc-4.3-ls232.tar.gz -C /
1.5, 编辑 ~/.bashrc文件,将下面这一行添加到文件最后。
set PATH=/opt/gcc-4.3-ls232/bin:$PATH
1.6, 使该文件立即生效。
source ~/.bashrc
2,用vim编辑hello.c程序。用mipsel-linux-gcc编译hello.c
vim hello.c
mipsel-linux-gcc -o hello.out hello.c

3,用tar打包hello.c 和hello.out 。不过也可不打包。
tar cvf hello.tar hello.c hello.out

4,在ubuntu 18.04里用U盘复制tar文件,然后在win7里用putty复制和解压缩U盘tar文件到智龙开发板,并运行hello.out 程序。
智龙板没有自动装载U盘,因此需要手动转载U盘。
fdisk -l #注释:该命令最后列出了U盘: /dev/sda1 32G
mount /dev/sda1 /mnt
tar xvf hello.tar
./hello.out



1054

被折叠的 条评论
为什么被折叠?



