1. Trang chủ
  2. » Công Nghệ Thông Tin

embeddedsystemsandlabsforarm v1 1 phần 3 pps

29 219 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 29
Dung lượng 1,05 MB

Nội dung

Embedded Systems Development and Labs; The English Edition 60 Figure 2-40 Compiler Warning Settings c) Compiler Debug/Optimization Settings The compiler debug/optimization setting is shown in Figure 2-41. Figure 2-41 Compiler Debug/Optimization Settings Embedded Systems Development and Labs; The English Edition 61 d) Compiler Target Specific Options Settings The compiler target specific options setting is shown in Figure 2-42. Figure 2-42 Compiler Target Specific Options Settings e) Compiler Code Generation Settings The code generation setting is shown in Figure 2-43. Embedded Systems Development and Labs; The English Edition 62 Figure 2-43 Compiler Code Generation Settings 6. Assembler Settings The assembler settings is shown in Figure 2-44. All the settings in this page will be displayed in the “Assemble Options” window. The users can manually edit the “Assemble Options” but need to follow the GNU rules. a) Assembler General Settings The assembler general settings are shown in Figure 2-44. ● Include Directory – header files directory. ● Object files location – the directory of object files. ● Predefinitions – Define the pre-compile macros. Embedded Systems Development and Labs; The English Edition 63 Figure 2-44 Assembler General Settings b) Assembler Code Generation Settings The assembler warning setting is shown in Figure 2-45. Figure 2-45 Code Generation Settings Embedded Systems Development and Labs; The English Edition 64 c) Assembler Target Specific Settings The assembler target specific setting is shown in Figure 2-46. Figure 2-46 Assembler Target Specific Settings d) Assembler Warning Options Settings The assembler warning options setting is shown in Figure 2-42. Embedded Systems Development and Labs; The English Edition 65 Figure 2-47 Assembler Warning Options Settings 7. Linker Settings The linker settings are shown in Figure 2-48. All the settings in this page will be displayed in the “Link Options” edit window. The users can manually edit the Link Options but need to follow the GNU rules. a) Linker General Settings The linker general setting is shown in Figure 2-48. ● Executable file – generate executable file. ● Library – generate library file. ● Linker script file – select this item only when executable output file is selected. ● Output file name – could be elf or lib file. Figure 2-48 Linker General Settings b) Linker Image Entry Options Settings The assembler warning settings are shown in Figure 2-49. ● Select Entry file – select one of the files listed in the List Box as the first parameter file in the linker command. When the Image Entry Point is set, this item can be empty. ● Image entry point – the entry point of executable file. Embedded Systems Development and Labs; The English Edition 66 Figure 2-49 Linker Image Entry Options Settings c) Linker Code Generate Option Settings The code generation option setting is shown in Figure 2-50. Figure 2-50 Linker Code Generate Option Settings Embedded Systems Development and Labs; The English Edition 67 d) Linker Include Object and Library Modules Settings The include object and library settings are shown in Figure 2-51. Figure 2-51 Linker Include Object and Library Modules Settings e) Linker Additional Library Search Path Settings The additional library search path setting is shown in Figure 2-52. Embedded Systems Development and Labs; The English Edition 68 Figure 2-52 Linker Add Library Search Path Settings 2.4.4 Project Compiling and Linking After the project is properly configured, the user can compile and link the project shown as shown in Figure 2-53. If there are any errors, double click the text line in the output window; the error line will be located. Figure 2-53 Project Build Menu and Tools Bar 2.4.5 Load Debugging The Embest IDE for ARM includes a software emulator. The user can debug software without the hardware. If the users debug software with the hardware, the JTAG emulator needs to be connected. Select DebugÆRemote Connect and then select “Download” from the menu. If “Automatic Download” is selected in the project settings, the online debugging will be launched immediately after the file is downloaded. 1. Break Point Setting and Single Stepping The Embest IDE can set break points in source program, disassemble program code source/assembly mixed program. There are following ways of setting break points: ● Use “Insert/Remove Break Point” button. ● Use F9. ● Use “Hand” pointer. ● Use DebugÆToggle Breakpoint menu item. A valid break point sample is shown in Figure 2-54. Embedded Systems Development and Labs; The English Edition 69 Figure 2-54 A Valid Break Point If a break point is set at a non-executable line, the break point is not valid. The non-valid break point is shown in Figure 2-55. Figure 2-55 An Invalid Break Point When the program is executed, it will stop at the first break point as shown in Figure 2-56. Figure 2-56 Program Stops at Break Point The user can select DebugÆBreakpoints… item, and a dialog box will list all the break points as shown in Figure 2-57. [...]... Systems Development and Labs; The English Edition Chapter 3 Embedded System Development Basic Labs 3 .1 ARM Assembly Instructions Lab 1 3 .1. 1 Purpose ● Learn how to use Embest IDE for ARM and ARM Software Emulator ● Use basic ARM instructions 3 .1. 2 Lab Equipment ● Hardware: PC ● Software: Embest IDE 20 03, Windows 98/2000/NT/XP 3 .1. 3 Content of the Lab 1 ● Introduction to the development environment and learn... at the current step 3 .1. 7 Exercises (1) Write a program to write the values 1- 8 into R4-R 11 Every time when you write this value, save the content of R4-R 11 to SP The initial value of SP should be 0x800 At the end, use the LDMFD instruction to clear R4-R 11 to 0 (2) Modify the value of x, y in this Lab and watch the results in the debug windows 3. 2 ARM Assembly Instruction Lab 2 3. 2 .1 Purpose Through... ORR etc 3 .1. 4 Principles of the Lab 1 The ARM processor has a total of 37 registers: ● 31 general-purpose registers, including a program counter (PC) These registers are 32 bits wide ● 6 status registers The status registers are also 32 -bit wide but only 12 -bits are used The registers are arranged in partially overlapping banks, with a different register bank for each processor mode At any time, 15 general-purpose... numbers, running from 0 to 232 - 1 The address space is regarded as consisting of 230 32 -bit words, each of whose address is word-aligned, which means that the address is divisible by 4 The word whose word-aligned address is A consists of the four bytes with addresses A, A +1, A+2, and A +3 In ARM architecture version 4 and above, the address space is also regarded as consisting of 2 31 16-bit halfwords, each... Figure 3- 5 Debugger Settings of the Workspace 3 Lab B (1) Right click the mouse on the Workspace in the project management window and select “Add New Project to Workspace…” (2) Refer to Lab A, build project sam_b (3) Refer to Lab A, finish the object code generation and debugging (4) After understanding and mastering the Lab A, do the exercises at the end of the Lab 1 3 .1. 6 Sample Programs of Lab 1 1 Lab... Figure 2-70 Figure 2-70 Flash programmer settings 1 Features and Functions of the Flash Programmer ● Supports all microprocessors based on ARM7 and ARM9 such as AT91R4087, EP7 31 2 , S3C4 510 and S3C2 410 , etc 76 Embedded Systems Development and Labs; The English Edition ● ● ● ● ● Supports most of flash products such as ATMEL AM29 series, Intel 28 series and SST 29 /39 /49 series, etc Supports flash empty checking,... referred to, you use names of the form: R 13_ , R14_ Where is the appropriate one of usr, svc (for Supervisor mode), abt, und, irq and fiq Register R 13 is normally used as a stack pointer and is also know as the SP In the ARM instruction set, this is by convention only, as there are no defined instructions or other functionality which use R 13 in a special-case manner However, there... open Select the “Processor” page shown in Figure 3- 2 Set the target board processor as arm7 81 Embedded Systems Development and Labs; The English Edition Figure 3- 2 Processor Settings at New Work Space (5) Generate Object Code: Select Build Build asm_a or press F7 to generate the object code Or click the button on tool bar shown in Figure 3- 3 Figure 3- 3 Embest IDE Compiling Buttons (6) Debug Settings:... sensitive Example: global My AsmFunc 3) text The text pseudo operator tells the compiler to put the compiled code to start from text of the code section or subsection Syntax Format: text {subsection} Example: text 4) end end is the end notation of the assembly file The code after this notation will not be processed Syntax Format: end 3 .1. 5 Lab 1 Operation Steps 1 Lab A (1) Create a New Project: Run the... in the address 0x8000-0x801F and the content in the address 0xFF0-0xFFF (9) Single step to execute the program and watch and record the values in the memory (10 ) Watch the program run and study the related technical details Get a good understanding of the usage of the ARM instructions (11 ) After understanding and mastering the Lab A, do the exercises at the end of the Lab 1 83 Embedded Systems Development . programmer settings 1. Features and Functions of the Flash Programmer ● Supports all microprocessors based on ARM7 and ARM9 such as AT91R4087, EP7 31 2 , S3C4 510 and S3C2 410 , etc. Embedded Systems. Development and Labs; The English Edition 78 Chapter 3 Embedded System Development Basic Labs 3 .1 ARM Assembly Instructions Lab 1 3 .1. 1 Purpose ● Learn how to use Embest IDE for ARM and. Emulator. ● Use basic ARM instructions. 3 .1. 2 Lab Equipment ● Hardware: PC ● Software: Embest IDE 20 03, Windows 98/2000/NT/XP 3 .1. 3 Content of the Lab 1 ● Introduction to the development environment

Ngày đăng: 14/08/2014, 20:21