diff options
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/debug-jz4760.c')
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/debug-jz4760.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/debug-jz4760.c b/firmware/target/mips/ingenic_jz47xx/debug-jz4760.c index ee247a9cff..3634a88f11 100644 --- a/firmware/target/mips/ingenic_jz47xx/debug-jz4760.c +++ b/firmware/target/mips/ingenic_jz47xx/debug-jz4760.c | |||
@@ -138,6 +138,8 @@ bool dbg_ports(void) | |||
138 | return false; | 138 | return false; |
139 | } | 139 | } |
140 | 140 | ||
141 | extern uint32_t irqstackend,irqstackbegin; | ||
142 | |||
141 | bool dbg_hw_info(void) | 143 | bool dbg_hw_info(void) |
142 | { | 144 | { |
143 | int btn = 0; | 145 | int btn = 0; |
@@ -151,6 +153,12 @@ bool dbg_hw_info(void) | |||
151 | { | 153 | { |
152 | lcd_clear_display(); | 154 | lcd_clear_display(); |
153 | line = 0; | 155 | line = 0; |
156 | |||
157 | uint32_t *ptr = &irqstackbegin; | ||
158 | for ( ; ptr < &irqstackend && *ptr == 0xDEADBEEF; ptr++) {} | ||
159 | |||
160 | lcd_putsf(0, line++, "IRQ stack max: %d", (uint32_t)&irqstackend - (uint32_t)ptr); | ||
161 | |||
154 | display_clocks(); | 162 | display_clocks(); |
155 | display_enabled_clocks(); | 163 | display_enabled_clocks(); |
156 | #ifdef HAVE_TOUCHSCREEN | 164 | #ifdef HAVE_TOUCHSCREEN |
@@ -169,8 +177,7 @@ bool dbg_hw_info(void) | |||
169 | return true; | 177 | return true; |
170 | } | 178 | } |
171 | 179 | ||
172 | #define CFG_UART_BASE UART1_BASE /* Base of the UART channel */ | 180 | #ifdef WITH_SERIAL |
173 | |||
174 | void serial_putc (const char c) | 181 | void serial_putc (const char c) |
175 | { | 182 | { |
176 | volatile u8 *uart_lsr = (volatile u8 *)(CFG_UART_BASE + OFF_LSR); | 183 | volatile u8 *uart_lsr = (volatile u8 *)(CFG_UART_BASE + OFF_LSR); |
@@ -271,3 +278,4 @@ void serial_dump_data(unsigned char* data, int len) | |||
271 | 278 | ||
272 | serial_putc( '\n' ); | 279 | serial_putc( '\n' ); |
273 | } | 280 | } |
281 | #endif | ||