当前位置:网站首页>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
边栏推荐
- CMU提出NLP新范式—重构预训练,高考英语交出134高分
- StaticLayout的使用详解
- 面试:List 如何根据对象的属性去重?
- Architecture high reliability application knowledge map ----- microservice architecture map
- Résumé de la graduation
- 转载文章:数字经济催生强劲算力需求 英特尔发布多项创新技术挖掘算力潜能
- Interpretation of bilstm-crf in NER forward_ algorithm
- [today in history] June 5: Lovelace and Babbage met; The pioneer of public key cryptography was born; Functional language design pioneer born
- [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
- Truth table of common anode digital tube
猜你喜欢

初始线性回归

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

【倒立摆控制】基于UKF无迹卡尔曼滤波的倒立摆控制simulink仿真

【云原生】-Docker安装部署分布式数据库 OceanBase

在线JSON转PlainText工具

【历史上的今天】6 月 1 日:Napster 成立;MS-DOS 原作者出生;谷歌出售 Google SketchUp

How does win11 close recently opened projects? Win11 method to close recently opened projects

Solutions to st link USB communication error
![[2D code image correction and enhancement] simulation of 2D code image correction and enhancement processing based on MATLAB](/img/d8/a367c26b51d9dbaf53bf4fe2a13917.png)
[2D code image correction and enhancement] simulation of 2D code image correction and enhancement processing based on MATLAB
![[inverted pendulum control] Simulink simulation of inverted pendulum control based on UKF unscented Kalman filter](/img/17/3c93ddf8f55c63a97480a78cbf8111.png)
[inverted pendulum control] Simulink simulation of inverted pendulum control based on UKF unscented Kalman filter
随机推荐
【历史上的今天】6 月 18 日:京东诞生;网店平台 Etsy 成立;Facebook 发布 Libra 白皮书
ROS+Gazebo中红绿黄交通灯如何实现?
【历史上的今天】6 月 15 日:第一个手机病毒;AI 巨匠司马贺诞生;Chromebook 发布
在线文本按行批量反转工具
第一次使用gcc和makefile编写c程序
Skills in schematic merging
Starting sequence of Turing machine
云原生(三十) | Kubernetes篇之应用商店-Helm
Usage differences between isempty and isblank
[today in history] June 7: kubernetes open source version was released; Worldofwarcraft landed in China; Birth of the inventor of packet switching network
MFC常用 当前路径
Mysql数据库基础:DML数据操作语言
【历史上的今天】6 月 23 日:图灵诞生日;互联网奠基人出生;Reddit 上线
MySQL query related knowledge (advanced level 7: sub query
Explanation of OSI layer 7 model (easy to understand in Chinese)
在线JSON转PlainText工具
[today in history] June 12: the United States entered the era of digital television; Mozilla's original developer was born; 3com merges with American Robotics
转载文章:数字经济催生强劲算力需求 英特尔发布多项创新技术挖掘算力潜能
【历史上的今天】6 月 3 日:微软推出必应搜索引擎;Larry Roberts 启动阿帕网;Visual Basic 之父出生
【电梯控制系统】基于VHDL语言和状态机实现的电梯控制系统的设计,使用了状态机