OpenCores
URL https://opencores.org/ocsvn/aor3000/aor3000/trunk

Subversion Repositories aor3000

[/] [aor3000/] [trunk/] [syn/] [soc/] [firmware/] [bootloader.c] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 alfik
/*
2
 * This file is subject to the terms and conditions of the BSD License. See
3
 * the file "LICENSE" in the main directory of this archive for more details.
4
 *
5
 * Copyright (C) 2014 Aleksander Osman
6
 */
7
 
8
volatile unsigned int *jtag = (unsigned int *)0xBFFFFFF0;
9
 
10
void jtag_print(char *ptr) {
11
 
12
    while((*ptr) != 0) {
13
        while((jtag[1] & 0xFFFF0000) == 0) { ; }
14
        jtag[0] = (*ptr);
15
        ptr++;
16
    }
17
}
18
 
19
void start_bootloader() {
20
    jtag_print("Press any key to boot kernel...\n");
21
 
22
    while((jtag[0] & 0x8000) == 0) { ; }
23
 
24
    jtag_print("Booting kernel...\n");
25
 
26
    void (*boot_func)(void) = (void (*)(void))0x80000400;
27
 
28
    boot_func();
29
 
30
    while(1) { ; }
31
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.