MIPS32R2 Common

Common implementations and headers for mips32r2 compliant devices. More...

Detailed Description


file  mips32r2_common/include/cpu.h
 Common implementations and headers for mips32r2 compliant devices.
file  cpu/mips32r2_common/include/cpu_conf.h
 Common CPU definitions for mip32r2 compatable devices.
file  eic_irq.h
 API for supporting External Interrupt Controllers (EIC mode)


static void cpu_print_last_instruction (void)
 Print the last instruction's address. More...
void eic_irq_configure (int irq_num)
 Configure and route the interrupt.
void eic_irq_enable (int irq_num)
 Enable an interrupt.
void eic_irq_disable (int irq_num)
 Disable an interrupt.
void eic_irq_ack (int irq_num)
 Acknowledge an interrupt.
 Configuration of default stack sizes. More...
#define EIC_IRQ_TIMER   (-1)
 @ brief Internal Interrupt numbers More...
#define EIC_IRQ_FDC   (-2)
#define EIC_IRQ_PC   (-3)

Macro Definition Documentation


#define EIC_IRQ_TIMER   (-1)

MIPS cores have a few internally generated interrupts from the Timer, Performance Counters and Fast Debug Channel hardware, in EIC mode these become outputs from the core and are connected to the external controller, the external control then loops these back at whichever IPL it decides

We use negative numbers to represent these, leaving positive numbers free for the SoC specific interrupts

Definition at line 39 of file eic_irq.h.



printf takes a pretty tortured route through the C lib then via UHI syscall exception to end up at the UART driver.

When debugging timer code we get printfs on the idle threads stack which can easily blow its limits.

Note code must be compiled at -Os with these values, using -O0 you'll overflow these stacks.

NO ISR stack is in use yet, interrupt use the current running stack hence the big-ish default stack size.

Definition at line 46 of file cpu/mips32r2_common/include/cpu_conf.h.

Function Documentation

◆ cpu_print_last_instruction()

static void cpu_print_last_instruction ( void  )
: Not supported

Definition at line 38 of file mips32r2_common/include/cpu.h.