Lesson Seven + SourceInsight3.5 use Linux bare-metal development use + notepad ++

A, Linux bare metal development

Glossary: gcc
gcc is the main compiler software linux system,
gcc stands for GNU compiler suite (GNU Compiler Collection),
in addition to the program c language development can be compiled, but can also develop C ++, the Java and other languages .
GCC intention is for the GNU operating system specifically written a compiler.

The reason for using the gcc: powerful, stable, open source free.

1) gcc -v view gcc version, which proves the gcc compiler normally.
No matter which version you are using gcc, behind only the normal compile it.

2) gcc -o output file name of the source file
o: output


Cross-compilation mode:
platform usually compiled program become embedded host (such as: PC's ubuntu system, CPU architecture X86 architecture),
platform running embedded program becomes the target machine (eg: a section ARM development board, CPU architecture ARM architecture).
In the editing and X86 platform and compiler arm-linux-gcc compiler program ARM architecture,
they belong to different architectural platforms, so that part of the cross compilation mode.
Then programmed into the ARM development board (downloading methods: a variety of ways JTAG, USB, SD card, network, etc.),
then the development board to run the program.

 

Editor
Recommended source insight and notepad using the windows platform.
source insight when looking at the code, edit the code and so is very easy to use.

 

The compiler
is recommended to use linux-gcc-arm
arm-linux-gcc based on linux platform arm compiler. It is open source free compiler.
arm-linux-gcc powerful, stable, many support arm chip, update speed.

Getting errors: use the ADS, MDK
the ADS (stop updating), MDK, is a windows platform compiler function is weak.
1) only suitable for individuals or small development teams, collaborative development is not suitable for medium and large teams.
2) is a billing software.


The purpose of our study was to find a job embedded.
Then the learning process is necessary to master the actual development of the enterprise development process.


// ================================================ ============
editors
recommend using source insight and notepad windows platform.
source insight when looking at the code, edit the code and so is very easy to use.

source insight: c files, h files, ARM assembler files
notepad: other files, such as Makefile (simply understood as: specifies what you want to compile the source file, the output file name is specified compilation)


source insight is billing software, but the software is free for 35 days.
Version: 3.5
installation package: their own Baidu, "source insight3.5"

 

 

Two, source insight3.5 use

Installation package path: D:. \ 2 Wei Dongshan Linux \ Tools & drive \ tools and drivers \ read source tools

Version: 3.5

Free access to 35 days

 

Tutorial:

1) increase the File Type
options -> documents options, the filter c source file to file * .c; * h; * S

2) new projects (new construction)
Project -> new new Project, and then add the appropriate files to the project.

3) font settings (to solve the Chinese garbled)
Options -> Documents in Options, set the screen fonts: Times New Roman, regular, 12, GB2312.

Use alt + F12 to adjust the font width.

4) explain the source insight window

Window Project: The project indicates which files.
Main Window: displays the contents of the currently open file.
Symbol Window: Displays the currently open file function name, structure name, macros, and so on.
Context window: the cursor on a function (the variable, the macro definition), in the following context window can see the corresponding definitions.

 

5) display line numbers
view -> line number

6) to quickly jump to a line in
the toolbar there is a go to line.

7) Highlight keywords
cursor over the keyword, and then right-click menu ---> highlight word

8) Check function defines the position of
the cursor on the function, and the context menu ---> jump to defintion, or ctrl + left mouse button.
go back (alt +,) back to the last cursor position, or use the left arrow in the toolbar.
go forward (alt +.) Back to the position next cursor, or use the right arrow in the toolbar.

9)查找
右键菜单-->lookup reference,或者ctrl + / 。

 三、notepad和二进制文件查看工具

安装包路径

D:\2.韦东山Linux\工具&驱动\工具和驱动\文本编辑器Notepad++

 D:\2.韦东山Linux\工具&驱动\工具和驱动\二进制工具

free-hex-editor-one:查看二进制文件

Guess you like

Origin www.cnblogs.com/freyluo/p/11059008.html