diff --git a/.cargo/config b/.cargo/config index fa95820..fb1cc56 100644 --- a/.cargo/config +++ b/.cargo/config @@ -2,6 +2,7 @@ runner = 'riscv64-unknown-elf-gdb -x openocd.gdb' rustflags = [ "-C", "link-arg=-Tmemory-c8.x", + "-C", "link-arg=-Tdevice.x", "-C", "link-arg=-Tlink.x", ] diff --git a/device.x b/device.x new file mode 100644 index 0000000..be3f1e4 --- /dev/null +++ b/device.x @@ -0,0 +1,65 @@ +PROVIDE(INT_SFT = DefaultHandler); +PROVIDE(INT_TMR = DefaultHandler); +PROVIDE(INT_BWEI = DefaultHandler); +PROVIDE(INT_PMOVI = DefaultHandler); +PROVIDE(WWDGT = DefaultHandler); +PROVIDE(EXTI_LVD = DefaultHandler); +PROVIDE(TAMPER = DefaultHandler); +PROVIDE(RTC = DefaultHandler); +PROVIDE(FMC = DefaultHandler); +PROVIDE(RCU = DefaultHandler); +PROVIDE(EXTI_LINE0 = DefaultHandler); +PROVIDE(EXTI_LINE1 = DefaultHandler); +PROVIDE(EXTI_LINE2 = DefaultHandler); +PROVIDE(EXTI_LINE3 = DefaultHandler); +PROVIDE(EXTI_LINE4 = DefaultHandler); +PROVIDE(DMA0_CHANNEL0 = DefaultHandler); +PROVIDE(DMA0_CHANNEL1 = DefaultHandler); +PROVIDE(DMA0_CHANNEL2 = DefaultHandler); +PROVIDE(DMA0_CHANNEL3 = DefaultHandler); +PROVIDE(DMA0_CHANNEL4 = DefaultHandler); +PROVIDE(DMA0_CHANNEL5 = DefaultHandler); +PROVIDE(DMA0_CHANNEL6 = DefaultHandler); +PROVIDE(ADC0_1 = DefaultHandler); +PROVIDE(CAN0_TX = DefaultHandler); +PROVIDE(CAN0_RX0 = DefaultHandler); +PROVIDE(CAN0_RX1 = DefaultHandler); +PROVIDE(CAN0_EWMC = DefaultHandler); +PROVIDE(EXTI_LINE9_5 = DefaultHandler); +PROVIDE(TIMER0_BRK = DefaultHandler); +PROVIDE(TIMER0_UP = DefaultHandler); +PROVIDE(TIMER0_TRG_CMT = DefaultHandler); +PROVIDE(TIMER0_CHANNEL = DefaultHandler); +PROVIDE(TIMER1 = DefaultHandler); +PROVIDE(TIMER2 = DefaultHandler); +PROVIDE(TIMER3 = DefaultHandler); +PROVIDE(I2C0_EV = DefaultHandler); +PROVIDE(I2C0_ER = DefaultHandler); +PROVIDE(I2C1_EV = DefaultHandler); +PROVIDE(I2C1_ER = DefaultHandler); +PROVIDE(SPI0 = DefaultHandler); +PROVIDE(SPI1 = DefaultHandler); +PROVIDE(USART0 = DefaultHandler); +PROVIDE(USART1 = DefaultHandler); +PROVIDE(USART2 = DefaultHandler); +PROVIDE(EXTI_LINE15_10 = DefaultHandler); +PROVIDE(RTC_ALARM = DefaultHandler); +PROVIDE(USBFS_WKUP = DefaultHandler); +PROVIDE(EXMC = DefaultHandler); +PROVIDE(TIMER4 = DefaultHandler); +PROVIDE(SPI2 = DefaultHandler); +PROVIDE(UART3 = DefaultHandler); +PROVIDE(UART4 = DefaultHandler); +PROVIDE(TIMER5 = DefaultHandler); +PROVIDE(TIMER6 = DefaultHandler); +PROVIDE(DMA1_CHANNEL0 = DefaultHandler); +PROVIDE(DMA1_CHANNEL1 = DefaultHandler); +PROVIDE(DMA1_CHANNEL2 = DefaultHandler); +PROVIDE(DMA1_CHANNEL3 = DefaultHandler); +PROVIDE(DMA1_CHANNEL4 = DefaultHandler); +PROVIDE(CAN1_TX = DefaultHandler); +PROVIDE(CAN1_RX0 = DefaultHandler); +PROVIDE(CAN1_RX1 = DefaultHandler); +PROVIDE(CAN1_EWMC = DefaultHandler); +PROVIDE(USBFS = DefaultHandler); +