Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 4cha - stand-alone application
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC DEL 1ns 4cha - stand-alone application
Commits
9af6d92e
Commit
9af6d92e
authored
Oct 07, 2014
by
Jose Jimenez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbg_main.c: Simplified and improved
Signed-off-by:
Jose Jimenez
<
ppjm@correo.ugr.es
>
parent
dd964654
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
13 deletions
+8
-13
dbg_main.c
debugger_sw/dbg_main.c
+8
-13
No files found.
debugger_sw/dbg_main.c
View file @
9af6d92e
...
...
@@ -20,6 +20,8 @@
#include "irq.h"
#include "linux/jiffies.h"
#include "linux/delay.h"
#include <unistd.h>
/* usleep */
#include <dbg.h>
#define mprintf pp_printf
#define vprintf pp_vprintf
...
...
@@ -29,7 +31,6 @@ void _irq_entry(void) {}
extern
uint32_t
_endram
;
extern
uint32_t
_fstack
;
#define ENDRAM_MAGIC 0xbadc0ffe
void
kernel_dev
(
int
subsys
,
const
char
*
fmt
,
...)
...
...
@@ -63,32 +64,26 @@ void mprint_64bit (uint64_t value)
mprintf
(
"%s"
,
valstr
);
}
/*
static void check_stack(void)
static
void
check_stack
(
void
)
{
while
(
_endram
!=
ENDRAM_MAGIC
)
{
mprintf
(
"Stack overflow!
\n
"
);
msleep
(
1000
);
}
}
*/
}
int
main
(
void
)
{
_endram
=
ENDRAM_MAGIC
;
sdb_find_devices
();
//uart_init_sw();
uart_init_hw
();
//usleep_init(); //Uncomment if in need of generating delay
mprintf
(
"Running....
\n
"
);
shell_exec
(
"dbgmem"
);
shell_exec
(
"dbgmem 0x80000"
);
shell_exec
(
"dbgmem -b 0x80000 0x1"
);
shell_exec
(
"dbgmem -b0x80000 0x1"
);
shell_exec
(
"dbgmem -b0x0000"
);
mprintf
(
"Running....
\n
"
);
for
(;;){
shell_interactive
();
//
check_stack();
check_stack
();
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment