Skip to content

Commit cda6372

Browse files
Hashu-17cpq
authored andcommitted
Updated README.md on startup code.
Common question : Why is there no startup.s file ? Explanation : The startup code is included at the bottom of the main.c file in a block, which is written in C instead of assembly as in a startup.s file
1 parent bfcdb9e commit cda6372

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ jump to our boot function.
333333

334334

335335
## Minimal firmware
336+
Note: The startup code here is written in C, and included in the main.c file. Usually we have a startup.s file which is written in assembly language for initialization.
336337

337338
Let's create a file `main.c`, and specify our boot function that initially does
338339
nothing (falls into infinite loop), and specify a vector table that contains 16
@@ -353,7 +354,7 @@ __attribute__((section(".vectors"))) void (*const tab[16 + 91])(void) = {
353354
};
354355
```
355356
356-
For function `_reset()`, we have used GCC-specific attributes `naked` and
357+
Here the reset() function is the Reset_Handler. For function `_reset()`, we have used GCC-specific attributes `naked` and
357358
`noreturn` - they mean, standard function's prologue and epilogue should not
358359
be created by the compiler, and that function does not return.
359360

0 commit comments

Comments
 (0)