Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| software:keil:asm_project [2016/02/19 07:14] – created feur | software:keil:asm_project [2020/02/07 16:20] (current) – [Minimal Assembly Project] akdi | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Create | + | ====== Create |
| Creating an Assembly project is pretty much the same as createing a [[c_project|C project]]. \\ | Creating an Assembly project is pretty much the same as createing a [[c_project|C project]]. \\ | ||
| - | \\ {{keil_add_file_2.png?500em}} \\ \\ | + | \\ {{keil_add_file_3.png?700em}} \\ \\ |
| |< 100% 10em >| | |< 100% 10em >| | ||
| ^Type|Choose "Asm File (.s)" | ^Type|Choose "Asm File (.s)" | ||
| ^Name|Choose an appropriate name.| | ^Name|Choose an appropriate name.| | ||
| - | ^Location|Choose correct [[# | + | ^Location|Choose correct [[c_project# |
| ===== Normal Assembly Project ===== | ===== Normal Assembly Project ===== | ||
| - | To create a " | + | To create a " |
| + | The example code bellow shows a minimal main procedure. | ||
| - | Example code for main procedure: | ||
| <file asm main.s> | <file asm main.s> | ||
| AREA myCode, CODE, READONLY | AREA myCode, CODE, READONLY | ||
| Line 20: | Line 20: | ||
| | | ||
| - | ADR_LED | + | ADDR_LED |
| - | ADR_DIPSW | + | ADDR_DIPSW |
| main | main | ||
| | | ||
| - | | + | |
| - | | + | |
| loop | loop | ||
| | | ||
| Line 37: | Line 37: | ||
| | | ||
| </ | </ | ||
| + | \\ | ||
| + | ===== Minimal Assembly Project ===== | ||
| + | The difference between a normal an d a minimal Assembly project is, that for the minimal project you don't need to choose a runtime component. This means you have to take care of every aspect yourself! \\ | ||
| + | The example code bellow shows a very minimal setup (without access to the CT Board [[ctboard: | ||
| - | ===== Minimal Assembly Project ===== | + | <file asm main.s> |
| + | AREA RESET, DATA, READONLY | ||
| + | EXPORT __Vectors | ||
| + | __Vectors | ||
| + | DCD 0x2002ffff | ||
| + | DCD Reset_Handler | ||
| + | |||
| + | |||
| + | AREA myCode, CODE, READONLY | ||
| + | |||
| + | THUMB | ||
| + | |||
| + | CONST_VALUE_X | ||
| + | |||
| + | |||
| + | ENTRY | ||
| + | Reset_Handler | ||
| + | |||
| + | ; -- Your code belongs here --------------------------------- | ||
| + | |||
| + | LDR R0, =0 | ||
| + | LDR R1, =CONST_VALUE_X | ||
| + | loop ADD R0, R1 | ||
| + | B loop | ||
| + | |||
| + | ; -- Your code ends here ------------------------------------ | ||
| + | |||
| + | END | ||
| + | </ | ||
| + | \\ \\ | ||
| + | |||
| + | |||
| + | //**Back to [[software: | ||