create your first assembly programbosio/hlee503/tp/tp0.pdf · 2017. 10. 19. · 63 ma.n.s s...

14
Create your first Assembly Program Alberto Bosio [email protected] Univeristé de Montpellier October 19, 2017

Upload: others

Post on 22-Jan-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Create your first Assembly Programbosio/HLEE503/TP/TP0.pdf · 2017. 10. 19. · 63 ma.n.s s workspace - C/C++ - TPO/src/main.s - Eclipse / * Start OF the program code section Quick

Create your first Assembly Program

Alberto [email protected]

Univeristé de Montpellier

October 19, 2017

Page 2: Create your first Assembly Programbosio/HLEE503/TP/TP0.pdf · 2017. 10. 19. · 63 ma.n.s s workspace - C/C++ - TPO/src/main.s - Eclipse / * Start OF the program code section Quick

2

Eclipse

Start Eclipse -> Menu Project -> C Project

Page 3: Create your first Assembly Programbosio/HLEE503/TP/TP0.pdf · 2017. 10. 19. · 63 ma.n.s s workspace - C/C++ - TPO/src/main.s - Eclipse / * Start OF the program code section Quick

3

Eclipse

Configure the Project

1 Select AC6 STM32 MCU Project2 Select Toolchain3 Give a name4 Click on Next

Page 4: Create your first Assembly Programbosio/HLEE503/TP/TP0.pdf · 2017. 10. 19. · 63 ma.n.s s workspace - C/C++ - TPO/src/main.s - Eclipse / * Start OF the program code section Quick

4

Eclipse

Configure the Project (Cont’d)

Page 5: Create your first Assembly Programbosio/HLEE503/TP/TP0.pdf · 2017. 10. 19. · 63 ma.n.s s workspace - C/C++ - TPO/src/main.s - Eclipse / * Start OF the program code section Quick

5

Eclipse

Configure the Project (Cont’d)

1 Select the Series: STM32F3

2 Select the Board: STM32F3DISCOVERY

3 Click Next

Page 6: Create your first Assembly Programbosio/HLEE503/TP/TP0.pdf · 2017. 10. 19. · 63 ma.n.s s workspace - C/C++ - TPO/src/main.s - Eclipse / * Start OF the program code section Quick

6

Eclipse

Configure the Project (Cont’d)

1 Select No Firmware

Page 7: Create your first Assembly Programbosio/HLEE503/TP/TP0.pdf · 2017. 10. 19. · 63 ma.n.s s workspace - C/C++ - TPO/src/main.s - Eclipse / * Start OF the program code section Quick

7

Eclipse

Your Project

Page 8: Create your first Assembly Programbosio/HLEE503/TP/TP0.pdf · 2017. 10. 19. · 63 ma.n.s s workspace - C/C++ - TPO/src/main.s - Eclipse / * Start OF the program code section Quick

8

Eclipse

Add a source file

1 Select src directory

2 Click using right button

3 Select New -> File

Page 9: Create your first Assembly Programbosio/HLEE503/TP/TP0.pdf · 2017. 10. 19. · 63 ma.n.s s workspace - C/C++ - TPO/src/main.s - Eclipse / * Start OF the program code section Quick

9

Eclipse

Add a source file (cont’d)

1 Specify the file name: in this example is main.s

Page 10: Create your first Assembly Programbosio/HLEE503/TP/TP0.pdf · 2017. 10. 19. · 63 ma.n.s s workspace - C/C++ - TPO/src/main.s - Eclipse / * Start OF the program code section Quick

10

Eclipse

Add a source file (cont’d)

Write you asm program!Download the example fromhttp://www.lirmm.fr/~bosio/L3/ASM/main.s

Page 11: Create your first Assembly Programbosio/HLEE503/TP/TP0.pdf · 2017. 10. 19. · 63 ma.n.s s workspace - C/C++ - TPO/src/main.s - Eclipse / * Start OF the program code section Quick

11

Eclipse

Build your program

Menu Project -> Build ProjectCheck for errors/results in the Build Console

Page 12: Create your first Assembly Programbosio/HLEE503/TP/TP0.pdf · 2017. 10. 19. · 63 ma.n.s s workspace - C/C++ - TPO/src/main.s - Eclipse / * Start OF the program code section Quick

12

Eclipse

Debug/Run your program

1 Menu Run -> Debug Configuration

2 Double click on “Ac6 STM32 Debugging”

3 Click on Debug

Page 13: Create your first Assembly Programbosio/HLEE503/TP/TP0.pdf · 2017. 10. 19. · 63 ma.n.s s workspace - C/C++ - TPO/src/main.s - Eclipse / * Start OF the program code section Quick

13

Eclipse

Debug/Run your program (Cont’d)

Page 14: Create your first Assembly Programbosio/HLEE503/TP/TP0.pdf · 2017. 10. 19. · 63 ma.n.s s workspace - C/C++ - TPO/src/main.s - Eclipse / * Start OF the program code section Quick

14

Eclipse

Debug/Run your program (Cont’d)