Read about our upcoming Code of Conduct on this issue

Commit b3a67878 authored by alex@thinkpad's avatar alex@thinkpad
Browse files

200D: enabled logging code written for 80D

(worked in QEMU after some minor changes)

--HG--
branch : digic6-dumper
parent 3556cb9e5d56
......@@ -2,7 +2,7 @@
CANON_NAME_FIR = CCF18101.FIR
FIRMWARE_ID = 0x80000417
UPDATE_NAME_FIR = DUMP200D.FIR
UPDATE_NAME_FIR = LOG_200D.FIR
ROMBASEADDR = 0xE0040000
# Shrink Canon's malloc heap by changing its end address
......@@ -14,7 +14,8 @@ RESTARTSTART = 0x001B6300
# these should be removed when porting starts
ifeq ($(ML_SRC_PROFILE),generic)
ML_SRC_PROFILE = minimal
ML_MINIMAL_OBJ = minimal-d78.o
ML_MINIMAL_OBJ = minimal-d6.o
ML_SRC_EXTRA_OBJS += log-d6.o stdio.o
endif
ML_BOOT_OBJ = boot-d78.o
......
......@@ -53,6 +53,9 @@ NSTUB(0xE023D461, sysmem_info) /* System Memory Information */
NSTUB(0xE01CA9C9, memmap_info) /* Exception vector, DRYOS system memory etc */
NSTUB(0xE0148E3B, smemShowFix) /* Common Lower, Common Upper etc */
/** Memory allocation **/
NSTUB(0xDF0079E3, GetMemoryInformation) /* called from AllocateMemory */
/** Debug messages **/
NSTUB(0xDF006E6D, DryosDebugMsg) /* lots of debug messages; format string is third argument */
......@@ -65,5 +68,20 @@ NSTUB(0xE05301DF, SetHPTimerAfterNow) /* from error message */
NSTUB(0xE0530233, SetHPTimerNextTick) /* same "worker" function as SetHPTimerAfterNow */
NSTUB(0xE04B9985, SetTimerAfter) /* from error message */
/** Interrupts **/
NSTUB( 0x4030, pre_isr_hook)
NSTUB( 0x4034, post_isr_hook)
NSTUB( 0x6CC10, isr_table_handler)
NSTUB( 0x6CC14, isr_table_param)
/** MPU communication **/
NSTUB(0xE01C7657, mpu_send) // "dwSize < TXBD_DATA_SIZE"
NSTUB(0xE056314F, mpu_recv) // passed as last argument by InitializeIntercom and eventually stored into mpu_recv_cbr
NSTUB( 0x79C0, mpu_recv_cbr) // mpu_recv is called indirectly through this function pointer
NSTUB( 0x87AD8, mpu_send_ring_buffer) // ring buffer used in mpu_send
NSTUB( 0x79A4, mpu_send_ring_buffer_tail) // ring buffer index incremented in mpu_send
NSTUB( 0x87998, mpu_recv_ring_buffer) // ring buffer used in SIO3_ISR, subroutine that processes two chars at a time
NSTUB( 0x799C, mpu_recv_ring_buffer_tail) // ring buffer index incremented in the above subroutine
/** Misc **/
NSTUB(0xE00764F1, vsnprintf) /* references "01234567", "0123456789", "0123456789abcdef" and "0123456789ABCDEF"; second arg is size; the one called by DebugMsg only knows %s */
......@@ -11,7 +11,7 @@ extern void dump_file(char* name, uint32_t addr, uint32_t size);
extern int GetMemoryInformation(int *, int *);
/* custom logging buffer */
static char buf[256 * 1024]; /* adjust this until it runs out of memory (512 might work, maybe more) */
static char buf[192 * 1024]; /* adjust this until it runs out of memory (512 might work, maybe more) */
static int buf_size = sizeof(buf);
static int len = 0;
......@@ -163,12 +163,12 @@ static void mpu_decode(const char * in, char * out, int max_len);
static void pre_isr_log(uint32_t isr)
{
#ifdef CONFIG_DIGIC_VI
//#ifdef CONFIG_DIGIC_VI
extern const uint32_t isr_table_handler[];
extern const uint32_t isr_table_param[];
uint32_t handler = isr_table_handler[2 * isr];
uint32_t arg = isr_table_param [2 * isr];
#endif
//#endif
const char * name = isr_names[isr & 0x1FF];
//DryosDebugMsg(0, 15, "INT-%03Xh %s %X(%X)", isr, name ? name : "", handler, arg);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment