1 |
78 |
csantifort |
/*----------------------------------------------------------------
|
2 |
|
|
// //
|
3 |
|
|
// boot-loader-ethmac.c //
|
4 |
|
|
// //
|
5 |
|
|
// This file is part of the Amber project //
|
6 |
|
|
// http://www.opencores.org/project,amber //
|
7 |
|
|
// //
|
8 |
|
|
// Description //
|
9 |
|
|
// The main functions for the boot loader application. This //
|
10 |
|
|
// application is embedded in the FPGA's SRAM and is used //
|
11 |
|
|
// to load larger applications into the DDR3 memory on //
|
12 |
|
|
// the development board. //
|
13 |
|
|
// //
|
14 |
|
|
// Author(s): //
|
15 |
|
|
// - Conor Santifort, csantifort.amber@gmail.com //
|
16 |
|
|
// //
|
17 |
|
|
//////////////////////////////////////////////////////////////////
|
18 |
|
|
// //
|
19 |
|
|
// Copyright (C) 2010-2013 Authors and OPENCORES.ORG //
|
20 |
|
|
// //
|
21 |
|
|
// This source file may be used and distributed without //
|
22 |
|
|
// restriction provided that this copyright statement is not //
|
23 |
|
|
// removed from the file and that any derivative work contains //
|
24 |
|
|
// the original copyright notice and the associated disclaimer. //
|
25 |
|
|
// //
|
26 |
|
|
// This source file is free software; you can redistribute it //
|
27 |
|
|
// and/or modify it under the terms of the GNU Lesser General //
|
28 |
|
|
// Public License as published by the Free Software Foundation; //
|
29 |
|
|
// either version 2.1 of the License, or (at your option) any //
|
30 |
|
|
// later version. //
|
31 |
|
|
// //
|
32 |
|
|
// This source is distributed in the hope that it will be //
|
33 |
|
|
// useful, but WITHOUT ANY WARRANTY; without even the implied //
|
34 |
|
|
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR //
|
35 |
|
|
// PURPOSE. See the GNU Lesser General Public License for more //
|
36 |
|
|
// details. //
|
37 |
|
|
// //
|
38 |
|
|
// You should have received a copy of the GNU Lesser General //
|
39 |
|
|
// Public License along with this source; if not, download it //
|
40 |
|
|
// from http://www.opencores.org/lgpl.shtml //
|
41 |
|
|
// //
|
42 |
|
|
----------------------------------------------------------------*/
|
43 |
|
|
|
44 |
81 |
csantifort |
//#define DEBUG 1
|
45 |
|
|
|
46 |
|
|
#ifdef DEBUG
|
47 |
|
|
#define trace(fmt, ...) print_serial("%s:%s:%d: "fmt"\n\r", __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__)
|
48 |
|
|
#else
|
49 |
|
|
#define trace(fmt, ...)
|
50 |
|
|
#endif
|
51 |
|
|
|
52 |
|
|
|
53 |
78 |
csantifort |
/* Function prototypes */
|
54 |
|
|
void init_serial();
|
55 |
|
|
void print_serial(const char *fmt, ...);
|