??? ??ARM? ??????? - PowerPoint PPT Presentation

1 / 54
About This Presentation
Title:

??? ??ARM? ???????

Description:

arm 1. arm 2. ads1.2 3. arm 2.1 arm ... – PowerPoint PPT presentation

Number of Views:61
Avg rating:3.0/5.0
Slides: 55
Provided by: smesyXid
Category:
Tags: arm | processor

less

Transcript and Presenter's Notes

Title: ??? ??ARM? ???????


1
? ?
2
??? ??ARM? ???????
  • 1. ??ARM????????????
  • 2. ADS1.2??????
  • 3. ARM?????

3
2.1 ??ARM????????????
4
?????????
????
???? .s
???
C?? .c
??
?????? .ld
?????? .map
??
?????? .cs
??
5
?????????
  • ???????
  • ?????????????
  • ????Debug?????
  • ADS CodeWarrior IDE?????????????
  • ?AXD???????????Debug?

6
2.2 ADS 1.2 ??????
  • CodeWarrior IDE
  • AXD Debuger

7
(No Transcript)
8
(No Transcript)
9
CodeWarrior IDE ??
  • 1 ?????(Project)
  • 2 ?????????
  • 3 ?????????
  • 4 ?????
  • 5 Debug?????????

10
1. ?????(Project)
11
1.2 ?????????
12
3 ?????????
13
4 ?????
  • ?? Project -gtMake????,??????
  • ??????????touch?????,??ELF????
  • ????????,????ELF image??
  • ??postlink??,??ELF ?????fromELF???????????

14
5 Debug?????????
  • ?????,IDE???AXD????Make???ELF image????debug???Pro
    ject -gtDebug

15
6 ????Building??
  • 1. ??????????

Compiler name Compiler variant Source language Compiler output
armcc C C 32-bit ARM code
tcc C C 16-bit Thumb code
armcpp C C or C 32-bit ARM code
tcpp C C or C 16-bit Thumb code
16
  • 1). ??C?? main.c
  • armcc -g -O1 -c main.c (for ARM)
  • tcc -g -O1 -c main.c (for Thumb)
  • ??
  • -g compiler??debug tables.
  • -O1 compiler ?????????????????????
  • -c compiler ?????
  • 2). ??????
  • armlink main.o -o embed.axf
  • ??
  • -o ????????? embed.axf.
  • 3). ? armsd or AXD ??????????

17
6 ????Building??
  • 2. ?????????
  • armasm -list addreg.lst addreg.s
  • armlink addreg.o -o addreg
  • ?Debugger?????
  • armsd addreg
  • step

18
2. AXD Debuger???
  • ????
  • ????
  • ?????
  • ??????
  • ?????
  • ??????

19
DEMO ??????
  • ???Benchmark ??, ???????????????????
  • ?Dhrystone??????,??????
  • Dhrystones/?????? ????)/????
  • ?Demo?,??????????2???
  • MIPS?
  • ?????????????????????VAX 11/780 ???????,????1
    MIP.
  • VAX 11/780 ???????1757 Dhrystones .

20
1 ??????
  • 1. ????????????
  • 2. ?? AXD, ??File? Load Image
  • 3. ?? Execute ? Go (??? F5),?????????????,????????
    ?
  • 4. ????????,??File ? Reload Current Image ,??????
    then repeat Steps 2,3??

21
(No Transcript)
22
(No Transcript)
23
(No Transcript)
24
2 ????
  • 1. ??File ? Reload Current Image ,
  • 2.?? Execute ? Go (??? F5),
  • 3.?????????
  • ?????,???Menu?? Toggle Breakpoint
  • ?????,?F9,
  • ????Margin??
  • 4.?? System Views ?Breakpoints ????
  • 5. ?F5 ???????????

25
(No Transcript)
26
2 ????
  • 4.?? System Views ?Breakpoints ????
  • ????????750??????,?????
  • Processor Views ? Variables ,??run_Index??
  • 5. ?F5 ???????????

27
(No Transcript)
28
3. ?????
  • 1.??File ? Reload Current Image
  • 2.?? Execute ? Go (??? F5)?main()
  • 3. ?F5 ????????
  • 4. System Views ?Watchpoints,? Watchpoints system
    View????,?Add,?Watchpoints???????

29
(No Transcript)
30
4. ??????
  • 1. ??Variables processor view??????
  • 1.??File ? Reload Current Image
  • 2.?? Execute ? Go (??? F5),???????Main
  • 3. ?F5 ?????
  • 4. Processor Views ? Variables ??????????????Local
    ?Global????
  • 5.????,?Properties ?Dec,????????
  • 6.?F10,?????Execute ? Step????,????????????????var
    iables???

31
(No Transcript)
32
5 ??????(2)
  • 2. ??????????
  • 13. ??
  • 4. Processor Views ? Watch ??Watch?????????Tab????
    ????
  • 5.???,?Add Watch,??Add Watch??,??????????
  • 6.?F10,?????Execute ? Step????,????????????????var
    iables???

33
(No Transcript)
34
6. ?????
  • 1.??File ? Reload Current Image
  • 2.?? Execute ?Go (??? F5),???????Main
  • 3.Processor Views ?Registers???????
  • 4.?F10????,????????????????registers????

35
(No Transcript)
36
7. ??????
  • 1.??File ? Reload Current Image
  • 2.?? Execute ? Go (??? F5),???????Main
  • 3. ?F5 ?????
  • 4. Processor Views ? Memory
  • 5.?F10????,????????????????registers????

37
(No Transcript)
38
8. ??????
  • 1.??File ? Reload Current Image
  • 2.?? Execute ? Go (??? F5),???????Main
  • 3. ?Search ? Memory?????????
  • 4. ???????????????????
  • 5. ?F5???????????????

39
(No Transcript)
40
(No Transcript)
41
2.3 ARM???????
  • 1. ??ARM C/C???
  • 2. Semihosting??
  • 3. ??????ARM C????
  • 4. ARM?????

42
1. C/C ????
  • ????????????????????C???????????????
  • ????????????
  • ??ARM?
  • ??????
  • C????????(ATPCS)

43
2. ??ARM C/C???
  • ARM???????????
  • ANSIC C??ISO ?C???????????
  • ????\lib\armlib
  • C ??ISO C ???????????
  • ????\lib\cpplib
  • ????ARM???ARM?semihosted????,????I/O???
  • semihosted???ARMulator?Multi-ICE??????

44
2. ??ARM C/C???
  • ANSIC C???
  • ?ISO C library standard?????.
  • ?semihosted?????????C???????????,?????????????????
  • ?C / C compilers???help??.
  • C ???
  • Rogue Wave Standard C Library version 2.01.01
  • C compiler???help??
  • ???? Rogue Wave library???C ??

45
3. Semihosting ??
  • ARM???????,???????debuger??????I/O??????C?????????
    ????????

46
4. ??????ARM C????
  • ?? main()???????????.
  • ?????C or C ??????,???????
  • ???? stack
  • ????,???? heap
  • ????????ARM C?????
  • ??????ISO-defined functions ???
  • ???? runtime errors ?signals ,????????????????????
    ?

47
4.1 ??????semihosted ????
  • ???????????????
  • ????????? semihosting ?? ,?ARMulator, Angel, and
    Multi-ICE
  • ??????semihosting SWI ?????

48
4.2 ????non-semihosted ????
  • 1??????????????
  • 2. ???????__use_no_semihosting_swi ??
  • ?????
  • __use_no_semihosting_swi
  • C???
  • pragma import(__use_no_semihosting_swi).
  • 3.?????????? ?

49
5. ARMC/C?????
  • ARM C/C?????????????
  • ??????ARM C/C???
  • ?????,???????????????,???????ARM C???????????

50
6. ??????
  • ARM??????armar??????ELF?????????,?????????
  • ??????????????,????????????,??????????????????????
    ???

51
7. C????????ATPCS
  • ?????????
  • ????
  • ????????????,??????C?????
  • ?C??????????,??ATPCS????????
  • ???????

52
8.1 ????
  • ????
  • __asm( ???? )
  • ??
  • __asm
  • ??1
  • ??n
  • ??
  • ???????????C??????,???char?short?int?????????
  • C?????????????????
  • ?????????????????

53
8.2 ATPCSARM-Thumb Procedure Call Stantard
  • ??
  • ??????C????????????????????
  • ATPCS ???????????
  • ???????
  • ??????????????

54
? ?
Write a Comment
User Comments (0)
About PowerShow.com