diff --git a/targets/bsp/drivers/csky_driver_qemu/driver.patch b/targets/bsp/drivers/csky_driver_qemu/driver.patch new file mode 100755 index 0000000000000000000000000000000000000000..3a6fc81adda28265c2e5913e254473745fbb1103 --- /dev/null +++ b/targets/bsp/drivers/csky_driver_qemu/driver.patch @@ -0,0 +1,155 @@ +diff -Nur a/Inc/ck_usart.h b/Inc/ck_usart.h +--- a/Inc/ck_usart.h 2019-01-17 19:37:53.000000000 +0800 ++++ b/Inc/ck_usart.h 2021-10-08 15:37:20.000000000 +0800 +@@ -89,4 +89,3 @@ + } ck_usart_reg_t; + + #endif /* __CK_USART_H */ +- +diff -Nur a/Inc/csi_config.h b/Inc/csi_config.h +--- a/Inc/csi_config.h 1970-01-01 08:00:00.000000000 +0800 ++++ b/Inc/csi_config.h 2021-10-08 15:37:20.000000000 +0800 +@@ -0,0 +1,8 @@ ++#ifndef _CSI_CONFIG_H_ ++#define _CSI_CONFIG_H_ ++ ++#define CONFIG_CHIP_SMARTL 1 ++#define CONFIG_KERNEL_NONE 1 ++#define CONFIG_ARCH_INTERRUPTSTACK 4096 ++ ++#endif +diff -Nur a/Inc/drv_common.h b/Inc/drv_common.h +--- a/Inc/drv_common.h 2019-01-17 19:37:53.000000000 +0800 ++++ b/Inc/drv_common.h 2021-10-08 15:37:20.000000000 +0800 +@@ -52,4 +52,3 @@ + } csi_power_stat_e; + + #endif /* _DRV_COMMON_H */ +- +diff -Nur a/Inc/drv_dmac.h b/Inc/drv_dmac.h +--- a/Inc/drv_dmac.h 2019-01-17 19:37:53.000000000 +0800 ++++ b/Inc/drv_dmac.h 2021-10-08 15:37:20.000000000 +0800 +@@ -174,4 +174,3 @@ + #endif + + #endif /* _CSI_DMA_H_ */ +- +diff -Nur a/Inc/drv_i2s.h b/Inc/drv_i2s.h +--- a/Inc/drv_i2s.h 2019-01-17 19:37:53.000000000 +0800 ++++ b/Inc/drv_i2s.h 2021-10-08 15:37:20.000000000 +0800 +@@ -222,4 +222,3 @@ + #endif + + #endif /* _DRV_I2S_H_ */ +- +diff -Nur a/Inc/drv_intc.h b/Inc/drv_intc.h +--- a/Inc/drv_intc.h 2019-01-17 19:37:53.000000000 +0800 ++++ b/Inc/drv_intc.h 2021-10-08 15:37:20.000000000 +0800 +@@ -152,10 +152,10 @@ + + /** + \briefThis function is set the attributes of an IRQ. +- \param[in] irq irq number to operate +- \param[in] priority interrupt priority +- \param[in] trigger_mode interrupt trigger_mode +- \return 0 on success; -1 on failure ++ \param[in] irq irq number to operate ++ \param[in] priority interrupt priority ++ \param[in] trigger_mode interrupt trigger_mode ++ \return 0 on success; -1 on failure + */ + int csi_intc_set_attribute(int32_t IRQn, uint32_t priority, int_trigger_mode_t trigger_mode); + +diff -Nur a/Inc/drv_timer.h b/Inc/drv_timer.h +--- a/Inc/drv_timer.h 2019-01-17 19:37:53.000000000 +0800 ++++ b/Inc/drv_timer.h 2021-10-08 15:37:20.000000000 +0800 +@@ -152,4 +152,3 @@ + #endif + + #endif /* _CSI_TIMER_H_ */ +- +diff -Nur a/Inc/dw_gpio.h b/Inc/dw_gpio.h +--- a/Inc/dw_gpio.h 2019-01-17 19:37:53.000000000 +0800 ++++ b/Inc/dw_gpio.h 2021-10-08 15:37:20.000000000 +0800 +@@ -51,4 +51,3 @@ + } dw_gpio_control_reg_t; + + #endif +- +diff -Nur a/Inc/dw_timer.h b/Inc/dw_timer.h +--- a/Inc/dw_timer.h 2019-01-17 19:37:53.000000000 +0800 ++++ b/Inc/dw_timer.h 2021-10-08 15:37:20.000000000 +0800 +@@ -46,4 +46,3 @@ + } dw_timer_reg_t; + + #endif /* __DW_TIMER_H */ +- +diff -Nur a/Inc/pin.h b/Inc/pin.h +--- a/Inc/pin.h 2019-01-17 19:37:53.000000000 +0800 ++++ b/Inc/pin.h 2021-10-14 11:27:02.141707107 +0800 +@@ -32,6 +32,8 @@ + + #define CONSOLE_TXD PAD_UART0_SIN + #define CONSOLE_RXD PAD_UART0_SOUT ++#define CONSOLE_TXD_FUNC CONSOLE_TXD ++#define CONSOLE_RXD_FUNC CONSOLE_RXD + #define CONSOLE_IDX 0 + + /* example pin manager */ +@@ -76,4 +78,3 @@ + #define SENSOR_UART_DIR PA3 + + #endif /* PHOBOS_PIN_H */ +- +diff -Nur a/Inc/pinmux.h b/Inc/pinmux.h +--- a/Inc/pinmux.h 2019-01-17 19:37:53.000000000 +0800 ++++ b/Inc/pinmux.h 2021-10-08 15:37:20.000000000 +0800 +@@ -31,4 +31,3 @@ + + + #endif /* _PINMUX_H_ */ +- +diff -Nur a/Inc/sys_freq.h b/Inc/sys_freq.h +--- a/Inc/sys_freq.h 2019-01-17 19:37:53.000000000 +0800 ++++ b/Inc/sys_freq.h 2021-10-08 15:37:20.000000000 +0800 +@@ -28,4 +28,3 @@ + int32_t drv_get_timer_freq(void); + + #endif /* _SYS_FREQ_H_ */ +- +diff -Nur a/Src/ck_usart.c b/Src/ck_usart.c +--- a/Src/ck_usart.c 2019-01-17 19:37:53.000000000 +0800 ++++ b/Src/ck_usart.c 2021-10-08 15:37:20.000000000 +0800 +@@ -1050,4 +1050,3 @@ + USART_NULL_PARAM_CHK(handle); + return ERR_USART(DRV_ERROR_UNSUPPORTED); + } +- +diff -Nur a/Src/devices.c b/Src/devices.c +--- a/Src/devices.c 2019-01-17 19:37:53.000000000 +0800 ++++ b/Src/devices.c 2021-10-13 10:36:35.535290500 +0800 +@@ -84,7 +84,7 @@ + int32_t target_get_timer(int32_t idx, uint32_t *base, uint32_t *irq) + { + if (idx >= target_get_timer_count()) { +- return NULL; ++ return 0; + } + + *base = sg_timer_config[idx].base; +diff -Nur a/Src/dw_gpio.c b/Src/dw_gpio.c +--- a/Src/dw_gpio.c 2019-01-17 19:37:53.000000000 +0800 ++++ b/Src/dw_gpio.c 2021-10-08 15:37:20.000000000 +0800 +@@ -697,4 +697,3 @@ + return ret; + + } +- +diff -Nur a/Src/dw_timer.c b/Src/dw_timer.c +--- a/Src/dw_timer.c 2019-01-17 19:37:53.000000000 +0800 ++++ b/Src/dw_timer.c 2021-10-08 15:37:20.000000000 +0800 +@@ -390,4 +390,3 @@ + *value = addr->TxLoadCount; + return 0; + } +- diff --git a/targets/bsp/drivers/csky_driver_qemu/patch.sha256 b/targets/bsp/drivers/csky_driver_qemu/patch.sha256 new file mode 100755 index 0000000000000000000000000000000000000000..1c09d4c8e4687b110a1b808ef943f9294c5bcdb8 --- /dev/null +++ b/targets/bsp/drivers/csky_driver_qemu/patch.sha256 @@ -0,0 +1 @@ +591e98b502b72c63d6f7ab03e7bdd0fe1ed249bc708d6bf27c01f3518c8ee597 driver.patch diff --git a/targets/bsp/drivers/csky_driver_qemu/src.sha256 b/targets/bsp/drivers/csky_driver_qemu/src.sha256 new file mode 100755 index 0000000000000000000000000000000000000000..fd6ac914d8c19f88d46f6297f486ee06d23bfcf3 --- /dev/null +++ b/targets/bsp/drivers/csky_driver_qemu/src.sha256 @@ -0,0 +1 @@ +36f16c562eb9da4b552c5ad1b5207b26ebaa68ad8417c57af0b1599a73f1eb39 SmartL_CK802-v1.6.zip