- added sam7x256 test example, and test result
[openocd.git] / ecosflash / flash.S
1 /*
2 #####ECOSGPLCOPYRIGHTBEGIN####
3 ## -------------------------------------------
4 ## This file is part of eCos, the Embedded Configurable Operating System.
5 ## Copyright (C) 2008 Øyvind Harboe
6 ##
7 ## eCos is free software; you can redistribute it and/or modify it under
8 ## the terms of the GNU General Public License as published by the Free
9 ## Software Foundation; either version 2 or (at your option) any later version.
10 ##
11 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
12 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 ## for more details.
15 ##
16 ## You should have received a copy of the GNU General Public License along
17 ## with eCos; if not, write to the Free Software Foundation, Inc.,
18 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
19 ##
20 ## As a special exception, if other files instantiate templates or use macros
21 ## or inline functions from this file, or you compile this file and link it
22 ## with other works to produce a work based on this file, this file does not
23 ## by itself cause the resulting work to be covered by the GNU General Public
24 ## License. However the source code for this file must still be made available
25 ## in accordance with section (3) of the GNU General Public License.
26 ##
27 ## This exception does not invalidate any other reasons why a work based on
28 ## this file might be covered by the GNU General Public License.
29 ## -------------------------------------------
30 #####ECOSGPLCOPYRIGHTEND####
31 */
32
33 /*
34 Jump table for flash driver
35
36 Registers in ARM callling convention is to place args in registers
37 starting at r0.
38
39 So for:
40
41 void foo(int a, int b, int c).
42
43 a=r0
44 b=r1
45 c=r2
46
47
48 */
49 .global _stack_base
50 .global _stack_start
51 .global _workarea
52 .global _start
53 .global _start_bss_clear
54 _start:
55 // offset=0
56 // int erase(void *address, int len)
57 ldr sp,=_stack_start
58 bl erase
59 nop // Stop CPU here using hw breakpoint
60
61 // offset=0xc
62 // int program(void *buffer, void *address, int len)
63 ldr sp,=_stack_start
64 bl program
65 nop // Stop CPU here using hw breakpoint
66
67 // offset=0x18
68 ldr r0,=_workarea
69 nop // Stop CPU here using hw breakpoint
70
71 // offset=0x20
72 // int init() - returns error message if the flash chip can't be detected
73 ldr sp,=_stack_start
74 bl init
75 nop // Stop CPU here using hw breakpoint
76
77 .section ".bss"
78 .balign 4
79 _stack_base:
80 .rept 4096
81 .byte 0
82 .endr
83 _stack_start:
84 .balign 4
85 _workarea:
86 .rept 8192
87 .byte 0
88 .endr
89 // NB!!! we clear bss while the stack is in use, so we start BSS clearing here !!! :-)
90 _start_bss_clear:

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)