aboutsummaryrefslogtreecommitdiff
path: root/docs/startup.puml
blob: f9cb528181b891095c69766350494f926f4f9eb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
@startuml

skinparam backgroundColor #EEEBDC

box "Hardware" #FFC700
participant "Cortex-M" as cortexm
participant "Ethos-U" as ethosu
end box

box "CMSIS Device" #0091BD
participant "__VECTOR_TABLE" as ivec
participant "Reset_Handler()" as reset
end box

box "Compiler" #FF6B00
participant "Runtime" as runtime
end box

box "Target" #95D600
participant "common" as common
participant "corstone-300" as target
end box

box "Drivers" #00C1DE
participant "NPU" as driver
participant "UART" as uart
participant "MPU" as mpu
end box

box "Application" #7D868C
participant "main()" as main
end box

cortexm -> ivec++:
    ivec -> reset++: Reset_Handler()
        reset -> reset++: SystemInit()
        deactivate reset

        reset -> runtime++: __main()
        note over runtime
            Scatter loading
            Initializing stack and heap
        end note

        note over runtime
            Calling constructors
        end note

        runtime -> common++: init() [constructor]
            note over common
                The constructor is called after stack and heap have been initialized,
                but before the main() function is called
            end note

            common -> target++: targetSetup()
                target -> uart++: uart_init()
                return

                target -> driver++: ethosu_init()
                return

                target -> mpu++: loadAndEnableConfig()
                return
            return
        return

        runtime -> main++: main()
            note over main
                Running application
            end note
@enduml