├── .gitattributes ├── LICENSE ├── README.md ├── demo ├── non_os │ └── stm32f10x │ │ ├── EWARM │ │ ├── .gitignore │ │ ├── EasyLogger.dep │ │ ├── EasyLogger.ewd │ │ ├── EasyLogger.ewp │ │ ├── EasyLogger.eww │ │ ├── EasyLoggerCustomSfr.sfr │ │ └── settings │ │ │ ├── EasyLogger.cspy.bat │ │ │ ├── EasyLogger.dbgdt │ │ │ ├── EasyLogger.dni │ │ │ ├── EasyLogger.wsdt │ │ │ ├── EasyLogger_Debug.jlink │ │ │ ├── EasyLogger_EncodingOverride.xml │ │ │ └── EasyLogger_stm32f103xE.jlink │ │ ├── Libraries │ │ ├── CMSIS_EWARM │ │ │ ├── CM3 │ │ │ │ └── DeviceSupport │ │ │ │ │ └── ST │ │ │ │ │ └── STM32F10x │ │ │ │ │ ├── Release_Notes.html │ │ │ │ │ ├── startup │ │ │ │ │ └── iar │ │ │ │ │ │ ├── startup_stm32f10x_cl.s │ │ │ │ │ │ ├── startup_stm32f10x_hd.s │ │ │ │ │ │ ├── startup_stm32f10x_hd_vl.s │ │ │ │ │ │ ├── startup_stm32f10x_ld.s │ │ │ │ │ │ ├── startup_stm32f10x_ld_vl.s │ │ │ │ │ │ ├── startup_stm32f10x_md.s │ │ │ │ │ │ ├── startup_stm32f10x_md_vl.s │ │ │ │ │ │ └── startup_stm32f10x_xl.s │ │ │ │ │ ├── stm32f10x.h │ │ │ │ │ ├── system_stm32f10x.c │ │ │ │ │ └── system_stm32f10x.h │ │ │ ├── CMSIS END USER LICENCE AGREEMENT.pdf │ │ │ ├── CMSIS debug support.htm │ │ │ ├── CMSIS_changes.htm │ │ │ ├── Documentation │ │ │ │ └── CMSIS_Core.htm │ │ │ ├── Include │ │ │ │ ├── arm_common_tables.h │ │ │ │ ├── arm_math.h │ │ │ │ ├── core_cm0.h │ │ │ │ ├── core_cm0plus.h │ │ │ │ ├── core_cm3.h │ │ │ │ ├── core_cm4.h │ │ │ │ ├── core_cm4_simd.h │ │ │ │ ├── core_cmFunc.h │ │ │ │ ├── core_cmInstr.h │ │ │ │ ├── core_sc000.h │ │ │ │ └── core_sc300.h │ │ │ ├── License.doc │ │ │ ├── README.txt │ │ │ ├── index.htm │ │ │ └── readme_patch.txt │ │ ├── CMSIS_RVMDK │ │ │ ├── CM3 │ │ │ │ ├── CoreSupport │ │ │ │ │ ├── core_cm3.c │ │ │ │ │ └── core_cm3.h │ │ │ │ └── DeviceSupport │ │ │ │ │ └── ST │ │ │ │ │ ├── Release_Notes_for_STM32F10x_CMSIS.html │ │ │ │ │ └── STM32F10x │ │ │ │ │ ├── Release_Notes.html │ │ │ │ │ ├── startup │ │ │ │ │ └── arm │ │ │ │ │ │ ├── startup_stm32f10x_cl.s │ │ │ │ │ │ ├── startup_stm32f10x_hd.s │ │ │ │ │ │ ├── startup_stm32f10x_hd_vl.s │ │ │ │ │ │ ├── startup_stm32f10x_ld.s │ │ │ │ │ │ ├── startup_stm32f10x_ld_vl.s │ │ │ │ │ │ ├── startup_stm32f10x_md.s │ │ │ │ │ │ ├── startup_stm32f10x_md_vl.s │ │ │ │ │ │ └── startup_stm32f10x_xl.s │ │ │ │ │ ├── stm32f10x.h │ │ │ │ │ ├── system_stm32f10x.c │ │ │ │ │ └── system_stm32f10x.h │ │ │ ├── CMSIS debug support.htm │ │ │ ├── CMSIS_changes.htm │ │ │ ├── Documentation │ │ │ │ └── CMSIS_Core.htm │ │ │ └── License.doc │ │ ├── SConscript │ │ └── STM32F10x_StdPeriph_Driver │ │ │ ├── Release_Notes.html │ │ │ ├── Release_Notes_for_STM32F10x_StdPeriph_Driver.html │ │ │ ├── inc │ │ │ ├── misc.h │ │ │ ├── stm32f10x_adc.h │ │ │ ├── stm32f10x_bkp.h │ │ │ ├── stm32f10x_can.h │ │ │ ├── stm32f10x_cec.h │ │ │ ├── stm32f10x_crc.h │ │ │ ├── stm32f10x_dac.h │ │ │ ├── stm32f10x_dbgmcu.h │ │ │ ├── stm32f10x_dma.h │ │ │ ├── stm32f10x_exti.h │ │ │ ├── stm32f10x_flash.h │ │ │ ├── stm32f10x_fsmc.h │ │ │ ├── stm32f10x_gpio.h │ │ │ ├── stm32f10x_i2c.h │ │ │ ├── stm32f10x_iwdg.h │ │ │ ├── stm32f10x_pwr.h │ │ │ ├── stm32f10x_rcc.h │ │ │ ├── stm32f10x_rtc.h │ │ │ ├── stm32f10x_sdio.h │ │ │ ├── stm32f10x_spi.h │ │ │ ├── stm32f10x_tim.h │ │ │ ├── stm32f10x_usart.h │ │ │ └── stm32f10x_wwdg.h │ │ │ └── src │ │ │ ├── misc.c │ │ │ ├── stm32f10x_adc.c │ │ │ ├── stm32f10x_bkp.c │ │ │ ├── stm32f10x_can.c │ │ │ ├── stm32f10x_cec.c │ │ │ ├── stm32f10x_crc.c │ │ │ ├── stm32f10x_dac.c │ │ │ ├── stm32f10x_dbgmcu.c │ │ │ ├── stm32f10x_dma.c │ │ │ ├── stm32f10x_exti.c │ │ │ ├── stm32f10x_flash.c │ │ │ ├── stm32f10x_fsmc.c │ │ │ ├── stm32f10x_gpio.c │ │ │ ├── stm32f10x_i2c.c │ │ │ ├── stm32f10x_iwdg.c │ │ │ ├── stm32f10x_pwr.c │ │ │ ├── stm32f10x_rcc.c │ │ │ ├── stm32f10x_rtc.c │ │ │ ├── stm32f10x_sdio.c │ │ │ ├── stm32f10x_spi.c │ │ │ ├── stm32f10x_tim.c │ │ │ ├── stm32f10x_usart.c │ │ │ └── stm32f10x_wwdg.c │ │ ├── README.md │ │ ├── RVMDK │ │ ├── .gitignore │ │ ├── EasyLogger.uvopt │ │ ├── EasyLogger.uvproj │ │ ├── EasyLogger_stm32f103xE.dep │ │ ├── EasyLogger_uvopt.bak │ │ ├── EasyLogger_uvproj.bak │ │ ├── JLink Regs CM3.txt │ │ ├── JLinkLog.txt │ │ └── JLinkSettings.ini │ │ ├── app │ │ ├── inc │ │ │ ├── stm32f10x_conf.h │ │ │ └── stm32f10x_it.h │ │ └── src │ │ │ ├── app.c │ │ │ └── stm32f10x_it.c │ │ └── components │ │ ├── easylogger │ │ ├── inc │ │ │ └── elog_cfg.h │ │ └── port │ │ │ └── elog_port.c │ │ └── others │ │ ├── bsp.c │ │ ├── bsp.h │ │ ├── stm32f103xB.icf │ │ ├── stm32f103xE.icf │ │ └── types.h └── os │ ├── cube-freertos │ └── nucleo-g070rb │ │ ├── .cproject │ │ ├── .mxproject │ │ ├── .project │ │ ├── .settings │ │ ├── language.settings.xml │ │ └── stm32cubeide.project.prefs │ │ ├── Components │ │ └── EasyLogger_Port │ │ │ ├── elog_cfg.h │ │ │ └── elog_port.c │ │ ├── Core │ │ ├── Inc │ │ │ ├── FreeRTOSConfig.h │ │ │ ├── dma.h │ │ │ ├── gpio.h │ │ │ ├── main.h │ │ │ ├── stm32g0xx_hal_conf.h │ │ │ ├── stm32g0xx_it.h │ │ │ └── usart.h │ │ ├── Src │ │ │ ├── app_freertos.c │ │ │ ├── dma.c │ │ │ ├── gpio.c │ │ │ ├── main.c │ │ │ ├── stm32g0xx_hal_msp.c │ │ │ ├── stm32g0xx_hal_timebase_tim.c │ │ │ ├── stm32g0xx_it.c │ │ │ ├── syscalls.c │ │ │ ├── sysmem.c │ │ │ ├── system_stm32g0xx.c │ │ │ └── usart.c │ │ └── Startup │ │ │ └── startup_stm32g070rbtx.s │ │ ├── Drivers │ │ ├── CMSIS │ │ │ ├── Device │ │ │ │ └── ST │ │ │ │ │ └── STM32G0xx │ │ │ │ │ ├── Include │ │ │ │ │ ├── stm32g070xx.h │ │ │ │ │ ├── stm32g0xx.h │ │ │ │ │ └── system_stm32g0xx.h │ │ │ │ │ └── LICENSE.txt │ │ │ ├── Include │ │ │ │ ├── cmsis_armcc.h │ │ │ │ ├── cmsis_armclang.h │ │ │ │ ├── cmsis_armclang_ltm.h │ │ │ │ ├── cmsis_compiler.h │ │ │ │ ├── cmsis_gcc.h │ │ │ │ ├── cmsis_iccarm.h │ │ │ │ ├── cmsis_version.h │ │ │ │ ├── core_armv81mml.h │ │ │ │ ├── core_armv8mbl.h │ │ │ │ ├── core_armv8mml.h │ │ │ │ ├── core_cm0.h │ │ │ │ ├── core_cm0plus.h │ │ │ │ ├── core_cm1.h │ │ │ │ ├── core_cm23.h │ │ │ │ ├── core_cm3.h │ │ │ │ ├── core_cm33.h │ │ │ │ ├── core_cm35p.h │ │ │ │ ├── core_cm4.h │ │ │ │ ├── core_cm7.h │ │ │ │ ├── core_sc000.h │ │ │ │ ├── core_sc300.h │ │ │ │ ├── mpu_armv7.h │ │ │ │ ├── mpu_armv8.h │ │ │ │ └── tz_context.h │ │ │ └── LICENSE.txt │ │ └── STM32G0xx_HAL_Driver │ │ │ ├── Inc │ │ │ ├── Legacy │ │ │ │ └── stm32_hal_legacy.h │ │ │ ├── stm32g0xx_hal.h │ │ │ ├── stm32g0xx_hal_cortex.h │ │ │ ├── stm32g0xx_hal_def.h │ │ │ ├── stm32g0xx_hal_dma.h │ │ │ ├── stm32g0xx_hal_dma_ex.h │ │ │ ├── stm32g0xx_hal_exti.h │ │ │ ├── stm32g0xx_hal_flash.h │ │ │ ├── stm32g0xx_hal_flash_ex.h │ │ │ ├── stm32g0xx_hal_gpio.h │ │ │ ├── stm32g0xx_hal_gpio_ex.h │ │ │ ├── stm32g0xx_hal_pwr.h │ │ │ ├── stm32g0xx_hal_pwr_ex.h │ │ │ ├── stm32g0xx_hal_rcc.h │ │ │ ├── stm32g0xx_hal_rcc_ex.h │ │ │ ├── stm32g0xx_hal_tim.h │ │ │ ├── stm32g0xx_hal_tim_ex.h │ │ │ ├── stm32g0xx_hal_uart.h │ │ │ ├── stm32g0xx_hal_uart_ex.h │ │ │ ├── stm32g0xx_ll_bus.h │ │ │ ├── stm32g0xx_ll_cortex.h │ │ │ ├── stm32g0xx_ll_dma.h │ │ │ ├── stm32g0xx_ll_dmamux.h │ │ │ ├── stm32g0xx_ll_exti.h │ │ │ ├── stm32g0xx_ll_gpio.h │ │ │ ├── stm32g0xx_ll_lpuart.h │ │ │ ├── stm32g0xx_ll_pwr.h │ │ │ ├── stm32g0xx_ll_rcc.h │ │ │ ├── stm32g0xx_ll_system.h │ │ │ ├── stm32g0xx_ll_usart.h │ │ │ └── stm32g0xx_ll_utils.h │ │ │ ├── LICENSE.txt │ │ │ └── Src │ │ │ ├── stm32g0xx_hal.c │ │ │ ├── stm32g0xx_hal_cortex.c │ │ │ ├── stm32g0xx_hal_dma.c │ │ │ ├── stm32g0xx_hal_dma_ex.c │ │ │ ├── stm32g0xx_hal_exti.c │ │ │ ├── stm32g0xx_hal_flash.c │ │ │ ├── stm32g0xx_hal_flash_ex.c │ │ │ ├── stm32g0xx_hal_gpio.c │ │ │ ├── stm32g0xx_hal_pwr.c │ │ │ ├── stm32g0xx_hal_pwr_ex.c │ │ │ ├── stm32g0xx_hal_rcc.c │ │ │ ├── stm32g0xx_hal_rcc_ex.c │ │ │ ├── stm32g0xx_hal_tim.c │ │ │ ├── stm32g0xx_hal_tim_ex.c │ │ │ ├── stm32g0xx_hal_uart.c │ │ │ ├── stm32g0xx_hal_uart_ex.c │ │ │ ├── stm32g0xx_ll_dma.c │ │ │ └── stm32g0xx_ll_rcc.c │ │ ├── Middlewares │ │ └── Third_Party │ │ │ └── FreeRTOS │ │ │ └── Source │ │ │ ├── CMSIS_RTOS_V2 │ │ │ ├── cmsis_os.h │ │ │ ├── cmsis_os2.c │ │ │ ├── cmsis_os2.h │ │ │ ├── freertos_mpool.h │ │ │ └── freertos_os2.h │ │ │ ├── LICENSE │ │ │ ├── croutine.c │ │ │ ├── event_groups.c │ │ │ ├── include │ │ │ ├── FreeRTOS.h │ │ │ ├── StackMacros.h │ │ │ ├── atomic.h │ │ │ ├── croutine.h │ │ │ ├── deprecated_definitions.h │ │ │ ├── event_groups.h │ │ │ ├── list.h │ │ │ ├── message_buffer.h │ │ │ ├── mpu_prototypes.h │ │ │ ├── mpu_wrappers.h │ │ │ ├── portable.h │ │ │ ├── projdefs.h │ │ │ ├── queue.h │ │ │ ├── semphr.h │ │ │ ├── stack_macros.h │ │ │ ├── stream_buffer.h │ │ │ ├── task.h │ │ │ └── timers.h │ │ │ ├── list.c │ │ │ ├── portable │ │ │ ├── GCC │ │ │ │ └── ARM_CM0 │ │ │ │ │ ├── port.c │ │ │ │ │ └── portmacro.h │ │ │ └── MemMang │ │ │ │ └── heap_4.c │ │ │ ├── queue.c │ │ │ ├── stream_buffer.c │ │ │ ├── tasks.c │ │ │ └── timers.c │ │ ├── README.md │ │ ├── STM32G070RBTX_FLASH.ld │ │ ├── nucleo-g070rb Debug.launch │ │ └── nucleo-g070rb.ioc │ ├── linux │ ├── Makefile │ ├── README.md │ ├── easylogger │ │ ├── inc │ │ │ ├── elog_cfg.h │ │ │ └── elog_file_cfg.h │ │ └── port │ │ │ ├── elog_file_port.c │ │ │ └── elog_port.c │ ├── main.c │ └── out │ │ └── .gitignore │ ├── nuttx-spiflash │ ├── README.md │ └── apps │ │ ├── examples │ │ └── easylogger │ │ │ ├── Kconfig │ │ │ ├── Make.defs │ │ │ ├── Makefile │ │ │ └── elog_main.c │ │ └── system │ │ ├── easyflash │ │ ├── Kconfig │ │ ├── Make.defs │ │ ├── Makefile │ │ ├── inc │ │ │ ├── easyflash.h │ │ │ ├── ef_cfg.h │ │ │ └── ef_def.h │ │ ├── plugins │ │ │ └── types │ │ │ │ ├── README.md │ │ │ │ ├── ef_types.c │ │ │ │ ├── ef_types.h │ │ │ │ └── struct2json │ │ │ │ ├── inc │ │ │ │ ├── cJSON.h │ │ │ │ ├── s2j.h │ │ │ │ └── s2jdef.h │ │ │ │ ├── readme.md │ │ │ │ └── src │ │ │ │ ├── cJSON.c │ │ │ │ └── s2j.c │ │ ├── port │ │ │ └── ef_port.c │ │ └── src │ │ │ ├── easyflash.c │ │ │ ├── ef_env.c │ │ │ ├── ef_env_legacy.c │ │ │ ├── ef_env_legacy_wl.c │ │ │ ├── ef_iap.c │ │ │ ├── ef_log.c │ │ │ └── ef_utils.c │ │ └── easylogger │ │ ├── Kconfig │ │ ├── Make.defs │ │ ├── Makefile │ │ ├── inc │ │ └── elog_cfg.h │ │ ├── plugins │ │ └── flash │ │ │ ├── elog_flash_cfg.h │ │ │ └── elog_flash_port.c │ │ └── port │ │ └── elog_port.c │ ├── rt-thread │ └── stm32f10x │ │ ├── EWARM │ │ ├── .gitignore │ │ ├── EasyLogger.dep │ │ ├── EasyLogger.ewd │ │ ├── EasyLogger.ewp │ │ ├── EasyLogger.ewt │ │ ├── EasyLogger.eww │ │ └── settings │ │ │ ├── EasyFlash.cspy.bat │ │ │ ├── EasyFlash.dbgdt │ │ │ ├── EasyFlash.dni │ │ │ ├── EasyFlash.wsdt │ │ │ ├── EasyFlash_Debug.jlink │ │ │ ├── EasyFlash_EncodingOverride.xml │ │ │ ├── EasyFlash_stm32f103xE.jlink │ │ │ ├── EasyLogger.crun │ │ │ ├── EasyLogger.cspy.bat │ │ │ ├── EasyLogger.dbgdt │ │ │ ├── EasyLogger.dni │ │ │ ├── EasyLogger.stm32f103xE.cspy.bat │ │ │ ├── EasyLogger.stm32f103xE.driver.xcl │ │ │ ├── EasyLogger.stm32f103xE.general.xcl │ │ │ ├── EasyLogger.wsdt │ │ │ ├── EasyLogger.wspos │ │ │ └── EasyLogger_stm32f103xE.jlink │ │ ├── Libraries │ │ ├── CMSIS_EWARM │ │ │ ├── CM3 │ │ │ │ └── DeviceSupport │ │ │ │ │ └── ST │ │ │ │ │ └── STM32F10x │ │ │ │ │ ├── Release_Notes.html │ │ │ │ │ ├── startup │ │ │ │ │ └── iar │ │ │ │ │ │ ├── startup_stm32f10x_cl.s │ │ │ │ │ │ ├── startup_stm32f10x_hd.s │ │ │ │ │ │ ├── startup_stm32f10x_hd_vl.s │ │ │ │ │ │ ├── startup_stm32f10x_ld.s │ │ │ │ │ │ ├── startup_stm32f10x_ld_vl.s │ │ │ │ │ │ ├── startup_stm32f10x_md.s │ │ │ │ │ │ ├── startup_stm32f10x_md_vl.s │ │ │ │ │ │ └── startup_stm32f10x_xl.s │ │ │ │ │ ├── stm32f10x.h │ │ │ │ │ ├── system_stm32f10x.c │ │ │ │ │ └── system_stm32f10x.h │ │ │ ├── CMSIS END USER LICENCE AGREEMENT.pdf │ │ │ ├── CMSIS debug support.htm │ │ │ ├── CMSIS_changes.htm │ │ │ ├── Documentation │ │ │ │ └── CMSIS_Core.htm │ │ │ ├── Include │ │ │ │ ├── arm_common_tables.h │ │ │ │ ├── arm_math.h │ │ │ │ ├── core_cm0.h │ │ │ │ ├── core_cm0plus.h │ │ │ │ ├── core_cm3.h │ │ │ │ ├── core_cm4.h │ │ │ │ ├── core_cm4_simd.h │ │ │ │ ├── core_cmFunc.h │ │ │ │ ├── core_cmInstr.h │ │ │ │ ├── core_sc000.h │ │ │ │ └── core_sc300.h │ │ │ ├── License.doc │ │ │ ├── README.txt │ │ │ ├── index.htm │ │ │ └── readme_patch.txt │ │ ├── CMSIS_RVMDK │ │ │ ├── CM3 │ │ │ │ ├── CoreSupport │ │ │ │ │ ├── core_cm3.c │ │ │ │ │ └── core_cm3.h │ │ │ │ └── DeviceSupport │ │ │ │ │ └── ST │ │ │ │ │ ├── Release_Notes_for_STM32F10x_CMSIS.html │ │ │ │ │ └── STM32F10x │ │ │ │ │ ├── Release_Notes.html │ │ │ │ │ ├── startup │ │ │ │ │ └── arm │ │ │ │ │ │ ├── startup_stm32f10x_cl.s │ │ │ │ │ │ ├── startup_stm32f10x_hd.s │ │ │ │ │ │ ├── startup_stm32f10x_hd_vl.s │ │ │ │ │ │ ├── startup_stm32f10x_ld.s │ │ │ │ │ │ ├── startup_stm32f10x_ld_vl.s │ │ │ │ │ │ ├── startup_stm32f10x_md.s │ │ │ │ │ │ ├── startup_stm32f10x_md_vl.s │ │ │ │ │ │ └── startup_stm32f10x_xl.s │ │ │ │ │ ├── stm32f10x.h │ │ │ │ │ ├── system_stm32f10x.c │ │ │ │ │ └── system_stm32f10x.h │ │ │ ├── CMSIS debug support.htm │ │ │ ├── CMSIS_changes.htm │ │ │ ├── Documentation │ │ │ │ └── CMSIS_Core.htm │ │ │ └── License.doc │ │ ├── SConscript │ │ └── STM32F10x_StdPeriph_Driver │ │ │ ├── Release_Notes.html │ │ │ ├── Release_Notes_for_STM32F10x_StdPeriph_Driver.html │ │ │ ├── inc │ │ │ ├── misc.h │ │ │ ├── stm32f10x_adc.h │ │ │ ├── stm32f10x_bkp.h │ │ │ ├── stm32f10x_can.h │ │ │ ├── stm32f10x_cec.h │ │ │ ├── stm32f10x_crc.h │ │ │ ├── stm32f10x_dac.h │ │ │ ├── stm32f10x_dbgmcu.h │ │ │ ├── stm32f10x_dma.h │ │ │ ├── stm32f10x_exti.h │ │ │ ├── stm32f10x_flash.h │ │ │ ├── stm32f10x_fsmc.h │ │ │ ├── stm32f10x_gpio.h │ │ │ ├── stm32f10x_i2c.h │ │ │ ├── stm32f10x_iwdg.h │ │ │ ├── stm32f10x_pwr.h │ │ │ ├── stm32f10x_rcc.h │ │ │ ├── stm32f10x_rtc.h │ │ │ ├── stm32f10x_sdio.h │ │ │ ├── stm32f10x_spi.h │ │ │ ├── stm32f10x_tim.h │ │ │ ├── stm32f10x_usart.h │ │ │ └── stm32f10x_wwdg.h │ │ │ └── src │ │ │ ├── misc.c │ │ │ ├── stm32f10x_adc.c │ │ │ ├── stm32f10x_bkp.c │ │ │ ├── stm32f10x_can.c │ │ │ ├── stm32f10x_cec.c │ │ │ ├── stm32f10x_crc.c │ │ │ ├── stm32f10x_dac.c │ │ │ ├── stm32f10x_dbgmcu.c │ │ │ ├── stm32f10x_dma.c │ │ │ ├── stm32f10x_exti.c │ │ │ ├── stm32f10x_flash.c │ │ │ ├── stm32f10x_fsmc.c │ │ │ ├── stm32f10x_gpio.c │ │ │ ├── stm32f10x_i2c.c │ │ │ ├── stm32f10x_iwdg.c │ │ │ ├── stm32f10x_pwr.c │ │ │ ├── stm32f10x_rcc.c │ │ │ ├── stm32f10x_rtc.c │ │ │ ├── stm32f10x_sdio.c │ │ │ ├── stm32f10x_spi.c │ │ │ ├── stm32f10x_tim.c │ │ │ ├── stm32f10x_usart.c │ │ │ └── stm32f10x_wwdg.c │ │ ├── README.md │ │ ├── RT-Thread-1.2.2 │ │ ├── AUTHORS │ │ ├── COPYING │ │ ├── components │ │ │ ├── SConscript │ │ │ ├── drivers │ │ │ │ ├── SConscript │ │ │ │ ├── include │ │ │ │ │ ├── drivers │ │ │ │ │ │ ├── alarm.h │ │ │ │ │ │ ├── i2c-bit-ops.h │ │ │ │ │ │ ├── i2c.h │ │ │ │ │ │ ├── i2c_dev.h │ │ │ │ │ │ ├── mmcsd_card.h │ │ │ │ │ │ ├── mmcsd_cmd.h │ │ │ │ │ │ ├── mmcsd_core.h │ │ │ │ │ │ ├── mmcsd_host.h │ │ │ │ │ │ ├── mtd_nand.h │ │ │ │ │ │ ├── mtd_nor.h │ │ │ │ │ │ ├── rtc.h │ │ │ │ │ │ ├── sd.h │ │ │ │ │ │ ├── sdio.h │ │ │ │ │ │ ├── sdio_func_ids.h │ │ │ │ │ │ ├── serial.h │ │ │ │ │ │ ├── spi.h │ │ │ │ │ │ ├── usb_common.h │ │ │ │ │ │ ├── usb_device.h │ │ │ │ │ │ └── usb_host.h │ │ │ │ │ └── rtdevice.h │ │ │ │ ├── serial │ │ │ │ │ ├── SConscript │ │ │ │ │ └── serial.c │ │ │ │ └── src │ │ │ │ │ ├── SConscript │ │ │ │ │ ├── completion.c │ │ │ │ │ ├── dataqueue.c │ │ │ │ │ ├── pipe.c │ │ │ │ │ ├── portal.c │ │ │ │ │ ├── ringbuffer.c │ │ │ │ │ └── wrokqueue.c │ │ │ └── finsh │ │ │ │ ├── SConscript │ │ │ │ ├── cmd.c │ │ │ │ ├── finsh.h │ │ │ │ ├── finsh_compiler.c │ │ │ │ ├── finsh_error.c │ │ │ │ ├── finsh_error.h │ │ │ │ ├── finsh_heap.c │ │ │ │ ├── finsh_heap.h │ │ │ │ ├── finsh_init.c │ │ │ │ ├── finsh_node.c │ │ │ │ ├── finsh_node.h │ │ │ │ ├── finsh_ops.c │ │ │ │ ├── finsh_ops.h │ │ │ │ ├── finsh_parser.c │ │ │ │ ├── finsh_parser.h │ │ │ │ ├── finsh_token.c │ │ │ │ ├── finsh_token.h │ │ │ │ ├── finsh_var.c │ │ │ │ ├── finsh_var.h │ │ │ │ ├── finsh_vm.c │ │ │ │ ├── finsh_vm.h │ │ │ │ ├── msh.c │ │ │ │ ├── msh.h │ │ │ │ ├── msh_cmd.c │ │ │ │ ├── shell.c │ │ │ │ ├── shell.h │ │ │ │ └── symbol.c │ │ ├── include │ │ │ ├── cpuusage.h │ │ │ ├── rtdebug.h │ │ │ ├── rtdef.h │ │ │ ├── rthw.h │ │ │ ├── rtm.h │ │ │ ├── rtservice.h │ │ │ └── rtthread.h │ │ ├── libcpu │ │ │ ├── SConscript │ │ │ └── arm │ │ │ │ └── cortex-m3 │ │ │ │ ├── context_gcc.S │ │ │ │ ├── context_iar.S │ │ │ │ ├── context_rvds.S │ │ │ │ └── cpuport.c │ │ └── src │ │ │ ├── SConscript │ │ │ ├── clock.c │ │ │ ├── cpuusage.c │ │ │ ├── device.c │ │ │ ├── idle.c │ │ │ ├── ipc.c │ │ │ ├── irq.c │ │ │ ├── kservice.c │ │ │ ├── mem.c │ │ │ ├── memheap.c │ │ │ ├── mempool.c │ │ │ ├── module.c │ │ │ ├── module.h │ │ │ ├── object.c │ │ │ ├── scheduler.c │ │ │ ├── slab.c │ │ │ ├── thread.c │ │ │ └── timer.c │ │ ├── RVMDK │ │ ├── .gitignore │ │ ├── EasyLogger.uvopt │ │ ├── EasyLogger.uvproj │ │ ├── EasyLogger_stm32f103xE.dep │ │ ├── EasyLogger_uvopt.bak │ │ ├── EasyLogger_uvproj.bak │ │ ├── JLink Regs CM3.txt │ │ ├── JLinkLog.txt │ │ └── JLinkSettings.ini │ │ ├── app │ │ ├── inc │ │ │ ├── app_task.h │ │ │ ├── delay_conf.h │ │ │ ├── rtconfig.h │ │ │ ├── stm32f10x_conf.h │ │ │ └── stm32f10x_it.h │ │ └── src │ │ │ ├── app.c │ │ │ ├── app_task.c │ │ │ ├── stm32f10x_it.c │ │ │ └── user_finsh_cmd.c │ │ └── components │ │ ├── easyflash │ │ ├── inc │ │ │ ├── easyflash.h │ │ │ └── ef_cfg.h │ │ ├── port │ │ │ └── ef_port.c │ │ └── src │ │ │ ├── easyflash.c │ │ │ ├── ef_env.c │ │ │ ├── ef_env_wl.c │ │ │ ├── ef_iap.c │ │ │ ├── ef_log.c │ │ │ └── ef_utils.c │ │ ├── easylogger │ │ ├── inc │ │ │ └── elog_cfg.h │ │ ├── plugins │ │ │ └── flash │ │ │ │ ├── elog_flash_cfg.h │ │ │ │ └── elog_flash_port.c │ │ └── port │ │ │ └── elog_port.c │ │ ├── others │ │ ├── bsp.c │ │ ├── bsp.h │ │ ├── stm32f103xB.icf │ │ ├── stm32f103xE.icf │ │ ├── types.h │ │ ├── utils.c │ │ └── utils.h │ │ └── rtt_uart │ │ ├── usart.c │ │ └── usart.h │ └── windows │ ├── .gitignore │ ├── CMakeLists.txt │ ├── README.md │ ├── easylogger │ ├── inc │ │ ├── elog_cfg.h │ │ └── elog_file_cfg.h │ └── port │ │ ├── elog_file_port.c │ │ └── elog_port.c │ ├── main.c │ └── make.bat ├── docs ├── en │ ├── api.md │ ├── images │ │ ├── EasyLoggerDemo.gif │ │ └── LogDemo.gif │ └── readme.md ├── readme.md └── zh │ ├── api │ ├── flash.md │ ├── kernel.md │ └── readme.md │ ├── images │ ├── EasyLoggerDemo.gif │ ├── ElogNuttxSpiFlashDemo.png │ ├── LogDemo.gif │ └── TextColor.png │ ├── port │ ├── flash.md │ ├── kernel.md │ └── readme.md │ └── readme.md └── easylogger ├── inc ├── elog.h └── elog_cfg.h ├── plugins ├── file │ ├── elog_file.c │ ├── elog_file.h │ ├── elog_file_cfg.h │ └── elog_file_port.c └── flash │ ├── elog_flash.c │ ├── elog_flash.h │ ├── elog_flash_cfg.h │ └── elog_flash_port.c ├── port └── elog_port.c └── src ├── elog.c ├── elog_async.c ├── elog_buf.c └── elog_utils.c /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | *.S text 4 | *.asm text 5 | *.c text 6 | *.cc text 7 | *.cpp text 8 | *.cxx text 9 | *.h text 10 | *.htm text 11 | *.html text 12 | *.in text 13 | *.ld text 14 | *.m4 text 15 | *.mak text 16 | *.mk text 17 | *.py text 18 | *.rb text 19 | *.s text 20 | *.sct text 21 | *.sh text 22 | *.txt text 23 | *.xml text 24 | Makefile text 25 | AUTHORS text 26 | COPYING text 27 | 28 | *.LZO -text 29 | *.Opt -text 30 | *.Uv2 -text 31 | *.ewp -text 32 | *.eww -text 33 | *.vcproj -text 34 | *.bat -text 35 | *.dos -text 36 | *.icf -text 37 | *.inf -text 38 | *.ini -text 39 | *.sct -text 40 | *.xsd -text 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-2019 Armink (armink.ztl@gmail.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/EWARM/.gitignore: -------------------------------------------------------------------------------- 1 | /stm32f103xB 2 | /stm32f103xE 3 | /Debug 4 | /Release 5 | -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/EWARM/EasyLogger.eww: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | $WS_DIR$\EasyLogger.ewp 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/EWARM/EasyLoggerCustomSfr.sfr: -------------------------------------------------------------------------------- 1 | [Sfr] 2 | 3 | 4 | [SfrGroupInfo] -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/EWARM/settings/EasyLogger.cspy.bat: -------------------------------------------------------------------------------- 1 | @REM This batch file has been generated by the IAR Embedded Workbench 2 | @REM C-SPY Debugger, as an aid to preparing a command line for running 3 | @REM the cspybat command line utility using the appropriate settings. 4 | @REM 5 | @REM Note that this file is generated every time a new debug session 6 | @REM is initialized, so you may want to move or rename the file before 7 | @REM making changes. 8 | @REM 9 | @REM You can launch cspybat by typing the name of this batch file followed 10 | @REM by the name of the debug file (usually an ELF/DWARF or UBROF file). 11 | @REM 12 | @REM Read about available command line parameters in the C-SPY Debugging 13 | @REM Guide. Hints about additional command line parameters that may be 14 | @REM useful in specific cases: 15 | @REM --download_only Downloads a code image without starting a debug 16 | @REM session afterwards. 17 | @REM --silent Omits the sign-on message. 18 | @REM --timeout Limits the maximum allowed execution time. 19 | @REM 20 | 21 | 22 | "C:\Program Files\IAR Systems\Embedded Workbench 6.5\common\bin\cspybat" "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\bin\armproc.dll" "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\bin\armjlink.dll" %1 --plugin "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\bin\armbat.dll" --macro "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\config\debugger\ST\Trace_STM32F1xx.dmac" --flash_loader "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\config\flashloader\ST\FlashSTM32F10xxE.board" --backend -B "--endian=little" "--cpu=Cortex-M3" "--fpu=None" "-p" "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\CONFIG\debugger\ST\STM32F103xE.ddf" "--drv_verify_download" "--semihosting" "--device=STM32F103xE" "--drv_communication=USB0" "--jlink_speed=auto" "--jlink_initial_speed=32" "--jlink_reset_strategy=0,0" "--jlink_interface=SWD" "--drv_catch_exceptions=0x000" "--drv_swo_clock_setup=72000000,0,2000000" 23 | 24 | 25 | -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/EWARM/settings/EasyLogger.dni: -------------------------------------------------------------------------------- 1 | [Stack] 2 | FillEnabled=0 3 | OverflowWarningsEnabled=1 4 | WarningThreshold=90 5 | SpWarningsEnabled=1 6 | WarnLogOnly=1 7 | UseTrigger=1 8 | TriggerName=main 9 | LimitSize=0 10 | ByteLimit=50 11 | [DebugChecksum] 12 | Checksum=-71993586 13 | [Exceptions] 14 | StopOnUncaught=_ 0 15 | StopOnThrow=_ 0 16 | [CallStack] 17 | ShowArgs=0 18 | [Disassembly] 19 | MixedMode=1 20 | [JLinkDriver] 21 | CStepIntDis=_ 0 22 | [watch_formats] 23 | Fmt0={W}0:CpuUsageMinor 3 0 24 | Fmt1={W}42:CpuUsageMajor 3 0 25 | Fmt2={W}42:CpuUsageMinor 3 0 26 | [SWOTraceHWSettings] 27 | OverrideDefaultClocks=0 28 | CpuClock=72000000 29 | ClockAutoDetect=0 30 | ClockWanted=2000000 31 | JtagSpeed=2000000 32 | Prescaler=36 33 | TimeStampPrescIndex=0 34 | TimeStampPrescData=0 35 | PcSampCYCTAP=1 36 | PcSampPOSTCNT=15 37 | PcSampIndex=0 38 | DataLogMode=0 39 | ITMportsEnable=0 40 | ITMportsTermIO=0 41 | ITMportsLogFile=0 42 | ITMlogFile=$PROJ_DIR$\ITM.log 43 | [Interrupts] 44 | Enabled=1 45 | [MemoryMap] 46 | Enabled=0 47 | Base=0 48 | UseAuto=0 49 | TypeViolation=1 50 | UnspecRange=1 51 | ActionState=1 52 | [Trace1] 53 | Enabled=0 54 | ShowSource=1 55 | [PowerLog] 56 | LogEnabled=0 57 | GraphEnabled=0 58 | ShowTimeLog=1 59 | ShowTimeSum=0 60 | Title0=I0 61 | Symbol0=0 4 62 | LiveEnabled=0 63 | LiveFile=PowerLogLive.log 64 | [DataLog] 65 | LogEnabled=0 66 | SumEnabled=0 67 | GraphEnabled=0 68 | ShowTimeLog=1 69 | ShowTimeSum=1 70 | [EventLog] 71 | LogEnabled=0 72 | SumEnabled=0 73 | GraphEnabled=0 74 | ShowTimeLog=1 75 | ShowTimeSum=1 76 | Title0=Ch0 77 | Symbol0=0 4 78 | Title1=Ch1 79 | Symbol1=0 4 80 | Title2=Ch2 81 | Symbol2=0 4 82 | Title3=Ch3 83 | Symbol3=0 4 84 | SumSortOrder=0 85 | Event0=1 1 1 86 | Event1=1 1 1 87 | Event2=1 1 1 88 | Event3=1 1 1 89 | [InterruptLog] 90 | LogEnabled=0 91 | SumEnabled=0 92 | GraphEnabled=0 93 | ShowTimeLog=1 94 | ShowTimeSum=1 95 | SumSortOrder=0 96 | [Log file] 97 | LoggingEnabled=_ 0 98 | LogFile=_ "" 99 | Category=_ 0 100 | [TermIOLog] 101 | LoggingEnabled=_ 0 102 | LogFile=_ "" 103 | [Trace2] 104 | Enabled=0 105 | ShowSource=0 106 | [SWOTraceWindow] 107 | PcSampling=0 108 | InterruptLogs=0 109 | ForcedTimeStamps=0 110 | EventCPI=0 111 | EventEXC=0 112 | EventFOLD=0 113 | EventLSU=0 114 | EventSLEEP=0 115 | [PowerProbe] 116 | Frequency=10000 117 | Probe0=I0 118 | ProbeSetup0=2 1 1 2 0 0 119 | [CallStackLog] 120 | Enabled=0 121 | [DriverProfiling] 122 | Enabled=0 123 | Mode=3 124 | Graph=0 125 | Symbiont=0 126 | Exclusions= 127 | [Disassemble mode] 128 | mode=0 129 | [Breakpoints2] 130 | Count=0 131 | [Aliases] 132 | Count=0 133 | SuppressDialog=0 134 | -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/EWARM/settings/EasyLogger_Debug.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ShowInfoWin = 1 3 | EnableFlashBP = 2 4 | BPDuringExecution = 0 5 | [CFI] 6 | CFISize = 0x00 7 | CFIAddr = 0x00 8 | [CPU] 9 | OverrideMemMap = 0 10 | AllowSimulation = 1 11 | ScriptFile="" 12 | [FLASH] 13 | MinNumBytesFlashDL = 0 14 | SkipProgOnCRCMatch = 1 15 | VerifyDownload = 1 16 | AllowCaching = 1 17 | EnableFlashDL = 2 18 | Override = 0 19 | Device="UNSPECIFIED" 20 | [GENERAL] 21 | WorkRAMSize = 0x00 22 | WorkRAMAddr = 0x00 23 | [SWO] 24 | SWOLogFile="" 25 | [MEM] 26 | RdOverrideOrMask = 0x00 27 | RdOverrideAndMask = 0xFFFFFFFF 28 | RdOverrideAddr = 0xFFFFFFFF 29 | WrOverrideOrMask = 0x00 30 | WrOverrideAndMask = 0xFFFFFFFF 31 | WrOverrideAddr = 0xFFFFFFFF 32 | -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/EWARM/settings/EasyLogger_EncodingOverride.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | E:\Program\Repository\FreeModbus_Slaver-Master-RTT-STM32\APP\src\app_task.c 6 | GB2312 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/EWARM/settings/EasyLogger_stm32f103xE.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ShowInfoWin = 1 3 | EnableFlashBP = 2 4 | BPDuringExecution = 0 5 | [CFI] 6 | CFISize = 0x00 7 | CFIAddr = 0x00 8 | [CPU] 9 | OverrideMemMap = 0 10 | AllowSimulation = 1 11 | ScriptFile="" 12 | [FLASH] 13 | MinNumBytesFlashDL = 0 14 | SkipProgOnCRCMatch = 1 15 | VerifyDownload = 1 16 | AllowCaching = 1 17 | EnableFlashDL = 2 18 | Override = 0 19 | Device="UNSPECIFIED" 20 | [GENERAL] 21 | WorkRAMSize = 0x00 22 | WorkRAMAddr = 0x00 23 | [SWO] 24 | SWOLogFile="" 25 | [MEM] 26 | RdOverrideOrMask = 0x00 27 | RdOverrideAndMask = 0xFFFFFFFF 28 | RdOverrideAddr = 0xFFFFFFFF 29 | WrOverrideOrMask = 0x00 30 | WrOverrideAndMask = 0xFFFFFFFF 31 | WrOverrideAddr = 0xFFFFFFFF 32 | -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/Libraries/CMSIS_EWARM/CM3/DeviceSupport/ST/STM32F10x/stm32f10x.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/non_os/stm32f10x/Libraries/CMSIS_EWARM/CM3/DeviceSupport/ST/STM32F10x/stm32f10x.h -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/Libraries/CMSIS_EWARM/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file system_stm32f10x.h 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Header File. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 17 | * 18 | *

© COPYRIGHT 2011 STMicroelectronics

19 | ****************************************************************************** 20 | */ 21 | 22 | /** @addtogroup CMSIS 23 | * @{ 24 | */ 25 | 26 | /** @addtogroup stm32f10x_system 27 | * @{ 28 | */ 29 | 30 | /** 31 | * @brief Define to prevent recursive inclusion 32 | */ 33 | #ifndef __SYSTEM_STM32F10X_H 34 | #define __SYSTEM_STM32F10X_H 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | /** @addtogroup STM32F10x_System_Includes 41 | * @{ 42 | */ 43 | 44 | /** 45 | * @} 46 | */ 47 | 48 | 49 | /** @addtogroup STM32F10x_System_Exported_types 50 | * @{ 51 | */ 52 | 53 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 54 | 55 | /** 56 | * @} 57 | */ 58 | 59 | /** @addtogroup STM32F10x_System_Exported_Constants 60 | * @{ 61 | */ 62 | 63 | /** 64 | * @} 65 | */ 66 | 67 | /** @addtogroup STM32F10x_System_Exported_Macros 68 | * @{ 69 | */ 70 | 71 | /** 72 | * @} 73 | */ 74 | 75 | /** @addtogroup STM32F10x_System_Exported_Functions 76 | * @{ 77 | */ 78 | 79 | extern void SystemInit(void); 80 | extern void SystemCoreClockUpdate(void); 81 | /** 82 | * @} 83 | */ 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | 89 | #endif /*__SYSTEM_STM32F10X_H */ 90 | 91 | /** 92 | * @} 93 | */ 94 | 95 | /** 96 | * @} 97 | */ 98 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 99 | -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/Libraries/CMSIS_EWARM/CMSIS END USER LICENCE AGREEMENT.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/non_os/stm32f10x/Libraries/CMSIS_EWARM/CMSIS END USER LICENCE AGREEMENT.pdf -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/Libraries/CMSIS_EWARM/CMSIS debug support.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/non_os/stm32f10x/Libraries/CMSIS_EWARM/CMSIS debug support.htm -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/Libraries/CMSIS_EWARM/Documentation/CMSIS_Core.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/non_os/stm32f10x/Libraries/CMSIS_EWARM/Documentation/CMSIS_Core.htm -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/Libraries/CMSIS_EWARM/Include/arm_common_tables.h: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------- 2 | * Copyright (C) 2010 ARM Limited. All rights reserved. 3 | * 4 | * $Date: 11. November 2010 5 | * $Revision: V1.0.2 6 | * 7 | * Project: CMSIS DSP Library 8 | * Title: arm_common_tables.h 9 | * 10 | * Description: This file has extern declaration for common tables like Bitreverse, reciprocal etc which are used across different functions 11 | * 12 | * Target Processor: Cortex-M4/Cortex-M3 13 | * 14 | * Version 1.0.2 2010/11/11 15 | * Documentation updated. 16 | * 17 | * Version 1.0.1 2010/10/05 18 | * Production release and review comments incorporated. 19 | * 20 | * Version 1.0.0 2010/09/20 21 | * Production release and review comments incorporated. 22 | * -------------------------------------------------------------------- */ 23 | 24 | #ifndef _ARM_COMMON_TABLES_H 25 | #define _ARM_COMMON_TABLES_H 26 | 27 | #include "arm_math.h" 28 | 29 | extern const uint16_t armBitRevTable[1024]; 30 | extern const q15_t armRecipTableQ15[64]; 31 | extern const q31_t armRecipTableQ31[64]; 32 | extern const q31_t realCoefAQ31[1024]; 33 | extern const q31_t realCoefBQ31[1024]; 34 | extern const float32_t twiddleCoef[6144]; 35 | extern const q31_t twiddleCoefQ31[6144]; 36 | extern const q15_t twiddleCoefQ15[6144]; 37 | 38 | #endif /* ARM_COMMON_TABLES_H */ 39 | -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/Libraries/CMSIS_EWARM/License.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/non_os/stm32f10x/Libraries/CMSIS_EWARM/License.doc -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/Libraries/CMSIS_EWARM/README.txt: -------------------------------------------------------------------------------- 1 | * ------------------------------------------------------------------- 2 | * Copyright (C) 2011-2012 ARM Limited. All rights reserved. 3 | * 4 | * Date: 07 March 2012 5 | * Revision: V3.01 6 | * 7 | * Project: Cortex Microcontroller Software Interface Standard (CMSIS) 8 | * Title: Release Note for CMSIS 9 | * 10 | * ------------------------------------------------------------------- 11 | 12 | 13 | NOTE - Open the index.html file to access CMSIS documentation 14 | 15 | 16 | The Cortex Microcontroller Software Interface Standard (CMSIS) provides a single standard across all 17 | Cortex-Mx processor series vendors. It enables code re-use and code sharing across software projects 18 | and reduces time-to-market for new embedded applications. 19 | 20 | CMSIS is released under the terms of the end user license agreement ("CMSIS END USER LICENCE AGREEMENT.pdf"). 21 | Any user of the software package is bound to the terms and conditions of the end user license agreement. 22 | 23 | 24 | You will find the following sub-directories: 25 | 26 | Documentation - Contains CMSIS documentation. 27 | 28 | DSP_Lib - MDK project files, Examples and source files etc.. to build the 29 | CMSIS DSP Software Library for Cortex-M0, Cortex-M3, Cortex-M4 processors. 30 | 31 | Include - CMSIS Core Support and CMSIS DSP Include Files. 32 | 33 | Lib - CMSIS DSP Libraries. 34 | 35 | RTOS - CMSIS RTOS API template header file. 36 | 37 | SVD - CMSIS SVD Schema files and Conversion Utility. 38 | -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/Libraries/CMSIS_EWARM/index.htm: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Redirect to the CMSIS main page after 0 seconds 5 | 6 | 7 | 8 | 9 | 10 | 11 | If the automatic redirection is failing, click open CMSIS Documentation. 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/Libraries/CMSIS_EWARM/readme_patch.txt: -------------------------------------------------------------------------------- 1 | No CMSIS patch is included in this version. 2 | -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/Libraries/CMSIS_RVMDK/CM3/DeviceSupport/ST/STM32F10x/stm32f10x.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/non_os/stm32f10x/Libraries/CMSIS_RVMDK/CM3/DeviceSupport/ST/STM32F10x/stm32f10x.h -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/Libraries/CMSIS_RVMDK/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file system_stm32f10x.h 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Header File. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 17 | * 18 | *

© COPYRIGHT 2011 STMicroelectronics

19 | ****************************************************************************** 20 | */ 21 | 22 | /** @addtogroup CMSIS 23 | * @{ 24 | */ 25 | 26 | /** @addtogroup stm32f10x_system 27 | * @{ 28 | */ 29 | 30 | /** 31 | * @brief Define to prevent recursive inclusion 32 | */ 33 | #ifndef __SYSTEM_STM32F10X_H 34 | #define __SYSTEM_STM32F10X_H 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | /** @addtogroup STM32F10x_System_Includes 41 | * @{ 42 | */ 43 | 44 | /** 45 | * @} 46 | */ 47 | 48 | 49 | /** @addtogroup STM32F10x_System_Exported_types 50 | * @{ 51 | */ 52 | 53 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 54 | 55 | /** 56 | * @} 57 | */ 58 | 59 | /** @addtogroup STM32F10x_System_Exported_Constants 60 | * @{ 61 | */ 62 | 63 | /** 64 | * @} 65 | */ 66 | 67 | /** @addtogroup STM32F10x_System_Exported_Macros 68 | * @{ 69 | */ 70 | 71 | /** 72 | * @} 73 | */ 74 | 75 | /** @addtogroup STM32F10x_System_Exported_Functions 76 | * @{ 77 | */ 78 | 79 | extern void SystemInit(void); 80 | extern void SystemCoreClockUpdate(void); 81 | /** 82 | * @} 83 | */ 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | 89 | #endif /*__SYSTEM_STM32F10X_H */ 90 | 91 | /** 92 | * @} 93 | */ 94 | 95 | /** 96 | * @} 97 | */ 98 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 99 | -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/Libraries/CMSIS_RVMDK/CMSIS debug support.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/non_os/stm32f10x/Libraries/CMSIS_RVMDK/CMSIS debug support.htm -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/Libraries/CMSIS_RVMDK/Documentation/CMSIS_Core.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/non_os/stm32f10x/Libraries/CMSIS_RVMDK/Documentation/CMSIS_Core.htm -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/Libraries/CMSIS_RVMDK/License.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/non_os/stm32f10x/Libraries/CMSIS_RVMDK/License.doc -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_crc.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f10x_crc.h 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief This file contains all the functions prototypes for the CRC firmware 8 | * library. 9 | ****************************************************************************** 10 | * @attention 11 | * 12 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 13 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 14 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 15 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 16 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 17 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 18 | * 19 | *

© COPYRIGHT 2011 STMicroelectronics

20 | ****************************************************************************** 21 | */ 22 | 23 | /* Define to prevent recursive inclusion -------------------------------------*/ 24 | #ifndef __STM32F10x_CRC_H 25 | #define __STM32F10x_CRC_H 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | /* Includes ------------------------------------------------------------------*/ 32 | #include "stm32f10x.h" 33 | 34 | /** @addtogroup STM32F10x_StdPeriph_Driver 35 | * @{ 36 | */ 37 | 38 | /** @addtogroup CRC 39 | * @{ 40 | */ 41 | 42 | /** @defgroup CRC_Exported_Types 43 | * @{ 44 | */ 45 | 46 | /** 47 | * @} 48 | */ 49 | 50 | /** @defgroup CRC_Exported_Constants 51 | * @{ 52 | */ 53 | 54 | /** 55 | * @} 56 | */ 57 | 58 | /** @defgroup CRC_Exported_Macros 59 | * @{ 60 | */ 61 | 62 | /** 63 | * @} 64 | */ 65 | 66 | /** @defgroup CRC_Exported_Functions 67 | * @{ 68 | */ 69 | 70 | void CRC_ResetDR(void); 71 | uint32_t CRC_CalcCRC(uint32_t Data); 72 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength); 73 | uint32_t CRC_GetCRC(void); 74 | void CRC_SetIDRegister(uint8_t IDValue); 75 | uint8_t CRC_GetIDRegister(void); 76 | 77 | #ifdef __cplusplus 78 | } 79 | #endif 80 | 81 | #endif /* __STM32F10x_CRC_H */ 82 | /** 83 | * @} 84 | */ 85 | 86 | /** 87 | * @} 88 | */ 89 | 90 | /** 91 | * @} 92 | */ 93 | 94 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 95 | -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/non_os/stm32f10x/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/non_os/stm32f10x/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.c -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/non_os/stm32f10x/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/non_os/stm32f10x/README.md -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/RVMDK/.gitignore: -------------------------------------------------------------------------------- 1 | /Output 2 | -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/RVMDK/JLink Regs CM3.txt: -------------------------------------------------------------------------------- 1 | 0: R0: 0x00 2 | 1: R1: 0x01 3 | 2: R2: 0x02 4 | 3: R3: 0x03 5 | 4: R4: 0x04 6 | 5: R5: 0x05 7 | 6: R6: 0x06 8 | 7: R7: 0x07 9 | 8: R8: 0x08 10 | 9: R9: 0x09 11 | 10: R10: 0x0a 12 | 11: R11: 0x0b 13 | 12: R12: 0x0c 14 | 13: R13: 0x0d 15 | 14: R14: 0x0e 16 | 15: R15: 0x0f 17 | 16: XPSR: 0x10 18 | 17: MSP: 0x11 19 | 18: PSP: 0x12 20 | 19: RAZ: 0x13 21 | 20: CFBP: 0x14 22 | 21: APSR: 0x15 23 | 22: EPSR: 0x16 24 | 23: IPSR: 0x17 25 | 24: PRIMASK: 0x18 26 | 25: BASEPRI: 0x19 27 | 26: FAULTMASK: 0x1a 28 | 27: CONTROL: 0x1b 29 | 28: BASEPRI_MAX: 0x1c 30 | 29: IAPSR: 0x1d 31 | 30: EAPSR: 0x1e 32 | 31: IEPSR: 0x1f 33 | -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/RVMDK/JLinkSettings.ini: -------------------------------------------------------------------------------- 1 | [FLASH] 2 | SkipProgOnCRCMatch = 1 3 | VerifyDownload = 1 4 | AllowCaching = 1 5 | EnableFlashDL = 2 6 | Override = 0 7 | Device="ADUC7020X62" 8 | [BREAKPOINTS] 9 | ShowInfoWin = 1 10 | EnableFlashBP = 2 11 | BPDuringExecution = 0 12 | [CPU] 13 | OverrideMemMap = 0 14 | AllowSimulation = 1 15 | ScriptFile="" 16 | [SWO] 17 | SWOLogFile="" 18 | -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/app/inc/stm32f10x_it.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file Project/Template/stm32f10x_it.h 4 | * @author MCD Application Team 5 | * @version V3.1.0 6 | * @date 06/19/2009 7 | * @brief This file contains the headers of the interrupt handlers. 8 | ****************************************************************************** 9 | * @copy 10 | * 11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 17 | * 18 | *

© COPYRIGHT 2009 STMicroelectronics

19 | */ 20 | 21 | /* Define to prevent recursive inclusion -------------------------------------*/ 22 | #ifndef __STM32F10x_IT_H 23 | #define __STM32F10x_IT_H 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | /* Includes ------------------------------------------------------------------*/ 30 | 31 | #include "bsp.h" 32 | 33 | /* Exported types ------------------------------------------------------------*/ 34 | /* Exported constants --------------------------------------------------------*/ 35 | /* Exported macro ------------------------------------------------------------*/ 36 | /* Exported functions ------------------------------------------------------- */ 37 | 38 | void NMI_Handler(void); 39 | void HardFault_Handler(void); 40 | void MemManage_Handler(void); 41 | void BusFault_Handler(void); 42 | void UsageFault_Handler(void); 43 | void SVC_Handler(void); 44 | void DebugMon_Handler(void); 45 | void PendSV_Handler(void); 46 | void SysTick_Handler(void); 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif /* __STM32F10x_IT_H */ 53 | 54 | /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/ 55 | -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/components/easylogger/inc/elog_cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the EasyLogger Library. 3 | * 4 | * Copyright (c) 2015, Armink, 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining 7 | * a copy of this software and associated documentation files (the 8 | * 'Software'), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sublicense, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject to 12 | * the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be 15 | * included in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | * 25 | * Function: It is the configure head file for this library. 26 | * Created on: 2015-07-30 27 | */ 28 | 29 | #ifndef _ELOG_CFG_H_ 30 | #define _ELOG_CFG_H_ 31 | 32 | /* enable log output. default open this macro */ 33 | #define ELOG_OUTPUT_ENABLE 34 | /* setting static output log level */ 35 | #define ELOG_OUTPUT_LVL ELOG_LVL_VERBOSE 36 | /* enable assert check */ 37 | #define ELOG_ASSERT_ENABLE 38 | /* buffer size for every line's log */ 39 | #define ELOG_LINE_BUF_SIZE 256 40 | /* output line number max length */ 41 | #define ELOG_LINE_NUM_MAX_LEN 5 42 | /* output filter's tag max length */ 43 | #define ELOG_FILTER_TAG_MAX_LEN 16 44 | /* output filter's keyword max length */ 45 | #define ELOG_FILTER_KW_MAX_LEN 16 46 | /* output filter's tag level max num */ 47 | #define ELOG_FILTER_TAG_LVL_MAX_NUM 5 48 | /* output newline sign */ 49 | #define ELOG_NEWLINE_SIGN "\r\n" 50 | 51 | #endif /* _ELOG_CFG_H_ */ 52 | -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/components/easylogger/port/elog_port.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the EasyLogger Library. 3 | * 4 | * Copyright (c) 2015, Armink, 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining 7 | * a copy of this software and associated documentation files (the 8 | * 'Software'), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sublicense, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject to 12 | * the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be 15 | * included in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | * 25 | * Function: Portable interface for non-os stm32f10x. 26 | * Created on: 2015-04-28 27 | */ 28 | 29 | #include "elog.h" 30 | #include 31 | #include 32 | 33 | /** 34 | * EasyLogger port initialize 35 | * 36 | * @return result 37 | */ 38 | ElogErrCode elog_port_init(void) { 39 | ElogErrCode result = ELOG_NO_ERR; 40 | 41 | return result; 42 | } 43 | 44 | /** 45 | * output log port interface 46 | * 47 | * @param log output of log 48 | * @param size log size 49 | */ 50 | void elog_port_output(const char *log, size_t size) { 51 | /* output to terminal */ 52 | printf("%.*s", size, log); 53 | //TODO output to flash 54 | } 55 | 56 | /** 57 | * output lock 58 | */ 59 | void elog_port_output_lock(void) { 60 | __disable_irq(); 61 | } 62 | 63 | /** 64 | * output unlock 65 | */ 66 | void elog_port_output_unlock(void) { 67 | __enable_irq(); 68 | } 69 | 70 | /** 71 | * get current time interface 72 | * 73 | * @return current time 74 | */ 75 | const char *elog_port_get_time(void) { 76 | return "10:08:12"; 77 | } 78 | 79 | /** 80 | * get current process name interface 81 | * 82 | * @return current process name 83 | */ 84 | const char *elog_port_get_p_info(void) { 85 | return "pid:1008"; 86 | } 87 | 88 | /** 89 | * get current thread name interface 90 | * 91 | * @return current thread name 92 | */ 93 | const char *elog_port_get_t_info(void) { 94 | return "tid:24"; 95 | } 96 | -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/components/others/bsp.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/non_os/stm32f10x/components/others/bsp.c -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/components/others/stm32f103xB.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000; 6 | /* software version and hardware version store start address */ 7 | define symbol __ICFEDIT_version_start__ = __ICFEDIT_intvec_start__ + 512; 8 | /*-Memory Regions-*/ 9 | define symbol __ICFEDIT_region_ROM_start__ = __ICFEDIT_intvec_start__; 10 | define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF; 11 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; 12 | define symbol __ICFEDIT_region_RAM_end__ = 0x20004FFF; 13 | /*-Sizes-*/ 14 | define symbol __ICFEDIT_size_cstack__ = 0x800; 15 | define symbol __ICFEDIT_size_heap__ = 0x800; 16 | 17 | /**** End of ICF editor section. ###ICF###*/ 18 | 19 | define memory mem with size = 4G; 20 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 21 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 22 | 23 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 24 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 25 | 26 | initialize by copy { readwrite }; 27 | do not initialize { section .noinit }; 28 | 29 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 30 | 31 | place in ROM_region { readonly }; 32 | place in RAM_region { readwrite, 33 | block CSTACK, block HEAP }; 34 | 35 | /* armink add for version storage */ 36 | keep { section .version }; 37 | place at address mem:__ICFEDIT_version_start__ { readonly section .version }; 38 | 39 | /* armink add for rtt finsh */ 40 | keep { section FSymTab }; 41 | keep { section VSymTab }; -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/components/others/stm32f103xE.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000; 6 | /* software version and hardware version store start address */ 7 | define symbol __ICFEDIT_version_start__ = __ICFEDIT_intvec_start__ + 512; 8 | /*-Memory Regions-*/ 9 | define symbol __ICFEDIT_region_ROM_start__ = __ICFEDIT_intvec_start__; 10 | define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF; 11 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; 12 | define symbol __ICFEDIT_region_RAM_end__ = 0x2000FFFF; 13 | /*-Sizes-*/ 14 | define symbol __ICFEDIT_size_cstack__ = 0x1000; 15 | define symbol __ICFEDIT_size_heap__ = 0x1000; 16 | 17 | /**** End of ICF editor section. ###ICF###*/ 18 | 19 | define memory mem with size = 4G; 20 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 21 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 22 | 23 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 24 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 25 | 26 | initialize by copy { readwrite }; 27 | do not initialize { section .noinit }; 28 | 29 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 30 | 31 | place in ROM_region { readonly }; 32 | place in RAM_region { readwrite, 33 | block CSTACK, block HEAP }; 34 | 35 | /* armink add for version storage */ 36 | keep { section .version }; 37 | place at address mem:__ICFEDIT_version_start__ { readonly section .version }; 38 | 39 | /* armink add for rtt finsh */ 40 | keep { section FSymTab }; 41 | keep { section VSymTab }; -------------------------------------------------------------------------------- /demo/non_os/stm32f10x/components/others/types.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef TYPES_H_ 3 | #define TYPES_H_ 4 | 5 | #include 6 | #include 7 | typedef int bool_t; /**< boolean type */ 8 | 9 | #ifndef TRUE 10 | #define TRUE 1 11 | #endif 12 | 13 | #ifndef FALSE 14 | #define FALSE 0 15 | #endif 16 | 17 | #ifndef NULL 18 | #define NULL 0 19 | #endif 20 | 21 | #define success 0 22 | #define fail 1 23 | 24 | 25 | #ifndef disable 26 | #define disable 0 27 | #endif 28 | 29 | #ifndef enable 30 | #define enable 1 31 | #endif 32 | 33 | #endif /* TYPES_H_ */ 34 | -------------------------------------------------------------------------------- /demo/os/cube-freertos/nucleo-g070rb/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | nucleo-g070rb 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 | com.st.stm32cube.ide.mcu.MCUProjectNature 23 | org.eclipse.cdt.core.cnature 24 | com.st.stm32cube.ide.mcu.MCUCubeIdeServicesRevAev2ProjectNature 25 | com.st.stm32cube.ide.mcu.MCUCubeProjectNature 26 | com.st.stm32cube.ide.mcu.MCUAdvancedStructureProjectNature 27 | com.st.stm32cube.ide.mcu.MCUSingleCpuProjectNature 28 | com.st.stm32cube.ide.mcu.MCURootProjectNature 29 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 30 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 31 | 32 | 33 | 34 | easylogger 35 | 2 36 | C:/Users/yekai/Documents/GitHub/EasyLogger/easylogger 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /demo/os/cube-freertos/nucleo-g070rb/.settings/language.settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /demo/os/cube-freertos/nucleo-g070rb/.settings/stm32cubeide.project.prefs: -------------------------------------------------------------------------------- 1 | 8DF89ED150041C4CBC7CB9A9CAA90856=3D0897469B68C4000654EAB7639777A7 2 | DC22A860405A8BF2F2C095E5B6529F12=62356375CBB8ABFAC902527942C70DE8 3 | eclipse.preferences.version=1 4 | -------------------------------------------------------------------------------- /demo/os/cube-freertos/nucleo-g070rb/Core/Inc/dma.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file dma.h 5 | * @brief This file contains all the function prototypes for 6 | * the dma.c file 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | * Copyright (c) 2022 STMicroelectronics. 11 | * All rights reserved. 12 | * 13 | * This software is licensed under terms that can be found in the LICENSE file 14 | * in the root directory of this software component. 15 | * If no LICENSE file comes with this software, it is provided AS-IS. 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* USER CODE END Header */ 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __DMA_H__ 22 | #define __DMA_H__ 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "main.h" 30 | 31 | /* DMA memory to memory transfer handles -------------------------------------*/ 32 | 33 | /* USER CODE BEGIN Includes */ 34 | 35 | /* USER CODE END Includes */ 36 | 37 | /* USER CODE BEGIN Private defines */ 38 | 39 | /* USER CODE END Private defines */ 40 | 41 | void MX_DMA_Init(void); 42 | 43 | /* USER CODE BEGIN Prototypes */ 44 | 45 | /* USER CODE END Prototypes */ 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif /* __DMA_H__ */ 52 | 53 | -------------------------------------------------------------------------------- /demo/os/cube-freertos/nucleo-g070rb/Core/Inc/gpio.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file gpio.h 5 | * @brief This file contains all the function prototypes for 6 | * the gpio.c file 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | * Copyright (c) 2022 STMicroelectronics. 11 | * All rights reserved. 12 | * 13 | * This software is licensed under terms that can be found in the LICENSE file 14 | * in the root directory of this software component. 15 | * If no LICENSE file comes with this software, it is provided AS-IS. 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* USER CODE END Header */ 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __GPIO_H__ 22 | #define __GPIO_H__ 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "main.h" 30 | 31 | /* USER CODE BEGIN Includes */ 32 | 33 | /* USER CODE END Includes */ 34 | 35 | /* USER CODE BEGIN Private defines */ 36 | 37 | /* USER CODE END Private defines */ 38 | 39 | void MX_GPIO_Init(void); 40 | 41 | /* USER CODE BEGIN Prototypes */ 42 | 43 | /* USER CODE END Prototypes */ 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | #endif /*__ GPIO_H__ */ 49 | 50 | -------------------------------------------------------------------------------- /demo/os/cube-freertos/nucleo-g070rb/Core/Inc/main.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : main.h 5 | * @brief : Header for main.c file. 6 | * This file contains the common defines of the application. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | * Copyright (c) 2022 STMicroelectronics. 11 | * All rights reserved. 12 | * 13 | * This software is licensed under terms that can be found in the LICENSE file 14 | * in the root directory of this software component. 15 | * If no LICENSE file comes with this software, it is provided AS-IS. 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* USER CODE END Header */ 20 | 21 | /* Define to prevent recursive inclusion -------------------------------------*/ 22 | #ifndef __MAIN_H 23 | #define __MAIN_H 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | /* Includes ------------------------------------------------------------------*/ 30 | #include "stm32g0xx_hal.h" 31 | 32 | /* Private includes ----------------------------------------------------------*/ 33 | /* USER CODE BEGIN Includes */ 34 | 35 | /* USER CODE END Includes */ 36 | 37 | /* Exported types ------------------------------------------------------------*/ 38 | /* USER CODE BEGIN ET */ 39 | 40 | /* USER CODE END ET */ 41 | 42 | /* Exported constants --------------------------------------------------------*/ 43 | /* USER CODE BEGIN EC */ 44 | 45 | /* USER CODE END EC */ 46 | 47 | /* Exported macro ------------------------------------------------------------*/ 48 | /* USER CODE BEGIN EM */ 49 | 50 | /* USER CODE END EM */ 51 | 52 | /* Exported functions prototypes ---------------------------------------------*/ 53 | void Error_Handler(void); 54 | 55 | /* USER CODE BEGIN EFP */ 56 | 57 | /* USER CODE END EFP */ 58 | 59 | /* Private defines -----------------------------------------------------------*/ 60 | #define MCO_Pin GPIO_PIN_0 61 | #define MCO_GPIO_Port GPIOF 62 | #define LED_GREEN_Pin GPIO_PIN_5 63 | #define LED_GREEN_GPIO_Port GPIOA 64 | #define TMS_Pin GPIO_PIN_13 65 | #define TMS_GPIO_Port GPIOA 66 | #define TCK_Pin GPIO_PIN_14 67 | #define TCK_GPIO_Port GPIOA 68 | /* USER CODE BEGIN Private defines */ 69 | 70 | /* USER CODE END Private defines */ 71 | 72 | #ifdef __cplusplus 73 | } 74 | #endif 75 | 76 | #endif /* __MAIN_H */ 77 | -------------------------------------------------------------------------------- /demo/os/cube-freertos/nucleo-g070rb/Core/Inc/stm32g0xx_it.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file stm32g0xx_it.h 5 | * @brief This file contains the headers of the interrupt handlers. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | * Copyright (c) 2022 STMicroelectronics. 10 | * All rights reserved. 11 | * 12 | * This software is licensed under terms that can be found in the LICENSE file 13 | * in the root directory of this software component. 14 | * If no LICENSE file comes with this software, it is provided AS-IS. 15 | * 16 | ****************************************************************************** 17 | */ 18 | /* USER CODE END Header */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __STM32G0xx_IT_H 22 | #define __STM32G0xx_IT_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Private includes ----------------------------------------------------------*/ 29 | /* USER CODE BEGIN Includes */ 30 | 31 | /* USER CODE END Includes */ 32 | 33 | /* Exported types ------------------------------------------------------------*/ 34 | /* USER CODE BEGIN ET */ 35 | 36 | /* USER CODE END ET */ 37 | 38 | /* Exported constants --------------------------------------------------------*/ 39 | /* USER CODE BEGIN EC */ 40 | 41 | /* USER CODE END EC */ 42 | 43 | /* Exported macro ------------------------------------------------------------*/ 44 | /* USER CODE BEGIN EM */ 45 | 46 | /* USER CODE END EM */ 47 | 48 | /* Exported functions prototypes ---------------------------------------------*/ 49 | void NMI_Handler(void); 50 | void HardFault_Handler(void); 51 | void DMA1_Channel1_IRQHandler(void); 52 | void TIM1_BRK_UP_TRG_COM_IRQHandler(void); 53 | void USART2_IRQHandler(void); 54 | /* USER CODE BEGIN EFP */ 55 | 56 | /* USER CODE END EFP */ 57 | 58 | #ifdef __cplusplus 59 | } 60 | #endif 61 | 62 | #endif /* __STM32G0xx_IT_H */ 63 | -------------------------------------------------------------------------------- /demo/os/cube-freertos/nucleo-g070rb/Core/Inc/usart.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file usart.h 5 | * @brief This file contains all the function prototypes for 6 | * the usart.c file 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | * Copyright (c) 2022 STMicroelectronics. 11 | * All rights reserved. 12 | * 13 | * This software is licensed under terms that can be found in the LICENSE file 14 | * in the root directory of this software component. 15 | * If no LICENSE file comes with this software, it is provided AS-IS. 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* USER CODE END Header */ 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __USART_H__ 22 | #define __USART_H__ 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "main.h" 30 | 31 | /* USER CODE BEGIN Includes */ 32 | 33 | /* USER CODE END Includes */ 34 | 35 | extern UART_HandleTypeDef huart2; 36 | 37 | /* USER CODE BEGIN Private defines */ 38 | 39 | /* USER CODE END Private defines */ 40 | 41 | void MX_USART2_UART_Init(void); 42 | 43 | /* USER CODE BEGIN Prototypes */ 44 | 45 | /* USER CODE END Prototypes */ 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif /* __USART_H__ */ 52 | 53 | -------------------------------------------------------------------------------- /demo/os/cube-freertos/nucleo-g070rb/Core/Src/dma.c: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file dma.c 5 | * @brief This file provides code for the configuration 6 | * of all the requested memory to memory DMA transfers. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | * Copyright (c) 2022 STMicroelectronics. 11 | * All rights reserved. 12 | * 13 | * This software is licensed under terms that can be found in the LICENSE file 14 | * in the root directory of this software component. 15 | * If no LICENSE file comes with this software, it is provided AS-IS. 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* USER CODE END Header */ 20 | 21 | /* Includes ------------------------------------------------------------------*/ 22 | #include "dma.h" 23 | 24 | /* USER CODE BEGIN 0 */ 25 | 26 | /* USER CODE END 0 */ 27 | 28 | /*----------------------------------------------------------------------------*/ 29 | /* Configure DMA */ 30 | /*----------------------------------------------------------------------------*/ 31 | 32 | /* USER CODE BEGIN 1 */ 33 | 34 | /* USER CODE END 1 */ 35 | 36 | /** 37 | * Enable DMA controller clock 38 | */ 39 | void MX_DMA_Init(void) 40 | { 41 | 42 | /* DMA controller clock enable */ 43 | __HAL_RCC_DMA1_CLK_ENABLE(); 44 | 45 | /* DMA interrupt init */ 46 | /* DMA1_Channel1_IRQn interrupt configuration */ 47 | HAL_NVIC_SetPriority(DMA1_Channel1_IRQn, 3, 0); 48 | HAL_NVIC_EnableIRQ(DMA1_Channel1_IRQn); 49 | 50 | } 51 | 52 | /* USER CODE BEGIN 2 */ 53 | 54 | /* USER CODE END 2 */ 55 | 56 | -------------------------------------------------------------------------------- /demo/os/cube-freertos/nucleo-g070rb/Core/Src/gpio.c: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file gpio.c 5 | * @brief This file provides code for the configuration 6 | * of all used GPIO pins. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | * Copyright (c) 2022 STMicroelectronics. 11 | * All rights reserved. 12 | * 13 | * This software is licensed under terms that can be found in the LICENSE file 14 | * in the root directory of this software component. 15 | * If no LICENSE file comes with this software, it is provided AS-IS. 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* USER CODE END Header */ 20 | 21 | /* Includes ------------------------------------------------------------------*/ 22 | #include "gpio.h" 23 | 24 | /* USER CODE BEGIN 0 */ 25 | 26 | /* USER CODE END 0 */ 27 | 28 | /*----------------------------------------------------------------------------*/ 29 | /* Configure GPIO */ 30 | /*----------------------------------------------------------------------------*/ 31 | /* USER CODE BEGIN 1 */ 32 | 33 | /* USER CODE END 1 */ 34 | 35 | /** Configure pins as 36 | * Analog 37 | * Input 38 | * Output 39 | * EVENT_OUT 40 | * EXTI 41 | */ 42 | void MX_GPIO_Init(void) 43 | { 44 | 45 | GPIO_InitTypeDef GPIO_InitStruct = {0}; 46 | 47 | /* GPIO Ports Clock Enable */ 48 | __HAL_RCC_GPIOC_CLK_ENABLE(); 49 | __HAL_RCC_GPIOF_CLK_ENABLE(); 50 | __HAL_RCC_GPIOA_CLK_ENABLE(); 51 | 52 | /*Configure GPIO pin Output Level */ 53 | HAL_GPIO_WritePin(LED_GREEN_GPIO_Port, LED_GREEN_Pin, GPIO_PIN_RESET); 54 | 55 | /*Configure GPIO pin : PtPin */ 56 | GPIO_InitStruct.Pin = LED_GREEN_Pin; 57 | GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; 58 | GPIO_InitStruct.Pull = GPIO_NOPULL; 59 | GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; 60 | HAL_GPIO_Init(LED_GREEN_GPIO_Port, &GPIO_InitStruct); 61 | 62 | } 63 | 64 | /* USER CODE BEGIN 2 */ 65 | 66 | /* USER CODE END 2 */ 67 | -------------------------------------------------------------------------------- /demo/os/cube-freertos/nucleo-g070rb/Core/Src/stm32g0xx_hal_msp.c: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file stm32g0xx_hal_msp.c 5 | * @brief This file provides code for the MSP Initialization 6 | * and de-Initialization codes. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | * Copyright (c) 2022 STMicroelectronics. 11 | * All rights reserved. 12 | * 13 | * This software is licensed under terms that can be found in the LICENSE file 14 | * in the root directory of this software component. 15 | * If no LICENSE file comes with this software, it is provided AS-IS. 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* USER CODE END Header */ 20 | 21 | /* Includes ------------------------------------------------------------------*/ 22 | #include "main.h" 23 | /* USER CODE BEGIN Includes */ 24 | 25 | /* USER CODE END Includes */ 26 | 27 | /* Private typedef -----------------------------------------------------------*/ 28 | /* USER CODE BEGIN TD */ 29 | 30 | /* USER CODE END TD */ 31 | 32 | /* Private define ------------------------------------------------------------*/ 33 | /* USER CODE BEGIN Define */ 34 | 35 | /* USER CODE END Define */ 36 | 37 | /* Private macro -------------------------------------------------------------*/ 38 | /* USER CODE BEGIN Macro */ 39 | 40 | /* USER CODE END Macro */ 41 | 42 | /* Private variables ---------------------------------------------------------*/ 43 | /* USER CODE BEGIN PV */ 44 | 45 | /* USER CODE END PV */ 46 | 47 | /* Private function prototypes -----------------------------------------------*/ 48 | /* USER CODE BEGIN PFP */ 49 | 50 | /* USER CODE END PFP */ 51 | 52 | /* External functions --------------------------------------------------------*/ 53 | /* USER CODE BEGIN ExternalFunctions */ 54 | 55 | /* USER CODE END ExternalFunctions */ 56 | 57 | /* USER CODE BEGIN 0 */ 58 | 59 | /* USER CODE END 0 */ 60 | /** 61 | * Initializes the Global MSP. 62 | */ 63 | void HAL_MspInit(void) 64 | { 65 | /* USER CODE BEGIN MspInit 0 */ 66 | 67 | /* USER CODE END MspInit 0 */ 68 | 69 | __HAL_RCC_SYSCFG_CLK_ENABLE(); 70 | __HAL_RCC_PWR_CLK_ENABLE(); 71 | 72 | /* System interrupt init*/ 73 | /* PendSV_IRQn interrupt configuration */ 74 | HAL_NVIC_SetPriority(PendSV_IRQn, 3, 0); 75 | 76 | /* USER CODE BEGIN MspInit 1 */ 77 | 78 | /* USER CODE END MspInit 1 */ 79 | } 80 | 81 | /* USER CODE BEGIN 1 */ 82 | 83 | /* USER CODE END 1 */ 84 | -------------------------------------------------------------------------------- /demo/os/cube-freertos/nucleo-g070rb/Drivers/CMSIS/Device/ST/STM32G0xx/Include/system_stm32g0xx.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file system_stm32g0xx.h 4 | * @author MCD Application Team 5 | * @brief CMSIS Cortex-M0+ Device System Source File for STM32G0xx devices. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | * Copyright (c) 2018-2021 STMicroelectronics. 10 | * All rights reserved. 11 | * 12 | * This software is licensed under terms that can be found in the LICENSE file 13 | * in the root directory of this software component. 14 | * If no LICENSE file comes with this software, it is provided AS-IS. 15 | * 16 | ****************************************************************************** 17 | */ 18 | /** @addtogroup CMSIS 19 | * @{ 20 | */ 21 | 22 | /** @addtogroup stm32g0xx_system 23 | * @{ 24 | */ 25 | 26 | /** 27 | * @brief Define to prevent recursive inclusion 28 | */ 29 | #ifndef SYSTEM_STM32G0XX_H 30 | #define SYSTEM_STM32G0XX_H 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif 35 | 36 | /** @addtogroup STM32G0xx_System_Includes 37 | * @{ 38 | */ 39 | 40 | /** 41 | * @} 42 | */ 43 | 44 | 45 | /** @addtogroup STM32G0xx_System_Exported_types 46 | * @{ 47 | */ 48 | /* This variable is updated in three ways: 49 | 1) by calling CMSIS function SystemCoreClockUpdate() 50 | 2) by calling HAL API function HAL_RCC_GetSysClockFreq() 51 | 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency 52 | Note: If you use this function to configure the system clock; then there 53 | is no need to call the 2 first functions listed above, since SystemCoreClock 54 | variable is updated automatically. 55 | */ 56 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 57 | 58 | extern const uint32_t AHBPrescTable[16]; /*!< AHB prescalers table values */ 59 | extern const uint32_t APBPrescTable[8]; /*!< APB prescalers table values */ 60 | 61 | /** 62 | * @} 63 | */ 64 | 65 | /** @addtogroup STM32G0xx_System_Exported_Constants 66 | * @{ 67 | */ 68 | 69 | /** 70 | * @} 71 | */ 72 | 73 | /** @addtogroup STM32G0xx_System_Exported_Macros 74 | * @{ 75 | */ 76 | 77 | /** 78 | * @} 79 | */ 80 | 81 | /** @addtogroup STM32G0xx_System_Exported_Functions 82 | * @{ 83 | */ 84 | 85 | extern void SystemInit(void); 86 | extern void SystemCoreClockUpdate(void); 87 | /** 88 | * @} 89 | */ 90 | 91 | #ifdef __cplusplus 92 | } 93 | #endif 94 | 95 | #endif /*SYSTEM_STM32G0XX_H */ 96 | 97 | /** 98 | * @} 99 | */ 100 | 101 | /** 102 | * @} 103 | */ 104 | -------------------------------------------------------------------------------- /demo/os/cube-freertos/nucleo-g070rb/Drivers/CMSIS/Device/ST/STM32G0xx/LICENSE.txt: -------------------------------------------------------------------------------- 1 | This software component is provided to you as part of a software package and 2 | applicable license terms are in the Package_license file. If you received this 3 | software component outside of a package or without applicable license terms, 4 | the terms of the Apache-2.0 license shall apply. 5 | You may obtain a copy of the Apache-2.0 at: 6 | https://opensource.org/licenses/Apache-2.0 7 | -------------------------------------------------------------------------------- /demo/os/cube-freertos/nucleo-g070rb/Drivers/CMSIS/Include/cmsis_version.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file cmsis_version.h 3 | * @brief CMSIS Core(M) Version definitions 4 | * @version V5.0.3 5 | * @date 24. June 2019 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2009-2019 ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef __CMSIS_VERSION_H 32 | #define __CMSIS_VERSION_H 33 | 34 | /* CMSIS Version definitions */ 35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ 36 | #define __CM_CMSIS_VERSION_SUB ( 3U) /*!< [15:0] CMSIS Core(M) sub version */ 37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ 38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ 39 | #endif 40 | -------------------------------------------------------------------------------- /demo/os/cube-freertos/nucleo-g070rb/Drivers/STM32G0xx_HAL_Driver/LICENSE.txt: -------------------------------------------------------------------------------- 1 | This software component is provided to you as part of a software package and 2 | applicable license terms are in the Package_license file. If you received this 3 | software component outside of a package or without applicable license terms, 4 | the terms of the BSD-3-Clause license shall apply. 5 | You may obtain a copy of the BSD-3-Clause at: 6 | https://opensource.org/licenses/BSD-3-Clause 7 | -------------------------------------------------------------------------------- /demo/os/cube-freertos/nucleo-g070rb/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/freertos_mpool.h: -------------------------------------------------------------------------------- 1 | /* -------------------------------------------------------------------------- 2 | * Copyright (c) 2013-2020 Arm Limited. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the License); you may 7 | * not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 14 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | * Name: freertos_mpool.h 19 | * Purpose: CMSIS RTOS2 wrapper for FreeRTOS 20 | * 21 | *---------------------------------------------------------------------------*/ 22 | 23 | #ifndef FREERTOS_MPOOL_H_ 24 | #define FREERTOS_MPOOL_H_ 25 | 26 | #include 27 | #include "FreeRTOS.h" 28 | #include "semphr.h" 29 | 30 | /* Memory Pool implementation definitions */ 31 | #define MPOOL_STATUS 0x5EED0000U 32 | 33 | /* Memory Block header */ 34 | typedef struct { 35 | void *next; /* Pointer to next block */ 36 | } MemPoolBlock_t; 37 | 38 | /* Memory Pool control block */ 39 | typedef struct MemPoolDef_t { 40 | MemPoolBlock_t *head; /* Pointer to head block */ 41 | SemaphoreHandle_t sem; /* Pool semaphore handle */ 42 | uint8_t *mem_arr; /* Pool memory array */ 43 | uint32_t mem_sz; /* Pool memory array size */ 44 | const char *name; /* Pointer to name string */ 45 | uint32_t bl_sz; /* Size of a single block */ 46 | uint32_t bl_cnt; /* Number of blocks */ 47 | uint32_t n; /* Block allocation index */ 48 | volatile uint32_t status; /* Object status flags */ 49 | #if (configSUPPORT_STATIC_ALLOCATION == 1) 50 | StaticSemaphore_t mem_sem; /* Semaphore object memory */ 51 | #endif 52 | } MemPool_t; 53 | 54 | /* No need to hide static object type, just align to coding style */ 55 | #define StaticMemPool_t MemPool_t 56 | 57 | /* Define memory pool control block size */ 58 | #define MEMPOOL_CB_SIZE (sizeof(StaticMemPool_t)) 59 | 60 | /* Define size of the byte array required to create count of blocks of given size */ 61 | #define MEMPOOL_ARR_SIZE(bl_count, bl_size) (((((bl_size) + (4 - 1)) / 4) * 4)*(bl_count)) 62 | 63 | #endif /* FREERTOS_MPOOL_H_ */ 64 | -------------------------------------------------------------------------------- /demo/os/cube-freertos/nucleo-g070rb/Middlewares/Third_Party/FreeRTOS/Source/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | Permission is hereby granted, free of charge, to any person obtaining a copy of 3 | this software and associated documentation files (the "Software"), to deal in 4 | the Software without restriction, including without limitation the rights to 5 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 6 | the Software, and to permit persons to whom the Software is furnished to do so, 7 | subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all 10 | copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | -------------------------------------------------------------------------------- /demo/os/cube-freertos/nucleo-g070rb/README.md: -------------------------------------------------------------------------------- 1 | # NUCLEO-G070RB(基于STM32G070RBT6) FreeRTOS demo 2 | 3 | ## 1、简介 4 | 5 | 使用STM32CubeMX创建FreeRTOS工程,实现异步log输出的demo 6 | 7 | ## 2、使用方法 8 | 9 | 导入STM32CubeIDE,连接开发板下载使用。使用NUCLEO自带的STLinkV2-1的串口,配置115200 8 1 N,可观察到3种不同等级和颜色的HelloWorld。 10 | 11 | ## 3、文件(夹)说明 12 | 13 | * `Components/EasyLogger_Port`文件夹下为移植参考适配文件。 14 | * `Core/Src/main.c`添加了串口发送完成回调函数和elog初始化。 15 | * `Core/Src/app_freertos.c`中默认线程每间隔1秒发送一次log。 16 | 17 | ## 4、其他说明 18 | 19 | * 对于NUCLEO-G070RB的默认Cube工程,大致进行了如下修改:修改了系统时钟为64M;修改系统时钟源为TIM1,开启FreeRTOS,添加了log异步输出线程,添加了信号量,使能` USE_NEWLIB_REENTRANT `选项;串口数据字节改为8,添加串口发送DMA,打开串口中断。 20 | * 对于异步输出的线程(本demo中为`elog`线程)和需要使用elog的线程,推荐stack大小大于256word,使用Cube默认的128word可能会造成栈溢出。 21 | * 需要打开串口2的中断,而不仅仅是默认打开的DMA中断,才能在DMA传输完成后正常进入`HAL_UART_TxCpltCallback()`回调函数。 -------------------------------------------------------------------------------- /demo/os/linux/Makefile: -------------------------------------------------------------------------------- 1 | CC = cc 2 | 3 | ROOTPATH=../../.. 4 | INCLUDE = -I./easylogger/inc -I$(ROOTPATH)/easylogger/inc -I$(ROOTPATH)/easylogger/plugins/file 5 | LIB=-lpthread 6 | 7 | OBJ += $(patsubst %.c, %.o, $(wildcard *.c)) 8 | OBJ += $(patsubst %.c, %.o, $(wildcard $(ROOTPATH)/easylogger/src/*.c)) 9 | OBJ += $(patsubst %.c, %.o, $(wildcard $(ROOTPATH)/easylogger/plugins/file/elog_file.c)) 10 | OBJ += $(patsubst %.c, %.o, $(wildcard easylogger/port/*.c)) 11 | 12 | CFLAGS = -O0 -g3 -Wall 13 | target = EasyLoggerLinuxDemo 14 | 15 | all:$(OBJ) 16 | $(CC) out/*.o -o $(target) $(LIB) 17 | mv $(target) out 18 | %.o:%.c 19 | $(CC) $(CFLAGS) -c $< -o $@ $(INCLUDE) 20 | mv $@ out 21 | clean: 22 | rm -rf out/* 23 | -------------------------------------------------------------------------------- /demo/os/linux/README.md: -------------------------------------------------------------------------------- 1 | # linux demo 2 | 3 | --- 4 | 5 | ## 1、简介 6 | 7 | 使用GCC编译。通过 `main.c` 的 `test_elog()` 方法来测试日志的输出。已在 `easylogger\inc\elog_cfg.h` 开启异步输出模式。 8 | 9 | ### 1.1、使用方法 10 | 11 | 使用前需提前配置好编译环境,配置成功后,执行 make,等待编译完成后,运行 `out\EasyLoggerLinuxDemo` 即可看到运行结果。 12 | 13 | ## 2、文件(夹)说明 14 | 15 | - `easylogger\port\elog_port.c` 移植参考文件 16 | - easylogger\plugins\file\elog_file_port.c File Log功能移植参考文件 17 | 18 | ## 3、其他功能 19 | 20 | 可以打开 `main.c` 中的部分注释,来测试以下功能。 21 | 22 | - `elog_set_output_enabled(false);` :动态使能或失能日志输出 23 | - `elog_set_filter_lvl(ELOG_LVL_WARN);` :动态设置过滤优先级 24 | - `elog_set_filter_tag("main");` :动态设置过滤标签 25 | - `elog_set_filter_kw("Hello");` :动态设置过滤关键词 26 | - `elog_set_filter_tag_lvl("main", ELOG_LVL_WARN);` :动态设置过滤关键词级别 27 | -------------------------------------------------------------------------------- /demo/os/linux/easylogger/inc/elog_file_cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the EasyLogger Library. 3 | * 4 | * Copyright (c) 2015-2019, Qintl, 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining 7 | * a copy of this software and associated documentation files (the 8 | * 'Software'), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sublicense, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject to 12 | * the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be 15 | * included in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | * 25 | * Function: It is the configure head file for this flash log plugin. 26 | * Created on: 2019-01-05 27 | */ 28 | 29 | #ifndef _ELOG_FILE_CFG_H_ 30 | #define _ELOG_FILE_CFG_H_ 31 | 32 | /* EasyLogger file log plugin's using file name */ 33 | #define ELOG_FILE_NAME "/tmp/elog_file.log" 34 | 35 | /* EasyLogger file log plugin's using file max size */ 36 | #define ELOG_FILE_MAX_SIZE (1 * 1024 * 1024) 37 | 38 | /* EasyLogger file log plugin's using max rotate file count */ 39 | #define ELOG_FILE_MAX_ROTATE 5 40 | 41 | #endif /* _ELOG_FILE_CFG_H_ */ 42 | -------------------------------------------------------------------------------- /demo/os/linux/out/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.exe 3 | EasyLoggerLinuxDemo 4 | -------------------------------------------------------------------------------- /demo/os/nuttx-spiflash/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/os/nuttx-spiflash/README.md -------------------------------------------------------------------------------- /demo/os/nuttx-spiflash/apps/examples/easylogger/Kconfig: -------------------------------------------------------------------------------- 1 | # 2 | # For a description of the syntax of this configuration file, 3 | # see the file kconfig-language.txt in the NuttX tools repository. 4 | # 5 | 6 | config EXAMPLES_EASYLOGGER 7 | tristate "Easylogger and EasyFlash Demo" 8 | default n 9 | select SYSTEM_EASYLOGGER 10 | select SYSTEM_EASYLOGGER_FLASH 11 | select SYSTEM_EASYFLASH 12 | select CONFIG_MTD 13 | select CONFIG_MTD_BYTE_WRITE 14 | select CONFIG_MTD_W25 15 | ---help--- 16 | Enable the Easylogger Demo 17 | 18 | if EXAMPLES_EASYLOGGER 19 | 20 | config EXAMPLES_EASYLOGGER_PROGNAME 21 | string "Program name" 22 | default "elog" 23 | ---help--- 24 | This is the name of the program that will be used when the NSH ELF 25 | program is installed. 26 | 27 | config EXAMPLES_EASYLOGGER_PRIORITY 28 | int "Easylogger task priority" 29 | default 100 30 | 31 | config EXAMPLES_EASYLOGGER_STACKSIZE 32 | int "Easylogger stack size" 33 | default DEFAULT_TASK_STACKSIZE 34 | 35 | endif 36 | -------------------------------------------------------------------------------- /demo/os/nuttx-spiflash/apps/examples/easylogger/Make.defs: -------------------------------------------------------------------------------- 1 | ############################################################################ 2 | # apps/examples/easylogger/Make.defs 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one or more 5 | # contributor license agreements. See the NOTICE file distributed with 6 | # this work for additional information regarding copyright ownership. The 7 | # ASF licenses this file to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance with the 9 | # License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 15 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 16 | # License for the specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | ############################################################################ 20 | 21 | ifneq ($(CONFIG_EXAMPLES_EASYLOGGER),) 22 | CONFIGURED_APPS += $(APPDIR)/examples/easylogger 23 | endif 24 | -------------------------------------------------------------------------------- /demo/os/nuttx-spiflash/apps/examples/easylogger/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################ 2 | # apps/examples/easylogger/Make.defs 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one or more 5 | # contributor license agreements. See the NOTICE file distributed with 6 | # this work for additional information regarding copyright ownership. The 7 | # ASF licenses this file to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance with the 9 | # License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 15 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 16 | # License for the specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | ############################################################################ 20 | 21 | include $(APPDIR)/Make.defs 22 | 23 | # Hello, easylogger! built-in application info 24 | 25 | PROGNAME = $(CONFIG_EXAMPLES_EASYLOGGER_PROGNAME) 26 | PRIORITY = $(CONFIG_EXAMPLES_EASYLOGGER_PRIORITY) 27 | STACKSIZE = $(CONFIG_EXAMPLES_EASYLOGGER_STACKSIZE) 28 | MODULE = $(CONFIG_EXAMPLES_EASYLOGGER) 29 | 30 | # Hello, easylogger! Example 31 | 32 | MAINSRC = elog_main.c 33 | 34 | CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/system/easylogger/inc} 35 | CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/system/easylogger/plugins/flash} 36 | CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/system/easyflash/inc} 37 | 38 | include $(APPDIR)/Application.mk 39 | -------------------------------------------------------------------------------- /demo/os/nuttx-spiflash/apps/system/easyflash/Kconfig: -------------------------------------------------------------------------------- 1 | # 2 | # For a description of the syntax of this configuration file, 3 | # see the file kconfig-language.txt in the NuttX tools repository. 4 | # 5 | 6 | menuconfig SYSTEM_EASYFLASH 7 | tristate "Easyflash" 8 | default n 9 | ---help--- 10 | Enable support for the Easyflash 11 | 12 | if SYSTEM_EASYFLASH 13 | 14 | 15 | endif # SYSTEM_EASYFLASH 16 | -------------------------------------------------------------------------------- /demo/os/nuttx-spiflash/apps/system/easyflash/Make.defs: -------------------------------------------------------------------------------- 1 | ############################################################################ 2 | # apps/system/easyflash/Make.defs 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one or more 5 | # contributor license agreements. See the NOTICE file distributed with 6 | # this work for additional information regarding copyright ownership. The 7 | # ASF licenses this file to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance with the 9 | # License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 15 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 16 | # License for the specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | ############################################################################ 20 | 21 | ifneq ($(CONFIG_SYSTEM_EASYFLASH),) 22 | CONFIGURED_APPS += $(APPDIR)/system/easyflash 23 | endif 24 | -------------------------------------------------------------------------------- /demo/os/nuttx-spiflash/apps/system/easyflash/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################ 2 | # apps/system/easyflash/Makefile 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one or more 5 | # contributor license agreements. See the NOTICE file distributed with 6 | # this work for additional information regarding copyright ownership. The 7 | # ASF licenses this file to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance with the 9 | # License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 15 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 16 | # License for the specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | ############################################################################ 20 | 21 | include $(APPDIR)/Make.defs 22 | 23 | # easyflash Application 24 | 25 | CSRCS = easyflash.c ef_utils.c ef_port.c 26 | CSRCS += ef_env.c # ef_env_wl.c 27 | # CSRCS += ef_iap.c ef_log.c 28 | 29 | CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/system/easyflash/inc} 30 | 31 | VPATH += :src port 32 | 33 | include $(APPDIR)/Application.mk 34 | -------------------------------------------------------------------------------- /demo/os/nuttx-spiflash/apps/system/easyflash/plugins/types/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/os/nuttx-spiflash/apps/system/easyflash/plugins/types/README.md -------------------------------------------------------------------------------- /demo/os/nuttx-spiflash/apps/system/easyflash/plugins/types/struct2json/readme.md: -------------------------------------------------------------------------------- 1 | # C结构体与 JSON 快速互转库 2 | 3 | --- 4 | 5 | ## struct2json 6 | 7 | [struct2json](https://github.com/armink/struct2json) 是一个开源的C结构体与 JSON 快速互转库,它可以快速实现 **结构体对象** 与 **JSON 对象** 之间序列化及反序列化要求。快速、简洁的 API 设计,大大降低直接使用 JSON 解析库来实现此类功能的代码复杂度。 8 | 9 | ## 起源 10 | 11 | 把面向对象设计应用到C语言中,是当下很流行的设计思想。由于C语言中没有类,所以一般使用结构体 `struct` 充当类,那么结构体变量就是对象。有了对象之后,很多时候需要考虑对象的序列化及反序列化问题。C语言不像很多高级语言拥有反射等机制,使得对象序列化及反序列化被原生的支持。 12 | 13 | 对于C语言来说,序列化为 JSON 字符串是个不错的选择,所以就得使用 [cJSON](https://github.com/kbranigan/cJSON) 这类 JSON 解析库,但是使用后的代码冗余且逻辑性差,所以萌生对cJSON库进行二次封装,实现一个 struct 与 JSON 之间快速互转的库。 struct2json 就诞生于此。下面是 struct2json 主要使用场景: 14 | 15 | - **持久化** :结构体对象序列化为 JSON 对象后,可直接保存至文件、Flash,实现对结构体对象的掉电存储; 16 | - **通信** :高级语言对JSON支持的很友好,例如: Javascript、Groovy 就对 JSON 具有原生的支持,所以 JSON 也可作为C语言与其他语言软件之间的通信协议格式及对象传递格式; 17 | - **可视化** :序列化为 JSON 后的对象,可以更加直观的展示到控制台或者 UI 上,可用于产品调试、产品二次开发等场景; 18 | 19 | ## 如何使用 20 | 21 | ### 声明结构体 22 | 23 | 如下声明了两个结构体,结构体 `Hometown` 是结构体 `Student` 的子结构体 24 | 25 | ```C 26 | /* 籍贯 */ 27 | typedef struct { 28 | char name[16]; 29 | } Hometown; 30 | 31 | /* 学生 */ 32 | typedef struct { 33 | uint8_t id; 34 | uint8_t score[8]; 35 | char name[10]; 36 | double weight; 37 | Hometown hometown; 38 | } Student; 39 | ``` 40 | 41 | ### 将结构体对象序列化为 JSON 对象 42 | 43 | |使用前([源文件](https://github.com/armink/struct2json/blob/master/docs/zh/assets/not_use_struct2json.c))|使用后([源文件](https://github.com/armink/struct2json/blob/master/docs/zh/assets/used_struct2json.c))| 44 | |:-----:|:-----:| 45 | |![结构体转JSON-使用前](https://git.oschina.net/Armink/struct2json/raw/master/docs/zh/images/not_use_struct2json.png)| ![结构体转JSON-使用后](https://git.oschina.net/Armink/struct2json/raw/master/docs/zh/images/used_struct2json.png)| 46 | 47 | ### 将 JSON 对象反序列化为结构体对象 48 | 49 | |使用前([源文件](https://github.com/armink/struct2json/blob/master/docs/zh/assets/not_use_struct2json_for_json.c))|使用后([源文件](https://github.com/armink/struct2json/blob/master/docs/zh/assets/used_struct2json_for_json.c))| 50 | |:-----:|:-----:| 51 | |![JSON转结构体-使用前](https://git.oschina.net/Armink/struct2json/raw/master/docs/zh/images/not_use_struct2json_for_json.png)| ![JSON转结构体-使用后](https://git.oschina.net/Armink/struct2json/raw/master/docs/zh/images/used_struct2json_for_json.png)| 52 | 53 | 欢迎大家 **fork and pull request**([Github](https://github.com/armink/struct2json)|[OSChina](http://git.oschina.net/armink/struct2json)|[Coding](https://coding.net/u/armink/p/struct2json/git)) 。如果觉得这个开源项目很赞,可以点击[项目主页](https://github.com/armink/struct2json) 右上角的**Star**,同时把它推荐给更多有需要的朋友。 54 | 55 | ## 文档 56 | 57 | 具体内容参考[`\docs\zh\`](https://github.com/armink/struct2json/tree/master/docs/zh)下的文件。务必保证在 **阅读文档** 后再使用。 58 | 59 | ## 许可 60 | 61 | MIT Copyright (c) armink.ztl@gmail.com 62 | -------------------------------------------------------------------------------- /demo/os/nuttx-spiflash/apps/system/easyflash/plugins/types/struct2json/src/s2j.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the struct2json Library. 3 | * 4 | * Copyright (c) 2015, Armink, 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining 7 | * a copy of this software and associated documentation files (the 8 | * 'Software'), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sublicense, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject to 12 | * the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be 15 | * included in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | * 25 | * Function: Initialize interface for this library. 26 | * Created on: 2015-10-14 27 | */ 28 | 29 | #include 30 | #include 31 | 32 | S2jHook s2jHook = { 33 | .malloc_fn = malloc, 34 | .free_fn = free, 35 | }; 36 | 37 | /** 38 | * struct2json library initialize 39 | * @note It will initialize cJSON library hooks. 40 | */ 41 | void s2j_init(S2jHook *hook) { 42 | /* initialize cJSON library */ 43 | cJSON_InitHooks((cJSON_Hooks *)hook); 44 | /* initialize hooks */ 45 | if (hook) { 46 | s2jHook.malloc_fn = (hook->malloc_fn) ? hook->malloc_fn : malloc; 47 | s2jHook.free_fn = (hook->free_fn) ? hook->free_fn : free; 48 | } else { 49 | hook->malloc_fn = malloc; 50 | hook->free_fn = free; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /demo/os/nuttx-spiflash/apps/system/easylogger/Kconfig: -------------------------------------------------------------------------------- 1 | # 2 | # For a description of the syntax of this configuration file, 3 | # see the file kconfig-language.txt in the NuttX tools repository. 4 | # 5 | 6 | menuconfig SYSTEM_EASYLOGGER 7 | tristate "Easylogger" 8 | default n 9 | ---help--- 10 | Enable support for the Easylogger 11 | 12 | if SYSTEM_EASYLOGGER 13 | 14 | config SYSTEM_EASYLOGGER_FILE 15 | bool "Enable EasyLogger File" 16 | default n 17 | ---help--- 18 | Add EasyLogger File support. 19 | 20 | config SYSTEM_EASYLOGGER_FLASH 21 | bool "Enable EasyLogger Flash" 22 | default n 23 | select SYSTEM_EASYFLASH 24 | ---help--- 25 | Add EasyLogger Flash support. 26 | 27 | endif # SYSTEM_EASYLOGGER 28 | -------------------------------------------------------------------------------- /demo/os/nuttx-spiflash/apps/system/easylogger/Make.defs: -------------------------------------------------------------------------------- 1 | ############################################################################ 2 | # apps/system/easylogger/Make.defs 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one or more 5 | # contributor license agreements. See the NOTICE file distributed with 6 | # this work for additional information regarding copyright ownership. The 7 | # ASF licenses this file to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance with the 9 | # License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 15 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 16 | # License for the specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | ############################################################################ 20 | 21 | ifneq ($(CONFIG_SYSTEM_EASYLOGGER),) 22 | CONFIGURED_APPS += $(APPDIR)/system/easylogger 23 | endif 24 | -------------------------------------------------------------------------------- /demo/os/nuttx-spiflash/apps/system/easylogger/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################ 2 | # apps/system/easylogger/Makefile 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one or more 5 | # contributor license agreements. See the NOTICE file distributed with 6 | # this work for additional information regarding copyright ownership. The 7 | # ASF licenses this file to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance with the 9 | # License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 15 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 16 | # License for the specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | ############################################################################ 20 | 21 | include $(APPDIR)/Make.defs 22 | 23 | # easylogger Application 24 | 25 | CSRCS = elog_port.c elog.c elog_utils.c 26 | CSRCS += elog_async.c elog_buf.c 27 | 28 | CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/system/easylogger/inc} 29 | 30 | VPATH += :src port 31 | 32 | ifeq ($(CONFIG_SYSTEM_EASYLOGGER_FILE),y) 33 | CSRCS += elog_file.c elog_file_port.c 34 | CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/system/easylogger/plugins/file} 35 | VPATH += :plugins/file 36 | endif 37 | 38 | ifeq ($(CONFIG_SYSTEM_EASYLOGGER_FLASH),y) 39 | CSRCS += elog_flash.c elog_flash_port.c 40 | CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/system/easylogger/plugins/flash} 41 | VPATH += :plugins/flash 42 | CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/system/easyflash/inc} 43 | endif 44 | 45 | include $(APPDIR)/Application.mk 46 | -------------------------------------------------------------------------------- /demo/os/nuttx-spiflash/apps/system/easylogger/plugins/flash/elog_flash_cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the EasyLogger Library. 3 | * 4 | * Copyright (c) 2015, Armink, 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining 7 | * a copy of this software and associated documentation files (the 8 | * 'Software'), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sublicense, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject to 12 | * the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be 15 | * included in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | * 25 | * Function: It is the configure head file for this flash log plugin. 26 | * Created on: 2015-07-30 27 | */ 28 | 29 | #ifndef _ELOG_FLASH_CFG_H_ 30 | #define _ELOG_FLASH_CFG_H_ 31 | 32 | /* EasyLogger flash log plugin's using buffer mode */ 33 | #define ELOG_FLASH_USING_BUF_MODE 34 | /* EasyLogger flash log plugin's RAM buffer size */ 35 | #define ELOG_FLASH_BUF_SIZE 1024 /* @note you must define it for a value */ 36 | 37 | #endif /* _ELOG_FLASH_CFG_H_ */ 38 | -------------------------------------------------------------------------------- /demo/os/nuttx-spiflash/apps/system/easylogger/plugins/flash/elog_flash_port.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the EasyLogger Library. 3 | * 4 | * Copyright (c) 2015, Armink, 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining 7 | * a copy of this software and associated documentation files (the 8 | * 'Software'), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sublicense, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject to 12 | * the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be 15 | * included in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | * 25 | * Function: Portable interface for EasyLogger's flash log pulgin. 26 | * Created on: 2015-07-28 27 | */ 28 | 29 | #include 30 | 31 | #include "elog_flash.h" 32 | 33 | static pthread_mutex_t flash_log_lock; 34 | 35 | /** 36 | * EasyLogger flash log pulgin port initialize 37 | * 38 | * @return result 39 | */ 40 | ElogErrCode elog_flash_port_init(void) { 41 | ElogErrCode result = ELOG_NO_ERR; 42 | 43 | /* add your code here */ 44 | pthread_mutex_init(&flash_log_lock, NULL); 45 | 46 | return result; 47 | } 48 | 49 | /** 50 | * output flash saved log port interface 51 | * 52 | * @param log flash saved log 53 | * @param size log size 54 | */ 55 | void elog_flash_port_output(const char *log, size_t size) { 56 | 57 | /* add your code here */ 58 | printf("%.*s", size, log); 59 | 60 | } 61 | 62 | /** 63 | * flash log lock 64 | */ 65 | void elog_flash_port_lock(void) { 66 | 67 | /* add your code here */ 68 | pthread_mutex_lock(&flash_log_lock); 69 | 70 | } 71 | 72 | /** 73 | * flash log unlock 74 | */ 75 | void elog_flash_port_unlock(void) { 76 | 77 | /* add your code here */ 78 | pthread_mutex_unlock(&flash_log_lock); 79 | 80 | } -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/EWARM/.gitignore: -------------------------------------------------------------------------------- 1 | /stm32f103xB 2 | /stm32f103xE 3 | /Debug 4 | /Release 5 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/EWARM/EasyLogger.eww: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | $WS_DIR$\EasyLogger.ewp 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/EWARM/settings/EasyFlash.cspy.bat: -------------------------------------------------------------------------------- 1 | @REM This batch file has been generated by the IAR Embedded Workbench 2 | @REM C-SPY Debugger, as an aid to preparing a command line for running 3 | @REM the cspybat command line utility using the appropriate settings. 4 | @REM 5 | @REM Note that this file is generated every time a new debug session 6 | @REM is initialized, so you may want to move or rename the file before 7 | @REM making changes. 8 | @REM 9 | @REM You can launch cspybat by typing the name of this batch file followed 10 | @REM by the name of the debug file (usually an ELF/DWARF or UBROF file). 11 | @REM 12 | @REM Read about available command line parameters in the C-SPY Debugging 13 | @REM Guide. Hints about additional command line parameters that may be 14 | @REM useful in specific cases: 15 | @REM --download_only Downloads a code image without starting a debug 16 | @REM session afterwards. 17 | @REM --silent Omits the sign-on message. 18 | @REM --timeout Limits the maximum allowed execution time. 19 | @REM 20 | 21 | 22 | "C:\Program Files\IAR Systems\Embedded Workbench 6.5\common\bin\cspybat" "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\bin\armproc.dll" "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\bin\armjlink.dll" %1 --plugin "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\bin\armbat.dll" --macro "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\config\debugger\ST\Trace_STM32F1xx.dmac" --flash_loader "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\config\flashloader\ST\FlashSTM32F10xxE.board" --backend -B "--endian=little" "--cpu=Cortex-M3" "--fpu=None" "-p" "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\CONFIG\debugger\ST\STM32F103xE.ddf" "--drv_verify_download" "--semihosting" "--device=STM32F103xE" "--drv_communication=USB0" "--jlink_speed=auto" "--jlink_initial_speed=32" "--jlink_reset_strategy=0,0" "--jlink_interface=SWD" "--drv_catch_exceptions=0x000" "--drv_swo_clock_setup=72000000,0,2000000" 23 | 24 | 25 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/EWARM/settings/EasyFlash.dni: -------------------------------------------------------------------------------- 1 | [Stack] 2 | FillEnabled=0 3 | OverflowWarningsEnabled=1 4 | WarningThreshold=90 5 | SpWarningsEnabled=1 6 | WarnLogOnly=1 7 | UseTrigger=1 8 | TriggerName=main 9 | LimitSize=0 10 | ByteLimit=50 11 | [DebugChecksum] 12 | Checksum=-700699776 13 | [Exceptions] 14 | StopOnUncaught=_ 0 15 | StopOnThrow=_ 0 16 | [CallStack] 17 | ShowArgs=0 18 | [Disassembly] 19 | MixedMode=1 20 | [JLinkDriver] 21 | CStepIntDis=_ 0 22 | [watch_formats] 23 | Fmt0={W}0:CpuUsageMinor 3 0 24 | Fmt1={W}42:CpuUsageMajor 3 0 25 | Fmt2={W}42:CpuUsageMinor 3 0 26 | [SWOTraceHWSettings] 27 | OverrideDefaultClocks=0 28 | CpuClock=72000000 29 | ClockAutoDetect=0 30 | ClockWanted=2000000 31 | JtagSpeed=2250000 32 | Prescaler=32 33 | TimeStampPrescIndex=0 34 | TimeStampPrescData=0 35 | PcSampCYCTAP=1 36 | PcSampPOSTCNT=15 37 | PcSampIndex=0 38 | DataLogMode=0 39 | ITMportsEnable=0 40 | ITMportsTermIO=0 41 | ITMportsLogFile=0 42 | ITMlogFile=$PROJ_DIR$\ITM.log 43 | [Interrupts] 44 | Enabled=1 45 | [MemoryMap] 46 | Enabled=0 47 | Base=0 48 | UseAuto=0 49 | TypeViolation=1 50 | UnspecRange=1 51 | ActionState=1 52 | [Trace1] 53 | Enabled=0 54 | ShowSource=1 55 | [PowerLog] 56 | LogEnabled=0 57 | GraphEnabled=0 58 | ShowTimeLog=1 59 | ShowTimeSum=0 60 | Title0=I0 61 | Symbol0=0 4 62 | LiveEnabled=0 63 | LiveFile=PowerLogLive.log 64 | [DataLog] 65 | LogEnabled=0 66 | SumEnabled=0 67 | GraphEnabled=0 68 | ShowTimeLog=1 69 | ShowTimeSum=1 70 | [EventLog] 71 | LogEnabled=0 72 | SumEnabled=0 73 | GraphEnabled=0 74 | ShowTimeLog=1 75 | ShowTimeSum=1 76 | Title0=Ch0 77 | Symbol0=0 4 78 | Title1=Ch1 79 | Symbol1=0 4 80 | Title2=Ch2 81 | Symbol2=0 4 82 | Title3=Ch3 83 | Symbol3=0 4 84 | SumSortOrder=0 85 | Event0=1 1 1 86 | Event1=1 1 1 87 | Event2=1 1 1 88 | Event3=1 1 1 89 | [InterruptLog] 90 | LogEnabled=0 91 | SumEnabled=0 92 | GraphEnabled=0 93 | ShowTimeLog=1 94 | ShowTimeSum=1 95 | SumSortOrder=0 96 | [Log file] 97 | LoggingEnabled=_ 0 98 | LogFile=_ "" 99 | Category=_ 0 100 | [TermIOLog] 101 | LoggingEnabled=_ 0 102 | LogFile=_ "" 103 | [Trace2] 104 | Enabled=0 105 | ShowSource=0 106 | [SWOTraceWindow] 107 | PcSampling=0 108 | InterruptLogs=0 109 | ForcedTimeStamps=0 110 | EventCPI=0 111 | EventEXC=0 112 | EventFOLD=0 113 | EventLSU=0 114 | EventSLEEP=0 115 | [PowerProbe] 116 | Frequency=10000 117 | Probe0=I0 118 | ProbeSetup0=2 1 1 2 0 0 119 | [CallStackLog] 120 | Enabled=0 121 | [DriverProfiling] 122 | Enabled=0 123 | Mode=3 124 | Graph=0 125 | Symbiont=0 126 | Exclusions= 127 | [Disassemble mode] 128 | mode=0 129 | [Breakpoints2] 130 | Count=0 131 | [Aliases] 132 | Count=0 133 | SuppressDialog=0 134 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/EWARM/settings/EasyFlash_Debug.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ShowInfoWin = 1 3 | EnableFlashBP = 2 4 | BPDuringExecution = 0 5 | [CFI] 6 | CFISize = 0x00 7 | CFIAddr = 0x00 8 | [CPU] 9 | OverrideMemMap = 0 10 | AllowSimulation = 1 11 | ScriptFile="" 12 | [FLASH] 13 | MinNumBytesFlashDL = 0 14 | SkipProgOnCRCMatch = 1 15 | VerifyDownload = 1 16 | AllowCaching = 1 17 | EnableFlashDL = 2 18 | Override = 0 19 | Device="UNSPECIFIED" 20 | [GENERAL] 21 | WorkRAMSize = 0x00 22 | WorkRAMAddr = 0x00 23 | [SWO] 24 | SWOLogFile="" 25 | [MEM] 26 | RdOverrideOrMask = 0x00 27 | RdOverrideAndMask = 0xFFFFFFFF 28 | RdOverrideAddr = 0xFFFFFFFF 29 | WrOverrideOrMask = 0x00 30 | WrOverrideAndMask = 0xFFFFFFFF 31 | WrOverrideAddr = 0xFFFFFFFF 32 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/EWARM/settings/EasyFlash_EncodingOverride.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | E:\Program\Repository\FreeModbus_Slaver-Master-RTT-STM32\APP\src\app_task.c 6 | GB2312 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/EWARM/settings/EasyFlash_stm32f103xE.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ShowInfoWin = 1 3 | EnableFlashBP = 2 4 | BPDuringExecution = 0 5 | [CFI] 6 | CFISize = 0x00 7 | CFIAddr = 0x00 8 | [CPU] 9 | OverrideMemMap = 0 10 | AllowSimulation = 1 11 | ScriptFile="" 12 | [FLASH] 13 | MinNumBytesFlashDL = 0 14 | SkipProgOnCRCMatch = 1 15 | VerifyDownload = 1 16 | AllowCaching = 1 17 | EnableFlashDL = 2 18 | Override = 0 19 | Device="UNSPECIFIED" 20 | [GENERAL] 21 | WorkRAMSize = 0x00 22 | WorkRAMAddr = 0x00 23 | [SWO] 24 | SWOLogFile="" 25 | [MEM] 26 | RdOverrideOrMask = 0x00 27 | RdOverrideAndMask = 0xFFFFFFFF 28 | RdOverrideAddr = 0xFFFFFFFF 29 | WrOverrideOrMask = 0x00 30 | WrOverrideAndMask = 0xFFFFFFFF 31 | WrOverrideAddr = 0xFFFFFFFF 32 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/EWARM/settings/EasyLogger.crun: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1 5 | 6 | 7 | * 8 | * 9 | * 10 | 0 11 | 1 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/EWARM/settings/EasyLogger.cspy.bat: -------------------------------------------------------------------------------- 1 | @REM This batch file has been generated by the IAR Embedded Workbench 2 | @REM C-SPY Debugger, as an aid to preparing a command line for running 3 | @REM the cspybat command line utility using the appropriate settings. 4 | @REM 5 | @REM Note that this file is generated every time a new debug session 6 | @REM is initialized, so you may want to move or rename the file before 7 | @REM making changes. 8 | @REM 9 | @REM You can launch cspybat by typing the name of this batch file followed 10 | @REM by the name of the debug file (usually an ELF/DWARF or UBROF file). 11 | @REM 12 | @REM Read about available command line parameters in the C-SPY Debugging 13 | @REM Guide. Hints about additional command line parameters that may be 14 | @REM useful in specific cases: 15 | @REM --download_only Downloads a code image without starting a debug 16 | @REM session afterwards. 17 | @REM --silent Omits the sign-on message. 18 | @REM --timeout Limits the maximum allowed execution time. 19 | @REM 20 | 21 | 22 | "C:\Program Files\IAR Systems\Embedded Workbench 6.5\common\bin\cspybat" "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\bin\armproc.dll" "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\bin\armjlink.dll" %1 --plugin "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\bin\armbat.dll" --macro "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\config\debugger\ST\Trace_STM32F1xx.dmac" --flash_loader "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\config\flashloader\ST\FlashSTM32F10xxE.board" --backend -B "--endian=little" "--cpu=Cortex-M3" "--fpu=None" "-p" "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\CONFIG\debugger\ST\STM32F103xE.ddf" "--drv_verify_download" "--semihosting" "--device=STM32F103xE" "--drv_communication=USB0" "--jlink_speed=auto" "--jlink_initial_speed=32" "--jlink_reset_strategy=0,8" "--jlink_interface=SWD" "--drv_catch_exceptions=0x000" "--drv_swo_clock_setup=72000000,0,2000000" 23 | 24 | 25 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/EWARM/settings/EasyLogger.dni: -------------------------------------------------------------------------------- 1 | [Stack] 2 | FillEnabled=0 3 | OverflowWarningsEnabled=1 4 | WarningThreshold=90 5 | SpWarningsEnabled=1 6 | WarnLogOnly=1 7 | UseTrigger=1 8 | TriggerName=main 9 | LimitSize=0 10 | ByteLimit=50 11 | [JLinkDriver] 12 | CStepIntDis=_ 0 13 | LeaveTargetRunning=_ 0 14 | [SWOTraceHWSettings] 15 | OverrideDefaultClocks=0 16 | CpuClock=72000000 17 | ClockAutoDetect=0 18 | ClockWanted=2000000 19 | JtagSpeed=2000000 20 | Prescaler=36 21 | TimeStampPrescIndex=0 22 | TimeStampPrescData=0 23 | PcSampCYCTAP=1 24 | PcSampPOSTCNT=15 25 | PcSampIndex=0 26 | DataLogMode=0 27 | ITMportsEnable=0 28 | ITMportsTermIO=0 29 | ITMportsLogFile=0 30 | ITMlogFile=$PROJ_DIR$\ITM.log 31 | [DebugChecksum] 32 | Checksum=-483865419 33 | [Exceptions] 34 | StopOnUncaught=_ 0 35 | StopOnThrow=_ 0 36 | [CallStack] 37 | ShowArgs=0 38 | [Disassembly] 39 | MixedMode=1 40 | [PowerLog] 41 | LogEnabled=0 42 | GraphEnabled=0 43 | ShowTimeLog=1 44 | ShowTimeSum=0 45 | Title0=I0 46 | Symbol0=0 4 47 | LiveEnabled=0 48 | LiveFile=PowerLogLive.log 49 | [DataLog] 50 | LogEnabled=0 51 | SumEnabled=0 52 | GraphEnabled=0 53 | ShowTimeLog=1 54 | ShowTimeSum=1 55 | [EventLog] 56 | LogEnabled=0 57 | SumEnabled=0 58 | GraphEnabled=0 59 | ShowTimeLog=1 60 | ShowTimeSum=1 61 | Title0=Ch0 62 | Symbol0=0 4 63 | Title1=Ch1 64 | Symbol1=0 4 65 | Title2=Ch2 66 | Symbol2=0 4 67 | Title3=Ch3 68 | Symbol3=0 4 69 | SumSortOrder=0 70 | Event0=1 1 1 71 | Event1=1 1 1 72 | Event2=1 1 1 73 | Event3=1 1 1 74 | [InterruptLog] 75 | LogEnabled=0 76 | SumEnabled=0 77 | GraphEnabled=0 78 | ShowTimeLog=1 79 | ShowTimeSum=1 80 | SumSortOrder=0 81 | [Log file] 82 | LoggingEnabled=_ 0 83 | LogFile=_ "" 84 | Category=_ 0 85 | [TermIOLog] 86 | LoggingEnabled=_ 0 87 | LogFile=_ "" 88 | [Trace2] 89 | Enabled=0 90 | ShowSource=0 91 | [SWOTraceWindow] 92 | PcSampling=0 93 | InterruptLogs=0 94 | ForcedTimeStamps=0 95 | EventCPI=0 96 | EventEXC=0 97 | EventFOLD=0 98 | EventLSU=0 99 | EventSLEEP=0 100 | [PowerProbe] 101 | Frequency=10000 102 | Probe0=I0 103 | ProbeSetup0=2 1 1 2 0 0 104 | [CallStackLog] 105 | Enabled=0 106 | [DriverProfiling] 107 | Enabled=0 108 | Mode=3 109 | Graph=0 110 | Symbiont=0 111 | Exclusions= 112 | [Disassemble mode] 113 | mode=0 114 | [Breakpoints2] 115 | Count=0 116 | [Aliases] 117 | Count=0 118 | SuppressDialog=0 119 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/EWARM/settings/EasyLogger.stm32f103xE.cspy.bat: -------------------------------------------------------------------------------- 1 | @REM This batch file has been generated by the IAR Embedded Workbench 2 | @REM C-SPY Debugger, as an aid to preparing a command line for running 3 | @REM the cspybat command line utility using the appropriate settings. 4 | @REM 5 | @REM Note that this file is generated every time a new debug session 6 | @REM is initialized, so you may want to move or rename the file before 7 | @REM making changes. 8 | @REM 9 | @REM You can launch cspybat by typing the name of this batch file followed 10 | @REM by the name of the debug file (usually an ELF/DWARF or UBROF file). 11 | @REM 12 | @REM Read about available command line parameters in the C-SPY Debugging 13 | @REM Guide. Hints about additional command line parameters that may be 14 | @REM useful in specific cases: 15 | @REM --download_only Downloads a code image without starting a debug 16 | @REM session afterwards. 17 | @REM --silent Omits the sign-on message. 18 | @REM --timeout Limits the maximum allowed execution time. 19 | @REM 20 | 21 | 22 | @echo off 23 | 24 | if not "%~1" == "" goto debugFile 25 | 26 | @echo on 27 | 28 | "C:\Program Files\IAR Systems\Embedded Workbench 7.4\common\bin\cspybat" -f "E:\Program\STM32\EasyLogger\demo\os\rt-thread\stm32f10x\EWARM\settings\EasyLogger.stm32f103xE.general.xcl" --backend -f "E:\Program\STM32\EasyLogger\demo\os\rt-thread\stm32f10x\EWARM\settings\EasyLogger.stm32f103xE.driver.xcl" 29 | 30 | @echo off 31 | goto end 32 | 33 | :debugFile 34 | 35 | @echo on 36 | 37 | "C:\Program Files\IAR Systems\Embedded Workbench 7.4\common\bin\cspybat" -f "E:\Program\STM32\EasyLogger\demo\os\rt-thread\stm32f10x\EWARM\settings\EasyLogger.stm32f103xE.general.xcl" "--debug_file=%~1" --backend -f "E:\Program\STM32\EasyLogger\demo\os\rt-thread\stm32f10x\EWARM\settings\EasyLogger.stm32f103xE.driver.xcl" 38 | 39 | @echo off 40 | :end -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/EWARM/settings/EasyLogger.stm32f103xE.driver.xcl: -------------------------------------------------------------------------------- 1 | "--endian=little" 2 | 3 | "--cpu=Cortex-M3" 4 | 5 | "--fpu=None" 6 | 7 | "-p" 8 | 9 | "C:\Program Files\IAR Systems\Embedded Workbench 7.4\arm\CONFIG\debugger\ST\STM32F103ZE.ddf" 10 | 11 | "--drv_verify_download" 12 | 13 | "--semihosting" 14 | 15 | "--device=STM32F103ZE" 16 | 17 | "--drv_communication=USB0" 18 | 19 | "--drv_interface_speed=auto" 20 | 21 | "--jlink_initial_speed=32" 22 | 23 | "--jlink_reset_strategy=0,8" 24 | 25 | "--drv_interface=SWD" 26 | 27 | "--drv_catch_exceptions=0x000" 28 | 29 | "--drv_swo_clock_setup=72000000,0,2000000" 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/EWARM/settings/EasyLogger.stm32f103xE.general.xcl: -------------------------------------------------------------------------------- 1 | "C:\Program Files\IAR Systems\Embedded Workbench 7.4\arm\bin\armproc.dll" 2 | 3 | "C:\Program Files\IAR Systems\Embedded Workbench 7.4\arm\bin\armjlink2.dll" 4 | 5 | "E:\Program\STM32\EasyLogger\demo\os\rt-thread\stm32f10x\EWARM\stm32f103xE\Exe\EasyLogger.out" 6 | 7 | --plugin "C:\Program Files\IAR Systems\Embedded Workbench 7.4\arm\bin\armbat.dll" 8 | 9 | --device_macro "C:\Program Files\IAR Systems\Embedded Workbench 7.4\arm\config\debugger\ST\STM32F1xx_XL.dmac" 10 | 11 | --flash_loader "C:\Program Files\IAR Systems\Embedded Workbench 7.4\arm\config\flashloader\ST\FlashSTM32F10xxE.board" 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/EWARM/settings/EasyLogger.wsdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | EasyLogger/stm32f103xE 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 276272727 16 | 17 | 20121532481201621 18 | 19 | 20 | 21 | 22 | 23 | TabID-24465-26237 24 | Workspace 25 | Workspace 26 | 27 | 28 | EasyLogger 29 | 30 | 31 | 32 | 0TabID-28731-28409BuildBuildTabID-15495-1620Debug LogDebug-Log0 33 | 34 | 35 | 36 | 37 | 38 | TextEditor$WS_DIR$\..\app\src\app_task.c0000000000100000010000001 39 | 40 | 41 | 42 | 43 | 44 | 45 | iaridepm.enu1-2-2748350-2-2229206119271206620183333752257-2-22041922-2-219242061002083206620119271206620 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/EWARM/settings/EasyLogger.wspos: -------------------------------------------------------------------------------- 1 | [MainWindow] 2 | WindowPlacement=_ 305 234 1745 993 3 3 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/EWARM/settings/EasyLogger_stm32f103xE.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ShowInfoWin = 1 3 | EnableFlashBP = 2 4 | BPDuringExecution = 0 5 | [CFI] 6 | CFISize = 0x00 7 | CFIAddr = 0x00 8 | [CPU] 9 | OverrideMemMap = 0 10 | AllowSimulation = 1 11 | ScriptFile="" 12 | [FLASH] 13 | MinNumBytesFlashDL = 0 14 | SkipProgOnCRCMatch = 1 15 | VerifyDownload = 1 16 | AllowCaching = 1 17 | EnableFlashDL = 2 18 | Override = 0 19 | Device="UNSPECIFIED" 20 | [GENERAL] 21 | WorkRAMSize = 0x00 22 | WorkRAMAddr = 0x00 23 | [SWO] 24 | SWOLogFile="" 25 | [MEM] 26 | RdOverrideOrMask = 0x00 27 | RdOverrideAndMask = 0xFFFFFFFF 28 | RdOverrideAddr = 0xFFFFFFFF 29 | WrOverrideOrMask = 0x00 30 | WrOverrideAndMask = 0xFFFFFFFF 31 | WrOverrideAddr = 0xFFFFFFFF 32 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/Libraries/CMSIS_EWARM/CM3/DeviceSupport/ST/STM32F10x/stm32f10x.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/os/rt-thread/stm32f10x/Libraries/CMSIS_EWARM/CM3/DeviceSupport/ST/STM32F10x/stm32f10x.h -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/Libraries/CMSIS_EWARM/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file system_stm32f10x.h 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Header File. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 17 | * 18 | *

© COPYRIGHT 2011 STMicroelectronics

19 | ****************************************************************************** 20 | */ 21 | 22 | /** @addtogroup CMSIS 23 | * @{ 24 | */ 25 | 26 | /** @addtogroup stm32f10x_system 27 | * @{ 28 | */ 29 | 30 | /** 31 | * @brief Define to prevent recursive inclusion 32 | */ 33 | #ifndef __SYSTEM_STM32F10X_H 34 | #define __SYSTEM_STM32F10X_H 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | /** @addtogroup STM32F10x_System_Includes 41 | * @{ 42 | */ 43 | 44 | /** 45 | * @} 46 | */ 47 | 48 | 49 | /** @addtogroup STM32F10x_System_Exported_types 50 | * @{ 51 | */ 52 | 53 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 54 | 55 | /** 56 | * @} 57 | */ 58 | 59 | /** @addtogroup STM32F10x_System_Exported_Constants 60 | * @{ 61 | */ 62 | 63 | /** 64 | * @} 65 | */ 66 | 67 | /** @addtogroup STM32F10x_System_Exported_Macros 68 | * @{ 69 | */ 70 | 71 | /** 72 | * @} 73 | */ 74 | 75 | /** @addtogroup STM32F10x_System_Exported_Functions 76 | * @{ 77 | */ 78 | 79 | extern void SystemInit(void); 80 | extern void SystemCoreClockUpdate(void); 81 | /** 82 | * @} 83 | */ 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | 89 | #endif /*__SYSTEM_STM32F10X_H */ 90 | 91 | /** 92 | * @} 93 | */ 94 | 95 | /** 96 | * @} 97 | */ 98 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 99 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/Libraries/CMSIS_EWARM/CMSIS END USER LICENCE AGREEMENT.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/os/rt-thread/stm32f10x/Libraries/CMSIS_EWARM/CMSIS END USER LICENCE AGREEMENT.pdf -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/Libraries/CMSIS_EWARM/CMSIS debug support.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/os/rt-thread/stm32f10x/Libraries/CMSIS_EWARM/CMSIS debug support.htm -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/Libraries/CMSIS_EWARM/Documentation/CMSIS_Core.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/os/rt-thread/stm32f10x/Libraries/CMSIS_EWARM/Documentation/CMSIS_Core.htm -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/Libraries/CMSIS_EWARM/Include/arm_common_tables.h: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------- 2 | * Copyright (C) 2010 ARM Limited. All rights reserved. 3 | * 4 | * $Date: 11. November 2010 5 | * $Revision: V1.0.2 6 | * 7 | * Project: CMSIS DSP Library 8 | * Title: arm_common_tables.h 9 | * 10 | * Description: This file has extern declaration for common tables like Bitreverse, reciprocal etc which are used across different functions 11 | * 12 | * Target Processor: Cortex-M4/Cortex-M3 13 | * 14 | * Version 1.0.2 2010/11/11 15 | * Documentation updated. 16 | * 17 | * Version 1.0.1 2010/10/05 18 | * Production release and review comments incorporated. 19 | * 20 | * Version 1.0.0 2010/09/20 21 | * Production release and review comments incorporated. 22 | * -------------------------------------------------------------------- */ 23 | 24 | #ifndef _ARM_COMMON_TABLES_H 25 | #define _ARM_COMMON_TABLES_H 26 | 27 | #include "arm_math.h" 28 | 29 | extern const uint16_t armBitRevTable[1024]; 30 | extern const q15_t armRecipTableQ15[64]; 31 | extern const q31_t armRecipTableQ31[64]; 32 | extern const q31_t realCoefAQ31[1024]; 33 | extern const q31_t realCoefBQ31[1024]; 34 | extern const float32_t twiddleCoef[6144]; 35 | extern const q31_t twiddleCoefQ31[6144]; 36 | extern const q15_t twiddleCoefQ15[6144]; 37 | 38 | #endif /* ARM_COMMON_TABLES_H */ 39 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/Libraries/CMSIS_EWARM/License.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/os/rt-thread/stm32f10x/Libraries/CMSIS_EWARM/License.doc -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/Libraries/CMSIS_EWARM/README.txt: -------------------------------------------------------------------------------- 1 | * ------------------------------------------------------------------- 2 | * Copyright (C) 2011-2012 ARM Limited. All rights reserved. 3 | * 4 | * Date: 07 March 2012 5 | * Revision: V3.01 6 | * 7 | * Project: Cortex Microcontroller Software Interface Standard (CMSIS) 8 | * Title: Release Note for CMSIS 9 | * 10 | * ------------------------------------------------------------------- 11 | 12 | 13 | NOTE - Open the index.html file to access CMSIS documentation 14 | 15 | 16 | The Cortex Microcontroller Software Interface Standard (CMSIS) provides a single standard across all 17 | Cortex-Mx processor series vendors. It enables code re-use and code sharing across software projects 18 | and reduces time-to-market for new embedded applications. 19 | 20 | CMSIS is released under the terms of the end user license agreement ("CMSIS END USER LICENCE AGREEMENT.pdf"). 21 | Any user of the software package is bound to the terms and conditions of the end user license agreement. 22 | 23 | 24 | You will find the following sub-directories: 25 | 26 | Documentation - Contains CMSIS documentation. 27 | 28 | DSP_Lib - MDK project files, Examples and source files etc.. to build the 29 | CMSIS DSP Software Library for Cortex-M0, Cortex-M3, Cortex-M4 processors. 30 | 31 | Include - CMSIS Core Support and CMSIS DSP Include Files. 32 | 33 | Lib - CMSIS DSP Libraries. 34 | 35 | RTOS - CMSIS RTOS API template header file. 36 | 37 | SVD - CMSIS SVD Schema files and Conversion Utility. 38 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/Libraries/CMSIS_EWARM/index.htm: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Redirect to the CMSIS main page after 0 seconds 5 | 6 | 7 | 8 | 9 | 10 | 11 | If the automatic redirection is failing, click open CMSIS Documentation. 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/Libraries/CMSIS_EWARM/readme_patch.txt: -------------------------------------------------------------------------------- 1 | No CMSIS patch is included in this version. 2 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/Libraries/CMSIS_RVMDK/CM3/DeviceSupport/ST/STM32F10x/stm32f10x.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/os/rt-thread/stm32f10x/Libraries/CMSIS_RVMDK/CM3/DeviceSupport/ST/STM32F10x/stm32f10x.h -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/Libraries/CMSIS_RVMDK/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file system_stm32f10x.h 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Header File. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 17 | * 18 | *

© COPYRIGHT 2011 STMicroelectronics

19 | ****************************************************************************** 20 | */ 21 | 22 | /** @addtogroup CMSIS 23 | * @{ 24 | */ 25 | 26 | /** @addtogroup stm32f10x_system 27 | * @{ 28 | */ 29 | 30 | /** 31 | * @brief Define to prevent recursive inclusion 32 | */ 33 | #ifndef __SYSTEM_STM32F10X_H 34 | #define __SYSTEM_STM32F10X_H 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | /** @addtogroup STM32F10x_System_Includes 41 | * @{ 42 | */ 43 | 44 | /** 45 | * @} 46 | */ 47 | 48 | 49 | /** @addtogroup STM32F10x_System_Exported_types 50 | * @{ 51 | */ 52 | 53 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 54 | 55 | /** 56 | * @} 57 | */ 58 | 59 | /** @addtogroup STM32F10x_System_Exported_Constants 60 | * @{ 61 | */ 62 | 63 | /** 64 | * @} 65 | */ 66 | 67 | /** @addtogroup STM32F10x_System_Exported_Macros 68 | * @{ 69 | */ 70 | 71 | /** 72 | * @} 73 | */ 74 | 75 | /** @addtogroup STM32F10x_System_Exported_Functions 76 | * @{ 77 | */ 78 | 79 | extern void SystemInit(void); 80 | extern void SystemCoreClockUpdate(void); 81 | /** 82 | * @} 83 | */ 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | 89 | #endif /*__SYSTEM_STM32F10X_H */ 90 | 91 | /** 92 | * @} 93 | */ 94 | 95 | /** 96 | * @} 97 | */ 98 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 99 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/Libraries/CMSIS_RVMDK/CMSIS debug support.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/os/rt-thread/stm32f10x/Libraries/CMSIS_RVMDK/CMSIS debug support.htm -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/Libraries/CMSIS_RVMDK/Documentation/CMSIS_Core.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/os/rt-thread/stm32f10x/Libraries/CMSIS_RVMDK/Documentation/CMSIS_Core.htm -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/Libraries/CMSIS_RVMDK/License.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/os/rt-thread/stm32f10x/Libraries/CMSIS_RVMDK/License.doc -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_crc.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f10x_crc.h 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief This file contains all the functions prototypes for the CRC firmware 8 | * library. 9 | ****************************************************************************** 10 | * @attention 11 | * 12 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 13 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 14 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 15 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 16 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 17 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 18 | * 19 | *

© COPYRIGHT 2011 STMicroelectronics

20 | ****************************************************************************** 21 | */ 22 | 23 | /* Define to prevent recursive inclusion -------------------------------------*/ 24 | #ifndef __STM32F10x_CRC_H 25 | #define __STM32F10x_CRC_H 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | /* Includes ------------------------------------------------------------------*/ 32 | #include "stm32f10x.h" 33 | 34 | /** @addtogroup STM32F10x_StdPeriph_Driver 35 | * @{ 36 | */ 37 | 38 | /** @addtogroup CRC 39 | * @{ 40 | */ 41 | 42 | /** @defgroup CRC_Exported_Types 43 | * @{ 44 | */ 45 | 46 | /** 47 | * @} 48 | */ 49 | 50 | /** @defgroup CRC_Exported_Constants 51 | * @{ 52 | */ 53 | 54 | /** 55 | * @} 56 | */ 57 | 58 | /** @defgroup CRC_Exported_Macros 59 | * @{ 60 | */ 61 | 62 | /** 63 | * @} 64 | */ 65 | 66 | /** @defgroup CRC_Exported_Functions 67 | * @{ 68 | */ 69 | 70 | void CRC_ResetDR(void); 71 | uint32_t CRC_CalcCRC(uint32_t Data); 72 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength); 73 | uint32_t CRC_GetCRC(void); 74 | void CRC_SetIDRegister(uint8_t IDValue); 75 | uint8_t CRC_GetIDRegister(void); 76 | 77 | #ifdef __cplusplus 78 | } 79 | #endif 80 | 81 | #endif /* __STM32F10x_CRC_H */ 82 | /** 83 | * @} 84 | */ 85 | 86 | /** 87 | * @} 88 | */ 89 | 90 | /** 91 | * @} 92 | */ 93 | 94 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 95 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/os/rt-thread/stm32f10x/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/os/rt-thread/stm32f10x/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.c -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/os/rt-thread/stm32f10x/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/os/rt-thread/stm32f10x/README.md -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/AUTHORS: -------------------------------------------------------------------------------- 1 | Kernel Design & Implementation 2 | - Bernard Xiong 3 | 4 | LwIP 1.3.0/1.3.1/1.3.2/1.4.0 5 | - Porting 6 | Qiu Yi 7 | Mbbill 8 | - Testing 9 | Bernard Xiong 10 | 11 | Filesystem 12 | - Porting and Add Virtual Filesystem 13 | - Testing 14 | Qiu Yi 15 | prife 16 | 17 | RTGUI 18 | - Design and Implemenation 19 | Bernard Xiong 20 | Grissiom 21 | 22 | BSP 23 | Bernard Xiong 24 | - ATMEL AT91SAM7S64 & AT91SAM7X256 Porting 25 | - STM32 Porting 26 | - S3C4510 Porting 27 | 28 | Mbbill 29 | - ATMEL AT91SAM7X256 30 | 31 | Xulong Cao 32 | - QEMU/x86 33 | 34 | Aozima 35 | - LPC 2148 Porting 36 | - STM32 Porting 37 | 38 | Jing Lee 39 | - LPC 2478 Porting 40 | 41 | Qiu Yi 42 | - S3C2410 & S3C2440 Porting 43 | - TI LM3S 44 | 45 | others... 46 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/components/SConscript: -------------------------------------------------------------------------------- 1 | # for module compiling 2 | import os 3 | Import('remove_components') 4 | from building import * 5 | 6 | objs = [] 7 | cwd = GetCurrentDir() 8 | list = os.listdir(cwd) 9 | 10 | for item in list: 11 | if item in remove_components: 12 | continue 13 | 14 | if os.path.isfile(os.path.join(cwd, item, 'SConscript')): 15 | objs = objs + SConscript(os.path.join(item, 'SConscript')) 16 | 17 | Return('objs') 18 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/components/drivers/SConscript: -------------------------------------------------------------------------------- 1 | # for module compiling 2 | import os 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | objs = [] 7 | list = os.listdir(cwd) 8 | 9 | for d in list: 10 | path = os.path.join(cwd, d) 11 | if os.path.isfile(os.path.join(path, 'SConscript')): 12 | objs = objs + SConscript(os.path.join(d, 'SConscript')) 13 | 14 | Return('objs') 15 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/components/drivers/include/drivers/i2c-bit-ops.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File : i2c-bit-ops.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-04-25 weety first version 23 | */ 24 | 25 | #ifndef __I2C_BIT_OPS_H__ 26 | #define __I2C_BIT_OPS_H__ 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | 32 | struct rt_i2c_bit_ops 33 | { 34 | void *data; /* private data for lowlevel routines */ 35 | void (*set_sda)(void *data, rt_int32_t state); 36 | void (*set_scl)(void *data, rt_int32_t state); 37 | rt_int32_t (*get_sda)(void *data); 38 | rt_int32_t (*get_scl)(void *data); 39 | 40 | void (*udelay)(rt_uint32_t us); 41 | 42 | rt_uint32_t delay_us; /* scl and sda line delay */ 43 | rt_uint32_t timeout; /* in tick */ 44 | }; 45 | 46 | rt_err_t rt_i2c_bit_add_bus(struct rt_i2c_bus_device *bus, 47 | const char *bus_name); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/components/drivers/include/drivers/i2c_dev.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File : i2c_dev.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-04-25 weety first version 23 | */ 24 | 25 | #ifndef __I2C_DEV_H__ 26 | #define __I2C_DEV_H__ 27 | 28 | #include 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | #define RT_I2C_DEV_CTRL_10BIT 0x20 35 | #define RT_I2C_DEV_CTRL_ADDR 0x21 36 | #define RT_I2C_DEV_CTRL_TIMEOUT 0x22 37 | #define RT_I2C_DEV_CTRL_RW 0x23 38 | 39 | struct rt_i2c_priv_data 40 | { 41 | struct rt_i2c_msg *msgs; 42 | rt_size_t number; 43 | }; 44 | 45 | rt_err_t rt_i2c_bus_device_device_init(struct rt_i2c_bus_device *bus, 46 | const char *name); 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/components/drivers/include/drivers/rtc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File : rtc.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-10-10 aozima first version. 23 | */ 24 | 25 | #ifndef RTC_H_INCLUDED 26 | #define RTC_H_INCLUDED 27 | 28 | extern rt_err_t set_date(rt_uint32_t year, 29 | rt_uint32_t month, 30 | rt_uint32_t day); 31 | 32 | extern rt_err_t set_time(rt_uint32_t hour, 33 | rt_uint32_t minute, 34 | rt_uint32_t second); 35 | 36 | #endif // RTC_H_INCLUDED 37 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/components/drivers/include/drivers/sd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File : sd.h 3 | * This file is part of RT-Thread RTOS 4 | * COPYRIGHT (C) 2006, 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 | * 2011-07-25 weety first version 23 | */ 24 | 25 | #ifndef __SD_H__ 26 | #define __SD_H__ 27 | 28 | #include 29 | #include 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | rt_err_t mmcsd_send_if_cond(struct rt_mmcsd_host *host, rt_uint32_t ocr); 36 | rt_err_t mmcsd_send_app_op_cond(struct rt_mmcsd_host *host, rt_uint32_t ocr, rt_uint32_t *rocr); 37 | rt_int32_t init_sd(struct rt_mmcsd_host *host, rt_uint32_t ocr); 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/components/drivers/include/drivers/sdio_func_ids.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File : sdio_func_ids.h 3 | * This file is part of RT-Thread RTOS 4 | * COPYRIGHT (C) 2006, 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-02-26 weety first version 23 | */ 24 | 25 | #ifndef __SDIO_FUNC_IDS_H__ 26 | #define __SDIO_FUNC_IDS_H__ 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | 32 | /* Standard SDIO Function Interfaces */ 33 | 34 | #define SDIO_FUNC_CODE_NONE 0x00 /* Not a SDIO standard interface */ 35 | #define SDIO_FUNC_CODE_UART 0x01 /* SDIO Standard UART */ 36 | #define SDIO_FUNC_CODE_BT_A 0x02 /* SDIO Type-A for Bluetooth standard interface */ 37 | #define SDIO_FUNC_CODE_BT_B 0x03 /* SDIO Type-B for Bluetooth standard interface */ 38 | #define SDIO_FUNC_CODE_GPS 0x04 /* SDIO GPS standard interface */ 39 | #define SDIO_FUNC_CODE_CAMERA 0x05 /* SDIO Camera standard interface */ 40 | #define SDIO_FUNC_CODE_PHS 0x06 /* SDIO PHS standard interface */ 41 | #define SDIO_FUNC_CODE_WLAN 0x07 /* SDIO WLAN interface */ 42 | #define SDIO_FUNC_CODE_ATA 0x08 /* Embedded SDIO-ATA standard interface */ 43 | 44 | /* manufacturer id, product io */ 45 | 46 | #define SDIO_MANUFACTURER_ID_MARVELL 0x02df 47 | #define SDIO_PRODUCT_ID_MARVELL_88W8686 0x9103 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/components/drivers/include/drivers/spi.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/components/drivers/include/drivers/spi.h -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/components/drivers/serial/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = Glob('*.c') 5 | CPPPATH = [cwd + '/../include'] 6 | group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_SERIAL'], CPPPATH = CPPPATH) 7 | 8 | Return('group') 9 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/components/drivers/src/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = Glob('*.c') 5 | CPPPATH = [cwd + '/../include'] 6 | group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_DEVICE_IPC'], CPPPATH = CPPPATH) 7 | 8 | Return('group') 9 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/components/drivers/src/wrokqueue.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #ifdef RT_USING_HEAP 5 | static void _workqueue_thread_entry(void* parameter) 6 | { 7 | struct rt_work* work; 8 | struct rt_workqueue* queue; 9 | 10 | queue = (struct rt_workqueue*) parameter; 11 | RT_ASSERT(queue != RT_NULL); 12 | 13 | while (1) 14 | { 15 | if (rt_list_isempty(&(queue->work_list))) 16 | { 17 | /* no software timer exist, suspend self. */ 18 | rt_thread_suspend(rt_thread_self()); 19 | rt_schedule(); 20 | } 21 | 22 | /* we have work to do with. */ 23 | rt_enter_critical(); 24 | work = rt_list_entry(queue->work_list.next, struct rt_work, list); 25 | rt_list_remove(&(work->list)); 26 | rt_exit_critical(); 27 | 28 | /* do work */ 29 | work->work_func(work, work->work_data); 30 | } 31 | } 32 | 33 | struct rt_workqueue *rt_workqueue_create(const char* name, rt_uint16_t stack_size, rt_uint8_t priority) 34 | { 35 | struct rt_workqueue *queue = RT_NULL; 36 | 37 | queue = (struct rt_workqueue*)RT_KERNEL_MALLOC(sizeof(struct rt_workqueue)); 38 | if (queue != RT_NULL) 39 | { 40 | /* initialize work list */ 41 | rt_list_init(&(queue->work_list)); 42 | 43 | /* create the work thread */ 44 | queue->work_thread = rt_thread_create(name, _workqueue_thread_entry, queue, stack_size, priority, 10); 45 | if (queue->work_thread == RT_NULL) 46 | { 47 | RT_KERNEL_FREE(queue); 48 | return RT_NULL; 49 | } 50 | 51 | rt_thread_startup(queue->work_thread); 52 | } 53 | 54 | return queue; 55 | } 56 | 57 | rt_err_t rt_workqueue_destroy(struct rt_workqueue* queue) 58 | { 59 | RT_ASSERT(queue != RT_NULL); 60 | 61 | rt_thread_delete(queue->work_thread); 62 | RT_KERNEL_FREE(queue); 63 | 64 | return RT_EOK; 65 | } 66 | 67 | rt_err_t rt_workqueue_dowork(struct rt_workqueue* queue, struct rt_work* work) 68 | { 69 | RT_ASSERT(queue != RT_NULL); 70 | RT_ASSERT(work != RT_NULL); 71 | 72 | rt_enter_critical(); 73 | /* NOTE: the work MUST be initialized firstly */ 74 | rt_list_remove(&(work->list)); 75 | 76 | rt_list_insert_after(queue->work_list.prev, &(work->list)); 77 | if (queue->work_thread->stat != RT_THREAD_READY) 78 | { 79 | rt_exit_critical(); 80 | /* resume work thread */ 81 | rt_thread_resume(queue->work_thread); 82 | rt_schedule(); 83 | } 84 | else rt_exit_critical(); 85 | 86 | return RT_EOK; 87 | } 88 | 89 | rt_err_t rt_workqueue_cancel_work(struct rt_workqueue* queue, struct rt_work* work) 90 | { 91 | RT_ASSERT(queue != RT_NULL); 92 | RT_ASSERT(work != RT_NULL); 93 | 94 | rt_enter_critical(); 95 | rt_list_remove(&(work->list)); 96 | rt_exit_critical(); 97 | 98 | return RT_EOK; 99 | } 100 | 101 | #endif 102 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/components/finsh/SConscript: -------------------------------------------------------------------------------- 1 | Import('rtconfig') 2 | from building import * 3 | 4 | cwd = GetCurrentDir() 5 | src = Split(''' 6 | shell.c 7 | symbol.c 8 | cmd.c 9 | ''') 10 | 11 | fsh_src = Split(''' 12 | finsh_compiler.c 13 | finsh_error.c 14 | finsh_heap.c 15 | finsh_init.c 16 | finsh_node.c 17 | finsh_ops.c 18 | finsh_parser.c 19 | finsh_var.c 20 | finsh_vm.c 21 | finsh_token.c 22 | ''') 23 | 24 | msh_src = Split(''' 25 | msh_cmd.c 26 | msh.c 27 | ''') 28 | 29 | CPPPATH = [cwd] 30 | if rtconfig.CROSS_TOOL == 'keil': 31 | LINKFLAGS = ' --keep __fsym_*' 32 | 33 | if not GetDepend('FINSH_USING_MSH_ONLY'): 34 | LINKFLAGS = LINKFLAGS + ' --keep __vsym_* ' 35 | else: 36 | LINKFLAGS = '' 37 | 38 | if GetDepend('FINSH_USING_MSH'): 39 | src = src + msh_src 40 | if not GetDepend('FINSH_USING_MSH_ONLY'): 41 | src = src + fsh_src 42 | 43 | group = DefineGroup('finsh', src, depend = ['RT_USING_FINSH'], CPPPATH = CPPPATH, LINKFLAGS = LINKFLAGS) 44 | 45 | Return('group') 46 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/components/finsh/finsh_error.c: -------------------------------------------------------------------------------- 1 | /* 2 | * error number for finsh shell. 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 | * 2010-03-22 Bernard first version 28 | */ 29 | #include "finsh_error.h" 30 | 31 | u_char global_errno; 32 | 33 | static const char * finsh_error_string_table[] = 34 | { 35 | "No error", 36 | "Invalid token", 37 | "Expect a type", 38 | "Unknown type", 39 | "Variable exist", 40 | "Expect a operater", 41 | "Memory full", 42 | "Unknown operator", 43 | "Unknown node", 44 | "Expect a character", 45 | "Unexpect end", 46 | "Unknown token", 47 | "Float not supported", 48 | "Unknown symbol", 49 | "Null node" 50 | }; 51 | 52 | int finsh_error_init() 53 | { 54 | global_errno = FINSH_ERROR_OK; 55 | 56 | return 0; 57 | } 58 | 59 | int finsh_error_set(u_char type) 60 | { 61 | global_errno = type; 62 | 63 | return 0; 64 | } 65 | 66 | u_char finsh_errno() 67 | { 68 | return global_errno; 69 | } 70 | 71 | const char* finsh_error_string(u_char type) 72 | { 73 | return finsh_error_string_table[type]; 74 | } 75 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/components/finsh/finsh_error.h: -------------------------------------------------------------------------------- 1 | /* 2 | * error number for finsh shell. 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 | * 2010-03-22 Bernard first version 28 | */ 29 | #ifndef __FINSH_ERROR_H__ 30 | #define __FINSH_ERROR_H__ 31 | 32 | #include 33 | 34 | int finsh_error_init(void); 35 | 36 | /* get error number */ 37 | u_char finsh_errno(void); 38 | 39 | int finsh_error_set(u_char type); 40 | const char* finsh_error_string(u_char type); 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/components/finsh/finsh_heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * heap management 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 30 | 31 | #ifndef __FINSH_HEAP_H__ 32 | #define __FINSH_HEAP_H__ 33 | 34 | int finsh_heap_init(void); 35 | void* finsh_heap_allocate(size_t size); 36 | void finsh_heap_free(void*ptr); 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/components/finsh/finsh_init.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Initialization procedure 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 | * 2010-03-22 Bernard first version 28 | */ 29 | #include 30 | 31 | #include "finsh_node.h" 32 | #include "finsh_vm.h" 33 | #include "finsh_parser.h" 34 | #include "finsh_var.h" 35 | #include "finsh_error.h" 36 | #include "finsh_heap.h" 37 | 38 | int finsh_init(struct finsh_parser* parser) 39 | { 40 | finsh_parser_init(parser); 41 | 42 | /* finsh init */ 43 | finsh_node_init(); 44 | finsh_var_init(); 45 | finsh_error_init(); 46 | finsh_heap_init(); 47 | 48 | return 0; 49 | } 50 | 51 | long finsh_stack_bottom() 52 | { 53 | return finsh_vm_stack[0].long_value; 54 | } 55 | 56 | int finsh_flush(struct finsh_parser* parser) 57 | { 58 | finsh_parser_init(parser); 59 | 60 | /* finsh init */ 61 | finsh_node_init(); 62 | finsh_error_init(); 63 | 64 | return 0; 65 | } 66 | 67 | int finsh_reset(struct finsh_parser* parser) 68 | { 69 | /* finsh init */ 70 | finsh_node_init(); 71 | finsh_var_init(); 72 | finsh_error_init(); 73 | finsh_heap_init(); 74 | 75 | return 0; 76 | } 77 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/components/finsh/finsh_parser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * script parser 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 | * 2010-03-22 Bernard first version 28 | */ 29 | #ifndef __FINSH_PARSER_H__ 30 | #define __FINSH_PARSER_H__ 31 | 32 | #include 33 | 34 | int finsh_parser_init(struct finsh_parser* self); 35 | void finsh_parser_run(struct finsh_parser* self, const u_char* string); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/components/finsh/finsh_var.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Variable implementation 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 | #ifndef __FINSH_VAR_H__ 30 | #define __FINSH_VAR_H__ 31 | 32 | #include 33 | 34 | /* 35 | * The variable in finsh is put in data segment as a global variable. 36 | * The 'finsh_var' structure presents the structure of variable in data segment. 37 | */ 38 | struct finsh_var 39 | { 40 | char name[FINSH_NAME_MAX + 1]; /* the name of variable */ 41 | 42 | u_char type; /* the type of variable */ 43 | 44 | /* variable value */ 45 | union { 46 | char char_value; 47 | short short_value; 48 | int int_value; 49 | long long_value; 50 | void* ptr; 51 | }value; 52 | }; 53 | extern struct finsh_var global_variable[]; 54 | 55 | int finsh_var_init(void); 56 | int finsh_var_insert(const char* name, int type); 57 | int finsh_var_delete(const char* name); 58 | struct finsh_var* finsh_var_lookup(const char* name); 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/components/finsh/finsh_vm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Virtual machine 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 | #ifndef __FINSH_VM_H__ 30 | #define __FINSH_VM_H__ 31 | 32 | #include 33 | 34 | #include "finsh_var.h" 35 | 36 | union finsh_value { 37 | char char_value; 38 | short short_value; 39 | long long_value; 40 | void* ptr; 41 | }; 42 | 43 | extern union finsh_value* finsh_sp; /* stack pointer */ 44 | extern u_char* finsh_pc; /* PC */ 45 | 46 | /* stack */ 47 | extern union finsh_value finsh_vm_stack[FINSH_STACK_MAX]; 48 | /* text segment */ 49 | extern u_char text_segment[FINSH_TEXT_MAX]; 50 | 51 | void finsh_vm_run(void); 52 | //void finsh_disassemble(void); 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/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 | #endif 40 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/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 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/include/cpuusage.h: -------------------------------------------------------------------------------- 1 | #ifndef CPUUSAGE_H 2 | #define CPUUSAGE_H 3 | 4 | 5 | static void cpu_usage_idle_hook(void); 6 | void cpu_usage_get(rt_uint8_t *major, rt_uint8_t *minor); 7 | void cpu_usage_init(void); 8 | 9 | #endif 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/include/rtm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File : rtm.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 | 21 | #ifndef __RTM_H__ 22 | #define __RTM_H__ 23 | 24 | #include 25 | #include 26 | 27 | #ifdef RT_USING_MODULE 28 | struct rt_module_symtab 29 | { 30 | void *addr; 31 | const char *name; 32 | }; 33 | 34 | #if defined(_MSC_VER) 35 | #pragma section("RTMSymTab$f",read) 36 | #define RTM_EXPORT(symbol) \ 37 | __declspec(allocate("RTMSymTab$f"))const char __rtmsym_##symbol##_name[] = "__vs_rtm_"#symbol; 38 | #pragma comment(linker, "/merge:RTMSymTab=mytext") 39 | 40 | #elif defined(__MINGW32__) 41 | #define RTM_EXPORT(symbol) 42 | 43 | #else 44 | #define RTM_EXPORT(symbol) \ 45 | const char __rtmsym_##symbol##_name[] = #symbol; \ 46 | const struct rt_module_symtab __rtmsym_##symbol SECTION("RTMSymTab")= \ 47 | { \ 48 | (void *)&symbol, \ 49 | __rtmsym_##symbol##_name \ 50 | }; 51 | #endif 52 | 53 | #else 54 | #define RTM_EXPORT(symbol) 55 | #endif 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/libcpu/SConscript: -------------------------------------------------------------------------------- 1 | Import('RTT_ROOT') 2 | Import('rtconfig') 3 | from building import * 4 | 5 | comm = rtconfig.ARCH + '/common' 6 | path = rtconfig.ARCH + '/' + rtconfig.CPU 7 | 8 | # The set of source files associated with this SConscript file. 9 | if rtconfig.PLATFORM == 'armcc': 10 | src = Glob(path + '/*.c') + Glob(path + '/*_rvds.S') + Glob(comm + '/*.c') 11 | 12 | if rtconfig.PLATFORM == 'gcc': 13 | src = Glob(path + '/*.c') + Glob(path + '/*_gcc.S') + Glob(comm + '/*.c') + Glob(path + '/*_init.S') 14 | 15 | if rtconfig.PLATFORM == 'iar': 16 | src = Glob(path + '/*.c') + Glob(path + '/*_iar.S') + Glob(comm + '/*.c') 17 | 18 | if rtconfig.PLATFORM == 'cl': 19 | src = Glob(path + '/*.c') 20 | 21 | if rtconfig.PLATFORM == 'mingw': 22 | src = Glob(path + '/*.c') 23 | 24 | CPPPATH = [RTT_ROOT + '/libcpu/' + rtconfig.ARCH + '/' + rtconfig.CPU, RTT_ROOT + '/libcpu/' + rtconfig.ARCH + '/common'] 25 | group = DefineGroup(rtconfig.CPU.upper(), src, depend = [''], CPPPATH = CPPPATH) 26 | 27 | Return('group') 28 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/src/SConscript: -------------------------------------------------------------------------------- 1 | Import('RTT_ROOT') 2 | Import('rtconfig') 3 | from building import * 4 | 5 | src = Glob('*.c') 6 | 7 | CPPPATH = [RTT_ROOT + '/include'] 8 | if rtconfig.CROSS_TOOL == 'keil' and GetDepend('RT_USING_MODULE') == True: 9 | LINKFLAGS = ' --keep __rtmsym_* ' 10 | else: 11 | LINKFLAGS = '' 12 | 13 | if GetDepend('RT_USING_MODULE') == False: 14 | SrcRemove(src, ['module.c']) 15 | 16 | if GetDepend('RT_USING_HEAP') == False or GetDepend('RT_USING_SMALL_MEM') == False: 17 | SrcRemove(src, ['mem.c']) 18 | 19 | if GetDepend('RT_USING_HEAP') == False or GetDepend('RT_USING_SLAB') == False: 20 | SrcRemove(src, ['slab.c']) 21 | 22 | if GetDepend('RT_USING_MEMPOOL') == False: 23 | SrcRemove(src, ['mempool.c']) 24 | 25 | if GetDepend('RT_USING_MEMHEAP') == False: 26 | SrcRemove(src, ['memheap.c']) 27 | if GetDepend('RT_USING_MEMHEAP_AS_HEAP'): 28 | SrcRemove(src, ['mem.c']) 29 | 30 | if GetDepend('RT_USING_DEVICE') == False: 31 | SrcRemove(src, ['device.c']) 32 | 33 | group = DefineGroup('Kernel', src, depend = [''], CPPPATH = CPPPATH, LINKFLAGS = LINKFLAGS) 34 | 35 | Return('group') 36 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RT-Thread-1.2.2/src/cpuusage.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define CPU_USAGE_CALC_TICK 10 5 | #define CPU_USAGE_LOOP 100 6 | 7 | static rt_uint8_t cpu_usage_major = 0, cpu_usage_minor= 0; 8 | static rt_uint32_t total_count = 0; 9 | 10 | static void cpu_usage_idle_hook() 11 | { 12 | rt_tick_t tick; 13 | rt_uint32_t count; 14 | volatile rt_uint32_t loop; 15 | 16 | if (total_count == 0) 17 | { 18 | /* get total count */ 19 | rt_enter_critical(); 20 | tick = rt_tick_get(); 21 | while(rt_tick_get() - tick < CPU_USAGE_CALC_TICK) 22 | { 23 | total_count ++; 24 | loop = 0; 25 | while (loop < CPU_USAGE_LOOP) loop ++; 26 | } 27 | rt_exit_critical(); 28 | } 29 | 30 | count = 0; 31 | /* get CPU usage */ 32 | tick = rt_tick_get(); 33 | while (rt_tick_get() - tick < CPU_USAGE_CALC_TICK) 34 | { 35 | count ++; 36 | loop = 0; 37 | while (loop < CPU_USAGE_LOOP) loop ++; 38 | } 39 | 40 | /* calculate major and minor */ 41 | if (count < total_count) 42 | { 43 | count = total_count - count; 44 | cpu_usage_major = (count * 100) / total_count; 45 | cpu_usage_minor = ((count * 100) % total_count) * 100 / total_count; 46 | } 47 | else 48 | { 49 | total_count = count; 50 | 51 | /* no CPU usage */ 52 | cpu_usage_major = 0; 53 | cpu_usage_minor = 0; 54 | } 55 | } 56 | 57 | void cpu_usage_get(rt_uint8_t *major, rt_uint8_t *minor) 58 | { 59 | RT_ASSERT(major != RT_NULL); 60 | RT_ASSERT(minor != RT_NULL); 61 | 62 | *major = cpu_usage_major; 63 | *minor = cpu_usage_minor; 64 | } 65 | 66 | void cpu_usage_init() 67 | { 68 | /* set idle thread hook */ 69 | rt_thread_idle_sethook(cpu_usage_idle_hook); 70 | } 71 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RVMDK/.gitignore: -------------------------------------------------------------------------------- 1 | /Output 2 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RVMDK/JLink Regs CM3.txt: -------------------------------------------------------------------------------- 1 | 0: R0: 0x00 2 | 1: R1: 0x01 3 | 2: R2: 0x02 4 | 3: R3: 0x03 5 | 4: R4: 0x04 6 | 5: R5: 0x05 7 | 6: R6: 0x06 8 | 7: R7: 0x07 9 | 8: R8: 0x08 10 | 9: R9: 0x09 11 | 10: R10: 0x0a 12 | 11: R11: 0x0b 13 | 12: R12: 0x0c 14 | 13: R13: 0x0d 15 | 14: R14: 0x0e 16 | 15: R15: 0x0f 17 | 16: XPSR: 0x10 18 | 17: MSP: 0x11 19 | 18: PSP: 0x12 20 | 19: RAZ: 0x13 21 | 20: CFBP: 0x14 22 | 21: APSR: 0x15 23 | 22: EPSR: 0x16 24 | 23: IPSR: 0x17 25 | 24: PRIMASK: 0x18 26 | 25: BASEPRI: 0x19 27 | 26: FAULTMASK: 0x1a 28 | 27: CONTROL: 0x1b 29 | 28: BASEPRI_MAX: 0x1c 30 | 29: IAPSR: 0x1d 31 | 30: EAPSR: 0x1e 32 | 31: IEPSR: 0x1f 33 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/RVMDK/JLinkSettings.ini: -------------------------------------------------------------------------------- 1 | [FLASH] 2 | SkipProgOnCRCMatch = 1 3 | VerifyDownload = 1 4 | AllowCaching = 1 5 | EnableFlashDL = 2 6 | Override = 0 7 | Device="ADUC7020X62" 8 | [BREAKPOINTS] 9 | ShowInfoWin = 1 10 | EnableFlashBP = 2 11 | BPDuringExecution = 0 12 | [CPU] 13 | OverrideMemMap = 0 14 | AllowSimulation = 1 15 | ScriptFile="" 16 | [SWO] 17 | SWOLogFile="" 18 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/app/inc/app_task.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************************************* 2 | // NCLUDE FILES 3 | *********************************************************************************************************/ 4 | #ifndef APP_TASK_H 5 | #define APP_TASK_H 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | void rtthread_startup(void); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/app/inc/delay_conf.h: -------------------------------------------------------------------------------- 1 | #ifndef __DELAY_CONF_H__ 2 | #define __DELAY_CONF_H__ 3 | 4 | #include"rtconfig.h" 5 | 6 | #if RT_TICK_PER_SECOND == 1 7 | #define DELAY_1S (RT_TICK_PER_SECOND) 8 | #define DELAY_S(X) (X*DELAY_1S) 9 | 10 | #elif RT_TICK_PER_SECOND == 10 11 | #define DELAY_100MS(X) (X) 12 | #define DELAY_S(X) (X*10) 13 | 14 | #elif RT_TICK_PER_SECOND == 100 15 | #define DELAY_10MS(X) (X) 16 | #define DELAY_100MS(X) (X*10) 17 | #define DELAY_S(X) (X*100) 18 | 19 | #elif (RT_TICK_PER_SECOND == 1000) 20 | 21 | #define DELAY_1MS (RT_TICK_PER_SECOND/1000) 22 | #define DELAY_MS(X) (X*DELAY_1MS) 23 | #define DELAY_S(X) (X*1000*DELAY_1MS) 24 | 25 | #elif (RT_TICK_PER_SECOND == 10000) 26 | #define DELAY_100US(X) (X*RT_TICK_PER_SECOND/10000) 27 | #define DELAY_1MS (RT_TICK_PER_SECOND/1000) 28 | #define DELAY_MS(X) (X*DELAY_1MS) 29 | #define DELAY_S(X) (X*1000*DELAY_1MS) 30 | 31 | #endif 32 | 33 | #define DELAY_SYS_INIT_LED_ON DELAY_MS(90) 34 | #define DELAY_SYS_INIT_LED_OFF DELAY_MS(10) 35 | #define DELAY_SYS_RUN_LED_ON DELAY_MS(1950) 36 | #define DELAY_SYS_RUN_LED_OFF DELAY_MS(150) 37 | #define DELAY_SYS_FAULT_LED_ON DELAY_MS(50) 38 | #define DELAY_SYS_FAULT_LED_OFF DELAY_MS(950) 39 | 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/app/inc/rtconfig.h: -------------------------------------------------------------------------------- 1 | /* RT-Thread config file */ 2 | #ifndef __RTTHREAD_CFG_H__ 3 | #define __RTTHREAD_CFG_H__ 4 | 5 | /* RT_NAME_MAX*/ 6 | #define RT_NAME_MAX 24 7 | 8 | /* RT_ALIGN_SIZE*/ 9 | #define RT_ALIGN_SIZE 8 10 | 11 | /* PRIORITY_MAX */ 12 | #define RT_THREAD_PRIORITY_MAX 32 13 | 14 | /* Tick per Second */ 15 | #define RT_TICK_PER_SECOND 10000 //0.1ms 16 | 17 | /* SECTION: RT_DEBUG */ 18 | /* Thread Debug */ 19 | #define RT_DEBUG 20 | #define RT_THREAD_DEBUG 21 | 22 | #define RT_USING_OVERFLOW_CHECK 23 | 24 | /* Using Hook */ 25 | #define RT_USING_HOOK 26 | 27 | /* Using Software Timer */ 28 | /* #define RT_USING_TIMER_SOFT */ 29 | #define RT_TIMER_THREAD_PRIO 4 30 | #define RT_TIMER_THREAD_STACK_SIZE 512 31 | #define RT_TIMER_TICK_PER_SECOND 1000 32 | 33 | /* SECTION: IPC */ 34 | /* Using Semaphore*/ 35 | #define RT_USING_SEMAPHORE 36 | 37 | /* Using Mutex */ 38 | #define RT_USING_MUTEX 39 | 40 | /* Using Event */ 41 | #define RT_USING_EVENT 42 | 43 | /* Using MailBox */ 44 | //#define RT_USING_MAILBOX 45 | 46 | /* Using Message Queue */ 47 | //#define RT_USING_MESSAGEQUEUE 48 | 49 | /* SECTION: Memory Management */ 50 | /* Using Memory Pool Management*/ 51 | //#define RT_USING_MEMPOOL 52 | 53 | /* Using Dynamic Heap Management */ 54 | #define RT_USING_HEAP 55 | 56 | /* Using Small MM */ 57 | #define RT_USING_SMALL_MEM 58 | 59 | /* SECTION: Device System */ 60 | /* Using Device System */ 61 | #define RT_USING_CONSOLE 62 | // 63 | #define RT_CONSOLE_DEVICE_NAME "uart1" 64 | 65 | /* SECTION: Console options */ 66 | /* the buffer size of console*/ 67 | #define RT_CONSOLEBUF_SIZE 512 68 | 69 | /* SECTION: finsh, a C-Express shell */ 70 | #define RT_USING_FINSH 71 | /* Using symbol table */ 72 | #define FINSH_USING_SYMTAB 73 | #define FINSH_USING_DESCRIPTION 74 | /* Using msh and finsh */ 75 | #define FINSH_USING_MSH 76 | /* Using msh only */ 77 | #define FINSH_USING_MSH_ONLY 78 | 79 | /* SECTION: Device System */ 80 | /* Using Device System */ 81 | #define RT_USING_DEVICE 82 | // 83 | #define RT_USING_DEVICE_IPC 84 | // 85 | #define RT_USING_SERIAL 86 | 87 | #endif 88 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/app/inc/stm32f10x_it.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file Project/Template/stm32f10x_it.h 4 | * @author MCD Application Team 5 | * @version V3.1.0 6 | * @date 06/19/2009 7 | * @brief This file contains the headers of the interrupt handlers. 8 | ****************************************************************************** 9 | * @copy 10 | * 11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 17 | * 18 | *

© COPYRIGHT 2009 STMicroelectronics

19 | */ 20 | 21 | /* Define to prevent recursive inclusion -------------------------------------*/ 22 | #ifndef __STM32F10x_IT_H 23 | #define __STM32F10x_IT_H 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | /* Includes ------------------------------------------------------------------*/ 30 | 31 | #include "bsp.h" 32 | 33 | /* Exported types ------------------------------------------------------------*/ 34 | /* Exported constants --------------------------------------------------------*/ 35 | /* Exported macro ------------------------------------------------------------*/ 36 | /* Exported functions ------------------------------------------------------- */ 37 | 38 | void NMI_Handler(void); 39 | void HardFault_Handler(void); 40 | void MemManage_Handler(void); 41 | void BusFault_Handler(void); 42 | void UsageFault_Handler(void); 43 | void SVC_Handler(void); 44 | void DebugMon_Handler(void); 45 | void PendSV_Handler(void); 46 | void SysTick_Handler(void); 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif /* __STM32F10x_IT_H */ 53 | 54 | /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/ 55 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/app/src/app.c: -------------------------------------------------------------------------------- 1 | #include "app_task.h" 2 | 3 | int main(void){ 4 | /* disable interrupt first */ 5 | rt_hw_interrupt_disable(); 6 | 7 | /* startup RT-Thread RTOS */ 8 | rtthread_startup(); 9 | 10 | return 0; 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/app/src/user_finsh_cmd.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/os/rt-thread/stm32f10x/app/src/user_finsh_cmd.c -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/components/easylogger/inc/elog_cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the EasyLogger Library. 3 | * 4 | * Copyright (c) 2015, Armink, 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining 7 | * a copy of this software and associated documentation files (the 8 | * 'Software'), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sublicense, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject to 12 | * the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be 15 | * included in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | * 25 | * Function: It is the configure head file for this library. 26 | * Created on: 2015-07-30 27 | */ 28 | 29 | #ifndef _ELOG_CFG_H_ 30 | #define _ELOG_CFG_H_ 31 | 32 | /* enable log output. default open this macro */ 33 | #define ELOG_OUTPUT_ENABLE 34 | /* setting static output log level */ 35 | #define ELOG_OUTPUT_LVL ELOG_LVL_VERBOSE 36 | /* enable assert check */ 37 | #define ELOG_ASSERT_ENABLE 38 | /* buffer size for every line's log */ 39 | #define ELOG_LINE_BUF_SIZE 256 40 | /* output line number max length */ 41 | #define ELOG_LINE_NUM_MAX_LEN 5 42 | /* output filter's tag max length */ 43 | #define ELOG_FILTER_TAG_MAX_LEN 16 44 | /* output filter's keyword max length */ 45 | #define ELOG_FILTER_KW_MAX_LEN 16 46 | /* output newline sign */ 47 | #define ELOG_NEWLINE_SIGN "\r\n" 48 | /* enable asynchronous output mode */ 49 | #define ELOG_ASYNC_OUTPUT_ENABLE 50 | /* the highest output level for async mode, other level will sync output */ 51 | #define ELOG_ASYNC_OUTPUT_LVL ELOG_LVL_DEBUG 52 | /* buffer size for asynchronous output mode */ 53 | #define ELOG_ASYNC_OUTPUT_BUF_SIZE (ELOG_LINE_BUF_SIZE * 10) 54 | /* each asynchronous output's log which must end with newline sign */ 55 | //#define ELOG_ASYNC_LINE_OUTPUT 56 | /* asynchronous output mode using POSIX pthread implementation */ 57 | //#define ELOG_ASYNC_OUTPUT_USING_PTHREAD 58 | 59 | #endif /* _ELOG_CFG_H_ */ 60 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/components/easylogger/plugins/flash/elog_flash_cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the EasyLogger Library. 3 | * 4 | * Copyright (c) 2015, Armink, 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining 7 | * a copy of this software and associated documentation files (the 8 | * 'Software'), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sublicense, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject to 12 | * the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be 15 | * included in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | * 25 | * Function: It is the configure head file for this flash log plugin. 26 | * Created on: 2015-07-30 27 | */ 28 | 29 | #ifndef _ELOG_FLASH_CFG_H_ 30 | #define _ELOG_FLASH_CFG_H_ 31 | 32 | /* EasyLogger flash log plugin's using buffer mode */ 33 | #define ELOG_FLASH_USING_BUF_MODE 34 | /* EasyLogger flash log plugin's RAM buffer size */ 35 | #define ELOG_FLASH_BUF_SIZE 1024 36 | 37 | #endif /* _ELOG_FLASH_CFG_H_ */ 38 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/components/easylogger/plugins/flash/elog_flash_port.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the EasyLogger Library. 3 | * 4 | * Copyright (c) 2015, Armink, 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining 7 | * a copy of this software and associated documentation files (the 8 | * 'Software'), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sublicense, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject to 12 | * the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be 15 | * included in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | * 25 | * Function: Portable interface for EasyLogger's flash log pulgin. 26 | * Created on: 2015-07-28 27 | */ 28 | 29 | #include "elog_flash.h" 30 | #include 31 | #include 32 | 33 | static struct rt_semaphore flash_log_lock; 34 | 35 | /** 36 | * EasyLogger flash log pulgin port initialize 37 | * 38 | * @return result 39 | */ 40 | ElogErrCode elog_flash_port_init(void) { 41 | ElogErrCode result = ELOG_NO_ERR; 42 | 43 | rt_sem_init(&flash_log_lock, "elog flash lock", 1, RT_IPC_FLAG_PRIO); 44 | 45 | return result; 46 | } 47 | 48 | /** 49 | * output flash saved log port interface 50 | * 51 | * @param log flash saved log 52 | * @param size log size 53 | */ 54 | void elog_flash_port_output(const char *log, size_t size) { 55 | /* output to terminal */ 56 | rt_kprintf("%.*s", size, log); 57 | } 58 | 59 | /** 60 | * flash log lock 61 | */ 62 | void elog_flash_port_lock(void) { 63 | rt_sem_take(&flash_log_lock, RT_WAITING_FOREVER); 64 | } 65 | 66 | /** 67 | * flash log unlock 68 | */ 69 | void elog_flash_port_unlock(void) { 70 | rt_sem_release(&flash_log_lock); 71 | } 72 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/components/others/bsp.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/os/rt-thread/stm32f10x/components/others/bsp.c -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/components/others/stm32f103xB.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000; 6 | /* software version and hardware version store start address */ 7 | define symbol __ICFEDIT_version_start__ = __ICFEDIT_intvec_start__ + 512; 8 | /*-Memory Regions-*/ 9 | define symbol __ICFEDIT_region_ROM_start__ = __ICFEDIT_intvec_start__; 10 | define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF; 11 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; 12 | define symbol __ICFEDIT_region_RAM_end__ = 0x20004FFF; 13 | /*-Sizes-*/ 14 | define symbol __ICFEDIT_size_cstack__ = 0x800; 15 | define symbol __ICFEDIT_size_heap__ = 0x800; 16 | 17 | /**** End of ICF editor section. ###ICF###*/ 18 | 19 | define memory mem with size = 4G; 20 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 21 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 22 | 23 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 24 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 25 | 26 | initialize by copy { readwrite }; 27 | do not initialize { section .noinit }; 28 | 29 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 30 | 31 | place in ROM_region { readonly }; 32 | place in RAM_region { readwrite, 33 | block CSTACK, block HEAP }; 34 | 35 | /* armink add for version storage */ 36 | keep { section .version }; 37 | place at address mem:__ICFEDIT_version_start__ { readonly section .version }; 38 | 39 | /* armink add for rtt finsh */ 40 | keep { section FSymTab }; 41 | keep { section VSymTab }; -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/components/others/stm32f103xE.icf: -------------------------------------------------------------------------------- 1 | /*###ICF### Section handled by ICF editor, don't touch! ****/ 2 | /*-Editor annotation file-*/ 3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ 4 | /*-Specials-*/ 5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000; 6 | /* software version and hardware version store start address */ 7 | define symbol __ICFEDIT_version_start__ = __ICFEDIT_intvec_start__ + 512; 8 | /*-Memory Regions-*/ 9 | define symbol __ICFEDIT_region_ROM_start__ = __ICFEDIT_intvec_start__; 10 | define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF; 11 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; 12 | define symbol __ICFEDIT_region_RAM_end__ = 0x2000FFFF; 13 | /*-Sizes-*/ 14 | define symbol __ICFEDIT_size_cstack__ = 0x1000; 15 | define symbol __ICFEDIT_size_heap__ = 0x1000; 16 | 17 | /**** End of ICF editor section. ###ICF###*/ 18 | 19 | define memory mem with size = 4G; 20 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; 21 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; 22 | 23 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; 24 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; 25 | 26 | initialize by copy { readwrite }; 27 | do not initialize { section .noinit }; 28 | 29 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; 30 | 31 | place in ROM_region { readonly }; 32 | place in RAM_region { readwrite, 33 | block CSTACK, block HEAP }; 34 | 35 | /* armink add for version storage */ 36 | keep { section .version }; 37 | place at address mem:__ICFEDIT_version_start__ { readonly section .version }; 38 | 39 | /* armink add for rtt finsh */ 40 | keep { section FSymTab }; 41 | keep { section VSymTab }; -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/components/others/types.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef TYPES_H_ 3 | #define TYPES_H_ 4 | 5 | #include 6 | #include 7 | typedef int bool_t; /**< boolean type */ 8 | 9 | #ifndef TRUE 10 | #define TRUE 1 11 | #endif 12 | 13 | #ifndef FALSE 14 | #define FALSE 0 15 | #endif 16 | 17 | #ifndef NULL 18 | #define NULL 0 19 | #endif 20 | 21 | #define success 0 22 | #define fail 1 23 | 24 | 25 | #ifndef disable 26 | #define disable 0 27 | #endif 28 | 29 | #ifndef enable 30 | #define enable 1 31 | #endif 32 | 33 | #endif /* TYPES_H_ */ 34 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/components/others/utils.c: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | /* current system status */ 4 | static SystemStatus cur_system_status = SYSTEM_STATUS_INIT; 5 | 6 | 7 | /** 8 | * System go to fault status. 9 | */ 10 | void system_go_to_fault_status(void){ 11 | cur_system_status = SYSTEM_STATUS_FAULT; 12 | } 13 | 14 | /** 15 | * Set current system status. 16 | * 17 | * @param status system status 18 | */ 19 | void set_system_status(SystemStatus status){ 20 | cur_system_status = status; 21 | } 22 | 23 | /** 24 | * Get current system status. 25 | * 26 | * @return current system status 27 | */ 28 | SystemStatus get_system_status(void){ 29 | return cur_system_status; 30 | } 31 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/components/others/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef UTILS_H_ 2 | #define UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | /* system status */ 8 | typedef enum{ 9 | SYSTEM_STATUS_INIT, 10 | SYSTEM_STATUS_RUN, 11 | SYSTEM_STATUS_FAULT, 12 | SYSTEM_STATUS_SLEEP, 13 | }SystemStatus; 14 | 15 | void Delay(vu32 nCount); 16 | void system_go_to_fault_status(void); 17 | void set_system_status(SystemStatus status); 18 | SystemStatus get_system_status(void); 19 | 20 | #endif /* UTILS_H_ */ 21 | -------------------------------------------------------------------------------- /demo/os/rt-thread/stm32f10x/components/rtt_uart/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 | 15 | #ifndef __USART_H__ 16 | #define __USART_H__ 17 | 18 | #include 19 | #include 20 | 21 | #define UART_ENABLE_IRQ(n) NVIC_EnableIRQ((n)) 22 | #define UART_DISABLE_IRQ(n) NVIC_DisableIRQ((n)) 23 | 24 | void rt_hw_usart_init(void); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /demo/os/windows/.gitignore: -------------------------------------------------------------------------------- 1 | out 2 | elog_file.* 3 | -------------------------------------------------------------------------------- /demo/os/windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.26) 2 | project(easylogger_demo) 3 | 4 | set(CMAKE_C_STANDARD 99) 5 | 6 | include_directories( 7 | ${PROJECT_SOURCE_DIR} 8 | easylogger/inc 9 | ../../../easylogger/inc 10 | ../../../easylogger/plugins/file 11 | ) 12 | 13 | file(GLOB SOURCES 14 | main.c 15 | easylogger/port/*.c 16 | ../../../easylogger/src/*.c 17 | ../../../easylogger/plugins/file/elog_file.c 18 | ) 19 | 20 | add_executable(${PROJECT_NAME} ${SOURCES}) -------------------------------------------------------------------------------- /demo/os/windows/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/demo/os/windows/README.md -------------------------------------------------------------------------------- /demo/os/windows/easylogger/inc/elog_cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the EasyLogger Library. 3 | * 4 | * Copyright (c) 2015, Armink, 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining 7 | * a copy of this software and associated documentation files (the 8 | * 'Software'), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sublicense, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject to 12 | * the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be 15 | * included in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | * 25 | * Function: It is the configure head file for this library. 26 | * Created on: 2015-07-30 27 | */ 28 | 29 | #ifndef _ELOG_CFG_H_ 30 | #define _ELOG_CFG_H_ 31 | 32 | /* enable log output. default open this macro */ 33 | #define ELOG_OUTPUT_ENABLE 34 | /* enable log write file. default open this macro */ 35 | #define ELOG_FILE_ENABLE 36 | /* enable flush file cache. default open this macro */ 37 | #define ELOG_FILE_FLUSH_CACHE_ENABLE 38 | /* setting static output log level */ 39 | #define ELOG_OUTPUT_LVL ELOG_LVL_VERBOSE 40 | /* enable assert check */ 41 | #define ELOG_ASSERT_ENABLE 42 | /* buffer size for every line's log */ 43 | #define ELOG_LINE_BUF_SIZE 512 44 | /* output line number max length */ 45 | #define ELOG_LINE_NUM_MAX_LEN 5 46 | /* output filter's tag max length */ 47 | #define ELOG_FILTER_TAG_MAX_LEN 16 48 | /* output filter's keyword max length */ 49 | #define ELOG_FILTER_KW_MAX_LEN 16 50 | /* output filter's tag level max num */ 51 | #define ELOG_FILTER_TAG_LVL_MAX_NUM 5 52 | /* output newline sign */ 53 | #define ELOG_NEWLINE_SIGN "\n" 54 | /* control some fmt */ 55 | #define ELOG_FMT_USING_FUNC 56 | #define ELOG_FMT_USING_DIR 57 | #define ELOG_FMT_USING_LINE 58 | 59 | #endif /* _ELOG_CFG_H_ */ 60 | -------------------------------------------------------------------------------- /demo/os/windows/easylogger/inc/elog_file_cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the EasyLogger Library. 3 | * 4 | * Copyright (c) 2015-2019, Qintl, 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining 7 | * a copy of this software and associated documentation files (the 8 | * 'Software'), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sublicense, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject to 12 | * the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be 15 | * included in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | * 25 | * Function: It is the configure head file for this flash log plugin. 26 | * Created on: 2019-01-05 27 | */ 28 | 29 | #ifndef _ELOG_FILE_CFG_H_ 30 | #define _ELOG_FILE_CFG_H_ 31 | 32 | /* EasyLogger file log plugin's using file name */ 33 | #define ELOG_FILE_NAME "elog_file.log" 34 | 35 | /* EasyLogger file log plugin's using file max size */ 36 | #define ELOG_FILE_MAX_SIZE (1 * 1024 * 1024) 37 | 38 | /* EasyLogger file log plugin's using max rotate file count */ 39 | #define ELOG_FILE_MAX_ROTATE 10 40 | 41 | #endif /* _ELOG_FILE_CFG_H_ */ 42 | -------------------------------------------------------------------------------- /demo/os/windows/easylogger/port/elog_file_port.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the EasyLogger Library. 3 | * 4 | * Copyright (c) 2015-2019, Qintl, 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining 7 | * a copy of this software and associated documentation files (the 8 | * 'Software'), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sublicense, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject to 12 | * the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be 15 | * included in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | * 25 | * Function: Portable interface for EasyLogger's file log pulgin. 26 | * Created on: 2019-01-05 27 | */ 28 | 29 | #include 30 | 31 | /** 32 | * EasyLogger flile log pulgin port initialize 33 | * 34 | * @return result 35 | */ 36 | ElogErrCode elog_file_port_init(void) { 37 | ElogErrCode result = ELOG_NO_ERR; 38 | 39 | /* do noting, using elog_port.c's locker only */ 40 | 41 | return result; 42 | } 43 | 44 | /** 45 | * file log lock 46 | */ 47 | void elog_file_port_lock(void) 48 | { 49 | /* do noting, using elog_port.c's locker only */ 50 | } 51 | 52 | /** 53 | * file log unlock 54 | */ 55 | void elog_file_port_unlock(void) 56 | { 57 | /* do noting, using elog_port.c's locker only */ 58 | } 59 | /** 60 | * file log deinit 61 | */ 62 | void elog_file_port_deinit(void) 63 | { 64 | /* do noting, using elog_port.c's locker only */ 65 | } 66 | -------------------------------------------------------------------------------- /demo/os/windows/make.bat: -------------------------------------------------------------------------------- 1 | @if not exist .\out mkdir .\out 2 | gcc -I "easylogger\inc" -I "..\..\..\easylogger\inc" -O0 -g3 -Wall -c "..\..\..\easylogger\src\elog.c" -o "out\elog.o" 3 | gcc -I "easylogger\inc" -I "..\..\..\easylogger\inc" -I "..\..\..\easylogger\plugins\file" -O0 -g3 -Wall -c "easylogger\port\elog_port.c" -o "out\elog_port.o" 4 | gcc -I "easylogger\inc" -I "..\..\..\easylogger\inc" -O0 -g3 -Wall -c "..\..\..\easylogger\src\elog_utils.c" -o "out\elog_utils.o" 5 | gcc -I "easylogger\inc" -I "..\..\..\easylogger\inc" -O0 -g3 -Wall -c "..\..\..\easylogger\plugins\file\elog_file.c" -o "out\elog_file.o" 6 | gcc -I "easylogger\inc" -I "..\..\..\easylogger\inc" -I "..\..\..\easylogger\plugins\file" -O0 -g3 -Wall -c "..\..\..\easylogger\plugins\file\elog_file_port.c" -o "out\elog_file_port.o" 7 | gcc -I "easylogger\inc" -I "..\..\..\easylogger\inc" -O0 -g3 -Wall -c "main.c" -o "out\main.o" 8 | gcc -o out\EasyLoggerWinDemo.exe "out\main.o" "out\elog_utils.o" "out\elog.o" "out\elog_port.o" "out\elog_file.o" "out\elog_file_port.o" 9 | -------------------------------------------------------------------------------- /docs/en/api.md: -------------------------------------------------------------------------------- 1 | # Coming soon... -------------------------------------------------------------------------------- /docs/en/images/EasyLoggerDemo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/docs/en/images/EasyLoggerDemo.gif -------------------------------------------------------------------------------- /docs/en/images/LogDemo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/docs/en/images/LogDemo.gif -------------------------------------------------------------------------------- /docs/en/readme.md: -------------------------------------------------------------------------------- 1 | |File name |Description| 2 | |:----- |:----| 3 | |api.md |API description| -------------------------------------------------------------------------------- /docs/readme.md: -------------------------------------------------------------------------------- 1 | |File or folder name |Description| 2 | |:----- |:----| 3 | |en |English documents| 4 | |zh |中文文档(简体)| -------------------------------------------------------------------------------- /docs/zh/api/readme.md: -------------------------------------------------------------------------------- 1 | |文件名 |描述| 2 | |:----- |:----| 3 | |flash.md |flash插件API文档| 4 | |kernel.md |核心功能API文档| -------------------------------------------------------------------------------- /docs/zh/images/EasyLoggerDemo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/docs/zh/images/EasyLoggerDemo.gif -------------------------------------------------------------------------------- /docs/zh/images/ElogNuttxSpiFlashDemo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/docs/zh/images/ElogNuttxSpiFlashDemo.png -------------------------------------------------------------------------------- /docs/zh/images/LogDemo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/docs/zh/images/LogDemo.gif -------------------------------------------------------------------------------- /docs/zh/images/TextColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armink/EasyLogger/a596b2642e27af3a2dbdeb0e5f04a6b5b673ef24/docs/zh/images/TextColor.png -------------------------------------------------------------------------------- /docs/zh/port/readme.md: -------------------------------------------------------------------------------- 1 | |文件名 |描述| 2 | |:----- |:----| 3 | |flash.md |flash插件移植文档| 4 | |kernel.md |核心功能移植文档| -------------------------------------------------------------------------------- /docs/zh/readme.md: -------------------------------------------------------------------------------- 1 | |文件名 |描述| 2 | |:----- |:----| 3 | |api |API说明| 4 | |port |移植说明| -------------------------------------------------------------------------------- /easylogger/plugins/file/elog_file.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the EasyLogger Library. 3 | * 4 | * Copyright (c) 2015-2019, Qintl, 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining 7 | * a copy of this software and associated documentation files (the 8 | * 'Software'), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sublicense, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject to 12 | * the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be 15 | * included in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | * 25 | * Function: It is an head file for file log plugin. You can see all be called functions. 26 | * Created on: 2019-01-05 27 | */ 28 | 29 | #ifndef __ELOG_FILE__H__ 30 | #define __ELOG_FILE__H__ 31 | 32 | #include 33 | #include 34 | #include 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | /* EasyLogger file log plugin's software version number */ 41 | #define ELOG_FILE_SW_VERSION "V1.0.0" 42 | #ifdef linux 43 | #define likely(x) __builtin_expect(!!(x), 1) 44 | #define unlikely(x) __builtin_expect(!!(x), 0) 45 | #else 46 | #define likely(x) (x) 47 | #define unlikely(x) (x) 48 | #endif 49 | 50 | typedef struct { 51 | char *name; /* file name */ 52 | size_t max_size; /* file max size */ 53 | int max_rotate; /* max rotate file count */ 54 | } ElogFileCfg; 55 | 56 | /* elog_file.c */ 57 | ElogErrCode elog_file_init(void); 58 | void elog_file_write(const char *log, size_t size); 59 | void elog_file_config(ElogFileCfg *cfg); 60 | void elog_file_deinit(void); 61 | 62 | /* elog_file_port.c */ 63 | ElogErrCode elog_file_port_init(void); 64 | void elog_file_port_lock(void); 65 | void elog_file_port_unlock(void); 66 | void elog_file_port_deinit(void); 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /easylogger/plugins/file/elog_file_cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the EasyLogger Library. 3 | * 4 | * Copyright (c) 2015-2019, Qintl, 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining 7 | * a copy of this software and associated documentation files (the 8 | * 'Software'), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sublicense, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject to 12 | * the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be 15 | * included in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | * 25 | * Function: It is the configure head file for this flash log plugin. 26 | * Created on: 2019-01-05 27 | */ 28 | 29 | #ifndef _ELOG_FILE_CFG_H_ 30 | #define _ELOG_FILE_CFG_H_ 31 | 32 | /* EasyLogger file log plugin's using file name */ 33 | #define ELOG_FILE_NAME /* @note you must define it for a value */ 34 | 35 | /* EasyLogger file log plugin's using file max size */ 36 | #define ELOG_FILE_MAX_SIZE /* @note you must define it for a value */ 37 | 38 | /* EasyLogger file log plugin's using max rotate file count */ 39 | #define ELOG_FILE_MAX_ROTATE /* @note you must define it for a value */ 40 | 41 | #endif /* _ELOG_FILE_CFG_H_ */ 42 | -------------------------------------------------------------------------------- /easylogger/plugins/file/elog_file_port.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the EasyLogger Library. 3 | * 4 | * Copyright (c) 2015-2019, Qintl, 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining 7 | * a copy of this software and associated documentation files (the 8 | * 'Software'), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sublicense, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject to 12 | * the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be 15 | * included in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | * 25 | * Function: Portable interface for EasyLogger's file log pulgin. 26 | * Created on: 2019-01-05 27 | */ 28 | 29 | #include "elog_file.h" 30 | 31 | /** 32 | * EasyLogger flile log pulgin port initialize 33 | * 34 | * @return result 35 | */ 36 | ElogErrCode elog_file_port_init(void) 37 | { 38 | ElogErrCode result = ELOG_NO_ERR; 39 | 40 | /* add your code here */ 41 | 42 | return result; 43 | } 44 | 45 | /** 46 | * file log lock 47 | */ 48 | void elog_file_port_lock(void) { 49 | 50 | /* add your code here */ 51 | 52 | } 53 | 54 | /** 55 | * file log unlock 56 | */ 57 | void elog_file_port_unlock(void) { 58 | 59 | /* add your code here */ 60 | 61 | } 62 | 63 | /** 64 | * file log deinit 65 | */ 66 | void elog_file_port_deinit(void) { 67 | 68 | /* add your code here */ 69 | 70 | } 71 | -------------------------------------------------------------------------------- /easylogger/plugins/flash/elog_flash.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the EasyLogger Library. 3 | * 4 | * Copyright (c) 2015-2017, Armink, 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining 7 | * a copy of this software and associated documentation files (the 8 | * 'Software'), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sublicense, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject to 12 | * the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be 15 | * included in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | * 25 | * Function: It is an head file for flash log plugin. You can see all be called functions. 26 | * Created on: 2015-06-05 27 | */ 28 | 29 | #ifndef __ELOG_FLASH_H__ 30 | #define __ELOG_FLASH_H__ 31 | 32 | #include 33 | #include 34 | 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | #if !defined(ELOG_FLASH_BUF_SIZE) 40 | #error "Please configure RAM buffer size (in elog_flash_cfg.h)" 41 | #endif 42 | 43 | /* EasyLogger flash log plugin's software version number */ 44 | #define ELOG_FLASH_SW_VERSION "V2.0.1" 45 | 46 | /* elog_flash.c */ 47 | ElogErrCode elog_flash_init(void); 48 | void elog_flash_output(size_t pos, size_t size); 49 | void elog_flash_output_all(void); 50 | void elog_flash_output_recent(size_t size); 51 | void elog_flash_set_filter(uint8_t level,const char *tag,const char *keyword); 52 | void elog_flash_write(const char *log, size_t size); 53 | void elog_flash_clean(void); 54 | void elog_flash_lock_enabled(bool enabled); 55 | 56 | #ifdef ELOG_FLASH_USING_BUF_MODE 57 | void elog_flash_flush(void); 58 | #endif 59 | 60 | /* elog_flash_port.c */ 61 | ElogErrCode elog_flash_port_init(void); 62 | void elog_flash_port_output(const char *log, size_t size); 63 | void elog_flash_port_lock(void); 64 | void elog_flash_port_unlock(void); 65 | 66 | #ifdef __cplusplus 67 | } 68 | #endif 69 | 70 | #endif /* __ELOG_FLASH_H__ */ 71 | -------------------------------------------------------------------------------- /easylogger/plugins/flash/elog_flash_cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the EasyLogger Library. 3 | * 4 | * Copyright (c) 2015, Armink, 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining 7 | * a copy of this software and associated documentation files (the 8 | * 'Software'), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sublicense, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject to 12 | * the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be 15 | * included in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | * 25 | * Function: It is the configure head file for this flash log plugin. 26 | * Created on: 2015-07-30 27 | */ 28 | 29 | #ifndef _ELOG_FLASH_CFG_H_ 30 | #define _ELOG_FLASH_CFG_H_ 31 | 32 | /* EasyLogger flash log plugin's using buffer mode */ 33 | #define ELOG_FLASH_USING_BUF_MODE 34 | /* EasyLogger flash log plugin's RAM buffer size */ 35 | #define ELOG_FLASH_BUF_SIZE /* @note you must define it for a value */ 36 | 37 | #endif /* _ELOG_FLASH_CFG_H_ */ 38 | -------------------------------------------------------------------------------- /easylogger/plugins/flash/elog_flash_port.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the EasyLogger Library. 3 | * 4 | * Copyright (c) 2015, Armink, 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining 7 | * a copy of this software and associated documentation files (the 8 | * 'Software'), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sublicense, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject to 12 | * the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be 15 | * included in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | * 25 | * Function: Portable interface for EasyLogger's flash log pulgin. 26 | * Created on: 2015-07-28 27 | */ 28 | 29 | #include "elog_flash.h" 30 | 31 | /** 32 | * EasyLogger flash log pulgin port initialize 33 | * 34 | * @return result 35 | */ 36 | ElogErrCode elog_flash_port_init(void) { 37 | ElogErrCode result = ELOG_NO_ERR; 38 | 39 | /* add your code here */ 40 | 41 | return result; 42 | } 43 | 44 | /** 45 | * output flash saved log port interface 46 | * 47 | * @param log flash saved log 48 | * @param size log size 49 | */ 50 | void elog_flash_port_output(const char *log, size_t size) { 51 | 52 | /* add your code here */ 53 | 54 | } 55 | 56 | /** 57 | * flash log lock 58 | */ 59 | void elog_flash_port_lock(void) { 60 | 61 | /* add your code here */ 62 | 63 | } 64 | 65 | /** 66 | * flash log unlock 67 | */ 68 | void elog_flash_port_unlock(void) { 69 | 70 | /* add your code here */ 71 | 72 | } --------------------------------------------------------------------------------