├── .cproject ├── .project ├── .settings ├── language.settings.xml └── org.eclipse.core.resources.prefs ├── .template ├── Core ├── core_riscv.c └── core_riscv.h ├── Debug ├── debug.c └── debug.h ├── Ld └── Link.ld ├── Peripheral ├── inc │ ├── ch32v30x.h │ ├── ch32v30x_adc.h │ ├── ch32v30x_bkp.h │ ├── ch32v30x_can.h │ ├── ch32v30x_crc.h │ ├── ch32v30x_dac.h │ ├── ch32v30x_dbgmcu.h │ ├── ch32v30x_dma.h │ ├── ch32v30x_dvp.h │ ├── ch32v30x_eth.h │ ├── ch32v30x_exti.h │ ├── ch32v30x_flash.h │ ├── ch32v30x_fsmc.h │ ├── ch32v30x_gpio.h │ ├── ch32v30x_i2c.h │ ├── ch32v30x_iwdg.h │ ├── ch32v30x_misc.h │ ├── ch32v30x_opa.h │ ├── ch32v30x_pwr.h │ ├── ch32v30x_rcc.h │ ├── ch32v30x_rng.h │ ├── ch32v30x_rtc.h │ ├── ch32v30x_sdio.h │ ├── ch32v30x_spi.h │ ├── ch32v30x_tim.h │ ├── ch32v30x_usart.h │ └── ch32v30x_wwdg.h └── src │ ├── ch32v30x_adc.c │ ├── ch32v30x_bkp.c │ ├── ch32v30x_can.c │ ├── ch32v30x_crc.c │ ├── ch32v30x_dac.c │ ├── ch32v30x_dbgmcu.c │ ├── ch32v30x_dma.c │ ├── ch32v30x_dvp.c │ ├── ch32v30x_eth.c │ ├── ch32v30x_exti.c │ ├── ch32v30x_flash.c │ ├── ch32v30x_fsmc.c │ ├── ch32v30x_gpio.c │ ├── ch32v30x_i2c.c │ ├── ch32v30x_iwdg.c │ ├── ch32v30x_misc.c │ ├── ch32v30x_opa.c │ ├── ch32v30x_pwr.c │ ├── ch32v30x_rcc.c │ ├── ch32v30x_rng.c │ ├── ch32v30x_rtc.c │ ├── ch32v30x_sdio.c │ ├── ch32v30x_spi.c │ ├── ch32v30x_tim.c │ ├── ch32v30x_usart.c │ └── ch32v30x_wwdg.c ├── README.md ├── Startup └── startup_ch32v30x.S ├── User ├── ch32v30x_conf.h ├── ch32v30x_it.c ├── ch32v30x_it.h ├── headers │ ├── ILI9341 │ │ ├── ILI9341.c │ │ ├── ILI9341.h │ │ ├── fonts.c │ │ └── fonts.h │ ├── MIDI.c │ ├── MIDI.h │ ├── YM3812 │ │ ├── OPL2.c │ │ ├── OPL2.h │ │ └── instruments.h │ ├── adc_helpers.c │ ├── adc_helpers.h │ ├── analog_sensors.c │ ├── analog_sensors.h │ ├── inputs.c │ ├── inputs.h │ ├── menu.c │ └── menu.h ├── main.c ├── system_ch32v30x.c └── system_ch32v30x.h ├── drivers ├── drv_gpio.c ├── drv_gpio.h ├── drv_usart.c └── drv_usart.h ├── obj ├── Core │ ├── core_riscv.d │ ├── core_riscv.o │ └── subdir.mk ├── Debug │ ├── debug.d │ ├── debug.o │ └── subdir.mk ├── NetLib │ └── subdir.mk ├── Peripheral │ └── src │ │ ├── ch32v30x_adc.d │ │ ├── ch32v30x_adc.o │ │ ├── ch32v30x_bkp.d │ │ ├── ch32v30x_bkp.o │ │ ├── ch32v30x_can.d │ │ ├── ch32v30x_can.o │ │ ├── ch32v30x_crc.d │ │ ├── ch32v30x_crc.o │ │ ├── ch32v30x_dac.d │ │ ├── ch32v30x_dac.o │ │ ├── ch32v30x_dbgmcu.d │ │ ├── ch32v30x_dbgmcu.o │ │ ├── ch32v30x_dma.d │ │ ├── ch32v30x_dma.o │ │ ├── ch32v30x_dvp.d │ │ ├── ch32v30x_dvp.o │ │ ├── ch32v30x_eth.d │ │ ├── ch32v30x_eth.o │ │ ├── ch32v30x_exti.d │ │ ├── ch32v30x_exti.o │ │ ├── ch32v30x_flash.d │ │ ├── ch32v30x_flash.o │ │ ├── ch32v30x_fsmc.d │ │ ├── ch32v30x_fsmc.o │ │ ├── ch32v30x_gpio.d │ │ ├── ch32v30x_gpio.o │ │ ├── ch32v30x_i2c.d │ │ ├── ch32v30x_i2c.o │ │ ├── ch32v30x_iwdg.d │ │ ├── ch32v30x_iwdg.o │ │ ├── ch32v30x_misc.d │ │ ├── ch32v30x_misc.o │ │ ├── ch32v30x_opa.d │ │ ├── ch32v30x_opa.o │ │ ├── ch32v30x_pwr.d │ │ ├── ch32v30x_pwr.o │ │ ├── ch32v30x_rcc.d │ │ ├── ch32v30x_rcc.o │ │ ├── ch32v30x_rng.d │ │ ├── ch32v30x_rng.o │ │ ├── ch32v30x_rtc.d │ │ ├── ch32v30x_rtc.o │ │ ├── ch32v30x_sdio.d │ │ ├── ch32v30x_sdio.o │ │ ├── ch32v30x_spi.d │ │ ├── ch32v30x_spi.o │ │ ├── ch32v30x_tim.d │ │ ├── ch32v30x_tim.o │ │ ├── ch32v30x_usart.d │ │ ├── ch32v30x_usart.o │ │ ├── ch32v30x_wwdg.d │ │ ├── ch32v30x_wwdg.o │ │ └── subdir.mk ├── RT-Thread_test-1.elf ├── RT-Thread_test-1.hex ├── RT-Thread_test-1.lst ├── RT-Thread_test-1.map ├── Startup │ ├── startup_ch32v30x.d │ ├── startup_ch32v30x.o │ └── subdir.mk ├── User │ ├── ch32v30x_it.d │ ├── ch32v30x_it.o │ ├── headers │ │ ├── ILI9341 │ │ │ ├── ILI9341.d │ │ │ ├── ILI9341.o │ │ │ ├── fonts.d │ │ │ ├── fonts.o │ │ │ └── subdir.mk │ │ ├── MIDI.d │ │ ├── MIDI.o │ │ ├── YM3812 │ │ │ ├── OPL2.d │ │ │ ├── OPL2.o │ │ │ └── subdir.mk │ │ ├── adc_helpers.d │ │ ├── adc_helpers.o │ │ ├── analog_sensors.d │ │ ├── analog_sensors.o │ │ ├── inputs.d │ │ ├── inputs.o │ │ ├── menu.d │ │ ├── menu.o │ │ └── subdir.mk │ ├── main.d │ ├── main.o │ ├── subdir.mk │ ├── system_ch32v30x.d │ └── system_ch32v30x.o ├── drivers │ ├── drv_gpio.d │ ├── drv_gpio.o │ ├── drv_usart.d │ ├── drv_usart.o │ └── subdir.mk ├── makefile ├── objects.mk ├── rtthread │ ├── board.d │ ├── board.o │ ├── components │ │ ├── drivers │ │ │ ├── misc │ │ │ │ ├── pin.d │ │ │ │ ├── pin.o │ │ │ │ └── subdir.mk │ │ │ └── serial │ │ │ │ ├── serial.d │ │ │ │ ├── serial.o │ │ │ │ └── subdir.mk │ │ └── finsh │ │ │ ├── cmd.d │ │ │ ├── cmd.o │ │ │ ├── msh.d │ │ │ ├── msh.o │ │ │ ├── msh_cmd.d │ │ │ ├── msh_cmd.o │ │ │ ├── msh_file.d │ │ │ ├── msh_file.o │ │ │ ├── shell.d │ │ │ ├── shell.o │ │ │ ├── subdir.mk │ │ │ ├── symbol.d │ │ │ └── symbol.o │ ├── libcpu │ │ ├── arm │ │ │ ├── AT91SAM7S │ │ │ │ └── subdir.mk │ │ │ ├── AT91SAM7X │ │ │ │ └── subdir.mk │ │ │ ├── am335x │ │ │ │ └── subdir.mk │ │ │ ├── arm926 │ │ │ │ └── subdir.mk │ │ │ ├── armv6 │ │ │ │ └── subdir.mk │ │ │ ├── common │ │ │ │ └── subdir.mk │ │ │ ├── cortex-a │ │ │ │ └── subdir.mk │ │ │ ├── cortex-m0 │ │ │ │ └── subdir.mk │ │ │ ├── cortex-m23 │ │ │ │ └── subdir.mk │ │ │ ├── cortex-m3 │ │ │ │ └── subdir.mk │ │ │ ├── cortex-m33 │ │ │ │ └── subdir.mk │ │ │ ├── cortex-m4 │ │ │ │ └── subdir.mk │ │ │ ├── cortex-m7 │ │ │ │ └── subdir.mk │ │ │ ├── cortex-r4 │ │ │ │ └── subdir.mk │ │ │ ├── dm36x │ │ │ │ └── subdir.mk │ │ │ ├── lpc214x │ │ │ │ └── subdir.mk │ │ │ ├── lpc24xx │ │ │ │ └── subdir.mk │ │ │ ├── realview-a8-vmm │ │ │ │ └── subdir.mk │ │ │ ├── s3c24x0 │ │ │ │ └── subdir.mk │ │ │ ├── s3c44b0 │ │ │ │ └── subdir.mk │ │ │ ├── sep4020 │ │ │ │ └── subdir.mk │ │ │ └── zynqmp-r5 │ │ │ │ └── subdir.mk │ │ └── risc-v │ │ │ └── common │ │ │ ├── context_gcc.d │ │ │ ├── context_gcc.o │ │ │ ├── cpuport.d │ │ │ ├── cpuport.o │ │ │ ├── interrupt_gcc.d │ │ │ ├── interrupt_gcc.o │ │ │ └── subdir.mk │ ├── src │ │ ├── clock.d │ │ ├── clock.o │ │ ├── components.d │ │ ├── components.o │ │ ├── cpu.d │ │ ├── cpu.o │ │ ├── device.d │ │ ├── device.o │ │ ├── idle.d │ │ ├── idle.o │ │ ├── ipc.d │ │ ├── ipc.o │ │ ├── irq.d │ │ ├── irq.o │ │ ├── kservice.d │ │ ├── kservice.o │ │ ├── mem.d │ │ ├── mem.o │ │ ├── memheap.d │ │ ├── memheap.o │ │ ├── mempool.d │ │ ├── mempool.o │ │ ├── object.d │ │ ├── object.o │ │ ├── scheduler.d │ │ ├── scheduler.o │ │ ├── slab.d │ │ ├── slab.o │ │ ├── subdir.mk │ │ ├── thread.d │ │ ├── thread.o │ │ ├── timer.d │ │ └── timer.o │ ├── subdir.mk │ └── tools │ │ └── kconfig-frontends │ │ ├── frontends │ │ ├── conf │ │ │ └── subdir.mk │ │ ├── gconf │ │ │ └── subdir.mk │ │ ├── mconf │ │ │ └── subdir.mk │ │ └── nconf │ │ │ └── subdir.mk │ │ ├── libs │ │ ├── lxdialog │ │ │ └── subdir.mk │ │ └── parser │ │ │ └── subdir.mk │ │ └── utils │ │ └── subdir.mk └── sources.mk ├── proto-netlist.txt └── rtthread ├── board.c ├── board.h ├── components ├── drivers │ ├── include │ │ ├── drivers │ │ │ ├── pin.h │ │ │ └── serial.h │ │ ├── ipc │ │ │ ├── completion.h │ │ │ ├── dataqueue.h │ │ │ ├── pipe.h │ │ │ ├── poll.h │ │ │ ├── ringbuffer.h │ │ │ ├── waitqueue.h │ │ │ └── workqueue.h │ │ └── rtdevice.h │ ├── misc │ │ └── pin.c │ └── serial │ │ └── serial.c └── finsh │ ├── cmd.c │ ├── finsh.h │ ├── finsh_api.h │ ├── msh.c │ ├── msh.h │ ├── msh_cmd.c │ ├── msh_file.c │ ├── shell.c │ ├── shell.h │ └── symbol.c ├── include ├── libc │ ├── libc_dirent.h │ ├── libc_errno.h │ ├── libc_fcntl.h │ ├── libc_fdset.h │ ├── libc_ioctl.h │ ├── libc_signal.h │ └── libc_stat.h ├── rtdbg.h ├── rtdebug.h ├── rtdef.h ├── rthw.h ├── rtlibc.h ├── rtm.h ├── rtservice.h └── rtthread.h ├── libcpu └── risc-v │ └── common │ ├── context_gcc.S │ ├── cpuport.c │ ├── cpuport.h │ └── interrupt_gcc.S ├── rtconfig.h └── src ├── clock.c ├── components.c ├── cpu.c ├── device.c ├── idle.c ├── ipc.c ├── irq.c ├── kservice.c ├── mem.c ├── memheap.c ├── mempool.c ├── object.c ├── scheduler.c ├── slab.c ├── thread.c └── timer.c /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | RT-Thread_test-1 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 24 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 25 | 26 | 27 | 28 | 1657331867305 29 | 30 | 22 31 | 32 | org.eclipse.ui.ide.multiFilter 33 | 1.0-name-matches-false-false-*.wvproj 34 | 35 | 36 | 37 | 38 | 39 | copy_PARENT 40 | $%7BPARENT-3-PROJECT_LOC%7D/Users/Stefan/Desktop/EVT/EXAM/ETH 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /.settings/language.settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//Core/core_riscv.h=GBK 3 | encoding//Debug/debug.c=GBK 4 | encoding//Debug/debug.h=GBK 5 | encoding//Peripheral/inc/ch32v30x.h=GBK 6 | encoding//Peripheral/inc/ch32v30x_adc.h=GBK 7 | encoding//Peripheral/inc/ch32v30x_eth.h=GBK 8 | encoding//Peripheral/inc/ch32v30x_gpio.h=GBK 9 | encoding//Peripheral/inc/ch32v30x_rcc.h=GBK 10 | encoding//Peripheral/inc/ch32v30x_spi.h=GBK 11 | encoding//Peripheral/inc/ch32v30x_usart.h=GBK 12 | encoding//Peripheral/src/ch32v30x_adc.c=GBK 13 | encoding//Peripheral/src/ch32v30x_gpio.c=GBK 14 | encoding//Peripheral/src/ch32v30x_rcc.c=GBK 15 | encoding//Peripheral/src/ch32v30x_spi.c=GBK 16 | encoding//Peripheral/src/ch32v30x_usart.c=GBK 17 | encoding//Startup/startup_ch32v30x.S=GBK 18 | encoding//User/ch32v30x_conf.h=GBK 19 | encoding//User/headers/ILI9341/ILI9341.c=GBK 20 | encoding//User/headers/ILI9341/ILI9341.h=GBK 21 | encoding//User/headers/ILI9341/fonts.c=GBK 22 | encoding//User/headers/ILI9341/fonts.h=GBK 23 | encoding//User/headers/MIDI.c=GBK 24 | encoding//User/headers/MIDI.h=GBK 25 | encoding//User/headers/YM3812/OPL2.c=GBK 26 | encoding//User/headers/YM3812/OPL2.h=GBK 27 | encoding//User/headers/YM3812/instruments.h=GBK 28 | encoding//User/headers/adc_helpers.c=GBK 29 | encoding//User/headers/adc_helpers.h=GBK 30 | encoding//User/headers/analog_sensors.c=GBK 31 | encoding//User/headers/analog_sensors.h=GBK 32 | encoding//User/headers/inputs.c=GBK 33 | encoding//User/headers/inputs.h=GBK 34 | encoding//User/headers/menu.c=GBK 35 | encoding//User/headers/menu.h=GBK 36 | encoding//User/main.c=GBK 37 | encoding//User/oldmain.txt=GBK 38 | encoding//rtthread/components/drivers/include/drivers/pin.h=GBK 39 | encoding//rtthread/components/drivers/include/rtdevice.h=GBK 40 | encoding//rtthread/components/drivers/misc/pin.c=GBK 41 | encoding//rtthread/components/finsh/finsh_api.h=GBK 42 | encoding//rtthread/include/rtdef.h=GBK 43 | encoding//rtthread/include/rthw.h=GBK 44 | encoding//rtthread/rtconfig.h=GBK 45 | encoding//rtthread/src/clock.c=GBK 46 | encoding//rtthread/src/components.c=GBK 47 | encoding//rtthread/src/device.c=GBK 48 | encoding//rtthread/src/kservice.c=GBK 49 | encoding//rtthread/src/thread.c=GBK 50 | encoding//rtthread/src/timer.c=GBK 51 | -------------------------------------------------------------------------------- /.template: -------------------------------------------------------------------------------- 1 | Mcu Type=CH32V30x 2 | Target Path=obj\RT-Thread_test-1.hex 3 | Address=0x08000000 4 | Erase All=true 5 | Program=true 6 | Verify=true 7 | Reset=true 8 | 9 | Vendor=WCH 10 | Link=WCH-Link 11 | Toolchain=RISC-V 12 | Series=CH32V307 13 | Description=ROM(byte): 256K, SRAM(byte): 64K, CHIP PINS: 64, GPIO PORTS: 51.\nWCH CH32V3 series of mainstream MCUs covers the needs of a large variety of applications in the industrial,medical and consumer markets. High performance with first-class peripherals and low-power,low-voltage operation is paired with a high level of integration at accessible prices with a simple architecture and easy-to-use tools. 14 | 15 | PeripheralVersion=1.7 16 | MCU=RT-Thread 17 | -------------------------------------------------------------------------------- /Debug/debug.h: -------------------------------------------------------------------------------- 1 | /********************************** (C) COPYRIGHT ******************************* 2 | * File Name : debug.h 3 | * Author : WCH 4 | * Version : V1.0.0 5 | * Date : 2021/06/06 6 | * Description : This file contains all the functions prototypes for UART 7 | * Printf , Delay functions. 8 | * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. 9 | * SPDX-License-Identifier: Apache-2.0 10 | *******************************************************************************/ 11 | #ifndef __DEBUG_H 12 | #define __DEBUG_H 13 | 14 | #include "stdio.h" 15 | #include "ch32v30x.h" 16 | 17 | /* UART Printf Definition */ 18 | #define DEBUG_UART1 1 19 | #define DEBUG_UART2 2 20 | #define DEBUG_UART3 3 21 | 22 | /* DEBUG UATR Definition */ 23 | #define DEBUG DEBUG_UART1 24 | //#define DEBUG DEBUG_UART2 25 | //#define DEBUG DEBUG_UART3 26 | 27 | 28 | void Delay_Init(void); 29 | void Delay_Us (uint32_t n); 30 | void Delay_Ms (uint32_t n); 31 | void USART_Printf_Init(uint32_t baudrate); 32 | 33 | #endif 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Ld/Link.ld: -------------------------------------------------------------------------------- 1 | ENTRY( _start ) __stack_size = 2048; PROVIDE( _stack_size = __stack_size ); MEMORY { FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 256K RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K } SECTIONS { .init : { _sinit = .; . = ALIGN(4); KEEP(*(SORT_NONE(.init))) . = ALIGN(4); _einit = .; } >FLASH AT>FLASH .vector : { *(.vector); . = ALIGN(64); } >FLASH AT>FLASH .text : { . = ALIGN(4); *(.text) *(.text.*) *(.rodata) *(.rodata*) *(.glue_7) *(.glue_7t) *(.gnu.linkonce.t.*) /* section information for finsh shell */ . = ALIGN(4); __fsymtab_start = .; KEEP(*(FSymTab)) __fsymtab_end = .; . = ALIGN(4); __vsymtab_start = .; KEEP(*(VSymTab)) __vsymtab_end = .; . = ALIGN(4); /* section information for initial. */ . = ALIGN(4); __rt_init_start = .; KEEP(*(SORT(.rti_fn*))) __rt_init_end = .; . = ALIGN(4); /* section information for modules */ . = ALIGN(4); __rtmsymtab_start = .; KEEP(*(RTMSymTab)) __rtmsymtab_end = .; . = ALIGN(4); } >FLASH AT>FLASH .fini : { KEEP(*(SORT_NONE(.fini))) . = ALIGN(4); } >FLASH AT>FLASH PROVIDE( _etext = . ); PROVIDE( _eitcm = . ); .preinit_array : { PROVIDE_HIDDEN (__preinit_array_start = .); KEEP (*(.preinit_array)) PROVIDE_HIDDEN (__preinit_array_end = .); } >FLASH AT>FLASH .init_array : { PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) PROVIDE_HIDDEN (__init_array_end = .); } >FLASH AT>FLASH .fini_array : { PROVIDE_HIDDEN (__fini_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) PROVIDE_HIDDEN (__fini_array_end = .); } >FLASH AT>FLASH .ctors : { /* gcc uses crtbegin.o to find the start of the constructors, so we make sure it is first. Because this is a wildcard, it doesn't matter if the user does not actually link against crtbegin.o; the linker won't look for a file to match a wildcard. The wildcard also means that it doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) KEEP (*crtbegin?.o(.ctors)) /* We don't want to include the .ctor section from the crtend.o file until after the sorted ctors. The .ctor section from the crtend file contains the end of ctors marker and it must be last */ KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors)) KEEP (*(SORT(.ctors.*))) KEEP (*(.ctors)) } >FLASH AT>FLASH .dtors : { KEEP (*crtbegin.o(.dtors)) KEEP (*crtbegin?.o(.dtors)) KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } >FLASH AT>FLASH .dalign : { . = ALIGN(4); PROVIDE(_data_vma = .); } >RAM AT>FLASH .dlalign : { . = ALIGN(4); PROVIDE(_data_lma = .); } >FLASH AT>FLASH .data : { *(.gnu.linkonce.r.*) *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); PROVIDE( __global_pointer$ = . + 0x800 ); *(.sdata .sdata.*) *(.sdata2.*) *(.gnu.linkonce.s.*) . = ALIGN(8); *(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) . = ALIGN(4); PROVIDE( _edata = .); } >RAM AT>FLASH .bss : { . = ALIGN(4); PROVIDE( _sbss = .); *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss*) *(.gnu.linkonce.b.*) *(COMMON*) . = ALIGN(4); PROVIDE( _ebss = .); } >RAM AT>FLASH PROVIDE( _end = _ebss); PROVIDE( end = . ); .stack ORIGIN(RAM) + LENGTH(RAM) - __stack_size : { PROVIDE( _heap_end = . ); . = ALIGN(4); PROVIDE(_susrstack = . ); . = . + __stack_size; PROVIDE( _eusrstack = .); } >RAM } -------------------------------------------------------------------------------- /Peripheral/inc/ch32v30x_crc.h: -------------------------------------------------------------------------------- 1 | /********************************** (C) COPYRIGHT ******************************* 2 | * File Name : ch32v30x_crc.h 3 | * Author : WCH 4 | * Version : V1.0.0 5 | * Date : 2021/06/06 6 | * Description : This file contains all the functions prototypes for the 7 | * CRC firmware library. 8 | * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. 9 | * SPDX-License-Identifier: Apache-2.0 10 | *******************************************************************************/ 11 | #ifndef __CH32V30x_CRC_H 12 | #define __CH32V30x_CRC_H 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #include "ch32v30x.h" 19 | 20 | 21 | void CRC_ResetDR(void); 22 | uint32_t CRC_CalcCRC(uint32_t Data); 23 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength); 24 | uint32_t CRC_GetCRC(void); 25 | void CRC_SetIDRegister(uint8_t IDValue); 26 | uint8_t CRC_GetIDRegister(void); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /Peripheral/inc/ch32v30x_dbgmcu.h: -------------------------------------------------------------------------------- 1 | /********************************** (C) COPYRIGHT ******************************* 2 | * File Name : ch32v30x_dbgmcu.h 3 | * Author : WCH 4 | * Version : V1.0.0 5 | * Date : 2021/06/06 6 | * Description : This file contains all the functions prototypes for the 7 | * DBGMCU firmware library. 8 | * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. 9 | * SPDX-License-Identifier: Apache-2.0 10 | *******************************************************************************/ 11 | #ifndef __CH32V30x_DBGMCU_H 12 | #define __CH32V30x_DBGMCU_H 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #include "ch32v30x.h" 19 | 20 | 21 | uint32_t DBGMCU_GetREVID(void); 22 | uint32_t DBGMCU_GetDEVID(void); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Peripheral/inc/ch32v30x_dvp.h: -------------------------------------------------------------------------------- 1 | /********************************** (C) COPYRIGHT ******************************* 2 | * File Name : ch32v30x_dvp.h 3 | * Author : WCH 4 | * Version : V1.0.0 5 | * Date : 2021/06/06 6 | * Description : This file contains all the functions prototypes for the 7 | * DVP firmware library. 8 | * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. 9 | * SPDX-License-Identifier: Apache-2.0 10 | *******************************************************************************/ 11 | #ifndef __CH32V30x_DVP_H 12 | #define __CH32V30x_DVP_H 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #include "ch32v30x.h" 19 | 20 | /* DVP Data Mode */ 21 | typedef enum 22 | { 23 | Video_Mode = 0, 24 | JPEG_Mode, 25 | }DVP_Data_ModeTypeDef; 26 | 27 | 28 | /* DVP DMA */ 29 | typedef enum 30 | { 31 | DVP_DMA_Disable = 0, 32 | DVP_DMA_Enable, 33 | }DVP_DMATypeDef; 34 | 35 | /* DVP FLAG and FIFO Reset */ 36 | typedef enum 37 | { 38 | DVP_FLAG_FIFO_RESET_Disable = 0, 39 | DVP_FLAG_FIFO_RESET_Enable, 40 | }DVP_FLAG_FIFO_RESETTypeDef; 41 | 42 | /* DVP RX Reset */ 43 | typedef enum 44 | { 45 | DVP_RX_RESET_Disable = 0, 46 | DVP_RX_RESET_Enable, 47 | }DVP_RX_RESETTypeDef; 48 | 49 | 50 | 51 | void DVP_INTCfg( uint8_t s, uint8_t i ); 52 | void DVP_Mode( uint8_t s, DVP_Data_ModeTypeDef i); 53 | void DVP_Cfg( DVP_DMATypeDef s, DVP_FLAG_FIFO_RESETTypeDef i, DVP_RX_RESETTypeDef j); 54 | 55 | 56 | 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /Peripheral/inc/ch32v30x_iwdg.h: -------------------------------------------------------------------------------- 1 | /********************************** (C) COPYRIGHT ******************************* 2 | * File Name : ch32v30x_iwdg.h 3 | * Author : WCH 4 | * Version : V1.0.0 5 | * Date : 2021/06/06 6 | * Description : This file contains all the functions prototypes for the 7 | * IWDG firmware library. 8 | * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. 9 | * SPDX-License-Identifier: Apache-2.0 10 | *******************************************************************************/ 11 | #ifndef __CH32V30x_IWDG_H 12 | #define __CH32V30x_IWDG_H 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #include "ch32v30x.h" 19 | 20 | /* IWDG_WriteAccess */ 21 | #define IWDG_WriteAccess_Enable ((uint16_t)0x5555) 22 | #define IWDG_WriteAccess_Disable ((uint16_t)0x0000) 23 | 24 | /* IWDG_prescaler */ 25 | #define IWDG_Prescaler_4 ((uint8_t)0x00) 26 | #define IWDG_Prescaler_8 ((uint8_t)0x01) 27 | #define IWDG_Prescaler_16 ((uint8_t)0x02) 28 | #define IWDG_Prescaler_32 ((uint8_t)0x03) 29 | #define IWDG_Prescaler_64 ((uint8_t)0x04) 30 | #define IWDG_Prescaler_128 ((uint8_t)0x05) 31 | #define IWDG_Prescaler_256 ((uint8_t)0x06) 32 | 33 | /* IWDG_Flag */ 34 | #define IWDG_FLAG_PVU ((uint16_t)0x0001) 35 | #define IWDG_FLAG_RVU ((uint16_t)0x0002) 36 | 37 | 38 | void IWDG_WriteAccessCmd(uint16_t IWDG_WriteAccess); 39 | void IWDG_SetPrescaler(uint8_t IWDG_Prescaler); 40 | void IWDG_SetReload(uint16_t Reload); 41 | void IWDG_ReloadCounter(void); 42 | void IWDG_Enable(void); 43 | FlagStatus IWDG_GetFlagStatus(uint16_t IWDG_FLAG); 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | 49 | #endif 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /Peripheral/inc/ch32v30x_misc.h: -------------------------------------------------------------------------------- 1 | /********************************** (C) COPYRIGHT ******************************* 2 | * File Name : ch32v30x_misc.h 3 | * Author : WCH 4 | * Version : V1.0.0 5 | * Date : 2021/06/06 6 | * Description : This file contains all the functions prototypes for the 7 | * miscellaneous firmware library functions. 8 | * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. 9 | * SPDX-License-Identifier: Apache-2.0 10 | *******************************************************************************/ 11 | #ifndef __CH32V30X_MISC_H 12 | #define __CH32V30X_MISC_H 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #include "ch32v30x.h" 19 | 20 | /* NVIC Init Structure definition */ 21 | typedef struct 22 | { 23 | uint8_t NVIC_IRQChannel; 24 | uint8_t NVIC_IRQChannelPreemptionPriority; 25 | uint8_t NVIC_IRQChannelSubPriority; 26 | FunctionalState NVIC_IRQChannelCmd; 27 | } NVIC_InitTypeDef; 28 | 29 | 30 | /* Preemption_Priority_Group */ 31 | #define NVIC_PriorityGroup_0 ((uint32_t)0x00) 32 | #define NVIC_PriorityGroup_1 ((uint32_t)0x01) 33 | #define NVIC_PriorityGroup_2 ((uint32_t)0x02) 34 | #define NVIC_PriorityGroup_3 ((uint32_t)0x03) 35 | #define NVIC_PriorityGroup_4 ((uint32_t)0x04) 36 | 37 | 38 | void NVIC_PriorityGroupConfig(uint32_t NVIC_PriorityGroup); 39 | void NVIC_Init(NVIC_InitTypeDef* NVIC_InitStruct); 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | 45 | #endif 46 | 47 | -------------------------------------------------------------------------------- /Peripheral/inc/ch32v30x_opa.h: -------------------------------------------------------------------------------- 1 | /********************************** (C) COPYRIGHT ******************************* 2 | * File Name : ch32v30x_opa.h 3 | * Author : WCH 4 | * Version : V1.0.0 5 | * Date : 2021/06/06 6 | * Description : This file contains all the functions prototypes for the 7 | * OPA firmware library. 8 | * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. 9 | * SPDX-License-Identifier: Apache-2.0 10 | *******************************************************************************/ 11 | #ifndef __CH32V30x_OPA_H 12 | #define __CH32V30x_OPA_H 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #include "ch32v30x.h" 19 | 20 | #define OPA_PSEL_OFFSET 3 21 | #define OPA_NSEL_OFFSET 2 22 | #define OPA_MODE_OFFSET 1 23 | 24 | 25 | /* OPA member enumeration */ 26 | typedef enum 27 | { 28 | OPA1=0, 29 | OPA2, 30 | OPA3, 31 | OPA4 32 | }OPA_Num_TypeDef; 33 | 34 | /* OPA PSEL enumeration */ 35 | typedef enum 36 | { 37 | CHP0=0, 38 | CHP1 39 | }OPA_PSEL_TypeDef; 40 | 41 | /* OPA NSEL enumeration */ 42 | typedef enum 43 | { 44 | CHN0=0, 45 | CHN1 46 | }OPA_NSEL_TypeDef; 47 | 48 | /* OPA Mode enumeration */ 49 | typedef enum 50 | { 51 | OUT_IO_ADC=0, 52 | OUT_IO 53 | }OPA_Mode_TypeDef; 54 | 55 | /* OPA Init Structure definition */ 56 | typedef struct 57 | { 58 | OPA_Num_TypeDef OPA_NUM; /* Specifies the members of OPA */ 59 | OPA_PSEL_TypeDef PSEL; /* Specifies the positive channel of OPA */ 60 | OPA_NSEL_TypeDef NSEL; /* Specifies the negative channel of OPA */ 61 | OPA_Mode_TypeDef Mode; /* Specifies the mode of OPA */ 62 | }OPA_InitTypeDef; 63 | 64 | 65 | void OPA_DeInit(void); 66 | void OPA_Init(OPA_InitTypeDef* OPA_InitStruct); 67 | void OPA_StructInit(OPA_InitTypeDef* OPA_InitStruct); 68 | void OPA_Cmd(OPA_Num_TypeDef OPA_NUM, FunctionalState NewState); 69 | 70 | #ifdef __cplusplus 71 | } 72 | #endif 73 | 74 | #endif 75 | 76 | -------------------------------------------------------------------------------- /Peripheral/inc/ch32v30x_pwr.h: -------------------------------------------------------------------------------- 1 | /********************************** (C) COPYRIGHT ******************************* 2 | * File Name : ch32v30x_pwr.h 3 | * Author : WCH 4 | * Version : V1.0.0 5 | * Date : 2021/06/06 6 | * Description : This file contains all the functions prototypes for the PWR 7 | * firmware library. 8 | * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. 9 | * SPDX-License-Identifier: Apache-2.0 10 | *******************************************************************************/ 11 | #ifndef __CH32V30x_PWR_H 12 | #define __CH32V30x_PWR_H 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #include "ch32v30x.h" 19 | 20 | /* PVD_detection_level */ 21 | #define PWR_PVDLevel_2V2 ((uint32_t)0x00000000) 22 | #define PWR_PVDLevel_2V3 ((uint32_t)0x00000020) 23 | #define PWR_PVDLevel_2V4 ((uint32_t)0x00000040) 24 | #define PWR_PVDLevel_2V5 ((uint32_t)0x00000060) 25 | #define PWR_PVDLevel_2V6 ((uint32_t)0x00000080) 26 | #define PWR_PVDLevel_2V7 ((uint32_t)0x000000A0) 27 | #define PWR_PVDLevel_2V8 ((uint32_t)0x000000C0) 28 | #define PWR_PVDLevel_2V9 ((uint32_t)0x000000E0) 29 | 30 | /* Regulator_state_is_STOP_mode */ 31 | #define PWR_Regulator_ON ((uint32_t)0x00000000) 32 | #define PWR_Regulator_LowPower ((uint32_t)0x00000001) 33 | 34 | /* STOP_mode_entry */ 35 | #define PWR_STOPEntry_WFI ((uint8_t)0x01) 36 | #define PWR_STOPEntry_WFE ((uint8_t)0x02) 37 | 38 | /* PWR_Flag */ 39 | #define PWR_FLAG_WU ((uint32_t)0x00000001) 40 | #define PWR_FLAG_SB ((uint32_t)0x00000002) 41 | #define PWR_FLAG_PVDO ((uint32_t)0x00000004) 42 | 43 | 44 | void PWR_DeInit(void); 45 | void PWR_BackupAccessCmd(FunctionalState NewState); 46 | void PWR_PVDCmd(FunctionalState NewState); 47 | void PWR_PVDLevelConfig(uint32_t PWR_PVDLevel); 48 | void PWR_WakeUpPinCmd(FunctionalState NewState); 49 | void PWR_EnterSTOPMode(uint32_t PWR_Regulator, uint8_t PWR_STOPEntry); 50 | void PWR_EnterSTANDBYMode(void); 51 | FlagStatus PWR_GetFlagStatus(uint32_t PWR_FLAG); 52 | void PWR_ClearFlag(uint32_t PWR_FLAG); 53 | void PWR_EnterSTANDBYMode_RAM(void); 54 | void PWR_EnterSTANDBYMode_RAM_LV(void); 55 | void PWR_EnterSTANDBYMode_RAM_VBAT_EN(void); 56 | void PWR_EnterSTANDBYMode_RAM_LV_VBAT_EN(void); 57 | 58 | 59 | #ifdef __cplusplus 60 | } 61 | #endif 62 | 63 | #endif 64 | 65 | -------------------------------------------------------------------------------- /Peripheral/inc/ch32v30x_rng.h: -------------------------------------------------------------------------------- 1 | /********************************** (C) COPYRIGHT ******************************* 2 | * File Name : ch32v30x_rng.h 3 | * Author : WCH 4 | * Version : V1.0.0 5 | * Date : 2021/06/06 6 | * Description : This file contains all the functions prototypes for the 7 | * RNG firmware library. 8 | * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. 9 | * SPDX-License-Identifier: Apache-2.0 10 | *******************************************************************************/ 11 | #ifndef __CH32V30x_RNG_H 12 | #define __CH32V30x_RNG_H 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | #include "ch32v30x.h" 18 | 19 | /* RNG_flags_definition*/ 20 | #define RNG_FLAG_DRDY ((uint8_t)0x0001) /* Data ready */ 21 | #define RNG_FLAG_CECS ((uint8_t)0x0002) /* Clock error current status */ 22 | #define RNG_FLAG_SECS ((uint8_t)0x0004) /* Seed error current status */ 23 | 24 | /* RNG_interrupts_definition */ 25 | #define RNG_IT_CEI ((uint8_t)0x20) /* Clock error interrupt */ 26 | #define RNG_IT_SEI ((uint8_t)0x40) /* Seed error interrupt */ 27 | 28 | 29 | void RNG_Cmd(FunctionalState NewState); 30 | uint32_t RNG_GetRandomNumber(void); 31 | void RNG_ITConfig(FunctionalState NewState); 32 | FlagStatus RNG_GetFlagStatus(uint8_t RNG_FLAG); 33 | void RNG_ClearFlag(uint8_t RNG_FLAG); 34 | ITStatus RNG_GetITStatus(uint8_t RNG_IT); 35 | void RNG_ClearITPendingBit(uint8_t RNG_IT); 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /Peripheral/inc/ch32v30x_rtc.h: -------------------------------------------------------------------------------- 1 | /********************************** (C) COPYRIGHT ******************************* 2 | * File Name : ch32v30x_rtc.h 3 | * Author : WCH 4 | * Version : V1.0.0 5 | * Date : 2021/06/06 6 | * Description : This file contains all the functions prototypes for the RTC 7 | * firmware library. 8 | * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. 9 | * SPDX-License-Identifier: Apache-2.0 10 | *******************************************************************************/ 11 | #ifndef __CH32V30x_RTC_H 12 | #define __CH32V30x_RTC_H 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #include "ch32v30x.h" 19 | 20 | 21 | /* RTC_interrupts_define */ 22 | #define RTC_IT_OW ((uint16_t)0x0004) /* Overflow interrupt */ 23 | #define RTC_IT_ALR ((uint16_t)0x0002) /* Alarm interrupt */ 24 | #define RTC_IT_SEC ((uint16_t)0x0001) /* Second interrupt */ 25 | 26 | /* RTC_interrupts_flags */ 27 | #define RTC_FLAG_RTOFF ((uint16_t)0x0020) /* RTC Operation OFF flag */ 28 | #define RTC_FLAG_RSF ((uint16_t)0x0008) /* Registers Synchronized flag */ 29 | #define RTC_FLAG_OW ((uint16_t)0x0004) /* Overflow flag */ 30 | #define RTC_FLAG_ALR ((uint16_t)0x0002) /* Alarm flag */ 31 | #define RTC_FLAG_SEC ((uint16_t)0x0001) /* Second flag */ 32 | 33 | 34 | void RTC_ITConfig(uint16_t RTC_IT, FunctionalState NewState); 35 | void RTC_EnterConfigMode(void); 36 | void RTC_ExitConfigMode(void); 37 | uint32_t RTC_GetCounter(void); 38 | void RTC_SetCounter(uint32_t CounterValue); 39 | void RTC_SetPrescaler(uint32_t PrescalerValue); 40 | void RTC_SetAlarm(uint32_t AlarmValue); 41 | uint32_t RTC_GetDivider(void); 42 | void RTC_WaitForLastTask(void); 43 | void RTC_WaitForSynchro(void); 44 | FlagStatus RTC_GetFlagStatus(uint16_t RTC_FLAG); 45 | void RTC_ClearFlag(uint16_t RTC_FLAG); 46 | ITStatus RTC_GetITStatus(uint16_t RTC_IT); 47 | void RTC_ClearITPendingBit(uint16_t RTC_IT); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif 54 | 55 | -------------------------------------------------------------------------------- /Peripheral/inc/ch32v30x_wwdg.h: -------------------------------------------------------------------------------- 1 | /********************************** (C) COPYRIGHT ******************************* 2 | * File Name : ch32v30x_wwdg.h 3 | * Author : WCH 4 | * Version : V1.0.0 5 | * Date : 2021/06/06 6 | * Description : This file contains all the functions prototypes for the WWDG 7 | * firmware library. 8 | * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. 9 | * SPDX-License-Identifier: Apache-2.0 10 | *******************************************************************************/ 11 | #ifndef __CH32V30x_WWDG_H 12 | #define __CH32V30x_WWDG_H 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #include "ch32v30x.h" 19 | 20 | 21 | /* WWDG_Prescaler */ 22 | #define WWDG_Prescaler_1 ((uint32_t)0x00000000) 23 | #define WWDG_Prescaler_2 ((uint32_t)0x00000080) 24 | #define WWDG_Prescaler_4 ((uint32_t)0x00000100) 25 | #define WWDG_Prescaler_8 ((uint32_t)0x00000180) 26 | 27 | 28 | void WWDG_DeInit(void); 29 | void WWDG_SetPrescaler(uint32_t WWDG_Prescaler); 30 | void WWDG_SetWindowValue(uint8_t WindowValue); 31 | void WWDG_EnableIT(void); 32 | void WWDG_SetCounter(uint8_t Counter); 33 | void WWDG_Enable(uint8_t Counter); 34 | FlagStatus WWDG_GetFlagStatus(void); 35 | void WWDG_ClearFlag(void); 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /Peripheral/src/ch32v30x_crc.c: -------------------------------------------------------------------------------- 1 | /********************************** (C) COPYRIGHT ******************************* 2 | * File Name : ch32v30x_crc.c 3 | * Author : WCH 4 | * Version : V1.0.0 5 | * Date : 2021/06/06 6 | * Description : This file provides all the CRC firmware functions. 7 | * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. 8 | * SPDX-License-Identifier: Apache-2.0 9 | *******************************************************************************/ 10 | #include "ch32v30x_crc.h" 11 | 12 | /********************************************************************* 13 | * @fn CRC_ResetDR 14 | * 15 | * @brief Resets the CRC Data register (DR). 16 | * 17 | * @return none 18 | */ 19 | void CRC_ResetDR(void) 20 | { 21 | CRC->CTLR = CRC_CTLR_RESET; 22 | } 23 | 24 | /********************************************************************* 25 | * @fn CRC_CalcCRC 26 | * 27 | * @brief Computes the 32-bit CRC of a given data word(32-bit). 28 | * 29 | * @param Data - data word(32-bit) to compute its CRC. 30 | * 31 | * @return 32-bit CRC. 32 | */ 33 | uint32_t CRC_CalcCRC(uint32_t Data) 34 | { 35 | CRC->DATAR = Data; 36 | 37 | return (CRC->DATAR); 38 | } 39 | 40 | /********************************************************************* 41 | * @fn CRC_CalcBlockCRC 42 | * 43 | * @brief Computes the 32-bit CRC of a given buffer of data word(32-bit). 44 | * 45 | * @param pBuffer - pointer to the buffer containing the data to be computed. 46 | * BufferLength - length of the buffer to be computed. 47 | * 48 | * @return 32-bit CRC. 49 | */ 50 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength) 51 | { 52 | uint32_t index = 0; 53 | 54 | for(index = 0; index < BufferLength; index++) 55 | { 56 | CRC->DATAR = pBuffer[index]; 57 | } 58 | 59 | return (CRC->DATAR); 60 | } 61 | 62 | /********************************************************************* 63 | * @fn CRC_GetCRC 64 | * 65 | * @brief Returns the current CRC value. 66 | * 67 | * @return 32-bit CRC. 68 | */ 69 | uint32_t CRC_GetCRC(void) 70 | { 71 | return (CRC->DATAR); 72 | } 73 | 74 | /********************************************************************* 75 | * @fn CRC_SetIDRegister 76 | * 77 | * @brief Stores a 8-bit data in the Independent Data(ID) register. 78 | * 79 | * @param IDValue - 8-bit value to be stored in the ID register. 80 | * 81 | * @return none 82 | */ 83 | void CRC_SetIDRegister(uint8_t IDValue) 84 | { 85 | CRC->IDATAR = IDValue; 86 | } 87 | 88 | /********************************************************************* 89 | * @fn CRC_GetIDRegister 90 | * 91 | * @brief Returns the 8-bit data stored in the Independent Data(ID) register. 92 | * 93 | * @return 8-bit value of the ID register. 94 | */ 95 | uint8_t CRC_GetIDRegister(void) 96 | { 97 | return (CRC->IDATAR); 98 | } 99 | -------------------------------------------------------------------------------- /Peripheral/src/ch32v30x_dbgmcu.c: -------------------------------------------------------------------------------- 1 | /********************************** (C) COPYRIGHT ******************************* 2 | * File Name : ch32v30x_dbgmcu.c 3 | * Author : WCH 4 | * Version : V1.0.0 5 | * Date : 2021/06/06 6 | * Description : This file provides all the DBGMCU firmware functions. 7 | * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. 8 | * SPDX-License-Identifier: Apache-2.0 9 | ****************************************************************************************/ 10 | #include "ch32v30x_dbgmcu.h" 11 | 12 | #define IDCODE_DEVID_MASK ((uint32_t)0x00000FFF) 13 | 14 | /********************************************************************* 15 | * @fn DBGMCU_GetREVID 16 | * 17 | * @brief Returns the device revision identifier. 18 | * 19 | * @return Revision identifier. 20 | */ 21 | uint32_t DBGMCU_GetREVID(void) 22 | { 23 | return ((*(uint32_t *)0x1FFFF704) >> 16); 24 | } 25 | 26 | /********************************************************************* 27 | * @fn DBGMCU_GetDEVID 28 | * 29 | * @brief Returns the device identifier. 30 | * 31 | * @return Device identifier. 32 | */ 33 | uint32_t DBGMCU_GetDEVID(void) 34 | { 35 | return ((*(uint32_t *)0x1FFFF704) & IDCODE_DEVID_MASK); 36 | } 37 | -------------------------------------------------------------------------------- /Peripheral/src/ch32v30x_dvp.c: -------------------------------------------------------------------------------- 1 | /********************************** (C) COPYRIGHT ******************************* 2 | * File Name : ch32v30x_dvp.c 3 | * Author : WCH 4 | * Version : V1.0.0 5 | * Date : 2021/06/06 6 | * Description : This file provides all the DVP firmware functions. 7 | * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. 8 | * SPDX-License-Identifier: Apache-2.0 9 | *******************************************************************************/ 10 | #include "ch32v30x_dvp.h" 11 | 12 | /********************************************************************* 13 | * @fn DVP_INTCfg 14 | * 15 | * @brief DVP interrupt configuration 16 | * 17 | * @param s - interrupt enable 18 | * ENABLE 19 | * DISABLE 20 | * i - interrupt type 21 | * RB_DVP_IE_STP_FRM 22 | * RB_DVP_IE_FIFO_OV 23 | * RB_DVP_IE_FRM_DONE 24 | * RB_DVP_IE_ROW_DONE 25 | * RB_DVP_IE_STR_FRM 26 | * 27 | * @return none 28 | */ 29 | void DVP_INTCfg(uint8_t s, uint8_t i) 30 | { 31 | if(s) 32 | { 33 | DVP->IER |= i; 34 | } 35 | else 36 | { 37 | DVP->IER &= ~i; 38 | } 39 | } 40 | 41 | /********************************************************************* 42 | * @fn DVP_Mode 43 | * 44 | * @brief DVP mode 45 | * 46 | * @param s - data bit width 47 | * RB_DVP_D8_MOD 48 | * RB_DVP_D10_MOD 49 | * RB_DVP_D12_MOD 50 | * i - interrupt type 51 | * Video_Mode 52 | * JPEG_Mode 53 | * 54 | * @return none 55 | */ 56 | void DVP_Mode(uint8_t s, DVP_Data_ModeTypeDef i) 57 | { 58 | DVP->CR0 &= ~RB_DVP_MSK_DAT_MOD; 59 | 60 | if(s) 61 | { 62 | DVP->CR0 |= s; 63 | } 64 | else 65 | { 66 | DVP->CR0 &= ~(3 << 4); 67 | } 68 | 69 | if(i) 70 | { 71 | DVP->CR0 |= RB_DVP_JPEG; 72 | } 73 | else 74 | { 75 | DVP->CR0 &= ~RB_DVP_JPEG; 76 | } 77 | } 78 | 79 | /********************************************************************* 80 | * @fn DVP_Cfg 81 | * 82 | * @brief DVP configuration 83 | * 84 | * @param s - DMA enable control 85 | * DVP_DMA_Enable 86 | * DVP_DMA_Disable 87 | * i - DVP all clear 88 | * DVP_FLAG_FIFO_RESET_Enable 89 | * DVP_FLAG_FIFO_RESET_Disable 90 | * j - receive reset enable 91 | * DVP_RX_RESET_Enable 92 | * DVP_RX_RESET_Disable 93 | * 94 | * @return none 95 | */ 96 | void DVP_Cfg(DVP_DMATypeDef s, DVP_FLAG_FIFO_RESETTypeDef i, DVP_RX_RESETTypeDef j) 97 | { 98 | switch(s) 99 | { 100 | case DVP_DMA_Enable: 101 | DVP->CR1 |= RB_DVP_DMA_EN; 102 | break; 103 | case DVP_DMA_Disable: 104 | DVP->CR1 &= ~RB_DVP_DMA_EN; 105 | break; 106 | default: 107 | break; 108 | } 109 | 110 | switch(i) 111 | { 112 | case DVP_RX_RESET_Enable: 113 | DVP->CR1 |= RB_DVP_ALL_CLR; 114 | break; 115 | case DVP_RX_RESET_Disable: 116 | DVP->CR1 &= ~RB_DVP_ALL_CLR; 117 | break; 118 | default: 119 | break; 120 | } 121 | 122 | switch(j) 123 | { 124 | case DVP_RX_RESET_Enable: 125 | DVP->CR1 |= RB_DVP_RCV_CLR; 126 | break; 127 | case DVP_RX_RESET_Disable: 128 | DVP->CR1 &= ~RB_DVP_RCV_CLR; 129 | break; 130 | default: 131 | break; 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /Peripheral/src/ch32v30x_eth.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/Peripheral/src/ch32v30x_eth.c -------------------------------------------------------------------------------- /Peripheral/src/ch32v30x_fsmc.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/Peripheral/src/ch32v30x_fsmc.c -------------------------------------------------------------------------------- /Peripheral/src/ch32v30x_opa.c: -------------------------------------------------------------------------------- 1 | /********************************** (C) COPYRIGHT ******************************* 2 | * File Name : ch32v30x_opa.c 3 | * Author : WCH 4 | * Version : V1.0.0 5 | * Date : 2021/06/06 6 | * Description : This file provides all the OPA firmware functions. 7 | * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. 8 | * SPDX-License-Identifier: Apache-2.0 9 | ***************************************************************************************/ 10 | #include "ch32v30x_opa.h" 11 | 12 | #define OPA_MASK ((uint32_t)0x000F) 13 | #define OPA_Total_NUM 4 14 | 15 | /********************************************************************* 16 | * @fn OPA_DeInit 17 | * 18 | * @brief Deinitializes the OPA peripheral registers to their default 19 | * reset values. 20 | * 21 | * @return none 22 | */ 23 | void OPA_DeInit(void) 24 | { 25 | OPA->CR = 0; 26 | } 27 | 28 | /********************************************************************* 29 | * @fn OPA_Init 30 | * 31 | * @brief Initializes the OPA peripheral according to the specified 32 | * parameters in the OPA_InitStruct. 33 | * 34 | * @param OPA_InitStruct - pointer to a OPA_InitTypeDef structure 35 | * 36 | * @return none 37 | */ 38 | void OPA_Init(OPA_InitTypeDef *OPA_InitStruct) 39 | { 40 | uint32_t tmp = 0; 41 | tmp = OPA->CR; 42 | tmp &= ~(OPA_MASK << (OPA_InitStruct->OPA_NUM * OPA_Total_NUM)); 43 | tmp |= (((OPA_InitStruct->PSEL << OPA_PSEL_OFFSET) | (OPA_InitStruct->NSEL << OPA_NSEL_OFFSET) | (OPA_InitStruct->Mode << OPA_MODE_OFFSET)) << (OPA_InitStruct->OPA_NUM * OPA_Total_NUM)); 44 | OPA->CR = tmp; 45 | } 46 | 47 | /********************************************************************* 48 | * @fn OPA_StructInit 49 | * 50 | * @brief Fills each OPA_StructInit member with its reset value. 51 | * 52 | * @param OPA_StructInit - pointer to a OPA_InitTypeDef structure 53 | * 54 | * @return none 55 | */ 56 | void OPA_StructInit(OPA_InitTypeDef *OPA_InitStruct) 57 | { 58 | OPA_InitStruct->Mode = OUT_IO; 59 | OPA_InitStruct->PSEL = CHP0; 60 | OPA_InitStruct->NSEL = CHN0; 61 | OPA_InitStruct->OPA_NUM = OPA1; 62 | } 63 | 64 | /********************************************************************* 65 | * @fn OPA_Cmd 66 | * 67 | * @brief Enables or disables the specified OPA peripheral. 68 | * 69 | * @param OPA_NUM - Select OPA 70 | * NewState - ENABLE or DISABLE. 71 | * 72 | * @return none 73 | */ 74 | void OPA_Cmd(OPA_Num_TypeDef OPA_NUM, FunctionalState NewState) 75 | { 76 | if(NewState == ENABLE) 77 | { 78 | OPA->CR |= (1 << (OPA_NUM * OPA_Total_NUM)); 79 | } 80 | else 81 | { 82 | OPA->CR &= ~(1 << (OPA_NUM * OPA_Total_NUM)); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /Peripheral/src/ch32v30x_rng.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/Peripheral/src/ch32v30x_rng.c -------------------------------------------------------------------------------- /Peripheral/src/ch32v30x_sdio.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/Peripheral/src/ch32v30x_sdio.c -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DOS-Synth 2 | The repository for the DOS Synth project - a DIY synthesizer which combines the powerful RISC-V microcontroller CH32V307, the RT-Thread RTOS with vintage Yamaha FM synthesis chips to enable musicians and synthesists to control them on a bare-metal level, creating unique and new sounds, with a hands-on focus. 3 | 4 | 5 | The project runs on the MounRiver Studio IDE and can be used with RT-Thread Studio as well - to use simply clone the project and open it with the aformentioned IDEs, using their Open/Load/Import functionality. 6 | 7 | 8 | Deeper project information and details are included in the Hackster article. 9 | -------------------------------------------------------------------------------- /User/ch32v30x_conf.h: -------------------------------------------------------------------------------- 1 | /********************************** (C) COPYRIGHT ******************************* 2 | * File Name : ch32v30x_conf.h 3 | * Author : WCH 4 | * Version : V1.0.0 5 | * Date : 2021/06/06 6 | * Description : Library configuration file. 7 | * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. 8 | * SPDX-License-Identifier: Apache-2.0 9 | *******************************************************************************/ 10 | #ifndef __CH32V30x_CONF_H 11 | #define __CH32V30x_CONF_H 12 | 13 | #include "ch32v30x_adc.h" 14 | #include "ch32v30x_bkp.h" 15 | #include "ch32v30x_can.h" 16 | #include "ch32v30x_crc.h" 17 | #include "ch32v30x_dac.h" 18 | #include "ch32v30x_dbgmcu.h" 19 | #include "ch32v30x_dma.h" 20 | #include "ch32v30x_exti.h" 21 | #include "ch32v30x_flash.h" 22 | #include "ch32v30x_fsmc.h" 23 | #include "ch32v30x_gpio.h" 24 | #include "ch32v30x_i2c.h" 25 | #include "ch32v30x_iwdg.h" 26 | #include "ch32v30x_pwr.h" 27 | #include "ch32v30x_rcc.h" 28 | #include "ch32v30x_rtc.h" 29 | #include "ch32v30x_sdio.h" 30 | #include "ch32v30x_spi.h" 31 | #include "ch32v30x_tim.h" 32 | #include "ch32v30x_usart.h" 33 | #include "ch32v30x_wwdg.h" 34 | #include "ch32v30x_it.h" 35 | #include "ch32v30x_misc.h" 36 | 37 | 38 | #endif /* __CH32V30x_CONF_H */ 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /User/ch32v30x_it.c: -------------------------------------------------------------------------------- 1 | /********************************** (C) COPYRIGHT ******************************* 2 | * File Name : ch32v10x_it.c 3 | * Author : WCH 4 | * Version : V1.0.0 5 | * Date : 2020/04/30 6 | * Description : Main Interrupt Service Routines. 7 | * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. 8 | * SPDX-License-Identifier: Apache-2.0 9 | *******************************************************************************/ 10 | #include "ch32v30x_it.h" 11 | #include "board.h" 12 | #include 13 | 14 | 15 | 16 | void NMI_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast"))); 17 | void HardFault_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast"))); 18 | 19 | /********************************************************************* 20 | * @fn NMI_Handler 21 | * 22 | * @brief This function handles NMI exception. 23 | * 24 | * @return none 25 | */ 26 | void NMI_Handler(void) 27 | { 28 | GET_INT_SP(); 29 | rt_interrupt_enter(); 30 | rt_kprintf(" NMI Handler\r\n"); 31 | rt_interrupt_leave(); 32 | FREE_INT_SP(); 33 | } 34 | 35 | /********************************************************************* 36 | * @fn HardFault_Handler 37 | * 38 | * @brief This function handles Hard Fault exception. 39 | * 40 | * @return none 41 | */ 42 | void HardFault_Handler(void) 43 | { 44 | GET_INT_SP(); 45 | rt_interrupt_enter(); 46 | rt_kprintf(" hardfult\r\n"); 47 | rt_interrupt_leave(); 48 | FREE_INT_SP(); 49 | 50 | } 51 | 52 | 53 | -------------------------------------------------------------------------------- /User/ch32v30x_it.h: -------------------------------------------------------------------------------- 1 | /********************************** (C) COPYRIGHT ******************************* 2 | * File Name : ch32v30x_it.h 3 | * Author : WCH 4 | * Version : V1.0.0 5 | * Date : 2021/06/06 6 | * Description : This file contains the headers of the interrupt handlers. 7 | * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. 8 | * SPDX-License-Identifier: Apache-2.0 9 | *******************************************************************************/ 10 | #ifndef __CH32V30x_IT_H 11 | #define __CH32V30x_IT_H 12 | 13 | #include "debug.h" 14 | 15 | #define GET_INT_SP() asm("csrrw sp,mscratch,sp") 16 | #define FREE_INT_SP() asm("csrrw sp,mscratch,sp") 17 | 18 | 19 | #endif /* __CH32V30x_IT_H */ 20 | 21 | 22 | -------------------------------------------------------------------------------- /User/headers/ILI9341/ILI9341.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "fonts.h" 4 | #include "ch32v30x.h" 5 | #include 6 | #include 7 | 8 | // code from MIT-licensed library https://github.com/afiskon/stm32-ili9341 9 | 10 | #define ILI9341_MADCTL_MY 0x80 11 | #define ILI9341_MADCTL_MX 0x40 12 | #define ILI9341_MADCTL_MV 0x20 13 | #define ILI9341_MADCTL_ML 0x10 14 | #define ILI9341_MADCTL_RGB 0x00 15 | #define ILI9341_MADCTL_BGR 0x08 16 | #define ILI9341_MADCTL_MH 0x04 17 | 18 | /*** Redefine if necessary ***/ 19 | 20 | #define ILI9341_RES_Pin GPIO_Pin_8 21 | #define ILI9341_RES_GPIO_Port GPIOA 22 | #define ILI9341_CS_Pin GPIO_Pin_3 23 | #define ILI9341_CS_GPIO_Port GPIOA 24 | #define ILI9341_DC_Pin GPIO_Pin_4 25 | #define ILI9341_DC_GPIO_Port GPIOA 26 | #define ILI9341_LED_Pin GPIO_Pin_2 27 | #define ILI9341_LED_GPIO_Port GPIOA 28 | 29 | 30 | // uncomment specific defines to change orientation 31 | /* 32 | #define ILI9341_WIDTH 240 33 | #define ILI9341_HEIGHT 320 34 | #define ILI9341_ROTATION (ILI9341_MADCTL_MX | ILI9341_MADCTL_BGR) 35 | */ 36 | 37 | // rotate right 38 | /* 39 | #define ILI9341_WIDTH 320 40 | #define ILI9341_HEIGHT 240 41 | #define ILI9341_ROTATION (ILI9341_MADCTL_MX | ILI9341_MADCTL_MY | ILI9341_MADCTL_MV | ILI9341_MADCTL_BGR) 42 | */ 43 | 44 | // rotate left 45 | 46 | #define ILI9341_WIDTH 320 47 | #define ILI9341_HEIGHT 240 48 | #define ILI9341_ROTATION (ILI9341_MADCTL_MV | ILI9341_MADCTL_BGR) 49 | 50 | 51 | // upside down 52 | /* 53 | #define ILI9341_WIDTH 240 54 | #define ILI9341_HEIGHT 320 55 | #define ILI9341_ROTATION (ILI9341_MADCTL_MY | ILI9341_MADCTL_BGR) 56 | */ 57 | 58 | /****************************/ 59 | 60 | // Color definitions 61 | #define ILI9341_BLACK 0x0000 62 | #define ILI9341_BLUE 0x001F 63 | #define ILI9341_RED 0xF800 64 | #define ILI9341_GREEN 0x07E0 65 | #define ILI9341_CYAN 0x07FF 66 | #define ILI9341_MAGENTA 0xF81F 67 | #define ILI9341_YELLOW 0xFFE0 68 | #define ILI9341_WHITE 0xFFFF 69 | #define ILI9341_COLOR565(r, g, b) (((r & 0xF8) << 8) | ((g & 0xFC) << 3) | ((b & 0xF8) >> 3)) 70 | 71 | #define DARKBLUE 0x0176 72 | #define PURPLE 0x501F 73 | #define DARKCYAN 0x0596 74 | #define DOSGREEN 0x0400 75 | 76 | 77 | // ADDED FOR STM32 COMPATIBILITY 78 | void ILI9341_SPI_Init(); 79 | void ILI9341_GPIO_Init(); 80 | 81 | void ILI9341_TurnOn(); 82 | void ILI9341_TurnOff(); 83 | 84 | // call before initializing any SPI devices 85 | void ILI9341_Unselect(); 86 | 87 | void ILI9341_Init(void); 88 | void ILI9341_DrawPixel(uint16_t x, uint16_t y, uint16_t color); 89 | void ILI9341_WriteChar(uint16_t x, uint16_t y, char ch, FontDef font, uint16_t color, uint16_t bgcolor); 90 | void ILI9341_WriteString(uint16_t x, uint16_t y, const char* str, FontDef font, uint16_t color, uint16_t bgcolor); 91 | void ILI9341_WriteString_Horizontal(uint16_t x, uint16_t y, const char* str, FontDef font, uint16_t color, uint16_t bgcolor); 92 | void ILI9341_WriteString_Horizontal_Backwards(uint16_t x, uint16_t y, const char* str, FontDef font, uint16_t color, uint16_t bgcolor); 93 | void ILI9341_FillRectangle(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t color); 94 | void ILI9341_FillScreen(uint16_t color); 95 | void ILI9341_DrawImage(uint16_t x, uint16_t y, uint16_t w, uint16_t h, const uint16_t* data); 96 | void ILI9341_InvertColors(bool invert); 97 | -------------------------------------------------------------------------------- /User/headers/ILI9341/fonts.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | typedef struct { 6 | const uint8_t width; 7 | uint8_t height; 8 | const uint16_t *data; 9 | } FontDef; 10 | 11 | 12 | extern FontDef Font_7x10; 13 | extern FontDef Font_11x18; 14 | -------------------------------------------------------------------------------- /User/headers/MIDI.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ch32v30x.h" 4 | #include 5 | 6 | extern uint8_t commandArray[3]; 7 | 8 | extern uint8_t midi_index; 9 | extern uint8_t midiCommandBytes; 10 | 11 | extern void USART3_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast"))); 12 | extern void (*Note_On)(uint8_t, uint8_t); // MIDI number, velocity 13 | extern void (*Note_Off)(uint8_t); // MIDI number 14 | 15 | void UART_Init(); 16 | void MIDI_Handler(uint8_t Last_Byte); 17 | void USART3_IRQHandler(void); 18 | void Note_On_Debug(uint8_t a1, uint8_t a2); 19 | void Note_Off_Debug(uint8_t a1); 20 | -------------------------------------------------------------------------------- /User/headers/adc_helpers.c: -------------------------------------------------------------------------------- 1 | #include "adc_helpers.h" 2 | 3 | int16_t calibrationVal = 0; 4 | 5 | void ADC_Function_Init(void){ 6 | ADC_InitTypeDef ADC_InitStructure={0}; 7 | GPIO_InitTypeDef GPIO_InitStructure={0}; 8 | 9 | RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE); // enable GPIOA peripheral 10 | RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, ENABLE); // enable ADC1 peripheral 11 | RCC_ADCCLKConfig(RCC_PCLK2_Div8); // set ADC clock divider to 8 12 | 13 | GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1; // select GPIOA pin 1 (PA1) as ADC input pin 14 | GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN; 15 | GPIO_Init(GPIOA, &GPIO_InitStructure); 16 | 17 | ADC_DeInit(ADC1); // set up ADC1 as: 18 | ADC_InitStructure.ADC_Mode = ADC_Mode_Independent; // independent mode 19 | ADC_InitStructure.ADC_ScanConvMode = DISABLE; // disable scan conversion (multiple channels in one command) 20 | ADC_InitStructure.ADC_ContinuousConvMode = DISABLE; // disable continuous conversion 21 | ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_None; // no external trigger (not called by an interrupt, software controlled) 22 | ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right; // 12 bit binary result is placed in register with zeros before it, not after 23 | ADC_InitStructure.ADC_NbrOfChannel = 1; // single channel 24 | ADC_Init(ADC1, &ADC_InitStructure); 25 | 26 | ADC_RegularChannelConfig(ADC1, ADC_Channel_1, 1, ADC_SampleTime_239Cycles5 ); // configure ADC_Channel_1 (pin PA1) as ADC input channel with longest sample time (for best result) 27 | 28 | ADC_DiscModeChannelCountConfig(ADC1, 1); // configure ADC1 as single channel, discontinuous mode 29 | ADC_Cmd(ADC1, ENABLE); // initial ADC1 power-on 30 | ADC_BufferCmd(ADC1, DISABLE); // disable buffer to do calibration 31 | ADC_ResetCalibration(ADC1); 32 | while(ADC_GetResetCalibrationStatus(ADC1)); 33 | ADC_StartCalibration(ADC1); 34 | while(ADC_GetCalibrationStatus(ADC1)); 35 | calibrationVal = Get_CalibrationValue(ADC1); // finish with calibration 36 | ADC_BufferCmd(ADC1, ENABLE); // enable buffer 37 | } 38 | 39 | // calibration function as per official WCH example code 40 | uint16_t Apply_Calibration_Offset(uint16_t val) 41 | { 42 | if((val + calibrationVal)<0) return 0; 43 | if((calibrationVal + val) > 4095 || val == 4095) return 4095; 44 | return (val + calibrationVal); 45 | } 46 | 47 | 48 | // simple, single-shot single-channel ADC conversion, contains max cycle count, so it's slow but accurate 49 | uint16_t Get_ADC_Val(uint8_t ADC_Input_Channel) 50 | { 51 | uint16_t val; 52 | 53 | ADC_RegularChannelConfig(ADC1, ADC_Input_Channel, 1, ADC_SampleTime_239Cycles5); 54 | 55 | ADC_SoftwareStartConvCmd(ADC1, ENABLE); 56 | 57 | while(!ADC_GetFlagStatus(ADC1, ADC_FLAG_EOC)); 58 | 59 | val = ADC_GetConversionValue(ADC1); 60 | 61 | val = Apply_Calibration_Offset(val); 62 | 63 | return val; 64 | } 65 | 66 | // convert the ADC result to voltage, useful for analog sensors 67 | float ADC_to_Voltage(uint16_t ADC_Result){ 68 | return (float)(ADC_Result) / ADC_RESOLUTION * ADC_REFERENCE; 69 | } 70 | 71 | uint32_t Clamp(uint32_t val, uint32_t max, uint32_t scale){ 72 | return (int)(scale * ((float)val / (float)max)); 73 | } 74 | -------------------------------------------------------------------------------- /User/headers/adc_helpers.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ch32v30x.h" 4 | 5 | #ifndef ADC_REFERENCE 6 | #define ADC_REFERENCE (3.3f) 7 | #endif 8 | 9 | #ifndef ADC_RESOLUTION 10 | #define ADC_RESOLUTION ((float)(1 << 12)) 11 | #endif 12 | 13 | extern int16_t calibrationVal; 14 | 15 | void ADC_Function_Init(void); 16 | uint16_t Apply_Calibration_Offset(uint16_t val); 17 | uint16_t Get_ADC_Val(uint8_t ADC_Input_Channel); 18 | float ADC_to_Voltage(uint16_t ADC_Result); 19 | uint32_t Clamp(uint32_t val, uint32_t max, uint32_t scale); 20 | -------------------------------------------------------------------------------- /User/headers/analog_sensors.c: -------------------------------------------------------------------------------- 1 | #include "analog_sensors.h" 2 | 3 | float temperature; 4 | float lightIntensity; 5 | 6 | const uint8_t LDR_ADC_Channel = ADC_Channel_1; 7 | const uint8_t MCP9701_ADC_Channel = ADC_Channel_2; 8 | 9 | void MCP9701_Get_Temperature(){ 10 | // data and formulas from the MCP9701 datasheet and https://snikolaj.github.io/electronics-projects/2022/04/23/thermometer.html#formulas 11 | const float TEMPERATURE_COEFFICIENT = 0.0195f; // for each increase of 1C the output voltage increases by 0.0195 (19.5mV) 12 | const float ZERO_OFFSET = 0.4f; // at 0C the voltage is 400mV 13 | 14 | temperature = (ADC_to_Voltage(Get_ADC_Val(MCP9701_ADC_Channel)) - ZERO_OFFSET) / TEMPERATURE_COEFFICIENT; 15 | } 16 | 17 | void LDR_Get_Intensity(){ 18 | const float RESISTOR_SIZE = 10.0f; // for 10Kohm resistor 19 | 20 | float LDR_Voltage = ADC_to_Voltage(Get_ADC_Val(LDR_ADC_Channel)); 21 | 22 | /* Given that for an average LDR the formula is R = 500 / lux, taking the resistor 23 | * divider formula and solving for lux, with resistor between VCC and output and LDR 24 | * between output and ground, we get the formula below. 25 | * 26 | * The accuracy is approximately +-50%, however for measuring if it is day or not 27 | * the formula gives a good enough result, as night time will result in really low 28 | * values either way. 29 | */ 30 | lightIntensity = 500 * (ADC_REFERENCE - LDR_Voltage) / (LDR_Voltage * RESISTOR_SIZE); 31 | } 32 | -------------------------------------------------------------------------------- /User/headers/analog_sensors.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ch32v30x.h" 4 | #include "adc_helpers.h" 5 | 6 | extern const uint8_t LDR_ADC_Channel; 7 | extern const uint8_t MCP9701_ADC_Channel; 8 | 9 | extern float temperature; 10 | extern float lightIntensity; 11 | 12 | void MCP9701_Get_Temperature(); 13 | void LDR_Get_Intensity(); 14 | -------------------------------------------------------------------------------- /User/headers/inputs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ch32v30x.h" 4 | #include "adc_helpers.h" 5 | #include 6 | 7 | // buttons are active low with internal pull-ups 8 | #define BUTTON_PRESSED 0 9 | #define BUTTON_UP 1 10 | 11 | // the value of the ADC needs to change by 25 in order to call the interrupt 12 | // this value is experimentally determined and for better/smaller potentiometers 13 | // it can be lowered for accuracy, however since the YM3812 has mostly 4 bit registers, 14 | // in this case it's not needed at all 15 | #define POTENTIOMETER_INTERRUPT_DIFFERENCE 25 16 | 17 | extern uint16_t pot1Val; 18 | extern uint16_t pot2Val; 19 | extern uint16_t pot3Val; 20 | extern uint16_t pot4Val; 21 | 22 | extern uint16_t pot1PrevVal; 23 | extern uint16_t pot2PrevVal; 24 | extern uint16_t pot3PrevVal; 25 | extern uint16_t pot4PrevVal; 26 | 27 | extern void (*Pot1_Interrupt_Handler)(void); 28 | extern void (*Pot2_Interrupt_Handler)(void); 29 | extern void (*Pot3_Interrupt_Handler)(void); 30 | extern void (*Pot4_Interrupt_Handler)(void); 31 | 32 | 33 | 34 | extern uint8_t buttonLeft; 35 | extern uint8_t buttonRight; 36 | 37 | extern uint8_t buttonLeftPrev; 38 | extern uint8_t buttonRightPrev; 39 | 40 | extern void (*Button_Left_Interrupt_Handler)(void); 41 | extern void (*Button_Right_Interrupt_Handler)(void); 42 | 43 | 44 | 45 | void Generic_Input_Interrupt(); 46 | void Inputs_Init(); 47 | void Read_Potentiometers(); 48 | void Read_Buttons(); 49 | void Poll_Inputs(); 50 | 51 | void Read_Potentiometers_Debug(); 52 | void Read_Buttons_Debug(); 53 | -------------------------------------------------------------------------------- /User/headers/menu.c: -------------------------------------------------------------------------------- 1 | #include "menu.h" 2 | 3 | uint8_t Menu_Index = 0; 4 | MenuPage Main_Menu[MENU_PAGES]; 5 | 6 | static void Do_Nothing(void){ 7 | 8 | } 9 | 10 | // draw a simple slider with 3 bars made of x-s, retro aesthetic 11 | void Slider_Draw(uint16_t x, uint16_t y, uint16_t ADC_Reading, uint8_t Possible_Values){ 12 | char progressBar[17]; 13 | char num[3]; 14 | 15 | uint8_t clampedVal = Clamp(ADC_Reading, Possible_Values, 16); 16 | 17 | uint8_t i; 18 | for(i = 0; i < 16; i++){ 19 | if(i > clampedVal){ 20 | break; 21 | } 22 | 23 | progressBar[i] = 'x'; 24 | } 25 | 26 | progressBar[i++] = '\0'; 27 | 28 | // fill the area with black to make sure that nothing from previous draws remains 29 | ILI9341_FillRectangle(x - Font_7x10.width, y, Font_7x10.width * 3, Font_7x10.height * 17, ILI9341_BLACK); 30 | if(Possible_Values != 2){ 31 | ILI9341_WriteString(x - Font_7x10.width, y + Font_7x10.height * 16, itoa(clampedVal + 1, num, 10), Font_7x10, ILI9341_BLACK, DOSGREEN); 32 | }else{ 33 | ILI9341_WriteString(x - Font_7x10.width, y + Font_7x10.height * 16, "true", Font_7x10, ILI9341_BLACK, DOSGREEN); 34 | } 35 | 36 | // draw the three bars, centered on the x 37 | ILI9341_WriteString_Horizontal_Backwards(x - Font_7x10.width, y + 15 * Font_7x10.height, progressBar, Font_7x10, DOSGREEN, ILI9341_BLACK); 38 | ILI9341_WriteString_Horizontal_Backwards(x, y + 15 * Font_7x10.height, progressBar, Font_7x10, DOSGREEN, ILI9341_BLACK); 39 | ILI9341_WriteString_Horizontal_Backwards(x + Font_7x10.width, y + 15 * Font_7x10.height, progressBar, Font_7x10, DOSGREEN, ILI9341_BLACK); 40 | } 41 | 42 | 43 | // initially make the functions do nothing so as to not execute random parts of memory 44 | void Initialize_Menu(){ 45 | for(uint8_t i = 0; i < MENU_PAGES; i++){ 46 | Main_Menu[i].Pot1_Slider = Do_Nothing; 47 | Main_Menu[i].Pot2_Slider = Do_Nothing; 48 | Main_Menu[i].Pot3_Slider = Do_Nothing; 49 | Main_Menu[i].Pot4_Slider = Do_Nothing; 50 | 51 | Main_Menu[i].Slider1_Draw = Do_Nothing; 52 | Main_Menu[i].Slider2_Draw = Do_Nothing; 53 | Main_Menu[i].Slider3_Draw = Do_Nothing; 54 | Main_Menu[i].Slider4_Draw = Do_Nothing; 55 | } 56 | } 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /User/headers/menu.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ILI9341/ILI9341.h" 4 | #include "adc_helpers.h" 5 | #include "inputs.h" 6 | #include 7 | #include 8 | 9 | #define MENU_PAGES 7 10 | 11 | extern uint8_t Menu_Index; 12 | 13 | typedef struct Page{ 14 | void (*Pot1_Slider)(void); 15 | void (*Pot2_Slider)(void); 16 | void (*Pot3_Slider)(void); 17 | void (*Pot4_Slider)(void); 18 | 19 | void (*Slider1_Draw)(void); 20 | void (*Slider2_Draw)(void); 21 | void (*Slider3_Draw)(void); 22 | void (*Slider4_Draw)(void); 23 | 24 | } MenuPage; 25 | 26 | extern MenuPage Main_Menu[]; 27 | 28 | void Slider_Draw(uint16_t x, uint16_t y, uint16_t ADC_Reading, uint8_t Possible_Values); 29 | void Initialize_Menu(); 30 | -------------------------------------------------------------------------------- /User/system_ch32v30x.h: -------------------------------------------------------------------------------- 1 | /********************************** (C) COPYRIGHT ******************************* 2 | * File Name : system_ch32v30x.h 3 | * Author : WCH 4 | * Version : V1.0.0 5 | * Date : 2021/06/06 6 | * Description : CH32V30x Device Peripheral Access Layer System Header File. 7 | * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd. 8 | * SPDX-License-Identifier: Apache-2.0 9 | *******************************************************************************/ 10 | #ifndef __SYSTEM_CH32V30x_H 11 | #define __SYSTEM_CH32V30x_H 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | extern uint32_t SystemCoreClock; /* System Clock Frequency (Core Clock) */ 18 | 19 | /* System_Exported_Functions */ 20 | extern void SystemInit(void); 21 | extern void SystemCoreClockUpdate(void); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif /*__CH32V30x_SYSTEM_H */ 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /drivers/drv_gpio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File : drv_gpio.h 3 | * This file is part of RT-Thread RTOS 4 | * COPYRIGHT (C) 2015, RT-Thread Development Team 5 | * 6 | * The license and distribution terms for this file may be 7 | * found in the file LICENSE in this distribution or at 8 | * http://www.rt-thread.org/license/LICENSE 9 | * 10 | * Change Logs: 11 | * Date Author Notes 12 | * 2015-01-05 Bernard the first version 13 | * 2017-11-35 ZYH update to 3.0.0 14 | */ 15 | #ifndef GPIO_H__ 16 | #define GPIO_H__ 17 | struct stm32_hw_pin_userdata 18 | { 19 | int pin; 20 | uint32_t mode; 21 | }; 22 | #define PIN_USERDATA_END {-1,0} 23 | extern struct stm32_hw_pin_userdata stm32_pins[]; 24 | int rt_hw_pin_init(void); 25 | #endif 26 | -------------------------------------------------------------------------------- /drivers/drv_usart.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File : usart.h 3 | * This file is part of RT-Thread RTOS 4 | * COPYRIGHT (C) 2009, RT-Thread Development Team 5 | * 6 | * The license and distribution terms for this file may be 7 | * found in the file LICENSE in this distribution or at 8 | * http://www.rt-thread.org/license/LICENSE 9 | * 10 | * Change Logs: 11 | * Date Author Notes 12 | * 2009-01-05 Bernard the first version 13 | */ 14 | #ifndef __USART_H__ 15 | #define __USART_H__ 16 | #include "rthw.h" 17 | #include "rtthread.h" 18 | 19 | int rt_hw_usart_init(void); 20 | #endif 21 | -------------------------------------------------------------------------------- /obj/Core/core_riscv.d: -------------------------------------------------------------------------------- 1 | Core/core_riscv.o: ../Core/core_riscv.c 2 | -------------------------------------------------------------------------------- /obj/Core/core_riscv.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Core/core_riscv.o -------------------------------------------------------------------------------- /obj/Core/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../Core/core_riscv.c 8 | 9 | OBJS += \ 10 | ./Core/core_riscv.o 11 | 12 | C_DEPS += \ 13 | ./Core/core_riscv.d 14 | 15 | 16 | # Each subdirectory must supply rules for building sources it contributes 17 | Core/%.o: ../Core/%.c 18 | @ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Debug" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Core" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\User" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Peripheral\inc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\drivers" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include\libc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v\common" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\src" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\misc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\serial" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 19 | @ @ 20 | 21 | -------------------------------------------------------------------------------- /obj/Debug/debug.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Debug/debug.o -------------------------------------------------------------------------------- /obj/Debug/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../Debug/debug.c 8 | 9 | OBJS += \ 10 | ./Debug/debug.o 11 | 12 | C_DEPS += \ 13 | ./Debug/debug.d 14 | 15 | 16 | # Each subdirectory must supply rules for building sources it contributes 17 | Debug/%.o: ../Debug/%.c 18 | @ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Debug" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Core" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\User" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Peripheral\inc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\drivers" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include\libc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v\common" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\src" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\misc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\serial" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 19 | @ @ 20 | 21 | -------------------------------------------------------------------------------- /obj/NetLib/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../NetLib/eth_driver.c \ 8 | ../NetLib/ethernet_helpers.c 9 | 10 | OBJS += \ 11 | ./NetLib/eth_driver.o \ 12 | ./NetLib/ethernet_helpers.o 13 | 14 | C_DEPS += \ 15 | ./NetLib/eth_driver.d \ 16 | ./NetLib/ethernet_helpers.d 17 | 18 | 19 | # Each subdirectory must supply rules for building sources it contributes 20 | NetLib/%.o: ../NetLib/%.c 21 | @ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Debug" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Core" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\User" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Peripheral\inc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\drivers" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include\libc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v\common" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\src" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\misc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\serial" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 22 | @ @ 23 | 24 | -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_adc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_adc.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_bkp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_bkp.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_can.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_can.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_crc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_crc.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_dac.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_dac.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_dbgmcu.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_dbgmcu.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_dma.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_dma.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_dvp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_dvp.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_eth.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_eth.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_exti.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_exti.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_flash.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_flash.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_fsmc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_fsmc.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_gpio.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_gpio.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_i2c.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_i2c.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_iwdg.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_iwdg.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_misc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_misc.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_opa.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_opa.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_pwr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_pwr.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_rcc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_rcc.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_rng.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_rng.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_rtc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_rtc.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_sdio.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_sdio.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_spi.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_spi.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_tim.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_tim.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_usart.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_usart.o -------------------------------------------------------------------------------- /obj/Peripheral/src/ch32v30x_wwdg.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Peripheral/src/ch32v30x_wwdg.o -------------------------------------------------------------------------------- /obj/RT-Thread_test-1.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/RT-Thread_test-1.elf -------------------------------------------------------------------------------- /obj/Startup/startup_ch32v30x.d: -------------------------------------------------------------------------------- 1 | Startup/startup_ch32v30x.o: ../Startup/startup_ch32v30x.S 2 | -------------------------------------------------------------------------------- /obj/Startup/startup_ch32v30x.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/Startup/startup_ch32v30x.o -------------------------------------------------------------------------------- /obj/Startup/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | S_UPPER_SRCS += \ 7 | ../Startup/startup_ch32v30x.S 8 | 9 | OBJS += \ 10 | ./Startup/startup_ch32v30x.o 11 | 12 | S_UPPER_DEPS += \ 13 | ./Startup/startup_ch32v30x.d 14 | 15 | 16 | # Each subdirectory must supply rules for building sources it contributes 17 | Startup/%.o: ../Startup/%.S 18 | @ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -x assembler-with-cpp -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Startup" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\drivers" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include\libc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v\common" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\src" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\misc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\serial" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 19 | @ @ 20 | 21 | -------------------------------------------------------------------------------- /obj/User/ch32v30x_it.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/User/ch32v30x_it.o -------------------------------------------------------------------------------- /obj/User/headers/ILI9341/ILI9341.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/User/headers/ILI9341/ILI9341.o -------------------------------------------------------------------------------- /obj/User/headers/ILI9341/fonts.d: -------------------------------------------------------------------------------- 1 | User/headers/ILI9341/fonts.o: ../User/headers/ILI9341/fonts.c \ 2 | ../User/headers/ILI9341/fonts.h 3 | 4 | ../User/headers/ILI9341/fonts.h: 5 | -------------------------------------------------------------------------------- /obj/User/headers/ILI9341/fonts.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/User/headers/ILI9341/fonts.o -------------------------------------------------------------------------------- /obj/User/headers/ILI9341/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../User/headers/ILI9341/ILI9341.c \ 8 | ../User/headers/ILI9341/fonts.c 9 | 10 | OBJS += \ 11 | ./User/headers/ILI9341/ILI9341.o \ 12 | ./User/headers/ILI9341/fonts.o 13 | 14 | C_DEPS += \ 15 | ./User/headers/ILI9341/ILI9341.d \ 16 | ./User/headers/ILI9341/fonts.d 17 | 18 | 19 | # Each subdirectory must supply rules for building sources it contributes 20 | User/headers/ILI9341/%.o: ../User/headers/ILI9341/%.c 21 | @ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Debug" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Core" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\User" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Peripheral\inc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\drivers" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include\libc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v\common" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\src" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\misc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\serial" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 22 | @ @ 23 | 24 | -------------------------------------------------------------------------------- /obj/User/headers/MIDI.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/User/headers/MIDI.o -------------------------------------------------------------------------------- /obj/User/headers/YM3812/OPL2.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/User/headers/YM3812/OPL2.o -------------------------------------------------------------------------------- /obj/User/headers/YM3812/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../User/headers/YM3812/OPL2.c 8 | 9 | OBJS += \ 10 | ./User/headers/YM3812/OPL2.o 11 | 12 | C_DEPS += \ 13 | ./User/headers/YM3812/OPL2.d 14 | 15 | 16 | # Each subdirectory must supply rules for building sources it contributes 17 | User/headers/YM3812/%.o: ../User/headers/YM3812/%.c 18 | @ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Debug" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Core" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\User" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Peripheral\inc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\drivers" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include\libc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v\common" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\src" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\misc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\serial" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 19 | @ @ 20 | 21 | -------------------------------------------------------------------------------- /obj/User/headers/adc_helpers.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/User/headers/adc_helpers.o -------------------------------------------------------------------------------- /obj/User/headers/analog_sensors.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/User/headers/analog_sensors.o -------------------------------------------------------------------------------- /obj/User/headers/inputs.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/User/headers/inputs.o -------------------------------------------------------------------------------- /obj/User/headers/menu.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/User/headers/menu.o -------------------------------------------------------------------------------- /obj/User/headers/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../User/headers/MIDI.c \ 8 | ../User/headers/adc_helpers.c \ 9 | ../User/headers/analog_sensors.c \ 10 | ../User/headers/inputs.c \ 11 | ../User/headers/menu.c 12 | 13 | OBJS += \ 14 | ./User/headers/MIDI.o \ 15 | ./User/headers/adc_helpers.o \ 16 | ./User/headers/analog_sensors.o \ 17 | ./User/headers/inputs.o \ 18 | ./User/headers/menu.o 19 | 20 | C_DEPS += \ 21 | ./User/headers/MIDI.d \ 22 | ./User/headers/adc_helpers.d \ 23 | ./User/headers/analog_sensors.d \ 24 | ./User/headers/inputs.d \ 25 | ./User/headers/menu.d 26 | 27 | 28 | # Each subdirectory must supply rules for building sources it contributes 29 | User/headers/%.o: ../User/headers/%.c 30 | @ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Debug" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Core" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\User" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Peripheral\inc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\drivers" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include\libc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v\common" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\src" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\misc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\serial" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 31 | @ @ 32 | 33 | -------------------------------------------------------------------------------- /obj/User/main.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/User/main.o -------------------------------------------------------------------------------- /obj/User/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../User/ch32v30x_it.c \ 8 | ../User/main.c \ 9 | ../User/system_ch32v30x.c 10 | 11 | OBJS += \ 12 | ./User/ch32v30x_it.o \ 13 | ./User/main.o \ 14 | ./User/system_ch32v30x.o 15 | 16 | C_DEPS += \ 17 | ./User/ch32v30x_it.d \ 18 | ./User/main.d \ 19 | ./User/system_ch32v30x.d 20 | 21 | 22 | # Each subdirectory must supply rules for building sources it contributes 23 | User/%.o: ../User/%.c 24 | @ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Debug" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Core" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\User" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Peripheral\inc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\drivers" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include\libc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v\common" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\src" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\misc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\serial" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 25 | @ @ 26 | 27 | -------------------------------------------------------------------------------- /obj/User/system_ch32v30x.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/User/system_ch32v30x.o -------------------------------------------------------------------------------- /obj/drivers/drv_gpio.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/drivers/drv_gpio.o -------------------------------------------------------------------------------- /obj/drivers/drv_usart.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/drivers/drv_usart.o -------------------------------------------------------------------------------- /obj/drivers/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../drivers/drv_gpio.c \ 8 | ../drivers/drv_usart.c 9 | 10 | OBJS += \ 11 | ./drivers/drv_gpio.o \ 12 | ./drivers/drv_usart.o 13 | 14 | C_DEPS += \ 15 | ./drivers/drv_gpio.d \ 16 | ./drivers/drv_usart.d 17 | 18 | 19 | # Each subdirectory must supply rules for building sources it contributes 20 | drivers/%.o: ../drivers/%.c 21 | @ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Debug" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Core" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\User" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Peripheral\inc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\drivers" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include\libc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v\common" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\src" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\misc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\serial" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 22 | @ @ 23 | 24 | -------------------------------------------------------------------------------- /obj/makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | -include ../makefile.init 6 | 7 | RM := rm -rf 8 | 9 | # All of the sources participating in the build are defined here 10 | -include sources.mk 11 | -include rtthread/src/subdir.mk 12 | -include rtthread/libcpu/risc-v/common/subdir.mk 13 | -include rtthread/components/finsh/subdir.mk 14 | -include rtthread/components/drivers/serial/subdir.mk 15 | -include rtthread/components/drivers/misc/subdir.mk 16 | -include rtthread/subdir.mk 17 | -include drivers/subdir.mk 18 | -include User/headers/YM3812/subdir.mk 19 | -include User/headers/ILI9341/subdir.mk 20 | -include User/headers/subdir.mk 21 | -include User/subdir.mk 22 | -include Startup/subdir.mk 23 | -include Peripheral/src/subdir.mk 24 | -include Debug/subdir.mk 25 | -include Core/subdir.mk 26 | -include subdir.mk 27 | -include objects.mk 28 | 29 | ifneq ($(MAKECMDGOALS),clean) 30 | ifneq ($(strip $(ASM_UPPER_DEPS)),) 31 | -include $(ASM_UPPER_DEPS) 32 | endif 33 | ifneq ($(strip $(ASM_DEPS)),) 34 | -include $(ASM_DEPS) 35 | endif 36 | ifneq ($(strip $(S_DEPS)),) 37 | -include $(S_DEPS) 38 | endif 39 | ifneq ($(strip $(S_UPPER_DEPS)),) 40 | -include $(S_UPPER_DEPS) 41 | endif 42 | ifneq ($(strip $(C_DEPS)),) 43 | -include $(C_DEPS) 44 | endif 45 | endif 46 | 47 | -include ../makefile.defs 48 | 49 | # Add inputs and outputs from these tool invocations to the build variables 50 | SECONDARY_FLASH += \ 51 | RT-Thread_test-1.hex \ 52 | 53 | SECONDARY_LIST += \ 54 | RT-Thread_test-1.lst \ 55 | 56 | SECONDARY_SIZE += \ 57 | RT-Thread_test-1.siz \ 58 | 59 | 60 | # All Target 61 | all: RT-Thread_test-1.elf secondary-outputs 62 | 63 | # Tool invocations 64 | RT-Thread_test-1.elf: $(OBJS) $(USER_OBJS) 65 | @ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -T "C:\MRS_DATA\workspace\RT-Thread_test-1\Ld\Link.ld" -nostartfiles -Xlinker --gc-sections -Wl,-Map,"RT-Thread_test-1.map" --specs=nano.specs --specs=nosys.specs -o "RT-Thread_test-1.elf" $(OBJS) $(USER_OBJS) $(LIBS) 66 | @ @ 67 | RT-Thread_test-1.hex: RT-Thread_test-1.elf 68 | @ riscv-none-embed-objcopy -O ihex "RT-Thread_test-1.elf" "RT-Thread_test-1.hex" 69 | @ @ 70 | RT-Thread_test-1.lst: RT-Thread_test-1.elf 71 | @ riscv-none-embed-objdump --all-headers --demangle --disassemble -M xw "RT-Thread_test-1.elf" > "RT-Thread_test-1.lst" 72 | @ @ 73 | RT-Thread_test-1.siz: RT-Thread_test-1.elf 74 | @ riscv-none-embed-size --format=berkeley "RT-Thread_test-1.elf" 75 | @ @ 76 | # Other Targets 77 | clean: 78 | -$(RM) $(ASM_UPPER_DEPS)$(OBJS)$(SECONDARY_FLASH)$(SECONDARY_LIST)$(SECONDARY_SIZE)$(ASM_DEPS)$(S_DEPS)$(S_UPPER_DEPS)$(C_DEPS) RT-Thread_test-1.elf 79 | -@ 80 | secondary-outputs: $(SECONDARY_FLASH) $(SECONDARY_LIST) $(SECONDARY_SIZE) 81 | 82 | .PHONY: all clean dependents 83 | 84 | -include ../makefile.targets 85 | -------------------------------------------------------------------------------- /obj/objects.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | USER_OBJS := 6 | 7 | LIBS := 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/board.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/board.o -------------------------------------------------------------------------------- /obj/rtthread/components/drivers/misc/pin.d: -------------------------------------------------------------------------------- 1 | rtthread/components/drivers/misc/pin.o: \ 2 | ../rtthread/components/drivers/misc/pin.c \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/drivers/pin.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 10 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h \ 11 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/rtdevice.h \ 12 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/ringbuffer.h \ 13 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/completion.h \ 14 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/dataqueue.h \ 15 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/workqueue.h \ 16 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/waitqueue.h \ 17 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/pipe.h \ 18 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/poll.h \ 19 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/drivers/serial.h \ 20 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/drivers/pin.h \ 21 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh.h \ 22 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h 23 | 24 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/drivers/pin.h: 25 | 26 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 27 | 28 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 29 | 30 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 31 | 32 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 33 | 34 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 35 | 36 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 37 | 38 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 39 | 40 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/rtdevice.h: 41 | 42 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/ringbuffer.h: 43 | 44 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/completion.h: 45 | 46 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/dataqueue.h: 47 | 48 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/workqueue.h: 49 | 50 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/waitqueue.h: 51 | 52 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/pipe.h: 53 | 54 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/poll.h: 55 | 56 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/drivers/serial.h: 57 | 58 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/drivers/pin.h: 59 | 60 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh.h: 61 | 62 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 63 | -------------------------------------------------------------------------------- /obj/rtthread/components/drivers/misc/pin.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/components/drivers/misc/pin.o -------------------------------------------------------------------------------- /obj/rtthread/components/drivers/misc/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../rtthread/components/drivers/misc/pin.c 8 | 9 | OBJS += \ 10 | ./rtthread/components/drivers/misc/pin.o 11 | 12 | C_DEPS += \ 13 | ./rtthread/components/drivers/misc/pin.d 14 | 15 | 16 | # Each subdirectory must supply rules for building sources it contributes 17 | rtthread/components/drivers/misc/%.o: ../rtthread/components/drivers/misc/%.c 18 | @ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Debug" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Core" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\User" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Peripheral\inc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\drivers" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include\libc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v\common" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\src" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\misc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\serial" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 19 | @ @ 20 | 21 | -------------------------------------------------------------------------------- /obj/rtthread/components/drivers/serial/serial.d: -------------------------------------------------------------------------------- 1 | rtthread/components/drivers/serial/serial.o: \ 2 | ../rtthread/components/drivers/serial/serial.c \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 10 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h \ 11 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/rtdevice.h \ 12 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/ringbuffer.h \ 13 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/completion.h \ 14 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/dataqueue.h \ 15 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/workqueue.h \ 16 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/waitqueue.h \ 17 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/pipe.h \ 18 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/poll.h \ 19 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/drivers/serial.h \ 20 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/drivers/pin.h \ 21 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdbg.h 22 | 23 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h: 24 | 25 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 26 | 27 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 28 | 29 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 30 | 31 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 32 | 33 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 34 | 35 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 36 | 37 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 38 | 39 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/rtdevice.h: 40 | 41 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/ringbuffer.h: 42 | 43 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/completion.h: 44 | 45 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/dataqueue.h: 46 | 47 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/workqueue.h: 48 | 49 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/waitqueue.h: 50 | 51 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/pipe.h: 52 | 53 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/ipc/poll.h: 54 | 55 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/drivers/serial.h: 56 | 57 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include/drivers/pin.h: 58 | 59 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdbg.h: 60 | -------------------------------------------------------------------------------- /obj/rtthread/components/drivers/serial/serial.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/components/drivers/serial/serial.o -------------------------------------------------------------------------------- /obj/rtthread/components/drivers/serial/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../rtthread/components/drivers/serial/serial.c 8 | 9 | OBJS += \ 10 | ./rtthread/components/drivers/serial/serial.o 11 | 12 | C_DEPS += \ 13 | ./rtthread/components/drivers/serial/serial.d 14 | 15 | 16 | # Each subdirectory must supply rules for building sources it contributes 17 | rtthread/components/drivers/serial/%.o: ../rtthread/components/drivers/serial/%.c 18 | @ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Debug" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Core" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\User" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Peripheral\inc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\drivers" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include\libc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v\common" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\src" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\misc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\serial" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 19 | @ @ 20 | 21 | -------------------------------------------------------------------------------- /obj/rtthread/components/finsh/cmd.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/components/finsh/cmd.o -------------------------------------------------------------------------------- /obj/rtthread/components/finsh/msh.d: -------------------------------------------------------------------------------- 1 | rtthread/components/finsh/msh.o: ../rtthread/components/finsh/msh.c \ 2 | ../rtthread/components/finsh/msh.h \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h \ 10 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh.h \ 11 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h \ 12 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/shell.h \ 13 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh.h 14 | 15 | ../rtthread/components/finsh/msh.h: 16 | 17 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 18 | 19 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 20 | 21 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 22 | 23 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 24 | 25 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 26 | 27 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 28 | 29 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 30 | 31 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh.h: 32 | 33 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 34 | 35 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/shell.h: 36 | 37 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh.h: 38 | -------------------------------------------------------------------------------- /obj/rtthread/components/finsh/msh.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/components/finsh/msh.o -------------------------------------------------------------------------------- /obj/rtthread/components/finsh/msh_cmd.d: -------------------------------------------------------------------------------- 1 | rtthread/components/finsh/msh_cmd.o: \ 2 | ../rtthread/components/finsh/msh_cmd.c \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h \ 10 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh.h \ 11 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h \ 12 | ../rtthread/components/finsh/msh.h 13 | 14 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 15 | 16 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 17 | 18 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 19 | 20 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 21 | 22 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 23 | 24 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 25 | 26 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 27 | 28 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh.h: 29 | 30 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 31 | 32 | ../rtthread/components/finsh/msh.h: 33 | -------------------------------------------------------------------------------- /obj/rtthread/components/finsh/msh_cmd.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/components/finsh/msh_cmd.o -------------------------------------------------------------------------------- /obj/rtthread/components/finsh/msh_file.d: -------------------------------------------------------------------------------- 1 | rtthread/components/finsh/msh_file.o: \ 2 | ../rtthread/components/finsh/msh_file.c \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h \ 10 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh.h \ 11 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h \ 12 | ../rtthread/components/finsh/msh.h 13 | 14 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 15 | 16 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 17 | 18 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 19 | 20 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 21 | 22 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 23 | 24 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 25 | 26 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 27 | 28 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh.h: 29 | 30 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 31 | 32 | ../rtthread/components/finsh/msh.h: 33 | -------------------------------------------------------------------------------- /obj/rtthread/components/finsh/msh_file.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/components/finsh/msh_file.o -------------------------------------------------------------------------------- /obj/rtthread/components/finsh/shell.d: -------------------------------------------------------------------------------- 1 | rtthread/components/finsh/shell.o: ../rtthread/components/finsh/shell.c \ 2 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h \ 10 | ../rtthread/components/finsh/finsh.h \ 11 | ../rtthread/components/finsh/finsh_api.h \ 12 | ../rtthread/components/finsh/shell.h ../rtthread/components/finsh/msh.h 13 | 14 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h: 15 | 16 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 17 | 18 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 19 | 20 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 21 | 22 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 23 | 24 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 25 | 26 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 27 | 28 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 29 | 30 | ../rtthread/components/finsh/finsh.h: 31 | 32 | ../rtthread/components/finsh/finsh_api.h: 33 | 34 | ../rtthread/components/finsh/shell.h: 35 | 36 | ../rtthread/components/finsh/msh.h: 37 | -------------------------------------------------------------------------------- /obj/rtthread/components/finsh/shell.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/components/finsh/shell.o -------------------------------------------------------------------------------- /obj/rtthread/components/finsh/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../rtthread/components/finsh/cmd.c \ 8 | ../rtthread/components/finsh/msh.c \ 9 | ../rtthread/components/finsh/msh_cmd.c \ 10 | ../rtthread/components/finsh/msh_file.c \ 11 | ../rtthread/components/finsh/shell.c \ 12 | ../rtthread/components/finsh/symbol.c 13 | 14 | OBJS += \ 15 | ./rtthread/components/finsh/cmd.o \ 16 | ./rtthread/components/finsh/msh.o \ 17 | ./rtthread/components/finsh/msh_cmd.o \ 18 | ./rtthread/components/finsh/msh_file.o \ 19 | ./rtthread/components/finsh/shell.o \ 20 | ./rtthread/components/finsh/symbol.o 21 | 22 | C_DEPS += \ 23 | ./rtthread/components/finsh/cmd.d \ 24 | ./rtthread/components/finsh/msh.d \ 25 | ./rtthread/components/finsh/msh_cmd.d \ 26 | ./rtthread/components/finsh/msh_file.d \ 27 | ./rtthread/components/finsh/shell.d \ 28 | ./rtthread/components/finsh/symbol.d 29 | 30 | 31 | # Each subdirectory must supply rules for building sources it contributes 32 | rtthread/components/finsh/%.o: ../rtthread/components/finsh/%.c 33 | @ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Debug" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Core" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\User" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Peripheral\inc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\drivers" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include\libc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v\common" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\src" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\misc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\serial" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 34 | @ @ 35 | 36 | -------------------------------------------------------------------------------- /obj/rtthread/components/finsh/symbol.d: -------------------------------------------------------------------------------- 1 | rtthread/components/finsh/symbol.o: ../rtthread/components/finsh/symbol.c \ 2 | ../rtthread/components/finsh/finsh.h \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h \ 10 | ../rtthread/components/finsh/finsh_api.h 11 | 12 | ../rtthread/components/finsh/finsh.h: 13 | 14 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 15 | 16 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 17 | 18 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 19 | 20 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 21 | 22 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 23 | 24 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 25 | 26 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 27 | 28 | ../rtthread/components/finsh/finsh_api.h: 29 | -------------------------------------------------------------------------------- /obj/rtthread/components/finsh/symbol.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/components/finsh/symbol.o -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/AT91SAM7S/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/AT91SAM7X/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/am335x/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/arm926/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/armv6/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/common/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/cortex-a/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/cortex-m0/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/cortex-m23/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/cortex-m3/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/cortex-m33/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/cortex-m4/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/cortex-m7/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/cortex-r4/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/dm36x/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/lpc214x/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/lpc24xx/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/realview-a8-vmm/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/s3c24x0/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/s3c44b0/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/sep4020/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/arm/zynqmp-r5/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/risc-v/common/context_gcc.d: -------------------------------------------------------------------------------- 1 | rtthread/libcpu/risc-v/common/context_gcc.o: \ 2 | ../rtthread/libcpu/risc-v/common/context_gcc.S \ 3 | ../rtthread/libcpu/risc-v/common/cpuport.h 4 | 5 | ../rtthread/libcpu/risc-v/common/cpuport.h: 6 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/risc-v/common/context_gcc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/libcpu/risc-v/common/context_gcc.o -------------------------------------------------------------------------------- /obj/rtthread/libcpu/risc-v/common/cpuport.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/libcpu/risc-v/common/cpuport.o -------------------------------------------------------------------------------- /obj/rtthread/libcpu/risc-v/common/interrupt_gcc.d: -------------------------------------------------------------------------------- 1 | rtthread/libcpu/risc-v/common/interrupt_gcc.o: \ 2 | ../rtthread/libcpu/risc-v/common/interrupt_gcc.S \ 3 | ../rtthread/libcpu/risc-v/common/cpuport.h 4 | 5 | ../rtthread/libcpu/risc-v/common/cpuport.h: 6 | -------------------------------------------------------------------------------- /obj/rtthread/libcpu/risc-v/common/interrupt_gcc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/libcpu/risc-v/common/interrupt_gcc.o -------------------------------------------------------------------------------- /obj/rtthread/libcpu/risc-v/common/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../rtthread/libcpu/risc-v/common/cpuport.c 8 | 9 | S_UPPER_SRCS += \ 10 | ../rtthread/libcpu/risc-v/common/context_gcc.S \ 11 | ../rtthread/libcpu/risc-v/common/interrupt_gcc.S 12 | 13 | OBJS += \ 14 | ./rtthread/libcpu/risc-v/common/context_gcc.o \ 15 | ./rtthread/libcpu/risc-v/common/cpuport.o \ 16 | ./rtthread/libcpu/risc-v/common/interrupt_gcc.o 17 | 18 | S_UPPER_DEPS += \ 19 | ./rtthread/libcpu/risc-v/common/context_gcc.d \ 20 | ./rtthread/libcpu/risc-v/common/interrupt_gcc.d 21 | 22 | C_DEPS += \ 23 | ./rtthread/libcpu/risc-v/common/cpuport.d 24 | 25 | 26 | # Each subdirectory must supply rules for building sources it contributes 27 | rtthread/libcpu/risc-v/common/%.o: ../rtthread/libcpu/risc-v/common/%.S 28 | @ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -x assembler-with-cpp -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Startup" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\drivers" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include\libc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v\common" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\src" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\misc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\serial" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 29 | @ @ 30 | rtthread/libcpu/risc-v/common/%.o: ../rtthread/libcpu/risc-v/common/%.c 31 | @ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Debug" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Core" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\User" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Peripheral\inc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\drivers" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include\libc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v\common" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\src" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\misc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\serial" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 32 | @ @ 33 | 34 | -------------------------------------------------------------------------------- /obj/rtthread/src/clock.d: -------------------------------------------------------------------------------- 1 | rtthread/src/clock.o: ../rtthread/src/clock.c \ 2 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h 10 | 11 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h: 12 | 13 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 14 | 15 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 16 | 17 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 18 | 19 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 20 | 21 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 22 | 23 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 24 | 25 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 26 | -------------------------------------------------------------------------------- /obj/rtthread/src/clock.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/src/clock.o -------------------------------------------------------------------------------- /obj/rtthread/src/components.d: -------------------------------------------------------------------------------- 1 | rtthread/src/components.o: ../rtthread/src/components.c \ 2 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h 10 | 11 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h: 12 | 13 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 14 | 15 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 16 | 17 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 18 | 19 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 20 | 21 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 22 | 23 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 24 | 25 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 26 | -------------------------------------------------------------------------------- /obj/rtthread/src/components.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/src/components.o -------------------------------------------------------------------------------- /obj/rtthread/src/cpu.d: -------------------------------------------------------------------------------- 1 | rtthread/src/cpu.o: ../rtthread/src/cpu.c \ 2 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h 10 | 11 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 12 | 13 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 14 | 15 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 16 | 17 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 18 | 19 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 20 | 21 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 22 | 23 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 24 | 25 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h: 26 | -------------------------------------------------------------------------------- /obj/rtthread/src/cpu.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/src/cpu.o -------------------------------------------------------------------------------- /obj/rtthread/src/device.d: -------------------------------------------------------------------------------- 1 | rtthread/src/device.o: ../rtthread/src/device.c \ 2 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h 9 | 10 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 11 | 12 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 13 | 14 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 15 | 16 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 17 | 18 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 19 | 20 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 21 | 22 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 23 | -------------------------------------------------------------------------------- /obj/rtthread/src/device.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/src/device.o -------------------------------------------------------------------------------- /obj/rtthread/src/idle.d: -------------------------------------------------------------------------------- 1 | rtthread/src/idle.o: ../rtthread/src/idle.c \ 2 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h 10 | 11 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h: 12 | 13 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 14 | 15 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 16 | 17 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 18 | 19 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 20 | 21 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 22 | 23 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 24 | 25 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 26 | -------------------------------------------------------------------------------- /obj/rtthread/src/idle.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/src/idle.o -------------------------------------------------------------------------------- /obj/rtthread/src/ipc.d: -------------------------------------------------------------------------------- 1 | rtthread/src/ipc.o: ../rtthread/src/ipc.c \ 2 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h 10 | 11 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 12 | 13 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 14 | 15 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 16 | 17 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 18 | 19 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 20 | 21 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 22 | 23 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 24 | 25 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h: 26 | -------------------------------------------------------------------------------- /obj/rtthread/src/ipc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/src/ipc.o -------------------------------------------------------------------------------- /obj/rtthread/src/irq.d: -------------------------------------------------------------------------------- 1 | rtthread/src/irq.o: ../rtthread/src/irq.c \ 2 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h 10 | 11 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h: 12 | 13 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 14 | 15 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 16 | 17 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 18 | 19 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 20 | 21 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 22 | 23 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 24 | 25 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 26 | -------------------------------------------------------------------------------- /obj/rtthread/src/irq.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/src/irq.o -------------------------------------------------------------------------------- /obj/rtthread/src/kservice.d: -------------------------------------------------------------------------------- 1 | rtthread/src/kservice.o: ../rtthread/src/kservice.c \ 2 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h 10 | 11 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 12 | 13 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 14 | 15 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 16 | 17 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 18 | 19 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 20 | 21 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 22 | 23 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 24 | 25 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h: 26 | -------------------------------------------------------------------------------- /obj/rtthread/src/kservice.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/src/kservice.o -------------------------------------------------------------------------------- /obj/rtthread/src/mem.d: -------------------------------------------------------------------------------- 1 | rtthread/src/mem.o: ../rtthread/src/mem.c \ 2 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h \ 10 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh.h \ 11 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h 12 | 13 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h: 14 | 15 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 16 | 17 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 18 | 19 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 20 | 21 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 22 | 23 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 24 | 25 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 26 | 27 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 28 | 29 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh.h: 30 | 31 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 32 | -------------------------------------------------------------------------------- /obj/rtthread/src/mem.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/src/mem.o -------------------------------------------------------------------------------- /obj/rtthread/src/memheap.d: -------------------------------------------------------------------------------- 1 | rtthread/src/memheap.o: ../rtthread/src/memheap.c \ 2 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h 10 | 11 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h: 12 | 13 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 14 | 15 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 16 | 17 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 18 | 19 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 20 | 21 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 22 | 23 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 24 | 25 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 26 | -------------------------------------------------------------------------------- /obj/rtthread/src/memheap.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/src/memheap.o -------------------------------------------------------------------------------- /obj/rtthread/src/mempool.d: -------------------------------------------------------------------------------- 1 | rtthread/src/mempool.o: ../rtthread/src/mempool.c \ 2 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h 10 | 11 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h: 12 | 13 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 14 | 15 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 16 | 17 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 18 | 19 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 20 | 21 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 22 | 23 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 24 | 25 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 26 | -------------------------------------------------------------------------------- /obj/rtthread/src/mempool.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/src/mempool.o -------------------------------------------------------------------------------- /obj/rtthread/src/object.d: -------------------------------------------------------------------------------- 1 | rtthread/src/object.o: ../rtthread/src/object.c \ 2 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h 10 | 11 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 12 | 13 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 14 | 15 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 16 | 17 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 18 | 19 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 20 | 21 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 22 | 23 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 24 | 25 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h: 26 | -------------------------------------------------------------------------------- /obj/rtthread/src/object.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/src/object.o -------------------------------------------------------------------------------- /obj/rtthread/src/scheduler.d: -------------------------------------------------------------------------------- 1 | rtthread/src/scheduler.o: ../rtthread/src/scheduler.c \ 2 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h 10 | 11 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 12 | 13 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 14 | 15 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 16 | 17 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 18 | 19 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 20 | 21 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 22 | 23 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 24 | 25 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h: 26 | -------------------------------------------------------------------------------- /obj/rtthread/src/scheduler.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/src/scheduler.o -------------------------------------------------------------------------------- /obj/rtthread/src/slab.d: -------------------------------------------------------------------------------- 1 | rtthread/src/slab.o: ../rtthread/src/slab.c \ 2 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h 10 | 11 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h: 12 | 13 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 14 | 15 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 16 | 17 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 18 | 19 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 20 | 21 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 22 | 23 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 24 | 25 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 26 | -------------------------------------------------------------------------------- /obj/rtthread/src/slab.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/src/slab.o -------------------------------------------------------------------------------- /obj/rtthread/src/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../rtthread/src/clock.c \ 8 | ../rtthread/src/components.c \ 9 | ../rtthread/src/cpu.c \ 10 | ../rtthread/src/device.c \ 11 | ../rtthread/src/idle.c \ 12 | ../rtthread/src/ipc.c \ 13 | ../rtthread/src/irq.c \ 14 | ../rtthread/src/kservice.c \ 15 | ../rtthread/src/mem.c \ 16 | ../rtthread/src/memheap.c \ 17 | ../rtthread/src/mempool.c \ 18 | ../rtthread/src/object.c \ 19 | ../rtthread/src/scheduler.c \ 20 | ../rtthread/src/slab.c \ 21 | ../rtthread/src/thread.c \ 22 | ../rtthread/src/timer.c 23 | 24 | OBJS += \ 25 | ./rtthread/src/clock.o \ 26 | ./rtthread/src/components.o \ 27 | ./rtthread/src/cpu.o \ 28 | ./rtthread/src/device.o \ 29 | ./rtthread/src/idle.o \ 30 | ./rtthread/src/ipc.o \ 31 | ./rtthread/src/irq.o \ 32 | ./rtthread/src/kservice.o \ 33 | ./rtthread/src/mem.o \ 34 | ./rtthread/src/memheap.o \ 35 | ./rtthread/src/mempool.o \ 36 | ./rtthread/src/object.o \ 37 | ./rtthread/src/scheduler.o \ 38 | ./rtthread/src/slab.o \ 39 | ./rtthread/src/thread.o \ 40 | ./rtthread/src/timer.o 41 | 42 | C_DEPS += \ 43 | ./rtthread/src/clock.d \ 44 | ./rtthread/src/components.d \ 45 | ./rtthread/src/cpu.d \ 46 | ./rtthread/src/device.d \ 47 | ./rtthread/src/idle.d \ 48 | ./rtthread/src/ipc.d \ 49 | ./rtthread/src/irq.d \ 50 | ./rtthread/src/kservice.d \ 51 | ./rtthread/src/mem.d \ 52 | ./rtthread/src/memheap.d \ 53 | ./rtthread/src/mempool.d \ 54 | ./rtthread/src/object.d \ 55 | ./rtthread/src/scheduler.d \ 56 | ./rtthread/src/slab.d \ 57 | ./rtthread/src/thread.d \ 58 | ./rtthread/src/timer.d 59 | 60 | 61 | # Each subdirectory must supply rules for building sources it contributes 62 | rtthread/src/%.o: ../rtthread/src/%.c 63 | @ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Debug" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Core" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\User" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Peripheral\inc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\drivers" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include\libc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v\common" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\src" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\misc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\serial" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 64 | @ @ 65 | 66 | -------------------------------------------------------------------------------- /obj/rtthread/src/thread.d: -------------------------------------------------------------------------------- 1 | rtthread/src/thread.o: ../rtthread/src/thread.c \ 2 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h 10 | 11 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 12 | 13 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 14 | 15 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 16 | 17 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 18 | 19 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 20 | 21 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 22 | 23 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 24 | 25 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h: 26 | -------------------------------------------------------------------------------- /obj/rtthread/src/thread.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/src/thread.o -------------------------------------------------------------------------------- /obj/rtthread/src/timer.d: -------------------------------------------------------------------------------- 1 | rtthread/src/timer.o: ../rtthread/src/timer.c \ 2 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h \ 3 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h \ 4 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h \ 5 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h \ 6 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h \ 7 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h \ 8 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h \ 9 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h 10 | 11 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtthread.h: 12 | 13 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread/rtconfig.h: 14 | 15 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdebug.h: 16 | 17 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtdef.h: 18 | 19 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtservice.h: 20 | 21 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rtm.h: 22 | 23 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh/finsh_api.h: 24 | 25 | C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include/rthw.h: 26 | -------------------------------------------------------------------------------- /obj/rtthread/src/timer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/obj/rtthread/src/timer.o -------------------------------------------------------------------------------- /obj/rtthread/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../rtthread/board.c 8 | 9 | OBJS += \ 10 | ./rtthread/board.o 11 | 12 | C_DEPS += \ 13 | ./rtthread/board.d 14 | 15 | 16 | # Each subdirectory must supply rules for building sources it contributes 17 | rtthread/%.o: ../rtthread/%.c 18 | @ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Debug" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Core" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\User" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\Peripheral\inc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\drivers" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\include\libc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\libcpu\risc-v\common" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\src" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\include" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\misc" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\drivers\serial" -I"C:\MRS_DATA\workspace\RT-Thread_test-1\rtthread\components\finsh" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 19 | @ @ 20 | 21 | -------------------------------------------------------------------------------- /obj/rtthread/tools/kconfig-frontends/frontends/conf/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/tools/kconfig-frontends/frontends/gconf/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/tools/kconfig-frontends/frontends/mconf/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/tools/kconfig-frontends/frontends/nconf/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/tools/kconfig-frontends/libs/lxdialog/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/tools/kconfig-frontends/libs/parser/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/rtthread/tools/kconfig-frontends/utils/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /obj/sources.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | ELF_SRCS := 6 | OBJ_SRCS := 7 | S_SRCS := 8 | ASM_UPPER_SRCS := 9 | ASM_SRCS := 10 | C_SRCS := 11 | S_UPPER_SRCS := 12 | O_SRCS := 13 | ASM_UPPER_DEPS := 14 | OBJS := 15 | SECONDARY_FLASH := 16 | SECONDARY_LIST := 17 | SECONDARY_SIZE := 18 | ASM_DEPS := 19 | S_DEPS := 20 | S_UPPER_DEPS := 21 | C_DEPS := 22 | 23 | # Every subdirectory with source files must be described here 24 | SUBDIRS := \ 25 | Core \ 26 | Debug \ 27 | Peripheral/src \ 28 | Startup \ 29 | User \ 30 | User/headers/ILI9341 \ 31 | User/headers \ 32 | User/headers/YM3812 \ 33 | drivers \ 34 | rtthread \ 35 | rtthread/components/drivers/misc \ 36 | rtthread/components/drivers/serial \ 37 | rtthread/components/finsh \ 38 | rtthread/libcpu/risc-v/common \ 39 | rtthread/src \ 40 | 41 | -------------------------------------------------------------------------------- /proto-netlist.txt: -------------------------------------------------------------------------------- 1 | PA1 - ADC1 2 | PA2 - ILI9341 LED 3 | PA3 - ILI9341 CS 4 | PA4 - ILI9341 DC 5 | PA5 - ILI9341 SCK 6 | PA6 - ILI9341 MISO 7 | PA7 - ILI9341 MOSI 8 | PA8 - ILI9341 RST 9 | PB10 - UART TX 10 | PB11 - UART RX 11 | PD1 - button left 12 | PD2 - button right 13 | PD3 - CD4051 A 14 | PD4 - CD4051 B 15 | PD5 - CD4051 C 16 | PE0 - YM3812 SDA 17 | PE1 - YM3812 SCK 18 | PE2 - YM3812 WR/CS 19 | PE3 - YM3812 A0 20 | PE4 - YM3812 IC 21 | -------------------------------------------------------------------------------- /rtthread/board.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2019, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2017-07-24 Tanek the first version 9 | * 2018-11-12 Ernest Chen modify copyright 10 | */ 11 | 12 | #include "board.h" 13 | #include 14 | #include "drv_usart.h" 15 | 16 | #include 17 | #include 18 | 19 | 20 | // core clock. 21 | extern uint32_t SystemCoreClock; 22 | 23 | static uint32_t _SysTick_Config(rt_uint32_t ticks) 24 | { 25 | NVIC_SetPriority(SysTicK_IRQn,0xf0); 26 | NVIC_SetPriority(Software_IRQn,0xf0); 27 | NVIC_EnableIRQ(SysTicK_IRQn); 28 | NVIC_EnableIRQ(Software_IRQn); 29 | SysTick->CTLR=0; 30 | SysTick->SR=0; 31 | SysTick->CNT=0; 32 | SysTick->CMP=ticks-1; 33 | SysTick->CTLR=0xF; 34 | return 0; 35 | } 36 | 37 | #if defined(RT_USING_USER_MAIN) && defined(RT_USING_HEAP) 38 | #define RT_HEAP_SIZE (1024) 39 | static uint32_t rt_heap[RT_HEAP_SIZE]; // heap default size: 4K(1024 * 4) 40 | RT_WEAK void *rt_heap_begin_get(void) 41 | { 42 | return rt_heap; 43 | } 44 | 45 | RT_WEAK void *rt_heap_end_get(void) 46 | { 47 | return rt_heap + RT_HEAP_SIZE; 48 | } 49 | #endif 50 | 51 | /** 52 | * This function will initial your board. 53 | */ 54 | void rt_hw_board_init() 55 | { 56 | /* System Tick Configuration */ 57 | _SysTick_Config(SystemCoreClock / RT_TICK_PER_SECOND); 58 | /* Call components board initial (use INIT_BOARD_EXPORT()) */ 59 | #ifdef RT_USING_COMPONENTS_INIT 60 | rt_components_board_init(); 61 | #endif 62 | #if defined(RT_USING_USER_MAIN) && defined(RT_USING_HEAP) 63 | rt_system_heap_init(rt_heap_begin_get(), rt_heap_end_get()); 64 | #endif 65 | 66 | #ifdef RT_USING_CONSOLE 67 | rt_console_set_device(RT_CONSOLE_DEVICE_NAME); 68 | #endif 69 | } 70 | 71 | 72 | void SysTick_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast"))); 73 | void SysTick_Handler(void) 74 | { 75 | GET_INT_SP(); 76 | /* enter interrupt */ 77 | rt_interrupt_enter(); 78 | SysTick->SR=0; 79 | rt_tick_increase(); 80 | /* leave interrupt */ 81 | rt_interrupt_leave(); 82 | FREE_INT_SP(); 83 | 84 | } 85 | -------------------------------------------------------------------------------- /rtthread/board.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File : board.h 3 | * This file is part of RT-Thread RTOS 4 | * COPYRIGHT (C) 2009, RT-Thread Development Team 5 | * 6 | * The license and distribution terms for this file may be 7 | * found in the file LICENSE in this distribution or at 8 | * http://www.rt-thread.org/license/LICENSE 9 | * 10 | * Change Logs: 11 | * Date Author Notes 12 | * 2009-09-22 Bernard add board.h to this bsp 13 | * 2017-10-20 ZYH emmm...setup for HAL Libraries 14 | */ 15 | 16 | // <<< Use Configuration Wizard in Context Menu >>> 17 | #ifndef __BOARD_H__ 18 | #define __BOARD_H__ 19 | 20 | #include "ch32v30x.h" 21 | #define CH32V30X_PIN_NUMBERS 100 22 | /* board configuration */ 23 | #define SRAM_SIZE 64 24 | #define SRAM_END (0x20000000 + SRAM_SIZE * 1024) 25 | 26 | extern int _ebss; 27 | #define HEAP_BEGIN ((void *)&_ebss) 28 | #define HEAP_END (SRAM_END-__stack_size) 29 | 30 | 31 | 32 | void rt_hw_board_init(void); 33 | 34 | #endif /* __BOARD_H__ */ 35 | -------------------------------------------------------------------------------- /rtthread/components/drivers/include/ipc/completion.h: -------------------------------------------------------------------------------- 1 | #ifndef COMPLETION_H_ 2 | #define COMPLETION_H_ 3 | 4 | #include 5 | 6 | /** 7 | * Completion 8 | */ 9 | 10 | struct rt_completion 11 | { 12 | rt_uint32_t flag; 13 | 14 | /* suspended list */ 15 | rt_list_t suspended_list; 16 | }; 17 | 18 | void rt_completion_init(struct rt_completion *completion); 19 | rt_err_t rt_completion_wait(struct rt_completion *completion, 20 | rt_int32_t timeout); 21 | void rt_completion_done(struct rt_completion *completion); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /rtthread/components/drivers/include/ipc/dataqueue.h: -------------------------------------------------------------------------------- 1 | #ifndef DATAQUEUE_H__ 2 | #define DATAQUEUE_H__ 3 | 4 | #include 5 | 6 | #define RT_DATAQUEUE_EVENT_UNKNOWN 0x00 7 | #define RT_DATAQUEUE_EVENT_POP 0x01 8 | #define RT_DATAQUEUE_EVENT_PUSH 0x02 9 | #define RT_DATAQUEUE_EVENT_LWM 0x03 10 | 11 | struct rt_data_item; 12 | #define RT_DATAQUEUE_SIZE(dq) ((dq)->put_index - (dq)->get_index) 13 | #define RT_DATAQUEUE_EMPTY(dq) ((dq)->size - RT_DATAQUEUE_SIZE(dq)) 14 | /* data queue implementation */ 15 | struct rt_data_queue 16 | { 17 | rt_uint16_t size; 18 | rt_uint16_t lwm; 19 | rt_bool_t waiting_lwm; 20 | 21 | rt_uint16_t get_index; 22 | rt_uint16_t put_index; 23 | 24 | struct rt_data_item *queue; 25 | 26 | rt_list_t suspended_push_list; 27 | rt_list_t suspended_pop_list; 28 | 29 | /* event notify */ 30 | void (*evt_notify)(struct rt_data_queue *queue, rt_uint32_t event); 31 | }; 32 | 33 | /** 34 | * DataQueue for DeviceDriver 35 | */ 36 | rt_err_t rt_data_queue_init(struct rt_data_queue *queue, 37 | rt_uint16_t size, 38 | rt_uint16_t lwm, 39 | void (*evt_notify)(struct rt_data_queue *queue, rt_uint32_t event)); 40 | rt_err_t rt_data_queue_push(struct rt_data_queue *queue, 41 | const void *data_ptr, 42 | rt_size_t data_size, 43 | rt_int32_t timeout); 44 | rt_err_t rt_data_queue_pop(struct rt_data_queue *queue, 45 | const void **data_ptr, 46 | rt_size_t *size, 47 | rt_int32_t timeout); 48 | rt_err_t rt_data_queue_peak(struct rt_data_queue *queue, 49 | const void **data_ptr, 50 | rt_size_t *size); 51 | void rt_data_queue_reset(struct rt_data_queue *queue); 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /rtthread/components/drivers/include/ipc/pipe.h: -------------------------------------------------------------------------------- 1 | #ifndef PIPE_H__ 2 | #define PIPE_H__ 3 | 4 | /** 5 | * Pipe Device 6 | */ 7 | #include 8 | #include 9 | 10 | #ifndef RT_PIPE_BUFSZ 11 | #define PIPE_BUFSZ 512 12 | #else 13 | #define PIPE_BUFSZ RT_PIPE_BUFSZ 14 | #endif 15 | 16 | struct rt_pipe_device 17 | { 18 | struct rt_device parent; 19 | 20 | /* ring buffer in pipe device */ 21 | struct rt_ringbuffer *fifo; 22 | rt_uint16_t bufsz; 23 | 24 | rt_uint8_t readers; 25 | rt_uint8_t writers; 26 | 27 | rt_wqueue_t reader_queue; 28 | rt_wqueue_t writer_queue; 29 | 30 | struct rt_mutex lock; 31 | }; 32 | typedef struct rt_pipe_device rt_pipe_t; 33 | 34 | rt_pipe_t *rt_pipe_create(const char *name, int bufsz); 35 | int rt_pipe_delete(const char *name); 36 | #endif /* PIPE_H__ */ 37 | -------------------------------------------------------------------------------- /rtthread/components/drivers/include/ipc/poll.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File : poll.h 3 | * This file is part of Device File System in RT-Thread RTOS 4 | * COPYRIGHT (C) 2006-2017, RT-Thread Development Team 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | * 20 | * Change Logs: 21 | * Date Author Notes 22 | * 2016-09-19 Heyuanjie The first version. 23 | * 2016-12-26 Bernard Update poll interface 24 | */ 25 | #ifndef IPC_POLL_H__ 26 | #define IPC_POLL_H__ 27 | 28 | 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | struct rt_pollreq; 35 | typedef void (*poll_queue_proc)(rt_wqueue_t *, struct rt_pollreq *); 36 | 37 | typedef struct rt_pollreq 38 | { 39 | poll_queue_proc _proc; 40 | short _key; 41 | } rt_pollreq_t; 42 | 43 | rt_inline void rt_poll_add(rt_wqueue_t *wq, rt_pollreq_t *req) 44 | { 45 | if (req && req->_proc && wq) 46 | { 47 | req->_proc(wq, req); 48 | } 49 | } 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /rtthread/components/drivers/include/ipc/ringbuffer.h: -------------------------------------------------------------------------------- 1 | #ifndef RINGBUFFER_H__ 2 | #define RINGBUFFER_H__ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | /* ring buffer */ 11 | struct rt_ringbuffer 12 | { 13 | rt_uint8_t *buffer_ptr; 14 | /* use the msb of the {read,write}_index as mirror bit. You can see this as 15 | * if the buffer adds a virtual mirror and the pointers point either to the 16 | * normal or to the mirrored buffer. If the write_index has the same value 17 | * with the read_index, but in a different mirror, the buffer is full. 18 | * While if the write_index and the read_index are the same and within the 19 | * same mirror, the buffer is empty. The ASCII art of the ringbuffer is: 20 | * 21 | * mirror = 0 mirror = 1 22 | * +---+---+---+---+---+---+---+|+~~~+~~~+~~~+~~~+~~~+~~~+~~~+ 23 | * | 0 | 1 | 2 | 3 | 4 | 5 | 6 ||| 0 | 1 | 2 | 3 | 4 | 5 | 6 | Full 24 | * +---+---+---+---+---+---+---+|+~~~+~~~+~~~+~~~+~~~+~~~+~~~+ 25 | * read_idx-^ write_idx-^ 26 | * 27 | * +---+---+---+---+---+---+---+|+~~~+~~~+~~~+~~~+~~~+~~~+~~~+ 28 | * | 0 | 1 | 2 | 3 | 4 | 5 | 6 ||| 0 | 1 | 2 | 3 | 4 | 5 | 6 | Empty 29 | * +---+---+---+---+---+---+---+|+~~~+~~~+~~~+~~~+~~~+~~~+~~~+ 30 | * read_idx-^ ^-write_idx 31 | * 32 | * The tradeoff is we could only use 32KiB of buffer for 16 bit of index. 33 | * But it should be enough for most of the cases. 34 | * 35 | * Ref: http://en.wikipedia.org/wiki/Circular_buffer#Mirroring */ 36 | rt_uint16_t read_mirror : 1; 37 | rt_uint16_t read_index : 15; 38 | rt_uint16_t write_mirror : 1; 39 | rt_uint16_t write_index : 15; 40 | /* as we use msb of index as mirror bit, the size should be signed and 41 | * could only be positive. */ 42 | rt_int16_t buffer_size; 43 | }; 44 | 45 | enum rt_ringbuffer_state 46 | { 47 | RT_RINGBUFFER_EMPTY, 48 | RT_RINGBUFFER_FULL, 49 | /* half full is neither full nor empty */ 50 | RT_RINGBUFFER_HALFFULL, 51 | }; 52 | 53 | /** 54 | * RingBuffer for DeviceDriver 55 | * 56 | * Please note that the ring buffer implementation of RT-Thread 57 | * has no thread wait or resume feature. 58 | */ 59 | void rt_ringbuffer_init(struct rt_ringbuffer *rb, rt_uint8_t *pool, rt_int16_t size); 60 | void rt_ringbuffer_reset(struct rt_ringbuffer *rb); 61 | rt_size_t rt_ringbuffer_put(struct rt_ringbuffer *rb, const rt_uint8_t *ptr, rt_uint16_t length); 62 | rt_size_t rt_ringbuffer_put_force(struct rt_ringbuffer *rb, const rt_uint8_t *ptr, rt_uint16_t length); 63 | rt_size_t rt_ringbuffer_putchar(struct rt_ringbuffer *rb, const rt_uint8_t ch); 64 | rt_size_t rt_ringbuffer_putchar_force(struct rt_ringbuffer *rb, const rt_uint8_t ch); 65 | rt_size_t rt_ringbuffer_get(struct rt_ringbuffer *rb, rt_uint8_t *ptr, rt_uint16_t length); 66 | rt_size_t rt_ringbuffer_getchar(struct rt_ringbuffer *rb, rt_uint8_t *ch); 67 | rt_size_t rt_ringbuffer_data_len(struct rt_ringbuffer *rb); 68 | 69 | #ifdef RT_USING_HEAP 70 | struct rt_ringbuffer* rt_ringbuffer_create(rt_uint16_t length); 71 | void rt_ringbuffer_destroy(struct rt_ringbuffer *rb); 72 | #endif 73 | 74 | rt_inline rt_uint16_t rt_ringbuffer_get_size(struct rt_ringbuffer *rb) 75 | { 76 | RT_ASSERT(rb != RT_NULL); 77 | return rb->buffer_size; 78 | } 79 | 80 | /** return the size of empty space in rb */ 81 | #define rt_ringbuffer_space_len(rb) ((rb)->buffer_size - rt_ringbuffer_data_len(rb)) 82 | 83 | 84 | #ifdef __cplusplus 85 | } 86 | #endif 87 | 88 | #endif 89 | -------------------------------------------------------------------------------- /rtthread/components/drivers/include/ipc/waitqueue.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File : waitqueue.h 3 | * This file is part of RT-Thread RTOS 4 | * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | * 20 | * Change Logs: 21 | * Date Author Notes 22 | * 2018/06/26 Bernard Fix the wait queue issue when wakeup a soon 23 | * to blocked thread. 24 | */ 25 | 26 | #ifndef WAITQUEUE_H__ 27 | #define WAITQUEUE_H__ 28 | 29 | #include 30 | 31 | #define RT_WQ_FLAG_CLEAN 0x00 32 | #define RT_WQ_FLAG_WAKEUP 0x01 33 | 34 | struct rt_wqueue_node; 35 | typedef int (*rt_wqueue_func_t)(struct rt_wqueue_node *wait, void *key); 36 | 37 | struct rt_wqueue_node 38 | { 39 | rt_thread_t polling_thread; 40 | rt_list_t list; 41 | 42 | rt_wqueue_func_t wakeup; 43 | rt_uint32_t key; 44 | }; 45 | typedef struct rt_wqueue_node rt_wqueue_node_t; 46 | 47 | int __wqueue_default_wake(struct rt_wqueue_node *wait, void *key); 48 | 49 | rt_inline void rt_wqueue_init(rt_wqueue_t *queue) 50 | { 51 | RT_ASSERT(queue != RT_NULL); 52 | 53 | queue->flag = RT_WQ_FLAG_CLEAN; 54 | rt_list_init(&(queue->waiting_list)); 55 | } 56 | 57 | void rt_wqueue_add(rt_wqueue_t *queue, struct rt_wqueue_node *node); 58 | void rt_wqueue_remove(struct rt_wqueue_node *node); 59 | int rt_wqueue_wait(rt_wqueue_t *queue, int condition, int timeout); 60 | void rt_wqueue_wakeup(rt_wqueue_t *queue, void *key); 61 | 62 | #define DEFINE_WAIT_FUNC(name, function) \ 63 | struct rt_wqueue_node name = { \ 64 | rt_current_thread, \ 65 | RT_LIST_OBJECT_INIT(((name).list)), \ 66 | \ 67 | function, \ 68 | 0 \ 69 | } 70 | 71 | #define DEFINE_WAIT(name) DEFINE_WAIT_FUNC(name, __wqueue_default_wake) 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /rtthread/components/drivers/include/ipc/workqueue.h: -------------------------------------------------------------------------------- 1 | #ifndef WORKQUEUE_H__ 2 | #define WORKQUEUE_H__ 3 | 4 | #include 5 | 6 | /* workqueue implementation */ 7 | struct rt_workqueue 8 | { 9 | rt_list_t work_list; 10 | struct rt_work *work_current; /* current work */ 11 | 12 | struct rt_semaphore sem; 13 | rt_thread_t work_thread; 14 | }; 15 | 16 | struct rt_work 17 | { 18 | rt_list_t list; 19 | 20 | void (*work_func)(struct rt_work* work, void* work_data); 21 | void *work_data; 22 | }; 23 | 24 | #ifdef RT_USING_HEAP 25 | /** 26 | * WorkQueue for DeviceDriver 27 | */ 28 | struct rt_workqueue *rt_workqueue_create(const char* name, rt_uint16_t stack_size, rt_uint8_t priority); 29 | rt_err_t rt_workqueue_destroy(struct rt_workqueue* queue); 30 | rt_err_t rt_workqueue_dowork(struct rt_workqueue* queue, struct rt_work* work); 31 | rt_err_t rt_workqueue_cancel_work(struct rt_workqueue* queue, struct rt_work* work); 32 | rt_err_t rt_workqueue_cancel_work_sync(struct rt_workqueue* queue, struct rt_work* work); 33 | 34 | rt_inline void rt_work_init(struct rt_work* work, void (*work_func)(struct rt_work* work, void* work_data), 35 | void* work_data) 36 | { 37 | rt_list_init(&(work->list)); 38 | work->work_func = work_func; 39 | work->work_data = work_data; 40 | } 41 | #endif 42 | 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /rtthread/components/drivers/include/rtdevice.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File : rtdevice.h 3 | * This file is part of RT-Thread RTOS 4 | * COPYRIGHT (C) 2006 - 2012, RT-Thread Development Team 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program; if not, write to the Free Software Foundation, Inc., 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | * 20 | * Change Logs: 21 | * Date Author Notes 22 | * 2012-01-08 bernard first version. 23 | * 2014-07-12 bernard Add workqueue implementation. 24 | */ 25 | 26 | #ifndef __RT_DEVICE_H__ 27 | #define __RT_DEVICE_H__ 28 | 29 | #include 30 | 31 | #include "ipc/ringbuffer.h" 32 | #include "ipc/completion.h" 33 | #include "ipc/dataqueue.h" 34 | #include "ipc/workqueue.h" 35 | #include "ipc/waitqueue.h" 36 | #include "ipc/pipe.h" 37 | #include "ipc/poll.h" 38 | 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | #define RT_DEVICE(device) ((rt_device_t)device) 45 | 46 | #ifdef RT_USING_RTC 47 | #include "drivers/rtc.h" 48 | #ifdef RT_USING_ALARM 49 | #include "drivers/alarm.h" 50 | #endif 51 | #endif /* RT_USING_RTC */ 52 | 53 | #ifdef RT_USING_SPI 54 | #include "drivers/spi.h" 55 | #endif /* RT_USING_SPI */ 56 | 57 | #ifdef RT_USING_MTD_NOR 58 | #include "drivers/mtd_nor.h" 59 | #endif /* RT_USING_MTD_NOR */ 60 | 61 | #ifdef RT_USING_MTD_NAND 62 | #include "drivers/mtd_nand.h" 63 | #endif /* RT_USING_MTD_NAND */ 64 | 65 | #ifdef RT_USING_USB_DEVICE 66 | #include "drivers/usb_device.h" 67 | #endif /* RT_USING_USB_DEVICE */ 68 | 69 | #ifdef RT_USING_USB_HOST 70 | #include "drivers/usb_host.h" 71 | #endif /* RT_USING_USB_HOST */ 72 | 73 | #ifdef RT_USING_SERIAL 74 | #include "drivers/serial.h" 75 | #endif /* RT_USING_SERIAL */ 76 | 77 | #ifdef RT_USING_I2C 78 | #include "drivers/i2c.h" 79 | #include "drivers/i2c_dev.h" 80 | 81 | #ifdef RT_USING_I2C_BITOPS 82 | #include "drivers/i2c-bit-ops.h" 83 | #endif /* RT_USING_I2C_BITOPS */ 84 | #endif /* RT_USING_I2C */ 85 | 86 | #ifdef RT_USING_SDIO 87 | #include "drivers/mmcsd_core.h" 88 | #include "drivers/sd.h" 89 | #include "drivers/sdio.h" 90 | #endif 91 | 92 | #ifdef RT_USING_WDT 93 | #include "drivers/watchdog.h" 94 | #endif 95 | 96 | #ifdef RT_USING_PIN 97 | #include "drivers/pin.h" 98 | #endif 99 | 100 | #ifdef RT_USING_CAN 101 | #include "drivers/can.h" 102 | #endif 103 | 104 | #ifdef RT_USING_HWTIMER 105 | #include "drivers/hwtimer.h" 106 | #endif 107 | 108 | #ifdef RT_USING_AUDIO 109 | #include "drivers/audio.h" 110 | #endif 111 | 112 | #ifdef RT_USING_CPUTIME 113 | #include "drivers/cputime.h" 114 | #endif 115 | 116 | #ifdef RT_USING_PWM 117 | #include "drivers/rt_drv_pwm.h" 118 | #endif 119 | 120 | #ifdef __cplusplus 121 | } 122 | #endif 123 | 124 | #endif /* __RT_DEVICE_H__ */ 125 | -------------------------------------------------------------------------------- /rtthread/components/finsh/cmd.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/rtthread/components/finsh/cmd.c -------------------------------------------------------------------------------- /rtthread/components/finsh/msh.h: -------------------------------------------------------------------------------- 1 | /* 2 | * RT-Thread module shell implementation. 3 | * 4 | * COPYRIGHT (C) 2013, Shanghai Real-Thread Technology Co., Ltd 5 | * 6 | * This file is part of RT-Thread (http://www.rt-thread.org) 7 | * Maintainer: bernard.xiong 8 | * 9 | * All rights reserved. 10 | * 11 | * This program is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License along 22 | * with this program; if not, write to the Free Software Foundation, Inc., 23 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 24 | * 25 | * Change Logs: 26 | * Date Author Notes 27 | * 2013-03-30 Bernard the first verion for FinSH 28 | */ 29 | 30 | #ifndef __M_SHELL__ 31 | #define __M_SHELL__ 32 | 33 | #include 34 | 35 | rt_bool_t msh_is_used(void); 36 | int msh_exec(char *cmd, rt_size_t length); 37 | void msh_auto_complete(char *prefix); 38 | 39 | int msh_exec_module(const char *cmd_line, int size); 40 | int msh_exec_script(const char *cmd_line, int size); 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /rtthread/components/finsh/shell.h: -------------------------------------------------------------------------------- 1 | /* 2 | * shell implementation for finsh shell. 3 | * 4 | * COPYRIGHT (C) 2006 - 2013, RT-Thread Development Team 5 | * 6 | * This file is part of RT-Thread (http://www.rt-thread.org) 7 | * Maintainer: bernard.xiong 8 | * 9 | * All rights reserved. 10 | * 11 | * This program is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License along 22 | * with this program; if not, write to the Free Software Foundation, Inc., 23 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 24 | * 25 | * Change Logs: 26 | * Date Author Notes 27 | * 2011-06-02 Bernard Add finsh_get_prompt function declaration 28 | */ 29 | 30 | #ifndef __SHELL_H__ 31 | #define __SHELL_H__ 32 | 33 | #include 34 | #include "finsh.h" 35 | 36 | #ifndef FINSH_THREAD_PRIORITY 37 | #define FINSH_THREAD_PRIORITY 20 38 | #endif 39 | #ifndef FINSH_THREAD_STACK_SIZE 40 | #define FINSH_THREAD_STACK_SIZE 2048 41 | #endif 42 | #ifndef FINSH_CMD_SIZE 43 | #define FINSH_CMD_SIZE 80 44 | #endif 45 | 46 | #define FINSH_OPTION_ECHO 0x01 47 | #if defined(FINSH_USING_MSH) || (defined(RT_USING_DFS) && defined(DFS_USING_WORKDIR)) 48 | #define FINSH_PROMPT finsh_get_prompt() 49 | const char* finsh_get_prompt(void); 50 | #else 51 | #define FINSH_PROMPT "finsh>>" 52 | #endif 53 | 54 | #ifdef FINSH_USING_HISTORY 55 | #ifndef FINSH_HISTORY_LINES 56 | #define FINSH_HISTORY_LINES 5 57 | #endif 58 | #endif 59 | 60 | #ifdef FINSH_USING_AUTH 61 | #ifndef FINSH_PASSWORD_MAX 62 | #define FINSH_PASSWORD_MAX RT_NAME_MAX 63 | #endif 64 | #ifndef FINSH_PASSWORD_MIN 65 | #define FINSH_PASSWORD_MIN 6 66 | #endif 67 | #ifndef FINSH_DEFAULT_PASSWORD 68 | #define FINSH_DEFAULT_PASSWORD "rtthread" 69 | #endif 70 | #endif /* FINSH_USING_AUTH */ 71 | 72 | #ifndef FINSH_THREAD_NAME 73 | #define FINSH_THREAD_NAME "tshell" 74 | #endif 75 | 76 | enum input_stat 77 | { 78 | WAIT_NORMAL, 79 | WAIT_SPEC_KEY, 80 | WAIT_FUNC_KEY, 81 | }; 82 | struct finsh_shell 83 | { 84 | struct rt_semaphore rx_sem; 85 | 86 | enum input_stat stat; 87 | 88 | rt_uint8_t echo_mode:1; 89 | 90 | #ifdef FINSH_USING_HISTORY 91 | rt_uint16_t current_history; 92 | rt_uint16_t history_count; 93 | 94 | char cmd_history[FINSH_HISTORY_LINES][FINSH_CMD_SIZE]; 95 | #endif 96 | 97 | #ifndef FINSH_USING_MSH_ONLY 98 | struct finsh_parser parser; 99 | #endif 100 | 101 | char line[FINSH_CMD_SIZE]; 102 | rt_uint8_t line_position; 103 | rt_uint8_t line_curpos; 104 | 105 | #ifndef RT_USING_POSIX 106 | rt_device_t device; 107 | #endif 108 | 109 | #ifdef FINSH_USING_AUTH 110 | char password[FINSH_PASSWORD_MAX]; 111 | #endif 112 | }; 113 | 114 | void finsh_set_echo(rt_uint32_t echo); 115 | rt_uint32_t finsh_get_echo(void); 116 | 117 | int finsh_system_init(void); 118 | void finsh_set_device(const char* device_name); 119 | const char* finsh_get_device(void); 120 | 121 | #ifdef FINSH_USING_AUTH 122 | rt_err_t finsh_set_password(const char *password); 123 | const char *finsh_get_password(void); 124 | #endif 125 | 126 | #endif 127 | 128 | -------------------------------------------------------------------------------- /rtthread/components/finsh/symbol.c: -------------------------------------------------------------------------------- 1 | /* 2 | * symbols in finsh shell. 3 | * 4 | * COPYRIGHT (C) 2006 - 2013, RT-Thread Development Team 5 | * 6 | * This file is part of RT-Thread (http://www.rt-thread.org) 7 | * Maintainer: bernard.xiong 8 | * 9 | * All rights reserved. 10 | * 11 | * This program is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License along 22 | * with this program; if not, write to the Free Software Foundation, Inc., 23 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 24 | * 25 | * Change Logs: 26 | * Date Author Notes 27 | * 2010-03-22 Bernard first version 28 | */ 29 | #include "finsh.h" 30 | 31 | long hello(void); 32 | long version(void); 33 | long list(void); 34 | long list_thread(void); 35 | long list_sem(void); 36 | long list_mutex(void); 37 | long list_fevent(void); 38 | long list_event(void); 39 | long list_mailbox(void); 40 | long list_msgqueue(void); 41 | long list_mempool(void); 42 | long list_timer(void); 43 | 44 | #ifdef FINSH_USING_SYMTAB 45 | struct finsh_syscall *_syscall_table_begin = NULL; 46 | struct finsh_syscall *_syscall_table_end = NULL; 47 | struct finsh_sysvar *_sysvar_table_begin = NULL; 48 | struct finsh_sysvar *_sysvar_table_end = NULL; 49 | #else 50 | struct finsh_syscall _syscall_table[] = 51 | { 52 | {"hello", hello}, 53 | {"version", version}, 54 | {"list", list}, 55 | {"list_thread", list_thread}, 56 | #ifdef RT_USING_SEMAPHORE 57 | {"list_sem", list_sem}, 58 | #endif 59 | #ifdef RT_USING_MUTEX 60 | {"list_mutex", list_mutex}, 61 | #endif 62 | #ifdef RT_USING_FEVENT 63 | {"list_fevent", list_fevent}, 64 | #endif 65 | #ifdef RT_USING_EVENT 66 | {"list_event", list_event}, 67 | #endif 68 | #ifdef RT_USING_MAILBOX 69 | {"list_mb", list_mailbox}, 70 | #endif 71 | #ifdef RT_USING_MESSAGEQUEUE 72 | {"list_mq", list_msgqueue}, 73 | #endif 74 | #ifdef RT_USING_MEMPOOL 75 | {"list_memp", list_mempool}, 76 | #endif 77 | {"list_timer", list_timer}, 78 | }; 79 | struct finsh_syscall *_syscall_table_begin = &_syscall_table[0]; 80 | struct finsh_syscall *_syscall_table_end = &_syscall_table[sizeof(_syscall_table) / sizeof(struct finsh_syscall)]; 81 | 82 | struct finsh_sysvar *_sysvar_table_begin = NULL; 83 | struct finsh_sysvar *_sysvar_table_end = NULL; 84 | #endif 85 | -------------------------------------------------------------------------------- /rtthread/include/libc/libc_dirent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2018, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #ifndef LIBC_DIRENT_H__ 8 | #define LIBC_DIRENT_H__ 9 | 10 | #define DT_UNKNOWN 0x00 11 | #define DT_REG 0x01 12 | #define DT_DIR 0x02 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /rtthread/include/libc/libc_fcntl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2018, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /* 8 | * File : libc_fcntl.h 9 | * 10 | * Change Logs: 11 | * Date Author Notes 12 | * 2018-02-07 Bernard Add O_DIRECTORY definition in NEWLIB mode. 13 | * 2018-02-09 Bernard Add O_BINARY definition 14 | */ 15 | 16 | #ifndef LIBC_FCNTL_H__ 17 | #define LIBC_FCNTL_H__ 18 | 19 | #if defined(RT_USING_NEWLIB) || defined(_WIN32) 20 | #include 21 | 22 | #ifndef O_NONBLOCK 23 | #define O_NONBLOCK 0x4000 24 | #endif 25 | 26 | #if defined(_WIN32) 27 | #define O_ACCMODE (_O_RDONLY | _O_WRONLY | _O_RDWR) 28 | #endif 29 | 30 | #ifndef F_GETFL 31 | #define F_GETFL 3 32 | #endif 33 | #ifndef F_SETFL 34 | #define F_SETFL 4 35 | #endif 36 | 37 | #ifndef O_DIRECTORY 38 | #define O_DIRECTORY 0x200000 39 | #endif 40 | 41 | #ifndef O_BINARY 42 | #ifdef _O_BINARY 43 | #define O_BINARY _O_BINARY 44 | #else 45 | #define O_BINARY 0 46 | #endif 47 | #endif 48 | 49 | #else 50 | #define O_RDONLY 00 51 | #define O_WRONLY 01 52 | #define O_RDWR 02 53 | 54 | #define O_CREAT 0100 55 | #define O_EXCL 0200 56 | #define O_NOCTTY 0400 57 | #define O_TRUNC 01000 58 | #define O_APPEND 02000 59 | #define O_NONBLOCK 04000 60 | #define O_DSYNC 010000 61 | #define O_SYNC 04010000 62 | #define O_RSYNC 04010000 63 | #define O_BINARY 0100000 64 | #define O_DIRECTORY 0200000 65 | #define O_NOFOLLOW 0400000 66 | #define O_CLOEXEC 02000000 67 | 68 | #define O_ASYNC 020000 69 | #define O_DIRECT 040000 70 | #define O_LARGEFILE 0100000 71 | #define O_NOATIME 01000000 72 | #define O_PATH 010000000 73 | #define O_TMPFILE 020200000 74 | #define O_NDELAY O_NONBLOCK 75 | 76 | #define O_SEARCH O_PATH 77 | #define O_EXEC O_PATH 78 | 79 | #define O_ACCMODE (03|O_SEARCH) 80 | 81 | #define F_DUPFD 0 82 | #define F_GETFD 1 83 | #define F_SETFD 2 84 | #define F_GETFL 3 85 | #define F_SETFL 4 86 | 87 | #define F_SETOWN 8 88 | #define F_GETOWN 9 89 | #define F_SETSIG 10 90 | #define F_GETSIG 11 91 | 92 | #define F_GETLK 12 93 | #define F_SETLK 13 94 | #define F_SETLKW 14 95 | 96 | #define F_SETOWN_EX 15 97 | #define F_GETOWN_EX 16 98 | 99 | #define F_GETOWNER_UIDS 17 100 | #endif 101 | 102 | #endif 103 | -------------------------------------------------------------------------------- /rtthread/include/libc/libc_fdset.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2018, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /* 8 | * File : libc_errno.h 9 | * 10 | * Change Logs: 11 | * Date Author Notes 12 | * 2017-10-30 Bernard The first version 13 | */ 14 | 15 | #ifndef LIBC_FDSET_H__ 16 | #define LIBC_FDSET_H__ 17 | 18 | #include 19 | 20 | #if defined(RT_USING_NEWLIB) || defined(_WIN32) 21 | #include 22 | #if defined(HAVE_SYS_SELECT_H) 23 | #include 24 | #endif 25 | 26 | #else 27 | 28 | #ifdef SAL_USING_POSIX 29 | 30 | #ifdef FD_SETSIZE 31 | #undef FD_SETSIZE 32 | #endif 33 | 34 | #define FD_SETSIZE DFS_FD_MAX 35 | #endif 36 | 37 | # ifndef FD_SETSIZE 38 | # define FD_SETSIZE 32 39 | # endif 40 | 41 | # define NBBY 8 /* number of bits in a byte */ 42 | 43 | typedef long fd_mask; 44 | # define NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */ 45 | # ifndef howmany 46 | # define howmany(x,y) (((x)+((y)-1))/(y)) 47 | # endif 48 | 49 | /* We use a macro for fd_set so that including Sockets.h afterwards 50 | can work. */ 51 | typedef struct _types_fd_set { 52 | fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)]; 53 | } _types_fd_set; 54 | 55 | #define fd_set _types_fd_set 56 | 57 | # define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS))) 58 | # define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS))) 59 | # define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS))) 60 | # define FD_ZERO(p) memset((void*)(p), 0, sizeof(*(p))) 61 | 62 | #endif 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /rtthread/include/libc/libc_stat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2018, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #ifndef LIBC_STAT_H__ 8 | #define LIBC_STAT_H__ 9 | 10 | #include 11 | 12 | #if defined(RT_USING_NEWLIB) 13 | /* use header file of newlib */ 14 | #include 15 | 16 | #elif defined(_WIN32) 17 | #include 18 | 19 | #define S_IRWXU 00700 20 | #define S_IRUSR 00400 21 | #define S_IWUSR 00200 22 | #define S_IXUSR 00100 23 | 24 | #define S_IRWXG 00070 25 | #define S_IRGRP 00040 26 | #define S_IWGRP 00020 27 | #define S_IXGRP 00010 28 | 29 | #define S_IRWXO 00007 30 | #define S_IROTH 00004 31 | #define S_IWOTH 00002 32 | #define S_IXOTH 00001 33 | 34 | #define S_IFSOCK 0140000 35 | #define S_IFLNK 0120000 36 | #define S_IFBLK 0060000 37 | #define S_IFIFO 0010000 38 | #define S_ISUID 0004000 39 | #define S_ISGID 0002000 40 | #define S_ISVTX 0001000 41 | 42 | #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) 43 | 44 | #else 45 | #define S_IFMT 00170000 46 | #define S_IFSOCK 0140000 47 | #define S_IFLNK 0120000 48 | #define S_IFREG 0100000 49 | #define S_IFBLK 0060000 50 | #define S_IFDIR 0040000 51 | #define S_IFCHR 0020000 52 | #define S_IFIFO 0010000 53 | #define S_ISUID 0004000 54 | #define S_ISGID 0002000 55 | #define S_ISVTX 0001000 56 | 57 | #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) 58 | #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) 59 | #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) 60 | #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) 61 | #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) 62 | #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) 63 | #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) 64 | 65 | #define S_IRWXU 00700 66 | #define S_IRUSR 00400 67 | #define S_IWUSR 00200 68 | #define S_IXUSR 00100 69 | 70 | #define S_IRWXG 00070 71 | #define S_IRGRP 00040 72 | #define S_IWGRP 00020 73 | #define S_IXGRP 00010 74 | 75 | #define S_IRWXO 00007 76 | #define S_IROTH 00004 77 | #define S_IWOTH 00002 78 | #define S_IXOTH 00001 79 | 80 | /* stat structure */ 81 | #include 82 | #include 83 | 84 | struct stat 85 | { 86 | struct rt_device *st_dev; 87 | uint16_t st_ino; 88 | uint16_t st_mode; 89 | uint16_t st_nlink; 90 | uint16_t st_uid; 91 | uint16_t st_gid; 92 | struct rt_device *st_rdev; 93 | uint32_t st_size; 94 | time_t st_atime; 95 | long st_spare1; 96 | time_t st_mtime; 97 | long st_spare2; 98 | time_t st_ctime; 99 | long st_spare3; 100 | uint32_t st_blksize; 101 | uint32_t st_blocks; 102 | long st_spare4[2]; 103 | }; 104 | 105 | #endif 106 | 107 | #endif 108 | -------------------------------------------------------------------------------- /rtthread/include/rthw.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2018, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2006-03-18 Bernard the first version 9 | * 2006-04-25 Bernard add rt_hw_context_switch_interrupt declaration 10 | * 2006-09-24 Bernard add rt_hw_context_switch_to declaration 11 | * 2012-12-29 Bernard add rt_hw_exception_install declaration 12 | * 2017-10-17 Hichard add some micros 13 | */ 14 | 15 | #ifndef __RT_HW_H__ 16 | #define __RT_HW_H__ 17 | 18 | #include 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | /* 25 | * Some macros define 26 | */ 27 | #ifndef HWREG32 28 | #define HWREG32(x) (*((volatile rt_uint32_t *)(x))) 29 | #endif 30 | #ifndef HWREG16 31 | #define HWREG16(x) (*((volatile rt_uint16_t *)(x))) 32 | #endif 33 | #ifndef HWREG8 34 | #define HWREG8(x) (*((volatile rt_uint8_t *)(x))) 35 | #endif 36 | 37 | #ifndef RT_CPU_CACHE_LINE_SZ 38 | #define RT_CPU_CACHE_LINE_SZ 32 39 | #endif 40 | 41 | enum RT_HW_CACHE_OPS 42 | { 43 | RT_HW_CACHE_FLUSH = 0x01, 44 | RT_HW_CACHE_INVALIDATE = 0x02, 45 | }; 46 | 47 | /* 48 | * CPU interfaces 49 | */ 50 | void rt_hw_cpu_icache_enable(void); 51 | void rt_hw_cpu_icache_disable(void); 52 | rt_base_t rt_hw_cpu_icache_status(void); 53 | void rt_hw_cpu_icache_ops(int ops, void* addr, int size); 54 | 55 | void rt_hw_cpu_dcache_enable(void); 56 | void rt_hw_cpu_dcache_disable(void); 57 | rt_base_t rt_hw_cpu_dcache_status(void); 58 | void rt_hw_cpu_dcache_ops(int ops, void* addr, int size); 59 | 60 | void rt_hw_cpu_reset(void); 61 | void rt_hw_cpu_shutdown(void); 62 | 63 | rt_uint8_t *rt_hw_stack_init(void *entry, 64 | void *parameter, 65 | rt_uint8_t *stack_addr, 66 | void *exit); 67 | 68 | /* 69 | * Interrupt handler definition 70 | */ 71 | typedef void (*rt_isr_handler_t)(int vector, void *param); 72 | 73 | struct rt_irq_desc 74 | { 75 | rt_isr_handler_t handler; 76 | void *param; 77 | 78 | #ifdef RT_USING_INTERRUPT_INFO 79 | char name[RT_NAME_MAX]; 80 | rt_uint32_t counter; 81 | #endif 82 | }; 83 | 84 | /* 85 | * Interrupt interfaces 86 | */ 87 | void rt_hw_interrupt_init(void); 88 | void rt_hw_interrupt_mask(int vector); 89 | void rt_hw_interrupt_umask(int vector); 90 | rt_isr_handler_t rt_hw_interrupt_install(int vector, 91 | rt_isr_handler_t handler, 92 | void *param, 93 | const char *name); 94 | 95 | rt_base_t rt_hw_interrupt_disable(void); 96 | void rt_hw_interrupt_enable(rt_base_t level); 97 | 98 | /* 99 | * Context interfaces 100 | */ 101 | void rt_hw_context_switch(rt_uint32_t from, rt_uint32_t to); 102 | void rt_hw_context_switch_to(rt_uint32_t to); 103 | void rt_hw_context_switch_interrupt(rt_uint32_t from, rt_uint32_t to); 104 | 105 | void rt_hw_console_output(const char *str); 106 | 107 | void rt_hw_backtrace(rt_uint32_t *fp, rt_uint32_t thread_entry); 108 | void rt_hw_show_memory(rt_uint32_t addr, rt_uint32_t size); 109 | 110 | /* 111 | * Exception interfaces 112 | */ 113 | void rt_hw_exception_install(rt_err_t (*exception_handle)(void *context)); 114 | 115 | /* 116 | * delay interfaces 117 | */ 118 | void rt_hw_us_delay(rt_uint32_t us); 119 | 120 | #define RT_DEFINE_SPINLOCK(x) 121 | #define RT_DECLARE_SPINLOCK(x) rt_ubase_t x 122 | 123 | #define rt_hw_spin_lock(lock) *(lock) = rt_hw_interrupt_disable() 124 | #define rt_hw_spin_unlock(lock) rt_hw_interrupt_enable(*(lock)) 125 | 126 | #ifdef __cplusplus 127 | } 128 | #endif 129 | 130 | #endif 131 | -------------------------------------------------------------------------------- /rtthread/include/rtlibc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2018, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2017-01-21 Bernard the first version 9 | */ 10 | 11 | #ifndef RTLIBC_H__ 12 | #define RTLIBC_H__ 13 | 14 | /* definitions for libc if toolchain has no these definitions */ 15 | #include "libc/libc_stat.h" 16 | #include "libc/libc_errno.h" 17 | 18 | #include "libc/libc_fcntl.h" 19 | #include "libc/libc_ioctl.h" 20 | #include "libc/libc_dirent.h" 21 | #include "libc/libc_signal.h" 22 | #include "libc/libc_fdset.h" 23 | 24 | #if defined(__CC_ARM) || defined(__CLANG_ARM) || defined(__IAR_SYSTEMS_ICC__) 25 | typedef signed long off_t; 26 | typedef int mode_t; 27 | #endif 28 | 29 | #if defined(__MINGW32__) || defined(_WIN32) 30 | typedef signed long off_t; 31 | typedef int mode_t; 32 | #endif 33 | 34 | #endif 35 | 36 | -------------------------------------------------------------------------------- /rtthread/include/rtm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2018, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #ifndef __RTM_H__ 8 | #define __RTM_H__ 9 | 10 | #include 11 | #include 12 | 13 | #ifdef RT_USING_MODULE 14 | struct rt_module_symtab 15 | { 16 | void *addr; 17 | const char *name; 18 | }; 19 | 20 | #if defined(_MSC_VER) 21 | #pragma section("RTMSymTab$f",read) 22 | #define RTM_EXPORT(symbol) \ 23 | __declspec(allocate("RTMSymTab$f"))const char __rtmsym_##symbol##_name[] = "__vs_rtm_"#symbol; 24 | #pragma comment(linker, "/merge:RTMSymTab=mytext") 25 | 26 | #elif defined(__MINGW32__) 27 | #define RTM_EXPORT(symbol) 28 | 29 | #else 30 | #define RTM_EXPORT(symbol) \ 31 | const char __rtmsym_##symbol##_name[] SECTION(".rodata.name") = #symbol; \ 32 | const struct rt_module_symtab __rtmsym_##symbol SECTION("RTMSymTab")= \ 33 | { \ 34 | (void *)&symbol, \ 35 | __rtmsym_##symbol##_name \ 36 | }; 37 | #endif 38 | 39 | #else 40 | #define RTM_EXPORT(symbol) 41 | #endif 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /rtthread/libcpu/risc-v/common/cpuport.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2018, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-09-09 WCH the first version 9 | */ 10 | 11 | #ifndef CPUPORT_H__ 12 | #define CPUPORT_H__ 13 | 14 | /* bytes of register width */ 15 | //#define ARCH_RISCV_FPU 16 | #define ARCH_RISCV_FPU_S 17 | 18 | #ifdef ARCH_CPU_64BIT 19 | #define STORE sd 20 | #define LOAD ld 21 | #define REGBYTES 8 22 | #else 23 | #define STORE sw 24 | #define LOAD lw 25 | #define REGBYTES 4 26 | #endif 27 | 28 | /* FPU */ 29 | #ifdef ARCH_RISCV_FPU 30 | #ifdef ARCH_RISCV_FPU_D 31 | #define FSTORE fsd 32 | #define FLOAD fld 33 | #define FREGBYTES 8 34 | #define rv_floatreg_t rt_int64_t 35 | #endif 36 | #ifdef ARCH_RISCV_FPU_S 37 | #define FSTORE fsw 38 | #define FLOAD flw 39 | #define FREGBYTES 4 40 | #define rv_floatreg_t rt_int32_t 41 | #endif 42 | #endif 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /rtthread/src/clock.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2018, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2006-03-12 Bernard first version 9 | * 2006-05-27 Bernard add support for same priority thread schedule 10 | * 2006-08-10 Bernard remove the last rt_schedule in rt_tick_increase 11 | * 2010-03-08 Bernard remove rt_passed_second 12 | * 2010-05-20 Bernard fix the tick exceeds the maximum limits 13 | * 2010-07-13 Bernard fix rt_tick_from_millisecond issue found by kuronca 14 | * 2011-06-26 Bernard add rt_tick_set function. 15 | */ 16 | 17 | #include 18 | #include 19 | 20 | static rt_tick_t rt_tick = 0; 21 | 22 | /** 23 | * This function will init system tick and set it to zero. 24 | * @ingroup SystemInit 25 | * 26 | * @deprecated since 1.1.0, this function does not need to be invoked 27 | * in the system initialization. 28 | */ 29 | void rt_system_tick_init(void) 30 | { 31 | } 32 | 33 | /** 34 | * @addtogroup Clock 35 | */ 36 | 37 | /**@{*/ 38 | 39 | /** 40 | * This function will return current tick from operating system startup 41 | * 42 | * @return current tick 43 | */ 44 | rt_tick_t rt_tick_get(void) 45 | { 46 | /* return the global tick */ 47 | return rt_tick; 48 | } 49 | RTM_EXPORT(rt_tick_get); 50 | 51 | /** 52 | * This function will set current tick 53 | */ 54 | void rt_tick_set(rt_tick_t tick) 55 | { 56 | rt_base_t level; 57 | 58 | level = rt_hw_interrupt_disable(); 59 | rt_tick = tick; 60 | rt_hw_interrupt_enable(level); 61 | } 62 | 63 | /** 64 | * This function will notify kernel there is one tick passed. Normally, 65 | * this function is invoked by clock ISR. 66 | */ 67 | void rt_tick_increase(void) 68 | { 69 | struct rt_thread *thread; 70 | 71 | /* increase the global tick */ 72 | ++ rt_tick; 73 | 74 | /* check time slice */ 75 | thread = rt_thread_self(); 76 | 77 | -- thread->remaining_tick; 78 | if (thread->remaining_tick == 0) 79 | { 80 | /* change to initialized tick */ 81 | thread->remaining_tick = thread->init_tick; 82 | 83 | /* yield */ 84 | rt_thread_yield(); 85 | } 86 | 87 | /* check timer */ 88 | rt_timer_check(); 89 | } 90 | 91 | /** 92 | * This function will calculate the tick from millisecond. 93 | * 94 | * @param ms the specified millisecond 95 | * - Negative Number wait forever 96 | * - Zero not wait 97 | * - Max 0x7fffffff 98 | * 99 | * @return the calculated tick 100 | */ 101 | rt_tick_t rt_tick_from_millisecond(rt_int32_t ms) 102 | { 103 | rt_tick_t tick; 104 | 105 | if (ms < 0) 106 | { 107 | tick = (rt_tick_t)RT_WAITING_FOREVER; 108 | } 109 | else 110 | { 111 | tick = RT_TICK_PER_SECOND * (ms / 1000); 112 | tick += (RT_TICK_PER_SECOND * (ms % 1000) + 999) / 1000; 113 | } 114 | 115 | /* return the calculated tick */ 116 | return tick; 117 | } 118 | RTM_EXPORT(rt_tick_from_millisecond); 119 | 120 | /**@}*/ 121 | 122 | -------------------------------------------------------------------------------- /rtthread/src/cpu.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2018, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2018-10-30 Bernard The first version 9 | */ 10 | 11 | #include 12 | #include 13 | 14 | /* nothing on non-smp version */ 15 | -------------------------------------------------------------------------------- /rtthread/src/irq.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2018, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2006-02-24 Bernard first version 9 | * 2006-05-03 Bernard add IRQ_DEBUG 10 | * 2016-08-09 ArdaFu add interrupt enter and leave hook. 11 | */ 12 | 13 | #include 14 | #include 15 | 16 | #ifdef RT_USING_HOOK 17 | 18 | static void (*rt_interrupt_enter_hook)(void); 19 | static void (*rt_interrupt_leave_hook)(void); 20 | 21 | /** 22 | * @ingroup Hook 23 | * This function set a hook function when the system enter a interrupt 24 | * 25 | * @note the hook function must be simple and never be blocked or suspend. 26 | */ 27 | void rt_interrupt_enter_sethook(void (*hook)(void)) 28 | { 29 | rt_interrupt_enter_hook = hook; 30 | } 31 | /** 32 | * @ingroup Hook 33 | * This function set a hook function when the system exit a interrupt. 34 | * 35 | * @note the hook function must be simple and never be blocked or suspend. 36 | */ 37 | void rt_interrupt_leave_sethook(void (*hook)(void)) 38 | { 39 | rt_interrupt_leave_hook = hook; 40 | } 41 | #endif 42 | 43 | /* #define IRQ_DEBUG */ 44 | 45 | /** 46 | * @addtogroup Kernel 47 | */ 48 | 49 | /**@{*/ 50 | 51 | volatile rt_uint8_t rt_interrupt_nest; 52 | 53 | /** 54 | * This function will be invoked by BSP, when enter interrupt service routine 55 | * 56 | * @note please don't invoke this routine in application 57 | * 58 | * @see rt_interrupt_leave 59 | */ 60 | void rt_interrupt_enter(void) 61 | { 62 | rt_base_t level; 63 | 64 | RT_DEBUG_LOG(RT_DEBUG_IRQ, ("irq coming..., irq nest:%d\n", 65 | rt_interrupt_nest)); 66 | 67 | level = rt_hw_interrupt_disable(); 68 | rt_interrupt_nest ++; 69 | RT_OBJECT_HOOK_CALL(rt_interrupt_enter_hook,()); 70 | rt_hw_interrupt_enable(level); 71 | } 72 | RTM_EXPORT(rt_interrupt_enter); 73 | 74 | /** 75 | * This function will be invoked by BSP, when leave interrupt service routine 76 | * 77 | * @note please don't invoke this routine in application 78 | * 79 | * @see rt_interrupt_enter 80 | */ 81 | void rt_interrupt_leave(void) 82 | { 83 | rt_base_t level; 84 | 85 | RT_DEBUG_LOG(RT_DEBUG_IRQ, ("irq leave, irq nest:%d\n", 86 | rt_interrupt_nest)); 87 | 88 | level = rt_hw_interrupt_disable(); 89 | rt_interrupt_nest --; 90 | RT_OBJECT_HOOK_CALL(rt_interrupt_leave_hook,()); 91 | rt_hw_interrupt_enable(level); 92 | } 93 | RTM_EXPORT(rt_interrupt_leave); 94 | 95 | /** 96 | * This function will return the nest of interrupt. 97 | * 98 | * User application can invoke this function to get whether current 99 | * context is interrupt context. 100 | * 101 | * @return the number of nested interrupts. 102 | */ 103 | rt_uint8_t rt_interrupt_get_nest(void) 104 | { 105 | return rt_interrupt_nest; 106 | } 107 | RTM_EXPORT(rt_interrupt_get_nest); 108 | 109 | RTM_EXPORT(rt_hw_interrupt_disable); 110 | RTM_EXPORT(rt_hw_interrupt_enable); 111 | 112 | /**@}*/ 113 | 114 | -------------------------------------------------------------------------------- /rtthread/src/scheduler.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snikolaj/DOS-Synth/e5d3b71d52573249ec3a842ef95d71781246004e/rtthread/src/scheduler.c --------------------------------------------------------------------------------