ECE 447: Lecture 5
-
Upload
francesca-haney -
Category
Documents
-
view
27 -
download
2
description
Transcript of ECE 447: Lecture 5
ECE 447: Lecture 5
Software Development
ECE 447: Software Abstraction Layers
High-level language (C, C++, Pascal, Fortran)
Assembly language (68HC11, 8051, Z80)
Machine language
assembler
compiler
linker
Object code
ECE 447: Software Abstraction Layers
C Pascal
Intermediate Code
68HC11 8051 Z80
Objectcode
compiler
assembler
Machinelanguage
Objectcode
Machinelanguage
Objectcode
Machinelanguage
linker
ECE 447: Assembly Characteristics
1. Very hardware dependent
2. Not very portable (if at all)
3. Very detailed (responsible for all register contents)
4. No inherent data types
5. Requires programming discipline
6. Non-intuitive, requires clear documentation
7. Access to all hardware intricacies of the chip
8. Fastest execution
9. Less memory
ECE 447: Assembly language vs. machine code
Assembly language
[label] mnemonic [operands]
LDAA #$4ALDAA $5B, Y
Machine code
$86 $4A
[prebyte] opcode [operands]
$18 $A6 $5B
START CLRA
$4F
ECE 447: Machine Code for 68HC11
Number of instructions represented using a single-byte opcode
Number of instructions represented using a combination prebyte+opcode
76
236
Values of prebytes
18, 1A, CD
ECE 447: Software Cycle
Text editor
Cross-assembler m6811-elf-as
Cross-compiler m6811-elf-gcc
Assembly source
C source
Relocatable object
Relocatable object
Linkerm6811-elf-ld(m6811-elf-gcc) Linker
command fileUser libraries
libraries
Non-relocatableexecutable program
memory.x
.s.c
.o.o
(a.out)
{lib_name}.a
Objectlisting .lst
{lib_name}.a
ECE 447: Software Cycle
Non-relocatableexecutable image
Downloadable file converter :m6811-elf-objcopy
Downloadable file
a.out
a.s19
ECE 447: Motorola S-Record Format
S108C000C601F7103D2CS123C005CE200020036F00088C205225F818CE2052CED8D12008E60018E7000818088CD80CS106C025E725F315S106C0288EBFFFC5S104C02B0E02S106C02CBDC07719S106C02F0F20FEDDS123C032CED85E3CBDC05638BDC03E39CEC80018CED800EC0018ED000808180818088CC8C2S123C0528026F0393C3C308FC3000830ED02EE023C30EE083CCE00003CCC2052BDC0C33094S123C072ED00383839FC20542708CC2052FE2054AD00CC2000FD205E5F4FFD2060C61FF7AAS123C0922064CE00003CCED8703CCC0002BDC032BDC0A6393736200FFE2050EE00AD00FE2ES123C0B22050EC02FD2050FC205026ECBDC02F38393736308F8300438F355F4FED20ED2F77S123C0D27ECB7F30E619C125271FC6203A3C30E61B4F373630C64B3A3C30EC49BDCBB73053S123C0F26C4A26026C497ECB7F308FC3000230ED176F006F01CCFFFFED1ECC0000ED1CC6C8S123C11220E722306C4A26026C4930EE49E60030E719C020C15823037ECB5B4F05C3C137CES123C1328FEE006E00C1E9CB5BCB5BC1F4CB5BC20DCB5BCB5BCB5BCB5BC241C202CB5BC118S123C152FBC2DBCB5BC22BC2C1C2C1C2C1C2C1C2C1C2C1C2C1C2C1C2C1CB5BCB5BCB5BCB46……………………………….S112FFC700000000000000000000000000000027S123FFD6C02FC02FC02FC02FC02FC02FC02FC02FC02FC02FC02FC02FC02FC02FC02FC02F17S10DFFF6C02FC02FC02FC02FC00081S9030000FC
ECE 447: Motorola S-Records
S108C000C601F7103D2C
Data bytecount
Recordtype
Loadaddress
Databytes
Checksum
S9030000FC
Recordtype
Data bytecount
Startaddress
Checksum