Difference between revisions of "BITL MCU"
(→Assignments) |
(→Calendar) |
||
(40 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
[[#Assignments | Assignments]] | |
[[#Assignments | Assignments]] | |
||
[[#Resources | Resources]] | |
[[#Resources | Resources]] | |
||
[[#{{CURRENTDAY2}}.{{CURRENTMONTH}}.{{CURRENTYEAR}} |
[[#{{CURRENTDAY2}}.{{CURRENTMONTH}}.{{CURRENTYEAR}} | Today <small>(if there is a class)</small>]] |
||
</big> |
</big> |
||
'''Course: Introduction to Processors''' |
'''Course: Introduction to Processors''' |
||
===Introduction=== |
|||
The course is about low level hardware architecture of the computers and the programming at that level. In particular, we study ARM Assembly programming language and techniques while discussing the microprocessor resources and features that implement the instructions. The students learn how to develop a code in Assembly and what to consider when implementing efficient programs in higher level languages. |
|||
===Deliverables=== |
|||
* All assignments are due by the end of the day on the due date, unless otherwise specified. |
|||
=Calendar= |
=Calendar= |
||
Line 22: | Line 25: | ||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
==== |
====01.09.2023==== |
||
9:00 |
|||
11:10 |
|||
| |
| |
||
{| width='100%' style='background-color:#ddd;' |
{| width='100%' style='background-color:#ddd;' |
||
Line 34: | Line 37: | ||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
==== |
====01.09.2023==== |
||
11:10 |
11:10 |
||
| |
| |
||
Line 41: | Line 44: | ||
|} |
|} |
||
Representation of non-negative numbers in hardware, registers and memory. Decimal, binary, octal, and hexadecimal systems. Converting between the systems. |
Representation of non-negative numbers in hardware, registers and memory. Decimal, binary, octal, and hexadecimal systems. Converting between the systems. |
||
| |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====08.09.2023==== |
|||
9:00 |
|||
| |
| |
||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Two's complement'''</big> |
|||
|} |
|||
Representing negative numbers in hardware. Register size, and why it is important. Methods for encoding negative numbers: packed, signed, bias, one's complement and two's complement. Converting between the value and two's complement in binary and hexadecimal systems. |
|||
| |
|||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
==== |
====08.09.2023==== |
||
11:10 |
11:10 |
||
| |
| |
||
Line 52: | Line 66: | ||
|<big>'''Lab :: Quiz 1'''</big> |
|<big>'''Lab :: Quiz 1'''</big> |
||
|} |
|} |
||
'''Lab''' |
|||
Practicing the conversion between the counting systems |
|||
'''Quiz 1''' |
'''Quiz 1''' |
||
Decimal, binary, octal and hexadecimal systems. |
Decimal, binary, octal and hexadecimal systems. |
||
'''Lab''' |
|||
Quiz review. Practicing the conversion between the systems with different bases |
|||
| |
| |
||
* Assignment '''Lab_Binary''' - Lab |
|||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
====21.09.21==== |
|||
====15.09.2023==== |
|||
11:10 |
|||
9:00 |
|||
| |
| |
||
{| width='100%' style='background-color:#ddd;' |
{| width='100%' style='background-color:#ddd;' |
||
|<big>''' |
|<big>'''Processor architecture'''</big> |
||
|} |
|} |
||
Architecture of a processor. Registers, register file, ALU, datapath. CISC vs. RISC architectures. x86 architecture as CISC representative. ARM architecture as RISC. Instruction encoding. |
|||
Representing negative numbers in hardware. Register size, and why it is important. Methods for encoding negative numbers: packed, signed, bias, one's complement and two's complement. Converting between the value and two's complement in binary and hexadecimal systems. |
|||
| |
| |
||
Line 77: | Line 93: | ||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
==== |
====15.09.2023==== |
||
11:10 |
11:10 |
||
| |
| |
||
Line 83: | Line 99: | ||
|<big>'''Lab :: Quiz 2'''</big> |
|<big>'''Lab :: Quiz 2'''</big> |
||
|} |
|} |
||
'''Lab''' |
|||
Exercises with the two's complement |
|||
'''Quiz 2''' |
'''Quiz 2''' |
||
Two's complement. |
Two's complement. |
||
'''Lab''' |
|||
Quiz review. Exercises with the two's complement |
|||
| |
| |
||
* Assignment '''Lab_Complement''' - Lab |
|||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
====28.09.21==== |
|||
====22.09.2023==== |
|||
11:10 |
|||
9:00 |
|||
| |
| |
||
{| width='100%' style='background-color:#ddd;' |
{| width='100%' style='background-color:#ddd;' |
||
|<big>''' |
|<big>'''Computing environment'''</big> |
||
|} |
|} |
||
Environment and tools for compiling and debugging Assembly programs. Compiler, preprocessor, assembly, linker, loader, debugger. Cross-compilation and toolchains. Emulators and virtual machines. |
|||
Architecture of a processor. Registers, register file, ALU, datapath. CISC vs. RISC architectures. x86 architecture as CISC representative. ARM architecture as RISC. Instruction encoding. |
|||
| |
| |
||
Line 108: | Line 126: | ||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
==== |
====22.09.2023==== |
||
11:10 |
11:10 |
||
| |
| |
||
Line 117: | Line 135: | ||
| |
| |
||
* Assignment '''Lab_Make''' - Lab |
|||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
==== |
====29.09.2023==== |
||
9:00 |
|||
11:10 |
|||
| |
| |
||
{| width='100%' style='background-color:#ddd;' |
{| width='100%' style='background-color:#ddd;' |
||
|<big>''' |
|<big>'''ARM Assembly and arithmetic'''</big> |
||
|} |
|} |
||
Introduction to ARM Assembly language and programming. Instruction types. Arithmetic instructions. MOV, ADD, SUB. MVN, ADC, SBC, RSB, RSC. Barrel Shifter. |
|||
Environment and tools for compiling and debugging Assembly programs. Compiler, preprocessor, assembly, linker, loader, debugger. Cross-compilation and toolchains. Emulators and virtual machines. |
|||
| |
| |
||
* HW1 announced |
|||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
====08.10.21==== |
|||
====29.09.2023==== |
|||
11:10 |
11:10 |
||
| |
| |
||
Line 142: | Line 161: | ||
| |
| |
||
* Assignment '''Lab_Make_2''' - Lab |
|||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
====12.10.21==== |
|||
====06.10.2023==== |
|||
11:10 |
|||
9:00 |
|||
| |
| |
||
{| width='100%' style='background-color:#ddd;' |
{| width='100%' style='background-color:#ddd;' |
||
|<big>''' |
|<big>'''Flow control and tests'''</big> |
||
|} |
|} |
||
Flow control in Assembly. Branch instructions. B, BL, BX, BLX. Working directly with PC register. CPSR flags. Condition field. Bit operations. AND, ORR, EOR, BIC, shift and rotation. CMP, CMN, TST, TEQ. Fast flags and the S postfix. |
|||
Introduction to ARM Assembly language and programming. Instruction types. Arithmetic instructions. MOV, ADD, SUB. MVN, ADC, SBC, RSB, RSC. Barrel Shifter. |
|||
| |
| |
||
Line 158: | Line 177: | ||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
====15.10.21==== |
|||
====06.10.2023==== |
|||
11:10 |
11:10 |
||
| |
| |
||
Line 167: | Line 187: | ||
| |
| |
||
* Assignment '''Lab_Dry_Run''' - Lab |
|||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
====19.10.21==== |
|||
====13.10.2023==== |
|||
11:10 |
|||
9:00 |
|||
| |
| |
||
{| width='100%' style='background-color:#ddd;' |
{| width='100%' style='background-color:#ddd;' |
||
|<big>''' |
|<big>'''Memory instructions'''</big> |
||
|} |
|} |
||
Reading and writing data to memory. Memory access instructions. STR, LDR, STRB, STRH, LDRB, LDRH, LDRSB, LDRSH. Addressing modes: offset, pre-indexed and post-indexed. Using barrel shifter with addressing. Data alignment in memory. |
|||
Flow control in Assembly. Branch instructions. B, BL, BX, BLX. Working directly with PC register. CPSR flags. Condition field. Bit operations. AND, ORR, EOR, BIC, shift and rotation. CMP, CMN, TST, TEQ. Fast flags and the S postfix. |
|||
| |
| |
||
* '''Due''' '''HW1''' |
|||
* HW2 announced |
|||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
====22.10.21==== |
|||
====13.10.2023==== |
|||
11:10 |
11:10 |
||
| |
| |
||
Line 189: | Line 213: | ||
|<big>'''Lab :: Quiz 3'''</big> |
|<big>'''Lab :: Quiz 3'''</big> |
||
|} |
|} |
||
'''Lab''' |
|||
Debugging Assembly programs. Gnu debugger gdb. |
|||
'''Quiz 3''' |
'''Quiz 3''' |
||
Code comprehension. |
Code comprehension. |
||
'''Lab''' |
|||
Quiz review. |
|||
| |
| |
||
* Assignment '''Lab_Debug''' - Lab |
|||
* '''Due''' '''HW1''' - Arithmetic progression |
|||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
====26.10.21==== |
|||
====20.10.2023==== |
|||
11:10 |
|||
9:00 |
|||
| |
| |
||
{| width='100%' style='background-color:#ddd;' |
{| width='100%' style='background-color:#ddd;' |
||
|<big>''' |
|<big>'''Calling subroutines and interfacing with C'''</big> |
||
|} |
|} |
||
Variable types in C: static, automatic and dynamic. Calling subroutines and parameter passing conventions. Parameters and return value. Stack and registers. Saving the registers, the context. Loading and storing multiple registers: LDM, STM. Interfacing between Assembly and C. |
|||
Reading and writing data to memory. Memory access instructions. STR, LDR, STRB, STRH, LDRB, LDRH, LDRSB, LDRSH. Addressing modes: offset, pre-indexed and post-indexed. Using barrel shifter with addressing. Data alignment in memory. |
|||
| |
| |
||
Line 215: | Line 237: | ||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
====29.10.21==== |
|||
====20.10.2023==== |
|||
11:10 |
11:10 |
||
| |
| |
||
Line 221: | Line 244: | ||
|<big>'''Lab'''</big> |
|<big>'''Lab'''</big> |
||
|} |
|} |
||
Debugging Assembly programs. Gnu debugger gdb. |
|||
TBD |
|||
| |
| |
||
* Assignment '''Lab_TBD''' - Lab |
|||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
====02.11.21==== |
|||
====27.10.2023==== |
|||
11:10 |
|||
9:00 |
|||
| |
| |
||
{| width='100%' style='background-color:#ddd;' |
{| width='100%' style='background-color:#ddd;' |
||
|<big>''' |
|<big>'''Symbols'''</big> |
||
|} |
|} |
||
Symbol encoding in hardware and software. Code tables. ASCII. EBCDIC. ISO code tables. Foreign letter symbols. UTF-8, UTF-16. Strings in C and memory. Converting values to symbols and strings. |
|||
Variable types in C: static, automatic and dynamic. Calling subroutines and parameter passing conventions. Parameters and return value. Stack and registers. Saving the registers, the context. Loading and storing multiple registers: LDM, STM. Interfacing between Assembly and C. |
|||
| |
| |
||
* '''Due''' '''HW2''' |
|||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
====05.11.21==== |
|||
====27.10.2023==== |
|||
11:10 |
11:10 |
||
| |
| |
||
Line 246: | Line 272: | ||
|<big>'''Lab'''</big> |
|<big>'''Lab'''</big> |
||
|} |
|} |
||
Practice passing parameters and working with buffers. |
|||
TBD |
|||
| |
| |
||
* Assignment '''Lab_TBD''' - Lab |
|||
* '''Due''' '''HW2''' - Matrix multiplication |
|||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
====09.11.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Symbols'''</big> |
|||
|} |
|||
Symbol encoding in hardware and software. Code tables. ASCII. EBCDIC. ISO code tables. Foreign letter symbols. UTF-8, UTF-16. Strings in C and memory. Converting values to symbols and strings. |
|||
====03.11.2023==== |
|||
| |
|||
9:00 |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====12.11.21==== |
|||
11:10 |
|||
| |
| |
||
{| width='100%' style='background-color:#ddd;' |
{| width='100%' style='background-color:#ddd;' |
||
Line 277: | Line 289: | ||
| |
| |
||
* Assignment '''Proj''' - Project |
|||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
====16.11.21==== |
|||
====10.11.2023==== |
|||
11:10 |
11:10 |
||
| |
| |
||
Line 292: | Line 305: | ||
* '''Due''' '''M1P1''' - Midterm 1 programming task 1, tested |
* '''Due''' '''M1P1''' - Midterm 1 programming task 1, tested |
||
* '''Due''' '''M1P2''' - Midterm 1 programming task 2, tested |
* '''Due''' '''M1P2''' - Midterm 1 programming task 2, tested |
||
* Project announced |
|||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
====23.11.21==== |
|||
====10.11.2023==== |
|||
11:10 |
11:10 |
||
| |
| |
||
Line 301: | Line 315: | ||
|<big>'''Lab'''</big> |
|<big>'''Lab'''</big> |
||
|} |
|} |
||
Midterm review. |
|||
TBD |
|||
| |
| |
||
* Assignment '''Lab_TBD''' - Lab |
|||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
====26.11.21==== |
|||
====17.11.2023==== |
|||
11:10 |
|||
9:00 |
|||
| |
| |
||
{| width='100%' style='background-color:#ddd;' |
{| width='100%' style='background-color:#ddd;' |
||
Line 317: | Line 331: | ||
| |
| |
||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
====30.11.21==== |
|||
====17.11.2023==== |
|||
11:10 |
11:10 |
||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Lab'''</big> |
|||
|} |
|||
Lab. Q&A session |
|||
| |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====24.11.2023==== |
|||
9:00 |
|||
| |
| |
||
{| width='100%' style='background-color:#ddd;' |
{| width='100%' style='background-color:#ddd;' |
||
Line 328: | Line 355: | ||
Execution time for instructions. Case study for code optimization. Leveraging the documentation and specification of instructions. Reordering the code. Unrolling loops. Taking advantage of branch prediction. Cache memory and the code performance. |
Execution time for instructions. Case study for code optimization. Leveraging the documentation and specification of instructions. Reordering the code. Unrolling loops. Taking advantage of branch prediction. Cache memory and the code performance. |
||
Documentation: [http://download.intel.com/design/intelxscale/27347302.pdf Intel XScale R Core Developer’s Manual]. |
|||
| |
|||
The section and focus: |
|||
* A.2.1.2 — Processor execution pipe diagram. Instruction and data flow description. |
|||
* 10.4 — Instruction execution time. For example, multiplication vs. addition. |
|||
* 5 — Branch prediction mechanism |
|||
* 4 and 6 — Cache memory. Instruction cache and Data cache. |
|||
* A.3–A.5 — Optimizations as suggested by Intel. |
|||
| |
|||
Due: Choose the format of your exam: Project vs. Test. |
|||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
====03.12.21==== |
|||
====24.11.2023==== |
|||
11:10 |
11:10 |
||
| |
| |
||
Line 341: | Line 378: | ||
| |
| |
||
* Assignment '''Lab_Summary''' - Lab |
|||
* '''Due By midnight''' '''Proj''' - Project |
|||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
====13-22.12.2021==== |
|||
====11-21.12.2023==== |
|||
| |
| |
||
Line 357: | Line 393: | ||
|- style='vertical-align: top;' |
|- style='vertical-align: top;' |
||
| |
| |
||
==== |
====15.12.2023==== |
||
9:00 |
|||
11:10 |
|||
| |
| |
||
{| width='100%' style='background-color:#ddd;' |
{| width='100%' style='background-color:#ddd;' |
||
|<big>'''Exam'''</big> |
|<big>'''Exam'''</big> |
||
|} |
|} |
||
<!-- |
|||
Data representation in memory. |
Data representation in memory. |
||
Assembly code comprehension. |
Assembly code comprehension. |
||
Multiple choice questions and a programming task. |
Multiple choice questions and a programming task. |
||
--> |
|||
| |
| |
||
* All deliverables due |
|||
* '''Due''' '''ExamP1''' - Exam programming task, tested |
|||
<!-- |
|||
* '''Due by midnight''' '''ExP1''' - Exam programming task, tested |
|||
* '''Due by midnight''' '''Proj''' - Project |
|||
--> |
|||
|} |
|} |
||
=Assignments= |
=Assignments= |
||
* |
* Homeworks are available from e-Studijas |
||
=Resources= |
|||
*[https://www.cs.colby.edu/maxwell/courses/tutorials/maketutor/ A simple Makefile tutorial] |
|||
* [https://developers.redhat.com/blog/2021/04/30/the-gdb-developers-gnu-debugger-tutorial-part-1-getting-started-with-the-debugger GDB getting started tutorial] |
|||
====ARM==== |
|||
* [http://pages.cs.wisc.edu/~markhill/restricted/arm_isa_quick_reference.pdf ARM instruction set quick reference] - from U.Wisconsin. |
|||
{{MCU_resources}} |
|||
* [https://developer.arm.com/documentation/100076/0100/a32-t32-instruction-set-reference/a32-and-t32-instructions/a32-and-t32-instruction-summary?lang=en A32 instruction summary] |
|||
* [https://developer.arm.com/architectures/system-architectures/software-standards/abi Application Binary Interface (ABI)] for the Arm architecture |
|||
* [https://developer.arm.com/architectures/instruction-sets/base-isas/a32 ARM A32 instruction set]. Note, that ARM has several [https://developer.arm.com/architectures/instruction-sets instruction sets described here] |
Latest revision as of 20:14, 5 October 2023
Shortcuts: Calendar | Assignments | Resources | Today (if there is a class)
Course: Introduction to Processors
Introduction
The course is about low level hardware architecture of the computers and the programming at that level. In particular, we study ARM Assembly programming language and techniques while discussing the microprocessor resources and features that implement the instructions. The students learn how to develop a code in Assembly and what to consider when implementing efficient programs in higher level languages.
Deliverables
- All assignments are due by the end of the day on the due date, unless otherwise specified.
Calendar
Date | Topic, content | Deliverables | |
---|---|---|---|
01.09.20239:00 |
Microprocessors and microcontrollers. Applications. Architectures. Coourse outline. |
||
01.09.202311:10 |
Representation of non-negative numbers in hardware, registers and memory. Decimal, binary, octal, and hexadecimal systems. Converting between the systems. |
||
08.09.20239:00 |
Representing negative numbers in hardware. Register size, and why it is important. Methods for encoding negative numbers: packed, signed, bias, one's complement and two's complement. Converting between the value and two's complement in binary and hexadecimal systems.
|
||
08.09.202311:10 |
Quiz 1 Decimal, binary, octal and hexadecimal systems. Lab Quiz review. Practicing the conversion between the systems with different bases |
| |
15.09.20239:00 |
Architecture of a processor. Registers, register file, ALU, datapath. CISC vs. RISC architectures. x86 architecture as CISC representative. ARM architecture as RISC. Instruction encoding. |
||
15.09.202311:10 |
Quiz 2 Two's complement. Lab Quiz review. Exercises with the two's complement |
| |
22.09.20239:00 |
Environment and tools for compiling and debugging Assembly programs. Compiler, preprocessor, assembly, linker, loader, debugger. Cross-compilation and toolchains. Emulators and virtual machines. |
||
22.09.202311:10 |
Developing and testing a simple Assembly program. Using cross-compilation tools. Introduction to the Make system. |
| |
29.09.20239:00 |
Introduction to ARM Assembly language and programming. Instruction types. Arithmetic instructions. MOV, ADD, SUB. MVN, ADC, SBC, RSB, RSC. Barrel Shifter. |
| |
29.09.202311:10 |
Advanced features of the Make system. |
||
06.10.20239:00 |
Flow control in Assembly. Branch instructions. B, BL, BX, BLX. Working directly with PC register. CPSR flags. Condition field. Bit operations. AND, ORR, EOR, BIC, shift and rotation. CMP, CMN, TST, TEQ. Fast flags and the S postfix. |
||
06.10.202311:10 |
Evaluating and following the code "on paper". |
| |
13.10.20239:00 |
Reading and writing data to memory. Memory access instructions. STR, LDR, STRB, STRH, LDRB, LDRH, LDRSB, LDRSH. Addressing modes: offset, pre-indexed and post-indexed. Using barrel shifter with addressing. Data alignment in memory. |
| |
13.10.202311:10 |
Quiz 3 Code comprehension. Lab Quiz review. |
||
20.10.20239:00 |
Variable types in C: static, automatic and dynamic. Calling subroutines and parameter passing conventions. Parameters and return value. Stack and registers. Saving the registers, the context. Loading and storing multiple registers: LDM, STM. Interfacing between Assembly and C. |
||
20.10.202311:10 |
Debugging Assembly programs. Gnu debugger gdb. |
||
27.10.20239:00 |
Symbol encoding in hardware and software. Code tables. ASCII. EBCDIC. ISO code tables. Foreign letter symbols. UTF-8, UTF-16. Strings in C and memory. Converting values to symbols and strings. |
| |
27.10.202311:10 |
Practice passing parameters and working with buffers. |
||
03.11.20239:00 |
Data representation in memory. Assembly code comprehension. Two programming tasks. |
| |
10.11.202311:10 |
Expressions in Assembly. Operators in expressions. Constants. Assigning values to symbols. Directives: .set, .equiv, .eqv. Conditional compilation. Directives .if, .ifdef, .endif., ifb, .ifc, .ifeqs. More conditionals .ifeq, .ifge, .ifne and others. Macro commands: .macro, .endm., .rept. Recursive macros. Local macros. Macros across sections. |
| |
10.11.202311:10 |
Midterm review. |
||
17.11.20239:00 |
Including Assembly in C code. Inline code and Assembly code operands. Tasks for the compiler, linker and loader. Dynamic loaders and libraries. |
||
17.11.202311:10 |
Lab. Q&A session |
||
24.11.20239:00 |
Execution time for instructions. Case study for code optimization. Leveraging the documentation and specification of instructions. Reordering the code. Unrolling loops. Taking advantage of branch prediction. Cache memory and the code performance. Documentation: Intel XScale R Core Developer’s Manual. The section and focus:
|
Due: Choose the format of your exam: Project vs. Test. | |
24.11.202311:10 |
Review of the course topics |
||
11-21.12.2023 |
Time for exams |
||
15.12.20239:00 |
|
|
Assignments
- Homeworks are available from e-Studijas
Resources
Tutorials
- Setting up ARM development environment on Ubuntu
Make
GDB
- GDB tutorial from UMD
- GDB getting started tutorial
- GDB commands in short from PDX
- GDB manual
Remote debugging example
Debugging myprog with a parameter 10.
- First, start the qemu emulator, providing the communications port (12345), and run it in background (&).
- Before you do this, make sure that the port is not in use by anyone or anything.
- Then start the gdb-multiarch with the name of the program and
- Use the gdb command "remote target" with address (localhost) and the port (12345).
- Finally start the program execution with "continue". Perhaps, you may want to set some breakpoints before that.
$ qemu-arm -L /usr/arm-linux-gnueabi -g 12345 myprog 10 & $ gdb-multiarch myprog (gdb) target remote localhost:12345 (gdb) continue
A few essential GDB commands
GDB command | Shortcut | Description |
run | Run the program from the beginning | |
continue | c | Continue (or start) the execution of the program |
step | s | Execute the current line from the source. If there is a function call, step into it.
This command can have a parameter n that tells how many steps to make. |
next | n | Execute the current line from the source. If there is a function call, stop after running it.
This command can have a parameter n that tells how many steps to make. |
break <x> | b <x> |
Set a "breakpoint" to <x>, where <x> could be:
|
list | l | Shows the source code (lines). Could be followed by a function_name or file:line_number |
info registers | i r | Prints all registers and their values. Can be followed by one or more register names. |
set step mode on | Set running mode such that "step" will enter the code that has no debug information available.
Using "off" instead of "on" resets this mode. |
ARM
- ARM instruction set quick reference - from U.Wisconsin.
- A32 instruction summary
- Application Binary Interface (ABI) for the Arm architecture
- ARM A32 instruction set. Note, that ARM has several instruction sets described here
Xscale
- Intel XScale Microarchitecture Assembly Language Quick Reference Card ARM Instruction Set, Intel Corporation, 2001
- Intel IXP42X Product Line of Network Processors and IXC1100 Control Plane Processor Developer’s Manual, ON: 252480-006US, Intel Corporation, 2006
- Intel XScale(R) Core Developer’s Manual
- Intel XScale R Core Developer’s Manual, ON: 273473-002, Intel Corporation, 2004
Insights
- Teach yourself programming in 10 years by Peter Norvig
- Should I learn assembly language to program a microcontroller? - Answer on Quora by software R&D professional with 40 years of experience.