URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
Compare Revisions
- This comparison shows the changes necessary to convert path
/openrisc/trunk
- from Rev 488 to Rev 489
- ↔ Reverse comparison
Rev 488 → Rev 489
/orpsocv2/sw/tests/or1200/board/or1200-timerdemo.c
104,9 → 104,9
|
} |
|
void our_timer_handler(void *); |
void our_timer_handler(void); |
|
void our_timer_handler(void *ptr) |
void our_timer_handler(void) |
{ |
// Call time output function |
print_time(); |
/orpsocv2/sw/lib/printf.c
272,7 → 272,7
(unsigned long)va_arg(arg, unsigned int)) |
|
|
xdigs = NULL; // stop compiler whinging |
xdigs = (char *) NULL; // stop compiler whinging |
fmt = (char *)format; |
ret = 0; |
|
675,7 → 675,7
} |
|
#include "printf.h" |
|
#include "cpu-utils.h" |
// Actual printf function we call, with static buffer of 512 bytes |
char PRINTFBUFFER[PRINTFBUFFER_SIZE]; // Declare a global printf buffer |
|
/orpsocv2/sw/lib/lib-utils.c
6,8 → 6,8
|
void* memcpy( void* s1, void* s2, size_t n) |
{ |
char* r1 = s1; |
const char* r2 = s2; |
char* r1 = (char *) s1; |
const char* r2 = (const char*) s2; |
#ifdef __BCC__ |
while (n--) { |
*r1++ = *r2++; |
/orpsocv2/sw/drivers/or1200/exceptions.c
39,10 → 39,10
"A Custom", // 1f |
}; |
|
extern void int_main(); |
extern void cpu_timer_tick(); |
extern void int_main(void); |
extern void cpu_timer_tick(void); |
|
void (*except_handlers[]) (void ) = {0, // 0 |
void (*except_handlers[]) (void) = {0, // 0 |
0, // 1 |
0, // 2 |
0, // 3 |
65,20 → 65,22
|
|
void |
add_handler(unsigned long vector, void (*handler) (void *)) |
add_handler(unsigned long vector, void (*handler) (void)) |
{ |
except_handlers[vector] = handler; |
} |
|
void default_exception_handler_c(unsigned exception_address,unsigned epc) |
void |
default_exception_handler_c(unsigned exception_address,unsigned epc) |
{ |
int exception_no = (exception_address >> 8) & 0x1f; |
if (except_handlers[exception_no]) |
{ |
return (*except_handlers[exception_no])(); |
(*except_handlers[exception_no])(); |
return; |
} |
|
// Init uart here, incase it hasn't been |
// init uart here, incase it hasn't been |
uart_init(DEFAULT_UART); |
|
printf("EPC = 0x%.8x\n", exception_address); |
/orpsocv2/sw/drivers/or1200/include/int.h
14,7 → 14,7
int int_add(unsigned long vect, void (* handler)(void *), void *arg); |
|
/* Add exception vector handler */ |
void add_handler(unsigned long vector, void (* handler) (void *)); |
void add_handler(unsigned long vector, void (* handler) (void)); |
|
/* Initialize routine */ |
int int_init(); |
/orpsocv2/sw/drivers/or1200/include/or1200-utils.h
1,6 → 1,9
#ifndef _OR1200_UTILS_H_ |
#define _OR1200_UTILS_H_ |
|
// Pull in interrupt defines here |
#include "int.h" |
|
/* Register access macros */ |
#define REG8(add) *((volatile unsigned char *)(add)) |
#define REG16(add) *((volatile unsigned short *)(add)) |
/orpsocv2/sw/drivers/or1200/crt0.S
31,7 → 31,6
/* =================================================== [ exceptions ] === */ |
.section .vectors, "ax" |
|
|
/* ---[ 0x100: RESET exception ]----------------------------------------- */ |
.org 0x100 |
l.movhi r0, 0 |
197,6 → 196,8
|
ENTRY(_start) |
|
|
|
/* Instruction cache enable */ |
/* Check if IC present and skip enabling otherwise */ |
l.mfspr r24,r0,SPR_UPR |