当前位置:网站首页>Raspberry pie - environment settings and cross compilation
Raspberry pie - environment settings and cross compilation
2022-06-28 02:50:00 【m0_ sixty-one million eight hundred and eleven thousand three h】
One 、 Raspberry pie VNC Viewer Remote connection by
1. The tools we need are raspberry pie , Formatting tool ,VNC Viewer, Image burning tool , Remote connection tools
Raspberry pie ( Official website ):https://www.raspberrypi.org/downloads/raspbian/
Formatting tool :SDCardFormatterv5( Software )
VNC Viewer( Official website ):https://www.realvnc.com/en/connect/download/viewer/
Image burning tool : Raspberry Pi( Software )
Remote connection tools ( Official website ):https://www.chiark.greenend.org.uk/~sgtatham/putty/
If you don't understand, you can refer to :https://blog.csdn.net/qq_43279579/article/details/109142276
2.SD Card format
(1) take SD Insert into the card reader , Then plug the card reader into the computer .
(2) Open the formatting tool SDCardFormatterv5.
(3) Select what you want to format SD card .
(4) Select the dialog box that pops up , choice “ yes ”.
(5) And then it pops up , Prompt for formatting completion , Select OK , It's done. SD Card formatting .
3. Burn image
(1) Open the burning tool raspberry pi.
(2) Click on “CHOOSE OS”, Select the image file you just downloaded , And then click “CHOOSE SD CARD” Select the just formatted SD card , Then click WRITE.
(3) Then a dialog box will pop up , choice “Continue/OK”, then , And started burning .
4. configure network
(1) On the computer , Open the burning image just now SD card .
(2) stay boot Under the table of contents , Build a ssh Empty file .
(3) stay boot Under the table of contents , Create a text file first .
(4) open the text file , Copy the following into the text .
country=CN
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid=" Your wireless network name "
psk=" Your wireless password "
key_mgmt=WPA-PSK
priority=1
}
(5) Save the text just now , And change the name to wpa_supplicant.conf.
(6) Take out SD card , take SD Insert the card into the raspberry pie , Turn on the phone hotspot and connect the raspberry pie at the same time .
(7) You can check the raspberry pie on your mobile phone ip Address .
5.putty Remote connection
(1) open putty, stay Host Name It's about , Enter the results you just viewed IP Address , Then choose “open”.
(2) Select the dialog box that pops up , choice “ no ”.
(3) Enter the user and password ( Default user :pi The default password :raspberry).
(4) Start raspberry pie VNC service , Input instruction (sudo raspi-config), Configure raspberry pie .
(5) Select... With the up and down keys “Interfacing Options”, Then press the left and right keys to select “Select”.
(6) Then press the up and down keys to select “VNC”, Press the left and right keys to select “Select”.
(7)“would you like the vNc server to be enabled?”–> choice “Yes”.
(8)“The VNC server is enabled”–> Carriage return option “OK”.
(9) Up and down key selection “Advanced Options”, Press the left and right keys to select “Select”.
(10) Up and down key selection “Resolution”, Press the left and right keys to select “Select”.
(11) Then there is the resolution selection , choice “DMT Mode 16”, Then choose “OK”.
(12)“The resolution is set to DMT mode 16”–> Carriage return option “OK”.
(13) Back to the beginning , choice “Finish”, complete .
6.VNC Viewer Remote interface display
Open after installation VNC Viewer Interface , First enter the name of raspberry pie at the top IP Address , Then enter... In the pop-up interface Username,Password, Click on “OK”.
Two 、assert( Assertion )
assert() It is generally called assertion , It is a macro that is often used when debugging programs . It is defined in <assert.h> Header file , It is usually used to judge whether there is illegal data in the program , When the program runs, it evaluates the expression in parentheses .
It should be noted that ,assert() Only in Debug Version has , Compilation of Release Version is ignored .
The other thing to note is that assert() And asser() The difference between ,assert() It's a macro , and assert() yes ANSIC Functions specified in the standard , It is associated with assert() Similar function of , But it can be applied to Release In the version , Use assert() The disadvantage of , Frequent calls will greatly affect the performance of the program , Add extra expenses .
assert The definition of macro is as follows
#define assert(ignore) ((void)0)
3、 ... and 、 Raspberry pie Executive .c file
First use putty Raspberry pie , And then use (nano helloworld.c) Command create file , use gcc Tool compilation (gcc helloworld.c) For output (./a.out)
The document code is as follows
#include <assert.h>
#include <stdio.h>
int main()
{
int a;
char str[50];
printf(" Please enter an integer value : ");
scanf("%d", &a);
assert(a >= 10);
printf(" The integer entered is : %d\n", a);
printf(" Please enter the string : ");
scanf("%s", str);
assert(str != NULL);
printf(" The input string is : %s\n", str);
return(0);
}
Four 、 use scp command , Practice in Ubuntu Copy and transfer files between the system and the raspberry pie system .
1. Create a example.txt file

2. Enter the command “sudo nano /etc/ssh/sshd_config”, Then remove the "PermitRootLogin prohibit-password " Previous comments , Save and exit .
 error , Add the input command first “systemctl enable ssh.service”, And then restart . use
scp /home/example.txt [email protected]192.168.75.1:/home/JingL //@ I made my own raspberry pie IP Address
Copy it in raspberry pie 
4, In raspberry pie ls Command to see if there is example.txt file , Use nano example.txt Command to open view :
ls
nano example.txt
5、 ... and 、 Reference link
https://blog.csdn.net/qq_45659777/article/details/125347172?spm=1001.2014.3001.5501
https://blog.csdn.net/qq_43279579/article/details/109142276
边栏推荐
- Win11新建不了文本文档?Win11右键无法新建文本文档的解决方法
- [today in history] June 2: Apple launched swift programming language; China Telecom acquires China Unicom C network; OS X Yosemite release
- LiveData 面试题库、解答---LiveData 面试 7 连问~
- Opencv——霍夫变换以及遇到的一些问题
- Interpretation of bilstm-crf in NER forward_ algorithm
- [fuzzy neural network] simulation of fuzzy neural network based on MATLAB
- Prometheus 2.27.0 新特性
- Architecture high reliability application knowledge map ----- microservice architecture map
- 设计电商秒杀系统
- 批阅2022春季学期课程小论文提交情况
猜你喜欢

Get 5 offers after being notified of layoffs

math_(函数&数列)极限的含义&误区和符号梳理/邻域&去心邻域&邻域半径

STM32的C语言与汇编语言混合编程

【历史上的今天】6 月 17 日:术语“超文本”的创造者出生;Novell 首席科学家诞生;探索频道开播

【历史上的今天】6 月 24 日:网易成立;首届消费电子展召开;世界上第一次网络直播

【方块编码】基于matlab的图像方块编码仿真

【云原生】-Docker安装部署分布式数据库 OceanBase
![[cloud native] - docker installation and deployment of distributed database oceanbase](/img/02/57ab785acafd8ff0a49c584dd05188.png)
[cloud native] - docker installation and deployment of distributed database oceanbase
![[today in history] June 1: Napster was founded; MS-DOS original author was born; Google sells Google SketchUp](/img/fe/497eab2ac4a762298e71d28ed26e41.png)
[today in history] June 1: Napster was founded; MS-DOS original author was born; Google sells Google SketchUp
![[today in history] June 10: Apple II came out; Microsoft acquires gecad; The scientific and technological pioneer who invented the word](/img/0d/9f99eb3dcb73c912987b81fba71890.png)
[today in history] June 10: Apple II came out; Microsoft acquires gecad; The scientific and technological pioneer who invented the word "software engineering" was born
随机推荐
Keil "St link USB communication error" solution
在线JSON转PlainText工具
The graduation season is coming, and the number of college graduates in 2022 has exceeded 10 million for the first time
win11如何添加打印机和扫描仪?win11添加打印机和扫描仪的设置
[inverted pendulum control] Simulink simulation of inverted pendulum control based on UKF unscented Kalman filter
Win11 cannot create a new text document? Solution to win11 right click failure to create a new text document
榜单首发——前装搭载率站上10%大关,数字钥匙方案供应商TOP10
Graduation summary
【历史上的今天】5 月 31 日:Amiga 之父诞生;BASIC 语言的共同开发者出生;黑莓 BBM 停运
MFC common current path
Snake C language
[today in history] June 15: the first mobile phone virus; AI master simahe was born; Chromebook launch
【历史上的今天】6 月 18 日:京东诞生;网店平台 Etsy 成立;Facebook 发布 Libra 白皮书
JDBC与MySQL数据库
[today in history] June 5: Lovelace and Babbage met; The pioneer of public key cryptography was born; Functional language design pioneer born
【历史上的今天】6 月 2 日:苹果推出了 Swift 编程语言;电信收购联通 C 网;OS X Yosemite 发布
How to run unity webgl after packaging (Firefox configuration)
Flutter 使用 CustomPaint 绘制基本图形
Win11新建不了文本文档?Win11右键无法新建文本文档的解决方法
初始线性回归