├── .gdbinit ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── CONTRIBUTING ├── ChibiOS_3.0.5 ├── ext │ ├── readme.txt │ └── stdperiph_stm32f4 │ │ ├── inc │ │ ├── misc.h │ │ ├── stm32f4_gpio_af.h │ │ ├── stm32f4xx_adc.h │ │ ├── stm32f4xx_dma.h │ │ ├── stm32f4xx_exti.h │ │ ├── stm32f4xx_flash.h │ │ ├── stm32f4xx_iwdg.h │ │ ├── stm32f4xx_rcc.h │ │ ├── stm32f4xx_syscfg.h │ │ ├── stm32f4xx_tim.h │ │ └── stm32f4xx_wwdg.h │ │ ├── src │ │ ├── misc.c │ │ ├── stm32f4xx_adc.c │ │ ├── stm32f4xx_dma.c │ │ ├── stm32f4xx_exti.c │ │ ├── stm32f4xx_flash.c │ │ ├── stm32f4xx_iwdg.c │ │ ├── stm32f4xx_rcc.c │ │ ├── stm32f4xx_syscfg.c │ │ ├── stm32f4xx_tim.c │ │ └── stm32f4xx_wwdg.c │ │ └── stm32lib.mk ├── license.txt ├── os │ ├── common │ │ └── ports │ │ │ ├── ARM │ │ │ ├── compilers │ │ │ │ └── GCC │ │ │ │ │ ├── crt0.s │ │ │ │ │ ├── crt1.c │ │ │ │ │ ├── ld │ │ │ │ │ └── LPC2148.ld │ │ │ │ │ ├── mk │ │ │ │ │ └── startup_lpc214x.mk │ │ │ │ │ ├── rules.ld │ │ │ │ │ ├── rules.mk │ │ │ │ │ └── vectors.s │ │ │ └── devices │ │ │ │ └── LPC214x │ │ │ │ ├── armparams.h │ │ │ │ └── lpc214x.h │ │ │ ├── ARMCMx │ │ │ ├── compilers │ │ │ │ ├── GCC │ │ │ │ │ ├── crt0_v6m.s │ │ │ │ │ ├── crt0_v7m.s │ │ │ │ │ ├── crt1.c │ │ │ │ │ ├── ld │ │ │ │ │ │ ├── KL25Z128.ld │ │ │ │ │ │ ├── MK20DX128.ld │ │ │ │ │ │ ├── STM32F030x4.ld │ │ │ │ │ │ ├── STM32F030x6.ld │ │ │ │ │ │ ├── STM32F030x8.ld │ │ │ │ │ │ ├── STM32F051x8.ld │ │ │ │ │ │ ├── STM32F072xB.ld │ │ │ │ │ │ ├── STM32F100xB.ld │ │ │ │ │ │ ├── STM32F103xB.ld │ │ │ │ │ │ ├── STM32F103xD.ld │ │ │ │ │ │ ├── STM32F103xE.ld │ │ │ │ │ │ ├── STM32F103xE_maplemini_bootloader.ld │ │ │ │ │ │ ├── STM32F103xG.ld │ │ │ │ │ │ ├── STM32F107xC.ld │ │ │ │ │ │ ├── STM32F302x8.ld │ │ │ │ │ │ ├── STM32F303xC.ld │ │ │ │ │ │ ├── STM32F334x8.ld │ │ │ │ │ │ ├── STM32F373xC.ld │ │ │ │ │ │ ├── STM32F401xC.ld │ │ │ │ │ │ ├── STM32F401xE.ld │ │ │ │ │ │ ├── STM32F405xG.ld │ │ │ │ │ │ ├── STM32F407xG.ld │ │ │ │ │ │ ├── STM32F411xC.ld │ │ │ │ │ │ ├── STM32F411xE.ld │ │ │ │ │ │ ├── STM32F429xI.ld │ │ │ │ │ │ ├── STM32L052x6.ld │ │ │ │ │ │ ├── STM32L052x8.ld │ │ │ │ │ │ ├── STM32L151x6.ld │ │ │ │ │ │ ├── STM32L152xB.ld │ │ │ │ │ │ └── STM32L152xE.ld │ │ │ │ │ ├── mk │ │ │ │ │ │ ├── startup_k20x.mk │ │ │ │ │ │ ├── startup_kl2x.mk │ │ │ │ │ │ ├── startup_stm32f0xx.mk │ │ │ │ │ │ ├── startup_stm32f1xx.mk │ │ │ │ │ │ ├── startup_stm32f3xx.mk │ │ │ │ │ │ ├── startup_stm32f4xx.mk │ │ │ │ │ │ ├── startup_stm32l0xx.mk │ │ │ │ │ │ └── startup_stm32l1xx.mk │ │ │ │ │ ├── rules.ld │ │ │ │ │ ├── rules.mk │ │ │ │ │ └── vectors.c │ │ │ │ ├── IAR │ │ │ │ │ ├── cstartup.s │ │ │ │ │ └── vectors.s │ │ │ │ └── RVCT │ │ │ │ │ ├── cstartup.s │ │ │ │ │ └── vectors.s │ │ │ └── devices │ │ │ │ ├── K20x │ │ │ │ └── cmparams.h │ │ │ │ ├── KL2x │ │ │ │ └── cmparams.h │ │ │ │ ├── STM32F0xx │ │ │ │ └── cmparams.h │ │ │ │ ├── STM32F1xx │ │ │ │ └── cmparams.h │ │ │ │ ├── STM32F3xx │ │ │ │ └── cmparams.h │ │ │ │ ├── STM32F4xx │ │ │ │ └── cmparams.h │ │ │ │ ├── STM32L0xx │ │ │ │ └── cmparams.h │ │ │ │ └── STM32L1xx │ │ │ │ └── cmparams.h │ │ │ └── e200 │ │ │ ├── compilers │ │ │ └── GCC │ │ │ │ ├── crt0.s │ │ │ │ ├── ld │ │ │ │ ├── SPC560B50.ld │ │ │ │ ├── SPC560B60.ld │ │ │ │ ├── SPC560B64.ld │ │ │ │ ├── SPC560D40.ld │ │ │ │ ├── SPC560P50.ld │ │ │ │ ├── SPC563M64.ld │ │ │ │ ├── SPC564A70.ld │ │ │ │ ├── SPC564A80.ld │ │ │ │ ├── SPC56EC74.ld │ │ │ │ ├── SPC56EL54_LSM.ld │ │ │ │ ├── SPC56EL60_LSM.ld │ │ │ │ ├── SPC56EL70_LSM.ld │ │ │ │ └── SPC57EM80_HSM.ld │ │ │ │ ├── rules.mk │ │ │ │ ├── rules_z0.ld │ │ │ │ ├── rules_z3.ld │ │ │ │ ├── rules_z4.ld │ │ │ │ ├── vectors.h │ │ │ │ └── vectors.s │ │ │ └── devices │ │ │ ├── SPC560BCxx │ │ │ ├── boot.h │ │ │ ├── boot.s │ │ │ ├── intc.h │ │ │ └── ppcparams.h │ │ │ ├── SPC560Bxx │ │ │ ├── boot.h │ │ │ ├── boot.s │ │ │ ├── intc.h │ │ │ └── ppcparams.h │ │ │ ├── SPC560Dxx │ │ │ ├── boot.h │ │ │ ├── boot.s │ │ │ ├── intc.h │ │ │ └── ppcparams.h │ │ │ ├── SPC560Pxx │ │ │ ├── boot.h │ │ │ ├── boot.s │ │ │ ├── intc.h │ │ │ └── ppcparams.h │ │ │ ├── SPC563Mxx │ │ │ ├── boot.h │ │ │ ├── boot.s │ │ │ ├── intc.h │ │ │ └── ppcparams.h │ │ │ ├── SPC564Axx │ │ │ ├── boot.h │ │ │ ├── boot.s │ │ │ ├── intc.h │ │ │ └── ppcparams.h │ │ │ ├── SPC56ECxx │ │ │ ├── boot.h │ │ │ ├── boot.s │ │ │ ├── intc.h │ │ │ └── ppcparams.h │ │ │ ├── SPC56ELxx │ │ │ ├── boot.h │ │ │ ├── boot.s │ │ │ ├── intc.h │ │ │ └── ppcparams.h │ │ │ └── SPC57EMxx_HSM │ │ │ ├── boot.h │ │ │ ├── boot.s │ │ │ ├── intc.h │ │ │ └── ppcparams.h │ ├── ext │ │ ├── CMSIS │ │ │ ├── ST │ │ │ │ ├── stm32f405xx.h │ │ │ │ ├── stm32f407xx.h │ │ │ │ ├── stm32f4xx.h │ │ │ │ └── system_stm32f4xx.h │ │ │ ├── include │ │ │ │ ├── arm_common_tables.h │ │ │ │ ├── arm_const_structs.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 │ │ │ └── readme.txt │ │ └── readme.txt │ ├── hal │ │ ├── hal.mk │ │ ├── include │ │ │ ├── adc.h │ │ │ ├── can.h │ │ │ ├── dac.h │ │ │ ├── ext.h │ │ │ ├── gpt.h │ │ │ ├── hal.h │ │ │ ├── hal_channels.h │ │ │ ├── hal_files.h │ │ │ ├── hal_ioblock.h │ │ │ ├── hal_mmcsd.h │ │ │ ├── hal_queues.h │ │ │ ├── hal_streams.h │ │ │ ├── i2c.h │ │ │ ├── i2s.h │ │ │ ├── icu.h │ │ │ ├── mac.h │ │ │ ├── mii.h │ │ │ ├── mmc_spi.h │ │ │ ├── pal.h │ │ │ ├── pwm.h │ │ │ ├── rtc.h │ │ │ ├── sdc.h │ │ │ ├── serial.h │ │ │ ├── serial_usb.h │ │ │ ├── spi.h │ │ │ ├── st.h │ │ │ ├── uart.h │ │ │ └── usb.h │ │ ├── lib │ │ │ └── streams │ │ │ │ ├── chprintf.c │ │ │ │ ├── chprintf.h │ │ │ │ ├── memstreams.c │ │ │ │ ├── memstreams.h │ │ │ │ ├── nullstreams.c │ │ │ │ └── nullstreams.h │ │ ├── osal │ │ │ ├── nil │ │ │ │ ├── osal.c │ │ │ │ ├── osal.h │ │ │ │ └── osal.mk │ │ │ ├── os-less │ │ │ │ └── ARMCMx │ │ │ │ │ ├── osal.c │ │ │ │ │ ├── osal.h │ │ │ │ │ └── osal.mk │ │ │ └── rt │ │ │ │ ├── osal.c │ │ │ │ ├── osal.h │ │ │ │ └── osal.mk │ │ ├── ports │ │ │ ├── STM32 │ │ │ │ ├── LLD │ │ │ │ │ ├── DACv1 │ │ │ │ │ │ ├── dac_lld.c │ │ │ │ │ │ └── dac_lld.h │ │ │ │ │ ├── DMAv1 │ │ │ │ │ │ ├── stm32_dma.c │ │ │ │ │ │ └── stm32_dma.h │ │ │ │ │ ├── GPIOv1 │ │ │ │ │ │ ├── pal_lld.c │ │ │ │ │ │ └── pal_lld.h │ │ │ │ │ ├── GPIOv2 │ │ │ │ │ │ ├── pal_lld.c │ │ │ │ │ │ └── pal_lld.h │ │ │ │ │ ├── I2Cv1 │ │ │ │ │ │ ├── i2c_lld.c │ │ │ │ │ │ └── i2c_lld.h │ │ │ │ │ ├── I2Cv2 │ │ │ │ │ │ ├── i2c_lld.c │ │ │ │ │ │ └── i2c_lld.h │ │ │ │ │ ├── OTGv1 │ │ │ │ │ │ ├── stm32_otg.h │ │ │ │ │ │ ├── usb_lld.c │ │ │ │ │ │ └── usb_lld.h │ │ │ │ │ ├── RTCv1 │ │ │ │ │ │ ├── rtc_lld.c │ │ │ │ │ │ └── rtc_lld.h │ │ │ │ │ ├── RTCv2 │ │ │ │ │ │ ├── rtc_lld.c │ │ │ │ │ │ └── rtc_lld.h │ │ │ │ │ ├── SPIv1 │ │ │ │ │ │ ├── i2s_lld.c │ │ │ │ │ │ ├── i2s_lld.h │ │ │ │ │ │ ├── spi_lld.c │ │ │ │ │ │ └── spi_lld.h │ │ │ │ │ ├── SPIv2 │ │ │ │ │ │ ├── spi_lld.c │ │ │ │ │ │ └── spi_lld.h │ │ │ │ │ ├── TIMv1 │ │ │ │ │ │ ├── gpt_lld.c │ │ │ │ │ │ ├── gpt_lld.h │ │ │ │ │ │ ├── icu_lld.c │ │ │ │ │ │ ├── icu_lld.h │ │ │ │ │ │ ├── pwm_lld.c │ │ │ │ │ │ ├── pwm_lld.h │ │ │ │ │ │ ├── st_lld.c │ │ │ │ │ │ ├── st_lld.h │ │ │ │ │ │ └── stm32_tim.h │ │ │ │ │ ├── USARTv1 │ │ │ │ │ │ ├── serial_lld.c │ │ │ │ │ │ ├── serial_lld.h │ │ │ │ │ │ ├── uart_lld.c │ │ │ │ │ │ └── uart_lld.h │ │ │ │ │ ├── USARTv2 │ │ │ │ │ │ ├── serial_lld.c │ │ │ │ │ │ ├── serial_lld.h │ │ │ │ │ │ ├── uart_lld.c │ │ │ │ │ │ └── uart_lld.h │ │ │ │ │ ├── USBv1 │ │ │ │ │ │ ├── stm32_usb.h │ │ │ │ │ │ ├── usb_lld.c │ │ │ │ │ │ └── usb_lld.h │ │ │ │ │ ├── can_lld.c │ │ │ │ │ ├── can_lld.h │ │ │ │ │ ├── ext_lld.c │ │ │ │ │ ├── ext_lld.h │ │ │ │ │ ├── mac_lld.c │ │ │ │ │ ├── mac_lld.h │ │ │ │ │ ├── sdc_lld.c │ │ │ │ │ └── sdc_lld.h │ │ │ │ ├── STM32F0xx │ │ │ │ │ ├── adc_lld.c │ │ │ │ │ ├── adc_lld.h │ │ │ │ │ ├── ext_lld_isr.c │ │ │ │ │ ├── ext_lld_isr.h │ │ │ │ │ ├── hal_lld.c │ │ │ │ │ ├── hal_lld.h │ │ │ │ │ ├── platform.mk │ │ │ │ │ ├── stm32_dma.c │ │ │ │ │ ├── stm32_dma.h │ │ │ │ │ ├── stm32_isr.h │ │ │ │ │ ├── stm32_rcc.h │ │ │ │ │ └── stm32_registry.h │ │ │ │ ├── STM32F1xx │ │ │ │ │ ├── adc_lld.c │ │ │ │ │ ├── adc_lld.h │ │ │ │ │ ├── ext_lld_isr.c │ │ │ │ │ ├── ext_lld_isr.h │ │ │ │ │ ├── hal_lld.c │ │ │ │ │ ├── hal_lld.h │ │ │ │ │ ├── hal_lld_f100.h │ │ │ │ │ ├── hal_lld_f103.h │ │ │ │ │ ├── hal_lld_f105_f107.h │ │ │ │ │ ├── platform.mk │ │ │ │ │ ├── platform_f105_f107.mk │ │ │ │ │ ├── stm32_dma.c │ │ │ │ │ ├── stm32_dma.h │ │ │ │ │ ├── stm32_isr.h │ │ │ │ │ ├── stm32_rcc.h │ │ │ │ │ └── stm32_registry.h │ │ │ │ ├── STM32F37x │ │ │ │ │ ├── adc_lld.c │ │ │ │ │ ├── adc_lld.h │ │ │ │ │ ├── ext_lld_isr.c │ │ │ │ │ ├── ext_lld_isr.h │ │ │ │ │ ├── hal_lld.c │ │ │ │ │ ├── hal_lld.h │ │ │ │ │ ├── platform.mk │ │ │ │ │ ├── stm32_dma.c │ │ │ │ │ ├── stm32_dma.h │ │ │ │ │ ├── stm32_isr.h │ │ │ │ │ ├── stm32_rcc.h │ │ │ │ │ └── stm32_registry.h │ │ │ │ ├── STM32F3xx │ │ │ │ │ ├── adc_lld.c │ │ │ │ │ ├── adc_lld.h │ │ │ │ │ ├── ext_lld_isr.c │ │ │ │ │ ├── ext_lld_isr.h │ │ │ │ │ ├── hal_lld.c │ │ │ │ │ ├── hal_lld.h │ │ │ │ │ ├── platform.mk │ │ │ │ │ ├── stm32_dma.c │ │ │ │ │ ├── stm32_dma.h │ │ │ │ │ ├── stm32_isr.h │ │ │ │ │ ├── stm32_rcc.h │ │ │ │ │ └── stm32_registry.h │ │ │ │ ├── STM32F4xx │ │ │ │ │ ├── adc_lld.c │ │ │ │ │ ├── adc_lld.h │ │ │ │ │ ├── ext_lld_isr.c │ │ │ │ │ ├── ext_lld_isr.h │ │ │ │ │ ├── hal_lld.c │ │ │ │ │ ├── hal_lld.h │ │ │ │ │ ├── platform.mk │ │ │ │ │ ├── stm32_dma.c │ │ │ │ │ ├── stm32_dma.h │ │ │ │ │ ├── stm32_isr.h │ │ │ │ │ ├── stm32_rcc.h │ │ │ │ │ └── stm32_registry.h │ │ │ │ └── STM32L1xx │ │ │ │ │ ├── adc_lld.c │ │ │ │ │ ├── adc_lld.h │ │ │ │ │ ├── ext_lld_isr.c │ │ │ │ │ ├── ext_lld_isr.h │ │ │ │ │ ├── hal_lld.c │ │ │ │ │ ├── hal_lld.h │ │ │ │ │ ├── platform.dox │ │ │ │ │ ├── platform.mk │ │ │ │ │ ├── stm32_dma.c │ │ │ │ │ ├── stm32_dma.h │ │ │ │ │ ├── stm32_isr.h │ │ │ │ │ ├── stm32_rcc.h │ │ │ │ │ └── stm32_registry.h │ │ │ └── common │ │ │ │ └── ARMCMx │ │ │ │ ├── nvic.c │ │ │ │ └── nvic.h │ │ └── src │ │ │ ├── adc.c │ │ │ ├── can.c │ │ │ ├── dac.c │ │ │ ├── ext.c │ │ │ ├── gpt.c │ │ │ ├── hal.c │ │ │ ├── hal_mmcsd.c │ │ │ ├── hal_queues.c │ │ │ ├── i2c.c │ │ │ ├── i2s.c │ │ │ ├── icu.c │ │ │ ├── mac.c │ │ │ ├── mmc_spi.c │ │ │ ├── pal.c │ │ │ ├── pwm.c │ │ │ ├── rtc.c │ │ │ ├── sdc.c │ │ │ ├── serial.c │ │ │ ├── serial_usb.c │ │ │ ├── spi.c │ │ │ ├── st.c │ │ │ ├── uart.c │ │ │ └── usb.c │ ├── nil │ │ ├── dox │ │ │ └── nil.dox │ │ ├── include │ │ │ └── nil.h │ │ ├── nil.mk │ │ ├── ports │ │ │ ├── ARMCMx │ │ │ │ ├── compilers │ │ │ │ │ └── GCC │ │ │ │ │ │ ├── mk │ │ │ │ │ │ ├── port_v6m.mk │ │ │ │ │ │ └── port_v7m.mk │ │ │ │ │ │ ├── nilcoreasm_v6m.s │ │ │ │ │ │ ├── nilcoreasm_v7m.s │ │ │ │ │ │ └── niltypes.h │ │ │ │ ├── nilcore.c │ │ │ │ ├── nilcore.h │ │ │ │ ├── nilcore_timer.h │ │ │ │ ├── nilcore_v6m.c │ │ │ │ ├── nilcore_v6m.h │ │ │ │ ├── nilcore_v7m.c │ │ │ │ └── nilcore_v7m.h │ │ │ ├── AVR │ │ │ │ ├── compilers │ │ │ │ │ └── GCC │ │ │ │ │ │ ├── mk │ │ │ │ │ │ └── port.mk │ │ │ │ │ │ └── niltypes.h │ │ │ │ ├── nilcore.c │ │ │ │ ├── nilcore.h │ │ │ │ └── nilcore_timer.h │ │ │ └── e200 │ │ │ │ ├── compilers │ │ │ │ └── GCC │ │ │ │ │ ├── ivor.s │ │ │ │ │ ├── mk │ │ │ │ │ ├── port_spc560bcxx.mk │ │ │ │ │ ├── port_spc560bxx.mk │ │ │ │ │ ├── port_spc560dxx.mk │ │ │ │ │ ├── port_spc560pxx.mk │ │ │ │ │ ├── port_spc563mxx.mk │ │ │ │ │ ├── port_spc564axx.mk │ │ │ │ │ ├── port_spc56ecxx.mk │ │ │ │ │ ├── port_spc56elxx.mk │ │ │ │ │ └── port_spc57emxx.mk │ │ │ │ │ └── niltypes.h │ │ │ │ ├── nilcore.c │ │ │ │ └── nilcore.h │ │ ├── src │ │ │ └── nil.c │ │ └── templates │ │ │ ├── nilconf.h │ │ │ ├── nilcore.c │ │ │ ├── nilcore.h │ │ │ ├── nilcore_timer.h │ │ │ └── niltypes.h │ ├── readme.txt │ ├── rt │ │ ├── dox │ │ │ └── rt.dox │ │ ├── include │ │ │ ├── ch.h │ │ │ ├── chbsem.h │ │ │ ├── chcond.h │ │ │ ├── chdebug.h │ │ │ ├── chdynamic.h │ │ │ ├── chevents.h │ │ │ ├── chheap.h │ │ │ ├── chlicense.h │ │ │ ├── chmboxes.h │ │ │ ├── chmemcore.h │ │ │ ├── chmempools.h │ │ │ ├── chmsg.h │ │ │ ├── chmtx.h │ │ │ ├── chqueues.h │ │ │ ├── chregistry.h │ │ │ ├── chschd.h │ │ │ ├── chsem.h │ │ │ ├── chstats.h │ │ │ ├── chstreams.h │ │ │ ├── chsys.h │ │ │ ├── chsystypes.h │ │ │ ├── chthreads.h │ │ │ ├── chtm.h │ │ │ └── chvt.h │ │ ├── ports │ │ │ ├── ARM │ │ │ │ ├── chcore.c │ │ │ │ ├── chcore.h │ │ │ │ ├── chcore_timer.h │ │ │ │ └── compilers │ │ │ │ │ └── GCC │ │ │ │ │ ├── chcoreasm.s │ │ │ │ │ ├── chtypes.h │ │ │ │ │ └── mk │ │ │ │ │ └── port_generic.mk │ │ │ ├── ARMCMx │ │ │ │ ├── chcore.c │ │ │ │ ├── chcore.h │ │ │ │ ├── chcore_timer.h │ │ │ │ ├── chcore_v6m.c │ │ │ │ ├── chcore_v6m.h │ │ │ │ ├── chcore_v7m.c │ │ │ │ ├── chcore_v7m.h │ │ │ │ ├── cmsis_os │ │ │ │ │ ├── cmsis_os.c │ │ │ │ │ ├── cmsis_os.h │ │ │ │ │ └── cmsis_os.mk │ │ │ │ └── compilers │ │ │ │ │ ├── GCC │ │ │ │ │ ├── chcoreasm_v6m.s │ │ │ │ │ ├── chcoreasm_v7m.s │ │ │ │ │ ├── chtypes.h │ │ │ │ │ └── mk │ │ │ │ │ │ ├── port_v6m.mk │ │ │ │ │ │ └── port_v7m.mk │ │ │ │ │ ├── IAR │ │ │ │ │ ├── chcoreasm_v6m.s │ │ │ │ │ ├── chcoreasm_v7m.s │ │ │ │ │ └── chtypes.h │ │ │ │ │ └── RVCT │ │ │ │ │ ├── chcoreasm_v6m.s │ │ │ │ │ ├── chcoreasm_v7m.s │ │ │ │ │ └── chtypes.h │ │ │ ├── AVR │ │ │ │ ├── chcore.c │ │ │ │ ├── chcore.h │ │ │ │ └── compilers │ │ │ │ │ └── GCC │ │ │ │ │ ├── chtypes.h │ │ │ │ │ └── mk │ │ │ │ │ └── port.mk │ │ │ ├── SIMIA32 │ │ │ │ ├── chcore.c │ │ │ │ ├── chcore.h │ │ │ │ └── compilers │ │ │ │ │ └── GCC │ │ │ │ │ ├── chtypes.h │ │ │ │ │ └── port.mk │ │ │ └── e200 │ │ │ │ ├── chcore.c │ │ │ │ ├── chcore.h │ │ │ │ └── compilers │ │ │ │ └── GCC │ │ │ │ ├── chtypes.h │ │ │ │ ├── ivor.s │ │ │ │ └── mk │ │ │ │ ├── port_spc560bcxx.mk │ │ │ │ ├── port_spc560bxx.mk │ │ │ │ ├── port_spc560dxx.mk │ │ │ │ ├── port_spc560pxx.mk │ │ │ │ ├── port_spc563mxx.mk │ │ │ │ ├── port_spc564axx.mk │ │ │ │ ├── port_spc56ecxx.mk │ │ │ │ ├── port_spc56elxx.mk │ │ │ │ └── port_spc57emxx.mk │ │ ├── rt.mk │ │ ├── src │ │ │ ├── chcond.c │ │ │ ├── chdebug.c │ │ │ ├── chdynamic.c │ │ │ ├── chevents.c │ │ │ ├── chheap.c │ │ │ ├── chmboxes.c │ │ │ ├── chmemcore.c │ │ │ ├── chmempools.c │ │ │ ├── chmsg.c │ │ │ ├── chmtx.c │ │ │ ├── chqueues.c │ │ │ ├── chregistry.c │ │ │ ├── chschd.c │ │ │ ├── chsem.c │ │ │ ├── chstats.c │ │ │ ├── chsys.c │ │ │ ├── chthreads.c │ │ │ ├── chtm.c │ │ │ └── chvt.c │ │ └── templates │ │ │ ├── chconf.h │ │ │ ├── chcore.c │ │ │ ├── chcore.h │ │ │ ├── chtypes.h │ │ │ └── meta │ │ │ ├── module.c │ │ │ └── module.h │ └── various │ │ ├── cpp_wrappers │ │ ├── ch.cpp │ │ ├── ch.hpp │ │ ├── chcpp.mk │ │ ├── syscalls_cpp.cpp │ │ └── syscalls_cpp.hpp │ │ ├── devices_lib │ │ ├── accel │ │ │ ├── lis302dl.c │ │ │ ├── lis302dl.dox │ │ │ └── lis302dl.h │ │ └── lcd │ │ │ ├── lcd3310.c │ │ │ └── lcd3310.h │ │ ├── evtimer.c │ │ ├── evtimer.h │ │ ├── fatfs_bindings │ │ ├── fatfs.mk │ │ ├── fatfs_diskio.c │ │ ├── fatfs_syscall.c │ │ └── readme.txt │ │ ├── lwip_bindings │ │ ├── arch │ │ │ ├── cc.h │ │ │ ├── perf.h │ │ │ ├── sys_arch.c │ │ │ └── sys_arch.h │ │ ├── lwip.mk │ │ ├── lwipthread.c │ │ ├── lwipthread.h │ │ └── readme.txt │ │ ├── shell.c │ │ ├── shell.h │ │ ├── syscalls.c │ │ └── various.dox ├── readme.txt └── release_note_3.0.0.txt ├── Makefile ├── Project ├── Qt Creator │ ├── vesc.pro │ └── vesc.pro.shared.template └── scripts │ └── qt_creator_firmware_configuration.py ├── README.md ├── applications ├── app.c ├── app.h ├── app_adc.c ├── app_balance.c ├── app_custom.c ├── app_custom_template.c ├── app_dpv.c ├── app_nunchuk.c ├── app_pas.c ├── app_ppm.c ├── app_skypuff.c ├── app_sten.c ├── app_uartcomm.c ├── appconf_default.h ├── applications.mk ├── er │ ├── ErConfig.qml │ ├── app_erockit_conf_v2.h │ ├── app_erockit_v2.c │ ├── er_qml.c │ └── er_qml.h └── finn │ ├── app_finn_az.c │ ├── app_finn_az_conf.h │ ├── app_finn_types.h │ ├── finn_qml.c │ └── finn_qml.h ├── blackmagic ├── README.md ├── blackmagic.mk ├── bm_if.c ├── bm_if.h ├── exception.c ├── exception.h ├── general.h ├── platform.c ├── platform.h ├── platform_support.h ├── swdptap.c ├── swdptap.h ├── target.h ├── target │ ├── adiv5.c │ ├── adiv5.h │ ├── adiv5_jtagdp.c │ ├── adiv5_swdp.c │ ├── cortexm.c │ ├── cortexm.h │ ├── flashstub │ │ ├── Makefile │ │ ├── README.md │ │ ├── nrf51.c │ │ ├── nrf51.stub │ │ └── stub.h │ ├── jtag_scan.h │ ├── nrf51.c │ ├── stm32f1.c │ ├── stm32f4.c │ ├── stm32h7.c │ ├── stm32l0.c │ ├── stm32l4.c │ ├── swdptap_generic.c │ ├── target.c │ └── target_internal.h ├── timing.c └── timing.h ├── bms.c ├── bms.h ├── buzzer.c ├── buzzer.h ├── chconf.h ├── comm ├── comm.mk ├── comm_can.c ├── comm_can.h ├── comm_usb.c ├── comm_usb.h ├── comm_usb_serial.c ├── comm_usb_serial.h ├── commands.c ├── commands.h ├── log.c ├── log.h ├── packet.c └── packet.h ├── conf_custom.c ├── conf_custom.h ├── conf_general.c ├── conf_general.h ├── confgenerator.c ├── confgenerator.h ├── datatypes.h ├── documentation └── comm_can.md ├── driver ├── driver.mk ├── eeprom.c ├── eeprom.h ├── i2c_bb.c ├── i2c_bb.h ├── ledpwm.c ├── ledpwm.h ├── lora │ ├── SX1278.c │ ├── SX1278.h │ ├── SX1278_hw.c │ ├── SX1278_hw.h │ ├── lora.c │ └── lora.h ├── nrf │ ├── nrf_driver.c │ ├── nrf_driver.h │ ├── rf.c │ ├── rf.h │ ├── rfhelp.c │ ├── rfhelp.h │ ├── spi_sw.c │ └── spi_sw.h ├── servo_dec.c ├── servo_dec.h ├── servo_simple.c ├── servo_simple.h ├── spi_bb.c ├── spi_bb.h ├── timer.c └── timer.h ├── encoder ├── enc_abi.c ├── enc_abi.h ├── enc_ad2s1205.c ├── enc_ad2s1205.h ├── enc_as504x.c ├── enc_as504x.h ├── enc_as5x47u.c ├── enc_as5x47u.h ├── enc_bissc.c ├── enc_bissc.h ├── enc_mt6816.c ├── enc_mt6816.h ├── enc_sincos.c ├── enc_sincos.h ├── enc_tle5012.c ├── enc_tle5012.h ├── enc_ts5700n8501.c ├── enc_ts5700n8501.h ├── encoder.c ├── encoder.h ├── encoder.mk ├── encoder_cfg.c ├── encoder_cfg.h └── encoder_datatype.h ├── events.c ├── events.h ├── firmware_metadata.h ├── flash_helper.c ├── flash_helper.h ├── halconf.h ├── hwconf ├── Ubox │ ├── 100v │ │ ├── hw_ubox_100_core.c │ │ ├── hw_ubox_100_core.h │ │ ├── hw_ubox_single_100.h │ │ ├── hw_ubox_single_100_no_limits.h │ │ ├── hw_ubox_single_80.h │ │ ├── hw_ubox_single_80_no_limits.h │ │ ├── hw_ubox_single_85_200.h │ │ ├── hw_ubox_single_85_200_no_limits.h │ │ ├── hw_ubox_v2_100.h │ │ └── hw_ubox_v2_100_no_limits.h │ └── 75v │ │ ├── hw_ubox_75_core.c │ │ ├── hw_ubox_75_core.h │ │ ├── hw_ubox_single_75.h │ │ ├── hw_ubox_single_75_no_limits.h │ │ ├── hw_ubox_v1_75_micro.h │ │ ├── hw_ubox_v1_75_micro_no_limits.h │ │ ├── hw_ubox_v1_75_typec.h │ │ ├── hw_ubox_v1_75_typec_no_limits.h │ │ ├── hw_ubox_v2_75.h │ │ └── hw_ubox_v2_75_no_limits.h ├── board.c ├── board.h ├── drv8301.c ├── drv8301.h ├── drv8305.c ├── drv8305.h ├── drv8320s.c ├── drv8320s.h ├── drv8323s.c ├── drv8323s.h ├── flipsky │ ├── hw_75_100.c │ ├── hw_75_100.h │ ├── hw_75_100_V2.c │ ├── hw_75_100_V2.h │ ├── hw_75_100_V2_0005ohm.h │ ├── hw_75_100_V2_no_limits.h │ ├── hw_75_100_no_limits.h │ ├── hw_fsesc_75_200_alu.c │ ├── hw_fsesc_75_200_alu.h │ ├── hw_fsesc_75_200_alu_no_limits.h │ ├── hw_fsesc_75_300.c │ └── hw_fsesc_75_300.h ├── floatwheel │ ├── hw_adv200.h │ ├── hw_adv500.h │ ├── hw_adv_core.c │ └── hw_adv_core.h ├── fungineers │ ├── hw_Thor300_20s.h │ ├── hw_Thor300_core.c │ └── hw_Thor300_core.h ├── hw.c ├── hw.h ├── hwconf.mk ├── ipm │ └── ka160 │ │ ├── hw_ka160.c │ │ └── hw_ka160.h ├── luna │ ├── bbshd │ │ ├── appconf_luna_bbshd.h │ │ ├── hw_luna_bbshd.c │ │ ├── hw_luna_bbshd.h │ │ ├── luna_display_serial.c │ │ ├── luna_display_serial.h │ │ ├── mcconf_luna_bbshd.h │ │ ├── qmlui_luna_bbshd.c │ │ └── qmlui_luna_bbshd.h │ └── m600 │ │ ├── appconf_luna_m600.h │ │ ├── hw_luna_m600.h │ │ ├── hw_luna_m600_Rev5.h │ │ ├── hw_luna_m600_core.c │ │ ├── luna_m600_display.c │ │ ├── luna_m600_display.h │ │ ├── mcconf_luna_m600.h │ │ ├── qmlui_luna_m600.c │ │ └── qmlui_luna_m600.h ├── makerx │ ├── hw_go_foc_dv6_pro.c │ ├── hw_go_foc_dv6_pro.h │ ├── hw_go_foc_dv6_pro_no_limits.h │ ├── hw_go_foc_g300.c │ ├── hw_go_foc_g300.h │ ├── hw_go_foc_g300_no_limits.h │ ├── hw_go_foc_hi200.c │ ├── hw_go_foc_hi200.h │ ├── hw_go_foc_hi200_no_limits.h │ ├── hw_go_foc_hv200.c │ ├── hw_go_foc_hv200.h │ ├── hw_go_foc_hv200_no_limits.h │ ├── hw_go_foc_m100.c │ ├── hw_go_foc_m100.h │ └── hw_go_foc_m100_no_limits.h ├── mcuconf.h ├── other │ ├── hw_axiom.c │ ├── hw_axiom.h │ ├── hw_axiom_fpga_bitstream.c │ ├── hw_das_mini.c │ ├── hw_das_mini.h │ ├── hw_das_rs.c │ ├── hw_das_rs.h │ ├── hw_es19.c │ ├── hw_es19.h │ ├── hw_gesc.c │ ├── hw_gesc.h │ ├── hw_mbot.c │ ├── hw_mbot.h │ ├── hw_mini4.c │ ├── hw_mini4.h │ ├── hw_r2.c │ ├── hw_r2.h │ ├── hw_raiden7.c │ ├── hw_raiden7.h │ ├── hw_rd2.c │ ├── hw_rd2.h │ ├── hw_resc.c │ ├── hw_resc.h │ ├── hw_rh.c │ ├── hw_rh.h │ ├── hw_spesc.c │ ├── hw_spesc.h │ ├── hw_uavc_omega.c │ ├── hw_uavc_omega.h │ ├── hw_uavc_qcube.c │ ├── hw_uavc_qcube.h │ ├── hw_unity.c │ ├── hw_unity.h │ ├── hw_unity_no_limits.h │ ├── hw_uxv_sr.c │ ├── hw_uxv_sr.h │ ├── hw_warrior6.c │ ├── hw_warrior6.h │ └── vesc4 │ │ ├── hw_40.c │ │ ├── hw_40.h │ │ ├── hw_410.c │ │ ├── hw_410.h │ │ ├── hw_410_0005ohm.h │ │ ├── hw_410_005ohm.h │ │ ├── hw_410_no_limits.h │ │ ├── hw_45.c │ │ ├── hw_45.h │ │ ├── hw_46.c │ │ ├── hw_46.h │ │ ├── hw_46_0005ohm.h │ │ ├── hw_46_33k.h │ │ ├── hw_48.c │ │ ├── hw_48.h │ │ ├── hw_49.c │ │ └── hw_49.h ├── shaman │ ├── Cheap_FOCer_2 │ │ ├── hw_Cheap_FOCer_2.h │ │ ├── hw_Cheap_FOCer_2_V09.h │ │ ├── hw_Cheap_FOCer_2_V09_no_limits.h │ │ ├── hw_Cheap_FOCer_2_core.c │ │ ├── hw_Cheap_FOCer_2_core.h │ │ └── hw_Cheap_FOCer_2_no_limits.h │ ├── Little_FOCer │ │ ├── hw_Little_FOCer.h │ │ ├── hw_Little_FOCer_V3.h │ │ ├── hw_Little_FOCer_V3_1.h │ │ ├── hw_Little_FOCer_V3_Igor.h │ │ ├── hw_Little_FOCer_core.c │ │ └── hw_Little_FOCer_core.h │ ├── hw_solo.c │ ├── hw_solo.h │ └── hw_solo_no_limits.h ├── shutdown.c ├── shutdown.h ├── si8900.c ├── si8900.h ├── stm32f4xx_conf.h ├── stormcore │ ├── 100D │ │ ├── hw_stormcore_100d.h │ │ ├── hw_stormcore_100d_core.c │ │ ├── hw_stormcore_100d_core.h │ │ ├── hw_stormcore_100d_no_limits.h │ │ ├── hw_stormcore_100d_parallel.h │ │ ├── hw_stormcore_100d_v2.h │ │ ├── hw_stormcore_100d_v2_no_limits.h │ │ ├── hw_stormcore_100dx.h │ │ ├── hw_stormcore_100dx_no_limits.h │ │ └── hw_stormcore_100dx_parallel.h │ ├── 100S │ │ ├── hw_stormcore_100s.c │ │ ├── hw_stormcore_100s.h │ │ └── hw_stormcore_100s_no_limits.h │ └── 60D │ │ ├── hw_stormcore_60d+.h │ │ ├── hw_stormcore_60d+_no_limits.h │ │ ├── hw_stormcore_60d.h │ │ ├── hw_stormcore_60d_core.c │ │ ├── hw_stormcore_60d_core.h │ │ ├── hw_stormcore_60d_no_limits.h │ │ ├── hw_stormcore_60dxs.h │ │ └── hw_stormcore_60dxs_no_limits.h ├── teamtriforceuk │ ├── a200s_v2 │ │ ├── hw_a200s_v2.1.h │ │ ├── hw_a200s_v2.2.h │ │ ├── hw_a200s_v2_core.c │ │ └── hw_a200s_v2_core.h │ ├── a200s_v3 │ │ ├── hw_a200s_v3.h │ │ ├── hw_a200s_v3_core.c │ │ └── hw_a200s_v3_core.h │ ├── a200s_v4 │ │ ├── hw_a200s_v4.h │ │ ├── hw_a200s_v4_core.c │ │ └── hw_a200s_v4_core.h │ ├── a50s_v22 │ │ ├── hw_a50s_v22_12s.h │ │ ├── hw_a50s_v22_12s_hg.h │ │ ├── hw_a50s_v22_6s.h │ │ ├── hw_a50s_v22_6s_hg.h │ │ ├── hw_a50s_v22_core.c │ │ └── hw_a50s_v22_core.h │ └── a50s_v23 │ │ ├── hw_a50s_v23_12s.h │ │ ├── hw_a50s_v23_20s.h │ │ ├── hw_a50s_v23_6s.h │ │ ├── hw_a50s_v23_core.c │ │ └── hw_a50s_v23_core.h ├── trampa │ ├── 100_250 │ │ ├── hw_100_250.c │ │ ├── hw_100_250.h │ │ └── hw_100_250_no_limits.h │ ├── 100_500 │ │ ├── hw_100_500.h │ │ ├── hw_100_500_core.c │ │ ├── hw_100_500_core.h │ │ ├── hw_100_500_no_limits.h │ │ ├── hw_75_600.h │ │ └── hw_75_600_no_limits.h │ ├── 140_300 │ │ ├── hw_140_300.c │ │ └── hw_140_300.h │ ├── 60_75 │ │ ├── hw_60_75.h │ │ ├── hw_60_75_core.c │ │ ├── hw_60_75_core.h │ │ ├── hw_60_75_mk2.h │ │ ├── hw_60_75_mk2_no_limits.h │ │ └── hw_60_75_no_limits.h │ ├── 60_alva │ │ ├── hw_60v2_alva.h │ │ ├── hw_60v2_alva_core.c │ │ ├── hw_60v2_alva_core.h │ │ ├── hw_60v2_alva_mk1.h │ │ └── hw_60v2_alva_mk2.h │ ├── 75_300 │ │ ├── hw_75_300.h │ │ ├── hw_75_300_core.c │ │ ├── hw_75_300_core.h │ │ ├── hw_75_300_no_limits.h │ │ ├── hw_75_300_r2.h │ │ ├── hw_75_300_r2_no_limits.h │ │ ├── hw_75_300_r3.h │ │ └── hw_75_300_r3_no_limits.h │ ├── 75_300_MKIV │ │ ├── hw_75_300_mkiv.h │ │ ├── hw_75_300_mkiv_core.c │ │ ├── hw_75_300_mkiv_core.h │ │ └── hw_75_300_mkiv_no_limits.h │ ├── hd │ │ ├── hw_hd60.c │ │ ├── hw_hd60.h │ │ ├── hw_hd60_no_limits.h │ │ ├── hw_hd75.c │ │ ├── hw_hd75.h │ │ └── hw_hd75_no_limits.h │ ├── vesc6 │ │ ├── hw_60.h │ │ ├── hw_60_core.c │ │ ├── hw_60_core.h │ │ ├── hw_60_mk3.h │ │ ├── hw_60_mk3_no_limits.h │ │ ├── hw_60_mk4.h │ │ ├── hw_60_mk4_no_limits.h │ │ ├── hw_60_mk5.h │ │ ├── hw_60_mk5_no_limits.h │ │ ├── hw_60_mk6.h │ │ ├── hw_60_mk6_hp.h │ │ ├── hw_60_mk6_hp_no_limits.h │ │ ├── hw_60_mk6_max.h │ │ ├── hw_60_mk6_no_limits.h │ │ └── hw_60_no_limits.h │ ├── vesc_edu │ │ ├── hw_edu.h │ │ ├── hw_edu_core.c │ │ ├── hw_edu_core.h │ │ └── hw_edu_no_limits.h │ └── vesc_gp │ │ ├── hw_gp.h │ │ ├── hw_gp_core.c │ │ └── hw_gp_core.h └── tronic │ ├── hw_TRONIC_1000.c │ ├── hw_TRONIC_1000.h │ ├── hw_TRONIC_250.c │ ├── hw_TRONIC_250.h │ ├── hw_TRONIC_250R.c │ ├── hw_TRONIC_250R.h │ ├── hw_TRONIC_750.c │ ├── hw_TRONIC_750.h │ ├── hw_x12_pro24.c │ ├── hw_x12_pro24.h │ ├── hw_x12_pro30.c │ └── hw_x12_pro30.h ├── imu ├── BMI160_driver │ ├── LICENSE │ ├── README.md │ ├── bmi160.c │ ├── bmi160.h │ └── bmi160_defs.h ├── Fusion │ ├── Examples │ │ ├── ExampleAhrs.c │ │ ├── ExampleAhrsWithoutMagnetometer.c │ │ └── ExampleCompass.c │ ├── Fusion.h │ ├── FusionAhrs.c │ ├── FusionAhrs.h │ ├── FusionBias.c │ ├── FusionBias.h │ ├── FusionCalibration.h │ ├── FusionCompass.c │ ├── FusionCompass.h │ ├── FusionTypes.h │ ├── LICENSE │ └── README.md ├── ahrs.c ├── ahrs.h ├── bmi160_wrapper.c ├── bmi160_wrapper.h ├── icm20948.c ├── icm20948.h ├── imu.c ├── imu.h ├── imu.mk ├── lsm6ds3.c ├── lsm6ds3.h ├── mpu9150.c └── mpu9150.h ├── irq_handlers.c ├── isr_vector_table.h ├── ld_eeprom_emu.ld ├── libcanard ├── README.md ├── canard.c ├── canard.h ├── canard.mk ├── canard_driver.c ├── canard_driver.h ├── canard_internals.h └── dsdl │ ├── definitions │ └── vesc │ │ └── 20601.RTData.uavcan │ ├── uavcan │ ├── equipment │ │ ├── esc │ │ │ ├── RPMCommand.h │ │ │ ├── RawCommand.h │ │ │ ├── Status.h │ │ │ ├── esc_RPMCommand.c │ │ │ ├── esc_RawCommand.c │ │ │ └── esc_Status.c │ │ └── power │ │ │ ├── BatteryInfo.h │ │ │ ├── CircuitStatus.h │ │ │ ├── PrimaryPowerSupplyStatus.h │ │ │ ├── power_BatteryInfo.c │ │ │ ├── power_CircuitStatus.c │ │ │ └── power_PrimaryPowerSupplyStatus.c │ └── protocol │ │ ├── GetNodeInfo.h │ │ ├── HardwareVersion.h │ │ ├── NodeStatus.h │ │ ├── RestartNode.h │ │ ├── SoftwareVersion.h │ │ ├── file │ │ ├── BeginFirmwareUpdate.h │ │ ├── Delete.h │ │ ├── EntryType.h │ │ ├── Error.h │ │ ├── GetDirectoryEntryInfo.h │ │ ├── GetInfo.h │ │ ├── Path.h │ │ ├── Read.h │ │ ├── Write.h │ │ ├── file_BeginFirmwareUpdate.c │ │ ├── file_Delete.c │ │ ├── file_EntryType.c │ │ ├── file_Error.c │ │ ├── file_GetDirectoryEntryInfo.c │ │ ├── file_GetInfo.c │ │ ├── file_Path.c │ │ ├── file_Read.c │ │ └── file_Write.c │ │ ├── param │ │ ├── Empty.h │ │ ├── ExecuteOpcode.h │ │ ├── GetSet.h │ │ ├── NumericValue.h │ │ ├── Value.h │ │ ├── param_Empty.c │ │ ├── param_ExecuteOpcode.c │ │ ├── param_GetSet.c │ │ ├── param_NumericValue.c │ │ └── param_Value.c │ │ ├── protocol_GetNodeInfo.c │ │ ├── protocol_HardwareVersion.c │ │ ├── protocol_NodeStatus.c │ │ ├── protocol_RestartNode.c │ │ └── protocol_SoftwareVersion.c │ └── vesc │ ├── RTData.h │ └── vesc_RTData.c ├── lispBM ├── README.md ├── c_libs │ ├── conv.py │ ├── examples │ │ ├── config │ │ │ ├── Makefile │ │ │ ├── code.c │ │ │ ├── conf │ │ │ │ ├── buffer.c │ │ │ │ ├── buffer.h │ │ │ │ ├── conf_default.h │ │ │ │ ├── conf_general.h │ │ │ │ ├── confparser.c │ │ │ │ ├── confparser.h │ │ │ │ ├── confxml.c │ │ │ │ ├── confxml.h │ │ │ │ ├── datatypes.h │ │ │ │ └── settings.xml │ │ │ └── datatypes.h │ │ ├── custom_data_comm │ │ │ ├── Makefile │ │ │ ├── buffer.c │ │ │ ├── buffer.h │ │ │ ├── code.c │ │ │ └── qml.qml │ │ ├── extension │ │ │ ├── Makefile │ │ │ └── code.c │ │ ├── speed_test │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ └── code.c │ │ ├── ssd1306 │ │ │ ├── Makefile │ │ │ └── code.c │ │ ├── thread │ │ │ ├── Makefile │ │ │ └── code.c │ │ └── ws2812 │ │ │ ├── Makefile │ │ │ └── code.c │ ├── link.ld │ ├── rules.mk │ ├── st_types.h │ ├── stdperiph_stm32f4 │ │ ├── CMSIS │ │ │ ├── ST │ │ │ │ ├── stm32f405xx.h │ │ │ │ ├── stm32f407xx.h │ │ │ │ ├── stm32f4xx.h │ │ │ │ └── system_stm32f4xx.h │ │ │ └── include │ │ │ │ ├── arm_common_tables.h │ │ │ │ ├── arm_const_structs.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 │ │ ├── inc │ │ │ ├── misc.h │ │ │ ├── stm32f4_gpio_af.h │ │ │ ├── stm32f4xx_adc.h │ │ │ ├── stm32f4xx_conf.h │ │ │ ├── stm32f4xx_dma.h │ │ │ ├── stm32f4xx_exti.h │ │ │ ├── stm32f4xx_flash.h │ │ │ ├── stm32f4xx_iwdg.h │ │ │ ├── stm32f4xx_rcc.h │ │ │ ├── stm32f4xx_syscfg.h │ │ │ ├── stm32f4xx_tim.h │ │ │ └── stm32f4xx_wwdg.h │ │ └── src │ │ │ ├── misc.c │ │ │ ├── stm32f4xx_adc.c │ │ │ ├── stm32f4xx_dma.c │ │ │ ├── stm32f4xx_exti.c │ │ │ ├── stm32f4xx_flash.c │ │ │ ├── stm32f4xx_iwdg.c │ │ │ ├── stm32f4xx_rcc.c │ │ │ ├── stm32f4xx_syscfg.c │ │ │ ├── stm32f4xx_tim.c │ │ │ └── stm32f4xx_wwdg.c │ ├── utils │ │ ├── rb.c │ │ ├── rb.h │ │ ├── utils.c │ │ └── utils.h │ └── vesc_c_if.h ├── lispBM │ ├── .clang_complete │ ├── .gitignore │ ├── .travis.yml │ ├── CODE_OF_CONDUCT.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── benchmarks │ │ ├── bench_chibi │ │ │ ├── Makefile │ │ │ ├── chconf.h │ │ │ ├── flash.sh │ │ │ ├── halconf.h │ │ │ ├── main.c │ │ │ ├── mcuconf.h │ │ │ ├── stm32f407g.cfg │ │ │ ├── usbcfg.c │ │ │ └── usbcfg.h │ │ ├── dec_cnt1.lisp │ │ ├── dec_cnt2.lisp │ │ ├── dec_cnt3.lisp │ │ ├── fibonacci.lisp │ │ ├── fibonacci_tail.lisp │ │ ├── insertionsort.lisp │ │ ├── plot_bench.py │ │ ├── q2.lisp │ │ ├── run_benchmarks_stm32 │ │ ├── stored_results │ │ │ ├── benchresult22_01_22_10_11_07 │ │ │ ├── benchresult22_01_22_22_02_57 │ │ │ ├── benchresult22_01_29_13_20_43 │ │ │ ├── benchresult22_02_04_14_29_37 │ │ │ ├── benchresult22_02_21_10_47_27 │ │ │ ├── benchresult22_02_21_10_48_24 │ │ │ ├── benchresult22_02_26_10_53_43 │ │ │ ├── benchresult22_02_26_21_40_40 │ │ │ ├── benchresult22_02_26_21_43_45 │ │ │ ├── benchresult22_02_26_21_47_01 │ │ │ ├── benchresult22_02_26_21_50_39 │ │ │ ├── benchresult22_02_26_21_54_50 │ │ │ ├── benchresult22_02_27_20_01_45 │ │ │ ├── benchresult22_02_28_15_57_27 │ │ │ ├── benchresult22_03_04_08_46_14 │ │ │ ├── benchresult22_03_27_08_59_54 │ │ │ ├── benchresult22_03_28_08_57_32 │ │ │ ├── benchresult22_03_29_09_32_58 │ │ │ ├── benchresult22_04_10_14_45_17 │ │ │ ├── benchresult22_04_12_08_14_25 │ │ │ ├── benchresult22_04_12_09_15_38 │ │ │ ├── benchresult22_04_12_10_09_11 │ │ │ ├── benchresult22_05_05_10_58_10 │ │ │ ├── benchresult22_07_11_09_42_55 │ │ │ ├── benchresult22_07_17_15_23_54 │ │ │ ├── benchresult22_08_31_11_55_28 │ │ │ ├── benchresult22_08_31_18_36_46 │ │ │ ├── benchresult22_08_31_18_48_32 │ │ │ ├── benchresult22_09_01_10_59_54 │ │ │ ├── benchresult22_09_02_13_48_30 │ │ │ ├── benchresult22_09_22_08_28_22 │ │ │ ├── benchresult22_09_26_15_35_37 │ │ │ ├── benchresult22_09_26_15_38_33 │ │ │ ├── benchresult22_10_02_09_10_03 │ │ │ ├── benchresult22_10_02_09_43_14 │ │ │ ├── benchresult22_10_02_10_08_55 │ │ │ ├── benchresult22_10_02_14_22_21 │ │ │ ├── benchresult22_10_02_15_56_27 │ │ │ ├── benchresult22_10_02_16_01_55 │ │ │ ├── benchresult22_10_02_18_55_15 │ │ │ ├── benchresult22_10_02_19_10_41 │ │ │ ├── benchresult22_10_02_20_00_10 │ │ │ ├── benchresult22_10_04_08_14_24 │ │ │ ├── benchresult22_10_05_19_21_33 │ │ │ ├── benchresult22_10_05_19_25_18 │ │ │ └── benchresult22_10_16_19_11_29 │ │ └── tak.lisp │ ├── chibios-examples │ │ ├── repl-ChibiOS │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── chconf.h │ │ │ ├── flash.sh │ │ │ ├── halconf.h │ │ │ ├── main.c │ │ │ ├── mcuconf.h │ │ │ ├── stm32f407g.cfg │ │ │ ├── test_mp.lisp │ │ │ ├── usbcfg.c │ │ │ └── usbcfg.h │ │ └── xmas_dac │ │ │ ├── Makefile │ │ │ ├── chconf.h │ │ │ ├── flash.sh │ │ │ ├── halconf.h │ │ │ ├── main.c │ │ │ ├── mcuconf.h │ │ │ ├── stm32f407g.cfg │ │ │ ├── usbcfg.c │ │ │ ├── usbcfg.c.txt │ │ │ ├── usbcfg.h │ │ │ ├── usbcfg.h.txt │ │ │ └── xmas_tune.lisp │ ├── doc │ │ ├── Doxyfile │ │ ├── Makefile │ │ ├── README.md │ │ ├── images │ │ │ ├── cons_cell.png │ │ │ ├── list.png │ │ │ └── pair.png │ │ ├── lbmref.md │ │ ├── mainpage.dox │ │ └── manual │ │ │ ├── ch1_introduction.md │ │ │ ├── ch2_examples │ │ │ └── listcode.lisp │ │ │ ├── ch2_list_processing.md │ │ │ ├── ch3_concurrency.md │ │ │ └── ch3_examples │ │ │ ├── hello.lisp │ │ │ ├── hello_bye.lisp │ │ │ ├── hello_repeater.lisp │ │ │ ├── recv_message.lisp │ │ │ └── recv_message2.lisp │ ├── docker │ │ ├── Dockerfile │ │ └── README.md │ ├── esp-examples │ │ └── repl │ │ │ ├── CMakeLists.txt │ │ │ ├── main │ │ │ ├── CMakeLists.txt │ │ │ └── main.c │ │ │ ├── sdkconfig │ │ │ └── sdkconfig.ci │ ├── examples │ │ ├── Makefile │ │ ├── evaluator.c │ │ ├── fibonacci.lisp │ │ ├── fibonacci_tail.lisp │ │ └── profile.sh │ ├── flash_nrf52_with_stlink.sh │ ├── include │ │ ├── env.h │ │ ├── eval_cps.h │ │ ├── exp_kind.h │ │ ├── extensions.h │ │ ├── extensions │ │ │ ├── array_extensions.h │ │ │ ├── loop_extensions.h │ │ │ ├── math_extensions.h │ │ │ ├── matvec_extensions.h │ │ │ ├── random_extensions.h │ │ │ ├── runtime_extensions.h │ │ │ └── string_extensions.h │ │ ├── fundamental.h │ │ ├── heap.h │ │ ├── heap_vis.h │ │ ├── lbm_c_interop.h │ │ ├── lbm_channel.h │ │ ├── lbm_constants.h │ │ ├── lbm_custom_type.h │ │ ├── lbm_defines.h │ │ ├── lbm_flags.h │ │ ├── lbm_flat_value.h │ │ ├── lbm_llama_ascii.h │ │ ├── lbm_memory.h │ │ ├── lbm_types.h │ │ ├── lbm_utils.h │ │ ├── lbm_variables.h │ │ ├── lbm_version.h │ │ ├── lispbm.h │ │ ├── prelude.h │ │ ├── print.h │ │ ├── qq_expand.h │ │ ├── stack.h │ │ ├── symrepr.h │ │ └── tokpar.h │ ├── lispbm.mk │ ├── mascot │ │ ├── lispbm_llama.png │ │ └── lispbm_llama_small.png │ ├── mktags.sh │ ├── notes │ │ ├── ABOUT_LISP.md │ │ └── pattern_matching.md │ ├── old │ │ ├── repl-cps-zynq │ │ │ └── repl.c │ │ ├── repl-ec │ │ │ ├── Makefile │ │ │ └── repl.c │ │ └── repl-esp-idf │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── main │ │ │ ├── CMakeLists.txt │ │ │ ├── component.mk │ │ │ └── hello_world_main.c │ │ │ ├── sdkconfig │ │ │ └── sdkconfig.ci │ ├── platform │ │ ├── chibios │ │ │ ├── include │ │ │ │ ├── platform_chibios_conf.h │ │ │ │ ├── platform_mutex.h │ │ │ │ └── platform_uart.h │ │ │ └── src │ │ │ │ ├── platform_mutex.c │ │ │ │ └── platform_uart.c │ │ ├── freertos │ │ │ ├── include │ │ │ │ └── platform_mutex.h │ │ │ └── src │ │ │ │ └── platform_mutex.c │ │ ├── linux │ │ │ ├── include │ │ │ │ └── platform_mutex.h │ │ │ └── src │ │ │ │ └── platform_mutex.c │ │ └── zephyr │ │ │ ├── include │ │ │ └── platform_mutex.h │ │ │ └── src │ │ │ └── platform_mutex.c │ ├── repl │ │ ├── Makefile │ │ ├── convmp4.sh │ │ ├── convpng.sh │ │ ├── evaldefunc.lisp │ │ ├── evalstack.lisp │ │ ├── evaluator.lisp │ │ ├── repl.c │ │ ├── simple.lisp │ │ ├── simple2.lisp │ │ ├── simple3.lisp │ │ ├── test_mp.lisp │ │ └── test_yield.lisp │ ├── runinfer.sh │ ├── runsa.sh │ ├── sdlrepl │ │ ├── Makefile │ │ ├── flake.lisp │ │ ├── lbm_sdl.c │ │ ├── lbm_sdl.h │ │ ├── repl.c │ │ ├── runinfer.sh │ │ ├── runsa.sh │ │ ├── sdl.lisp │ │ ├── sdl_texture.lisp │ │ ├── sierpinski.lisp │ │ └── tex1.png │ ├── setup_fw_build.sh │ ├── src │ │ ├── env.c │ │ ├── eval_cps.c │ │ ├── extensions.c │ │ ├── extensions │ │ │ ├── array_extensions.c │ │ │ ├── loop_extensions.c │ │ │ ├── math_extensions.c │ │ │ ├── matvec_extensions.c │ │ │ ├── random_extensions.c │ │ │ ├── runtime_extensions.c │ │ │ └── string_extensions.c │ │ ├── fundamental.c │ │ ├── heap.c │ │ ├── lbm_c_interop.c │ │ ├── lbm_channel.c │ │ ├── lbm_custom_type.c │ │ ├── lbm_flags.c │ │ ├── lbm_flat_value.c │ │ ├── lbm_memory.c │ │ ├── lbm_variables.c │ │ ├── lispbm.c │ │ ├── print.c │ │ ├── qq_expand.c │ │ ├── stack.c │ │ ├── symrepr.c │ │ ├── tokpar.c │ │ └── visual │ │ │ └── heap_vis.c │ ├── tests │ │ ├── Makefile │ │ ├── run_tests.sh │ │ ├── run_tests64.sh │ │ ├── test_append_1.lisp │ │ ├── test_append_2.lisp │ │ ├── test_arith_0.lisp │ │ ├── test_arith_1.lisp │ │ ├── test_arith_10.lisp │ │ ├── test_arith_11.lisp │ │ ├── test_arith_12.lisp │ │ ├── test_arith_13.lisp │ │ ├── test_arith_14.lisp │ │ ├── test_arith_15.lisp │ │ ├── test_arith_16.lisp │ │ ├── test_arith_17.lisp │ │ ├── test_arith_18.lisp │ │ ├── test_arith_19.lisp │ │ ├── test_arith_2.lisp │ │ ├── test_arith_20.lisp │ │ ├── test_arith_21.lisp │ │ ├── test_arith_22.lisp │ │ ├── test_arith_23.lisp │ │ ├── test_arith_24.lisp │ │ ├── test_arith_3.lisp │ │ ├── test_arith_4.lisp │ │ ├── test_arith_5.lisp │ │ ├── test_arith_6.lisp │ │ ├── test_arith_7.lisp │ │ ├── test_arith_8.lisp │ │ ├── test_arith_9.lisp │ │ ├── test_arith_stress_1.lisp │ │ ├── test_arith_stress_2.lisp │ │ ├── test_arith_stress_3.lisp │ │ ├── test_array_0.lisp │ │ ├── test_array_1.lisp │ │ ├── test_array_2.lisp │ │ ├── test_array_3.lisp │ │ ├── test_array_4.lisp │ │ ├── test_array_5.lisp │ │ ├── test_array_6.lisp │ │ ├── test_array_7.lisp │ │ ├── test_array_8.lisp │ │ ├── test_array_9.lisp │ │ ├── test_array_extensions_0.lisp │ │ ├── test_array_extensions_1.lisp │ │ ├── test_array_extensions_2.lisp │ │ ├── test_array_extensions_3.lisp │ │ ├── test_array_extensions_4.lisp │ │ ├── test_array_extensions_5.lisp │ │ ├── test_array_extensions_6.lisp │ │ ├── test_array_extensions_7.lisp │ │ ├── test_array_extensions_8.lisp │ │ ├── test_array_syntax_0.lisp │ │ ├── test_array_syntax_1.lisp │ │ ├── test_array_syntax_10.lisp │ │ ├── test_array_syntax_11.lisp │ │ ├── test_array_syntax_12.lisp │ │ ├── test_array_syntax_13.lisp │ │ ├── test_array_syntax_14.lisp │ │ ├── test_array_syntax_15.lisp │ │ ├── test_array_syntax_16.lisp │ │ ├── test_array_syntax_17.lisp │ │ ├── test_array_syntax_18.lisp │ │ ├── test_array_syntax_2.lisp │ │ ├── test_array_syntax_3.lisp │ │ ├── test_array_syntax_4.lisp │ │ ├── test_array_syntax_5.lisp │ │ ├── test_array_syntax_6.lisp │ │ ├── test_array_syntax_7.lisp │ │ ├── test_array_syntax_8.lisp │ │ ├── test_array_syntax_9.lisp │ │ ├── test_assoc_0.lisp │ │ ├── test_assoc_1.lisp │ │ ├── test_assoc_2.lisp │ │ ├── test_assoc_3.lisp │ │ ├── test_atomic_0.lisp │ │ ├── test_atomic_1.lisp │ │ ├── test_atomic_2.lisp │ │ ├── test_atomic_3.lisp │ │ ├── test_atomic_4.lisp │ │ ├── test_bitwise_1.lisp │ │ ├── test_block_unblock_1.lisp │ │ ├── test_callcc_0.lisp │ │ ├── test_callcc_1.lisp │ │ ├── test_callcc_2.lisp │ │ ├── test_callcc_3.lisp │ │ ├── test_callcc_4.lisp │ │ ├── test_callcc_5.lisp │ │ ├── test_car_0.lisp │ │ ├── test_car_1.lisp │ │ ├── test_car_2.lisp │ │ ├── test_cdr_0.lisp │ │ ├── test_cdr_1.lisp │ │ ├── test_cdr_2.lisp │ │ ├── test_char_0.lisp │ │ ├── test_comments_0.lisp │ │ ├── test_comments_1.lisp │ │ ├── test_comments_2.lisp │ │ ├── test_comments_3.lisp │ │ ├── test_comments_4.lisp │ │ ├── test_comments_5.lisp │ │ ├── test_compare_0.lisp │ │ ├── test_compare_1.lisp │ │ ├── test_compare_2.lisp │ │ ├── test_compare_3.lisp │ │ ├── test_concurrent_0.lisp │ │ ├── test_concurrent_1.lisp │ │ ├── test_cond.lisp │ │ ├── test_cond_0.lisp │ │ ├── test_cond_1.lisp │ │ ├── test_cond_2.lisp │ │ ├── test_cond_3.lisp │ │ ├── test_cond_4.lisp │ │ ├── test_cossa_0.lisp │ │ ├── test_cossa_1.lisp │ │ ├── test_cossa_2.lisp │ │ ├── test_cossa_3.lisp │ │ ├── test_def_0.lisp │ │ ├── test_define_0.lisp │ │ ├── test_define_1.lisp │ │ ├── test_define_2.lisp │ │ ├── test_define_3.lisp │ │ ├── test_dot1.lisp │ │ ├── test_dot2.lisp │ │ ├── test_dot_1.lisp │ │ ├── test_enc_dec.c │ │ ├── test_eq_0.lisp │ │ ├── test_eq_1.lisp │ │ ├── test_eq_2.lisp │ │ ├── test_eq_3.lisp │ │ ├── test_eq_4.lisp │ │ ├── test_eq_5.lisp │ │ ├── test_eq_6.lisp │ │ ├── test_eq_not_eq_1.lisp │ │ ├── test_eq_not_eq_2.lisp │ │ ├── test_eval_0.lisp │ │ ├── test_eval_1.lisp │ │ ├── test_eval_2.lisp │ │ ├── test_eval_3.lisp │ │ ├── test_eval_program_1.lisp │ │ ├── test_eval_program_2.lisp │ │ ├── test_eval_program_3.lisp │ │ ├── test_eval_program_4.lisp │ │ ├── test_eval_program_5.lisp │ │ ├── test_event_1.lisp │ │ ├── test_event_2.lisp │ │ ├── test_event_3.lisp │ │ ├── test_event_4.lisp │ │ ├── test_event_5.lisp │ │ ├── test_event_6.lisp │ │ ├── test_event_7.lisp │ │ ├── test_event_8.lisp │ │ ├── test_explicit_gc_0.lisp │ │ ├── test_extension_0.lisp │ │ ├── test_extension_1.lisp │ │ ├── test_extension_2.lisp │ │ ├── test_extension_3.lisp │ │ ├── test_fib_0.lisp │ │ ├── test_fib_1.lisp │ │ ├── test_fib_2.lisp │ │ ├── test_fib_3.lisp │ │ ├── test_fib_4.lisp │ │ ├── test_first_0.lisp │ │ ├── test_float_0.lisp │ │ ├── test_float_1.lisp │ │ ├── test_float_2.lisp │ │ ├── test_float_3.lisp │ │ ├── test_float_4.lisp │ │ ├── test_float_5.lisp │ │ ├── test_fn_0.lisp │ │ ├── test_fold_0.lisp │ │ ├── test_heap_alloc.c │ │ ├── test_hex_0.lisp │ │ ├── test_hof_0.lisp │ │ ├── test_hof_1.lisp │ │ ├── test_hof_2.lisp │ │ ├── test_if_0.lisp │ │ ├── test_if_1.lisp │ │ ├── test_if_2.lisp │ │ ├── test_if_3.lisp │ │ ├── test_if_4.lisp │ │ ├── test_if_5.lisp │ │ ├── test_ix_0.lisp │ │ ├── test_ix_1.lisp │ │ ├── test_ix_2.lisp │ │ ├── test_ix_3.lisp │ │ ├── test_ix_4.lisp │ │ ├── test_lambda_0.lisp │ │ ├── test_lambda_1.lisp │ │ ├── test_lambda_10.lisp │ │ ├── test_lambda_11.lisp │ │ ├── test_lambda_2.lisp │ │ ├── test_lambda_3.lisp │ │ ├── test_lambda_4.lisp │ │ ├── test_lambda_5.lisp │ │ ├── test_lambda_6.lisp │ │ ├── test_lambda_7.lisp │ │ ├── test_lambda_8.lisp │ │ ├── test_lambda_9.lisp │ │ ├── test_let_0.lisp │ │ ├── test_let_1.lisp │ │ ├── test_let_10.lisp │ │ ├── test_let_11.lisp │ │ ├── test_let_12.lisp │ │ ├── test_let_2.lisp │ │ ├── test_let_3.lisp │ │ ├── test_let_4.lisp │ │ ├── test_let_5.lisp │ │ ├── test_let_6.lisp │ │ ├── test_let_7.lisp │ │ ├── test_let_8.lisp │ │ ├── test_let_9.lisp │ │ ├── test_lisp_code_cps.c │ │ ├── test_list_0.lisp │ │ ├── test_list_1.lisp │ │ ├── test_list_2.lisp │ │ ├── test_list_3.lisp │ │ ├── test_list_4.lisp │ │ ├── test_list_5.lisp │ │ ├── test_logic_1.lisp │ │ ├── test_logic_10.lisp │ │ ├── test_logic_11.lisp │ │ ├── test_logic_12.lisp │ │ ├── test_logic_2.lisp │ │ ├── test_logic_3.lisp │ │ ├── test_logic_4.lisp │ │ ├── test_logic_5.lisp │ │ ├── test_logic_6.lisp │ │ ├── test_logic_7.lisp │ │ ├── test_logic_8.lisp │ │ ├── test_logic_9.lisp │ │ ├── test_loop_for_1.lisp │ │ ├── test_loop_foreach_1.lisp │ │ ├── test_loop_range_1.lisp │ │ ├── test_loop_while_1.lisp │ │ ├── test_macro_0.lisp │ │ ├── test_mail_0.lisp │ │ ├── test_mail_1.lisp │ │ ├── test_mail_2.lisp │ │ ├── test_mail_3.lisp │ │ ├── test_mail_4.lisp │ │ ├── test_map_0.lisp │ │ ├── test_map_1.lisp │ │ ├── test_map_10.lisp │ │ ├── test_map_11.lisp │ │ ├── test_map_12.lisp │ │ ├── test_map_3.lisp │ │ ├── test_map_4.lisp │ │ ├── test_map_5.lisp │ │ ├── test_map_6.lisp │ │ ├── test_map_7.lisp │ │ ├── test_map_8.lisp │ │ ├── test_map_9.lisp │ │ ├── test_match_0.lisp │ │ ├── test_match_1.lisp │ │ ├── test_match_10.lisp │ │ ├── test_match_11.lisp │ │ ├── test_match_12.lisp │ │ ├── test_match_13.lisp │ │ ├── test_match_14.lisp │ │ ├── test_match_15.lisp │ │ ├── test_match_2.lisp │ │ ├── test_match_3.lisp │ │ ├── test_match_4.lisp │ │ ├── test_match_5.lisp │ │ ├── test_match_6.lisp │ │ ├── test_match_7.lisp │ │ ├── test_match_8.lisp │ │ ├── test_match_9.lisp │ │ ├── test_match_guard_0.lisp │ │ ├── test_match_guard_1.lisp │ │ ├── test_match_guard_2.lisp │ │ ├── test_match_guard_3.lisp │ │ ├── test_match_guard_4.lisp │ │ ├── test_match_guard_5.lisp │ │ ├── test_match_guard_6.lisp │ │ ├── test_match_guard_7.lisp │ │ ├── test_match_guard_8.lisp │ │ ├── test_match_guard_9.lisp │ │ ├── test_matrix_1.lisp │ │ ├── test_memory_1.lisp │ │ ├── test_memory_2.lisp │ │ ├── test_memory_3.lisp │ │ ├── test_memory_4.lisp │ │ ├── test_mutual_rec_0.lisp │ │ ├── test_mutual_rec_1.lisp │ │ ├── test_n_times.sh │ │ ├── test_nil_1.lisp │ │ ├── test_not_eq_1.lisp │ │ ├── test_not_eq_2.lisp │ │ ├── test_not_eq_3.lisp │ │ ├── test_num_not_eq_1.lisp │ │ ├── test_num_not_eq_2.lisp │ │ ├── test_num_not_eq_3.lisp │ │ ├── test_numbers_0.lisp │ │ ├── test_numbers_1.lisp │ │ ├── test_numbers_2.lisp │ │ ├── test_partial_0.lisp │ │ ├── test_partial_1.lisp │ │ ├── test_partial_2.lisp │ │ ├── test_partial_3.lisp │ │ ├── test_partial_4.lisp │ │ ├── test_partial_5.lisp │ │ ├── test_progn_0.lisp │ │ ├── test_progn_1.lisp │ │ ├── test_progn_2.lisp │ │ ├── test_progn_3.lisp │ │ ├── test_progn_4.lisp │ │ ├── test_progn_5.lisp │ │ ├── test_progn_6.lisp │ │ ├── test_progn_7.lisp │ │ ├── test_qq_0.lisp │ │ ├── test_qq_1.lisp │ │ ├── test_qq_10.lisp │ │ ├── test_qq_11.lisp │ │ ├── test_qq_12.lisp │ │ ├── test_qq_13.lisp │ │ ├── test_qq_15.lisp │ │ ├── test_qq_2.lisp │ │ ├── test_qq_3.lisp │ │ ├── test_qq_4.lisp │ │ ├── test_qq_5.lisp │ │ ├── test_qq_6.lisp │ │ ├── test_qq_7.lisp │ │ ├── test_qq_8.lisp │ │ ├── test_qq_9.lisp │ │ ├── test_quote_0.lisp │ │ ├── test_quote_1.lisp │ │ ├── test_random_1.lisp │ │ ├── test_range_0.lisp │ │ ├── test_range_1.lisp │ │ ├── test_range_2.lisp │ │ ├── test_range_3.lisp │ │ ├── test_range_4.lisp │ │ ├── test_range_5.lisp │ │ ├── test_range_6.lisp │ │ ├── test_range_7.lisp │ │ ├── test_range_8.lisp │ │ ├── test_range_9.lisp │ │ ├── test_read_0.lisp │ │ ├── test_read_1.lisp │ │ ├── test_read_2.lisp │ │ ├── test_read_3.lisp │ │ ├── test_read_4.lisp │ │ ├── test_read_program_1.lisp │ │ ├── test_read_program_2.lisp │ │ ├── test_read_program_3.lisp │ │ ├── test_read_program_4.lisp │ │ ├── test_read_program_5.lisp │ │ ├── test_read_program_6.lisp │ │ ├── test_read_program_7.lisp │ │ ├── test_read_program_8.lisp │ │ ├── test_receive_1.lisp │ │ ├── test_receive_2.lisp │ │ ├── test_receive_3.lisp │ │ ├── test_receive_4.lisp │ │ ├── test_receive_5.lisp │ │ ├── test_receive_6.lisp │ │ ├── test_refmut_1.lisp │ │ ├── test_refmut_2.lisp │ │ ├── test_refmut_3.lisp │ │ ├── test_refmut_4.lisp │ │ ├── test_refmut_5.lisp │ │ ├── test_refmut_6.lisp │ │ ├── test_refmut_7.lisp │ │ ├── test_refmut_8.lisp │ │ ├── test_rest_0.lisp │ │ ├── test_saxpy_1.lisp │ │ ├── test_saxpy_2.lisp │ │ ├── test_setix_0.lisp │ │ ├── test_setix_1.lisp │ │ ├── test_setix_2.lisp │ │ ├── test_setvar_let_0.lisp │ │ ├── test_setvar_let_1.lisp │ │ ├── test_setvar_let_2.lisp │ │ ├── test_spawn_trap_1.lisp │ │ ├── test_spawn_trap_2.lisp │ │ ├── test_spawn_trap_3.lisp │ │ ├── test_spawn_trap_4.lisp │ │ ├── test_spawn_wait_1.lisp │ │ ├── test_str_cmp_1.lisp │ │ ├── test_str_from_n_1.lisp │ │ ├── test_str_from_n_2.lisp │ │ ├── test_str_len_1.lisp │ │ ├── test_str_merge_1.lisp │ │ ├── test_str_part_1.lisp │ │ ├── test_str_replace_1.lisp │ │ ├── test_str_split_1.lisp │ │ ├── test_str_to_f_1.lisp │ │ ├── test_str_to_i_1.lisp │ │ ├── test_str_to_lower_1.lisp │ │ ├── test_str_to_upper_1.lisp │ │ ├── test_string_1.lisp │ │ ├── test_sumtree_0.lisp │ │ ├── test_sumtree_1.lisp │ │ ├── test_sumtree_2.lisp │ │ ├── test_symbol_0.lisp │ │ ├── test_symbol_1.lisp │ │ ├── test_tailrec_0.lisp │ │ ├── test_tailrec_1.lisp │ │ ├── test_tailrec_2.lisp │ │ ├── test_take_iota_0.lisp │ │ ├── test_to_str_1.lisp │ │ ├── test_to_str_delim_1.lisp │ │ ├── test_typeof_0.lisp │ │ ├── test_typeof_1.lisp │ │ ├── test_typeof_2.lisp │ │ ├── test_typeof_3.lisp │ │ ├── test_typeof_4.lisp │ │ ├── test_typeof_5.lisp │ │ ├── test_typeof_6.lisp │ │ ├── test_typeof_7.lisp │ │ ├── test_typeof_8.lisp │ │ ├── test_undefine_0.lisp │ │ ├── test_underscore_sym_0.lisp │ │ ├── test_underscore_sym_1.lisp │ │ ├── test_variable_0.lisp │ │ ├── test_variable_1.lisp │ │ ├── test_vector_1.lisp │ │ ├── test_vector_2.lisp │ │ ├── test_vector_3.lisp │ │ └── test_word_size.lisp │ ├── utils │ │ └── gen_codes.py │ ├── videos │ │ ├── one_minute_heap_vis.mp4 │ │ ├── sum150_rgb_2.mp4 │ │ └── sum150_tail_recursive_rgb_0.mp4 │ ├── zephyr-examples │ │ ├── repl-zephyr │ │ │ ├── CMakeLists.txt │ │ │ ├── Kconfig │ │ │ ├── Makefile │ │ │ ├── flash.sh │ │ │ ├── prj.conf │ │ │ ├── src │ │ │ │ └── main.c │ │ │ ├── usb_cdc.c │ │ │ └── usb_cdc.h │ │ └── source_me_zephyr.sh │ └── zephyr-source-me.sh ├── lispbm.mk ├── lispif.c ├── lispif.h ├── lispif_c_lib.c ├── lispif_vesc_dynamic_loader.c └── lispif_vesc_extensions.c ├── main.c ├── main.h ├── make ├── fw.mk ├── linux.mk ├── macos.mk ├── system-id.mk ├── tools.mk ├── unittest-defs.mk ├── unittest.mk └── windows.mk ├── motor ├── foc_math.c ├── foc_math.h ├── gpdrive.c ├── gpdrive.h ├── mc_interface.c ├── mc_interface.h ├── mcconf_default.h ├── mcpwm.c ├── mcpwm.h ├── mcpwm_foc.c ├── mcpwm_foc.h ├── motor.mk ├── virtual_motor.c └── virtual_motor.h ├── package_firmware.py ├── pi_stm32.cfg ├── qmlui ├── app │ ├── qmlui_example_app.c │ └── qmlui_example_app.h ├── hw │ ├── qmlui_example_hw.c │ └── qmlui_example_hw.h ├── qmlui.c └── qmlui.h ├── stm32-bv_openocd.cfg ├── terminal.c ├── terminal.h ├── tests ├── float_serialization │ ├── Makefile │ └── main.c ├── overvoltage_fault │ ├── overvoltage_test_v1.ods │ ├── overvoltage_test_v1.pdf │ ├── overvoltage_test_v2.ods │ └── overvoltage_test_v2.pdf ├── packet_recovery │ ├── Makefile │ └── main.c └── utils_math │ ├── Makefile │ ├── app.h │ ├── ch.h │ ├── hal.h │ └── unittest.cpp ├── timeout.c ├── timeout.h └── util ├── buffer.c ├── buffer.h ├── crc.c ├── crc.h ├── digital_filter.c ├── digital_filter.h ├── lzo ├── README.LZO ├── lzoconf.h ├── lzodefs.h ├── minilzo.c └── minilzo.h ├── mempools.c ├── mempools.h ├── util.mk ├── utils.h ├── utils_math.c ├── utils_math.h ├── utils_sys.c ├── utils_sys.h ├── worker.c └── worker.h /.gdbinit: -------------------------------------------------------------------------------- 1 | define connect 2 | target extended localhost:3333 3 | end 4 | 5 | define dump_flash 6 | if ($argc == 0) 7 | dump binary memory flash_dump.bin 0 0x100000 8 | end 9 | if ($argc == 1) 10 | dump binary memory $arg0 0 0x100000 11 | else 12 | help dump_flash 13 | end 14 | end 15 | document dump_flash 16 | Dump the enitire stm flash area to a bin file. 17 | Usage: dump_flash *.bin 18 | end 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | 3 | build 4 | tools 5 | downloads 6 | package/ 7 | 8 | .dep 9 | .project 10 | .cproject 11 | .settings/language.settings.xml 12 | .DS_Store 13 | workspace.code-workspace 14 | 15 | # Qt project settings 16 | *.pro.user 17 | *.pro.shared 18 | 19 | .vscode 20 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: cpp 2 | compiler: gcc 3 | cache: apt 4 | sudo: required 5 | dist: trusty 6 | addons: 7 | apt: 8 | packages: 9 | - gcc-arm-none-eabi 10 | - libnewlib-arm-none-eabi 11 | env: 12 | 13 | script: 14 | - cd build_all && ./rebuild_all 15 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/ext/readme.txt: -------------------------------------------------------------------------------- 1 | All the code contained under ./ext is not part of the ChibiOS project and 2 | supplied as-is without any additional warranty by ChibiOS. For ownership and 3 | copyright statements see the license details inside the code. 4 | 5 | Some modules may contain changes from the ChibiOS team in order to increase 6 | compatibility or usability with ChibiOS itself. 7 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/ext/stdperiph_stm32f4/stm32lib.mk: -------------------------------------------------------------------------------- 1 | # STM32F4 STDPERIPH files. 2 | STM32SRC = ${CHIBIOS}/ext/stdperiph_stm32f4/src/misc.c \ 3 | ${CHIBIOS}/ext/stdperiph_stm32f4/src/stm32f4xx_adc.c \ 4 | ${CHIBIOS}/ext/stdperiph_stm32f4/src/stm32f4xx_dma.c \ 5 | ${CHIBIOS}/ext/stdperiph_stm32f4/src/stm32f4xx_exti.c \ 6 | ${CHIBIOS}/ext/stdperiph_stm32f4/src/stm32f4xx_flash.c \ 7 | ${CHIBIOS}/ext/stdperiph_stm32f4/src/stm32f4xx_rcc.c \ 8 | ${CHIBIOS}/ext/stdperiph_stm32f4/src/stm32f4xx_syscfg.c \ 9 | ${CHIBIOS}/ext/stdperiph_stm32f4/src/stm32f4xx_tim.c \ 10 | ${CHIBIOS}/ext/stdperiph_stm32f4/src/stm32f4xx_iwdg.c \ 11 | ${CHIBIOS}/ext/stdperiph_stm32f4/src/stm32f4xx_wwdg.c 12 | 13 | STM32INC = ${CHIBIOS}/ext/stdperiph_stm32f4/inc 14 | 15 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/common/ports/ARM/compilers/GCC/mk/startup_lpc214x.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS generic LPC214x file. 2 | STARTUPSRC = $(CHIBIOS)/os/common/ports/ARM/compilers/GCC/crt1.c 3 | 4 | STARTUPASM = $(CHIBIOS)/os/common/ports/ARM/compilers/GCC/vectors.s \ 5 | $(CHIBIOS)/os/common/ports/ARM/compilers/GCC/crt0.s 6 | 7 | STARTUPINC = ${CHIBIOS}/os/common/ports/ARM/devices/LPC214x 8 | 9 | STARTUPLD = ${CHIBIOS}/os/common/ports/ARM/compilers/GCC/ld 10 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/common/ports/ARMCMx/compilers/GCC/mk/startup_k20x.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS generic K20x startup and CMSIS files. 2 | STARTUPSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt1.c \ 3 | $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c 4 | 5 | STARTUPASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s 6 | 7 | STARTUPINC = $(CHIBIOS)/os/common/ports/ARMCMx/devices/K20x \ 8 | $(CHIBIOS)/os/ext/CMSIS/include \ 9 | $(CHIBIOS)/os/ext/CMSIS/KINETIS 10 | 11 | STARTUPLD = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/ld 12 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/common/ports/ARMCMx/compilers/GCC/mk/startup_kl2x.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS generic KL2x startup and CMSIS files. 2 | STARTUPSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt1.c \ 3 | $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c 4 | 5 | STARTUPASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v6m.s 6 | 7 | STARTUPINC = $(CHIBIOS)/os/common/ports/ARMCMx/devices/KL2x \ 8 | $(CHIBIOS)/os/ext/CMSIS/include \ 9 | $(CHIBIOS)/os/ext/CMSIS/KINETIS 10 | 11 | STARTUPLD = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/ld 12 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS generic STM32F0xx startup and CMSIS files. 2 | STARTUPSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt1.c \ 3 | $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c 4 | 5 | STARTUPASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v6m.s 6 | 7 | STARTUPINC = $(CHIBIOS)/os/common/ports/ARMCMx/devices/STM32F0xx \ 8 | $(CHIBIOS)/os/ext/CMSIS/include \ 9 | $(CHIBIOS)/os/ext/CMSIS/ST 10 | 11 | STARTUPLD = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/ld 12 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS generic STM32F1xx startup and CMSIS files. 2 | STARTUPSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt1.c \ 3 | $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c 4 | 5 | STARTUPASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s 6 | 7 | STARTUPINC = $(CHIBIOS)/os/common/ports/ARMCMx/devices/STM32F1xx \ 8 | $(CHIBIOS)/os/ext/CMSIS/include \ 9 | $(CHIBIOS)/os/ext/CMSIS/ST 10 | 11 | STARTUPLD = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/ld 12 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f3xx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS generic STM32F3xx startup and CMSIS files. 2 | STARTUPSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt1.c \ 3 | $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c 4 | 5 | STARTUPASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s 6 | 7 | STARTUPINC = $(CHIBIOS)/os/common/ports/ARMCMx/devices/STM32F3xx \ 8 | $(CHIBIOS)/os/ext/CMSIS/include \ 9 | $(CHIBIOS)/os/ext/CMSIS/ST 10 | 11 | STARTUPLD = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/ld 12 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS generic STM32F4xx startup and CMSIS files. 2 | STARTUPSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt1.c \ 3 | $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c 4 | 5 | STARTUPASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s 6 | 7 | STARTUPINC = $(CHIBIOS)/os/common/ports/ARMCMx/devices/STM32F4xx \ 8 | $(CHIBIOS)/os/ext/CMSIS/include \ 9 | $(CHIBIOS)/os/ext/CMSIS/ST 10 | 11 | STARTUPLD = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/ld 12 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32l0xx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS generic STM32L0xx startup and CMSIS files. 2 | STARTUPSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt1.c \ 3 | $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c 4 | 5 | STARTUPASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v6m.s 6 | 7 | STARTUPINC = $(CHIBIOS)/os/common/ports/ARMCMx/devices/STM32L0xx \ 8 | $(CHIBIOS)/os/ext/CMSIS/include \ 9 | $(CHIBIOS)/os/ext/CMSIS/ST 10 | 11 | STARTUPLD = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/ld 12 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32l1xx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS generic STM32L1xx startup and CMSIS files. 2 | STARTUPSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt1.c \ 3 | $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c 4 | 5 | STARTUPASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s 6 | 7 | STARTUPINC = $(CHIBIOS)/os/common/ports/ARMCMx/devices/STM32L1xx \ 8 | $(CHIBIOS)/os/ext/CMSIS/include \ 9 | $(CHIBIOS)/os/ext/CMSIS/ST 10 | 11 | STARTUPLD = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/ld 12 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/ext/CMSIS/ST/stm32f405xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surfdado/bldc/c7e496a54e599fa2bf65720d5cfe0fd765af0fef/ChibiOS_3.0.5/os/ext/CMSIS/ST/stm32f405xx.h -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/ext/CMSIS/ST/stm32f407xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surfdado/bldc/c7e496a54e599fa2bf65720d5cfe0fd765af0fef/ChibiOS_3.0.5/os/ext/CMSIS/ST/stm32f407xx.h -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/ext/CMSIS/readme.txt: -------------------------------------------------------------------------------- 1 | CMSIS is Copyright (C) 2011-2013 ARM Limited. All rights reserved. 2 | 3 | This directory contains only part of the CMSIS package. If you need the whole 4 | package please download it from: 5 | 6 | http://www.arm.com 7 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/ext/readme.txt: -------------------------------------------------------------------------------- 1 | All the code contained under ./os/ext is not part of the ChibiOS project and 2 | supplied as-is without any additional warranty by ChibiOS. For ownership and 3 | copyright statements see the license details inside the code. 4 | 5 | Some modules may contain changes from the ChibiOS team in order to increase 6 | compatibility or usability with ChibiOS itself. 7 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/hal/osal/nil/osal.mk: -------------------------------------------------------------------------------- 1 | # OSAL files. 2 | OSALSRC += ${CHIBIOS}/os/hal/osal/nil/osal.c 3 | 4 | # Required include directories 5 | OSALINC += ${CHIBIOS}/os/hal/osal/nil 6 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/hal/osal/os-less/ARMCMx/osal.mk: -------------------------------------------------------------------------------- 1 | # OSAL files. 2 | OSALSRC += ${CHIBIOS}/os/hal/osal/os-less/ARMCMx/osal.c 3 | 4 | # Required include directories 5 | OSALINC += ${CHIBIOS}/os/hal/osal/os-less/ARMCMx 6 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/hal/osal/rt/osal.mk: -------------------------------------------------------------------------------- 1 | # OSAL files. 2 | OSALSRC += ${CHIBIOS}/os/hal/osal/rt/osal.c 3 | 4 | # Required include directories 5 | OSALINC += ${CHIBIOS}/os/hal/osal/rt 6 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/nil/nil.mk: -------------------------------------------------------------------------------- 1 | # List of all the ChibiOS/NIL kernel files. 2 | KERNSRC = ${CHIBIOS}/os/nil/src/nil.c 3 | 4 | # Required include directories 5 | KERNINC = ${CHIBIOS}/os/nil/include 6 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/nil/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/NIL ARMv6M generic port files. 2 | PORTSRC = $(CHIBIOS)/os/nil/ports/ARMCMx/nilcore.c \ 3 | $(CHIBIOS)/os/nil/ports/ARMCMx/nilcore_v6m.c 4 | 5 | PORTASM = $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v6m.s 6 | 7 | PORTINC = $(CHIBIOS)/os/nil/ports/ARMCMx \ 8 | $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC 9 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/nil/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/NIL ARMv7M generic port files. 2 | PORTSRC = $(CHIBIOS)/os/nil/ports/ARMCMx/nilcore.c \ 3 | $(CHIBIOS)/os/nil/ports/ARMCMx/nilcore_v7m.c 4 | 5 | PORTASM = $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s 6 | 7 | PORTINC = $(CHIBIOS)/os/nil/ports/ARMCMx \ 8 | $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC 9 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/nil/ports/AVR/compilers/GCC/mk/port.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/RT AVR port files. 2 | PORTSRC = ${CHIBIOS}/os/nil/ports/AVR/nilcore.c 3 | 4 | PORTASM = 5 | 6 | PORTINC = ${CHIBIOS}/os/nil/ports/AVR \ 7 | ${CHIBIOS}/os/nil/ports/AVR/compilers/GCC 8 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/nil/ports/e200/compilers/GCC/mk/port_spc560bxx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/NIL e200z0 SPC560Bxx port files. 2 | PORTSRC = ${CHIBIOS}/os/nil/ports/e200/nilcore.c 3 | 4 | PORTASM = $(CHIBIOS)/os/common/ports/e200/devices/SPC560Bxx/boot.s \ 5 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/vectors.s \ 6 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/crt0.s \ 7 | $(CHIBIOS)/os/nil/ports/e200/compilers/GCC/ivor.s 8 | 9 | PORTINC = ${CHIBIOS}/os/common/ports/e200/compilers/GCC \ 10 | ${CHIBIOS}/os/common/ports/e200/devices/SPC560Bxx \ 11 | ${CHIBIOS}/os/nil/ports/e200 \ 12 | ${CHIBIOS}/os/nil/ports/e200/compilers/GCC 13 | 14 | PORTLD = ${CHIBIOS}/os/common/ports/e200/compilers/GCC/ld 15 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/nil/ports/e200/compilers/GCC/mk/port_spc560dxx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/NIL e200z0 SPC560Dxx port files. 2 | PORTSRC = ${CHIBIOS}/os/nil/ports/e200/nilcore.c 3 | 4 | PORTASM = $(CHIBIOS)/os/common/ports/e200/devices/SPC560Dxx/boot.s \ 5 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/vectors.s \ 6 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/crt0.s \ 7 | $(CHIBIOS)/os/nil/ports/e200/compilers/GCC/ivor.s 8 | 9 | PORTINC = ${CHIBIOS}/os/common/ports/e200/compilers/GCC \ 10 | ${CHIBIOS}/os/common/ports/e200/devices/SPC560Dxx \ 11 | ${CHIBIOS}/os/nil/ports/e200 \ 12 | ${CHIBIOS}/os/nil/ports/e200/compilers/GCC 13 | 14 | PORTLD = ${CHIBIOS}/os/common/ports/e200/compilers/GCC/ld 15 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/nil/ports/e200/compilers/GCC/mk/port_spc560pxx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/NIL e200z0 SPC560Pxx port files. 2 | PORTSRC = ${CHIBIOS}/os/nil/ports/e200/nilcore.c 3 | 4 | PORTASM = $(CHIBIOS)/os/common/ports/e200/devices/SPC560Pxx/boot.s \ 5 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/vectors.s \ 6 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/crt0.s \ 7 | $(CHIBIOS)/os/nil/ports/e200/compilers/GCC/ivor.s 8 | 9 | PORTINC = ${CHIBIOS}/os/common/ports/e200/compilers/GCC \ 10 | ${CHIBIOS}/os/common/ports/e200/devices/SPC560Pxx \ 11 | ${CHIBIOS}/os/nil/ports/e200 \ 12 | ${CHIBIOS}/os/nil/ports/e200/compilers/GCC 13 | 14 | PORTLD = ${CHIBIOS}/os/common/ports/e200/compilers/GCC/ld 15 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/nil/ports/e200/compilers/GCC/mk/port_spc563mxx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/NIL e200z3 SPC563Mxx port files. 2 | PORTSRC = ${CHIBIOS}/os/nil/ports/e200/nilcore.c 3 | 4 | PORTASM = $(CHIBIOS)/os/common/ports/e200/devices/SPC563Mxx/boot.s \ 5 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/vectors.s \ 6 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/crt0.s \ 7 | $(CHIBIOS)/os/nil/ports/e200/compilers/GCC/ivor.s 8 | 9 | PORTINC = ${CHIBIOS}/os/common/ports/e200/compilers/GCC \ 10 | ${CHIBIOS}/os/common/ports/e200/devices/SPC563Mxx \ 11 | ${CHIBIOS}/os/nil/ports/e200 \ 12 | ${CHIBIOS}/os/nil/ports/e200/compilers/GCC 13 | 14 | PORTLD = ${CHIBIOS}/os/common/ports/e200/compilers/GCC/ld 15 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/nil/ports/e200/compilers/GCC/mk/port_spc564axx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/NIL e200z4 SPC564Axx port files. 2 | PORTSRC = ${CHIBIOS}/os/nil/ports/e200/nilcore.c 3 | 4 | PORTASM = $(CHIBIOS)/os/common/ports/e200/devices/SPC564Axx/boot.s \ 5 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/vectors.s \ 6 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/crt0.s \ 7 | $(CHIBIOS)/os/nil/ports/e200/compilers/GCC/ivor.s 8 | 9 | PORTINC = ${CHIBIOS}/os/common/ports/e200/compilers/GCC \ 10 | ${CHIBIOS}/os/common/ports/e200/devices/SPC564Axx \ 11 | ${CHIBIOS}/os/nil/ports/e200 \ 12 | ${CHIBIOS}/os/nil/ports/e200/compilers/GCC 13 | 14 | PORTLD = ${CHIBIOS}/os/common/ports/e200/compilers/GCC/ld 15 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/nil/ports/e200/compilers/GCC/mk/port_spc56ecxx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/NIL e200z4 SPC56ECxx port files. 2 | PORTSRC = ${CHIBIOS}/os/nil/ports/e200/nilcore.c 3 | 4 | PORTASM = $(CHIBIOS)/os/common/ports/e200/devices/SPC56ECxx/boot.s \ 5 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/vectors.s \ 6 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/crt0.s \ 7 | $(CHIBIOS)/os/nil/ports/e200/compilers/GCC/ivor.s 8 | 9 | PORTINC = ${CHIBIOS}/os/common/ports/e200/compilers/GCC \ 10 | ${CHIBIOS}/os/common/ports/e200/devices/SPC56ECxx \ 11 | ${CHIBIOS}/os/nil/ports/e200 \ 12 | ${CHIBIOS}/os/nil/ports/e200/compilers/GCC 13 | 14 | PORTLD = ${CHIBIOS}/os/common/ports/e200/compilers/GCC/ld 15 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/nil/ports/e200/compilers/GCC/mk/port_spc56elxx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/NIL e200z4 SPC56ELxx port files. 2 | PORTSRC = ${CHIBIOS}/os/nil/ports/e200/nilcore.c 3 | 4 | PORTASM = $(CHIBIOS)/os/common/ports/e200/devices/SPC56ELxx/boot.s \ 5 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/vectors.s \ 6 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/crt0.s \ 7 | $(CHIBIOS)/os/nil/ports/e200/compilers/GCC/ivor.s 8 | 9 | PORTINC = ${CHIBIOS}/os/common/ports/e200/compilers/GCC \ 10 | ${CHIBIOS}/os/common/ports/e200/devices/SPC56ELxx \ 11 | ${CHIBIOS}/os/nil/ports/e200 \ 12 | ${CHIBIOS}/os/nil/ports/e200/compilers/GCC 13 | 14 | PORTLD = ${CHIBIOS}/os/common/ports/e200/compilers/GCC/ld 15 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/nil/ports/e200/compilers/GCC/mk/port_spc57emxx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/NIL e200z4 SPC57EMxx port files. 2 | PORTSRC = ${CHIBIOS}/os/nil/ports/e200/nilcore.c 3 | 4 | PORTASM = $(CHIBIOS)/os/common/ports/e200/devices/SPC57EMxx/boot.s \ 5 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/vectors.s \ 6 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/crt0.s \ 7 | $(CHIBIOS)/os/nil/ports/e200/compilers/GCC/ivor.s 8 | 9 | PORTINC = ${CHIBIOS}/os/common/ports/e200/compilers/GCC \ 10 | ${CHIBIOS}/os/common/ports/e200/devices/SPC57EMxx \ 11 | ${CHIBIOS}/os/nil/ports/e200 \ 12 | ${CHIBIOS}/os/nil/ports/e200/compilers/GCC 13 | 14 | PORTLD = ${CHIBIOS}/os/common/ports/e200/compilers/GCC/ld 15 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/rt/ports/ARM/compilers/GCC/mk/port_generic.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/RT ARM generic port files. 2 | PORTSRC = ${CHIBIOS}/os/rt/ports/ARM/chcore.c 3 | 4 | PORTASM = $(CHIBIOS)/os/rt/ports/ARM/compilers/GCC/chcoreasm.s 5 | 6 | PORTINC = ${CHIBIOS}/os/rt/ports/ARM \ 7 | ${CHIBIOS}/os/rt/ports/ARM/compilers/GCC 8 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/rt/ports/ARMCMx/cmsis_os/cmsis_os.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/RT CMSIS RTOS wrapper. 2 | CMSISRTOSSRC = ${CHIBIOS}/os/rt/ports/ARMCMx/cmsis_os/cmsis_os.c 3 | 4 | CMSISRTOSINC = ${CHIBIOS}/os/rt/ports/ARMCMx/cmsis_os 5 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/RT Cortex-M0 STM32F0xx port files. 2 | PORTSRC = $(CHIBIOS)/os/rt/ports/ARMCMx/chcore.c \ 3 | $(CHIBIOS)/os/rt/ports/ARMCMx/chcore_v6m.c 4 | 5 | PORTASM = $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v6m.s 6 | 7 | PORTINC = $(CHIBIOS)/os/rt/ports/ARMCMx \ 8 | $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC 9 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/RT ARMv7M generic port files. 2 | PORTSRC = $(CHIBIOS)/os/rt/ports/ARMCMx/chcore.c \ 3 | $(CHIBIOS)/os/rt/ports/ARMCMx/chcore_v7m.c 4 | 5 | PORTASM = $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s 6 | 7 | PORTINC = $(CHIBIOS)/os/rt/ports/ARMCMx \ 8 | $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC 9 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/rt/ports/AVR/compilers/GCC/mk/port.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/RT AVR port files. 2 | PORTSRC = ${CHIBIOS}/os/rt/ports/AVR/chcore.c 3 | 4 | PORTASM = 5 | 6 | PORTINC = ${CHIBIOS}/os/rt/ports/AVR \ 7 | ${CHIBIOS}/os/rt/ports/AVR/compilers/GCC 8 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/rt/ports/SIMIA32/compilers/GCC/port.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/RT SIMIA32 port files. 2 | PORTSRC = ${CHIBIOS}/os/rt/ports/SIMIA32/chcore.c 3 | 4 | PORTASM = 5 | 6 | PORTINC = ${CHIBIOS}/os/rt/ports/SIMIA32/compilers/GCC \ 7 | ${CHIBIOS}/os/rt/ports/SIMIA32 8 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/rt/ports/e200/compilers/GCC/mk/port_spc560bxx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/RT e200z0 SPC560Bxx port files. 2 | PORTSRC = ${CHIBIOS}/os/rt/ports/e200/chcore.c 3 | 4 | PORTASM = $(CHIBIOS)/os/common/ports/e200/devices/SPC560Bxx/boot.s \ 5 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/vectors.s \ 6 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/crt0.s \ 7 | $(CHIBIOS)/os/rt/ports/e200/compilers/GCC/ivor.s 8 | 9 | PORTINC = ${CHIBIOS}/os/common/ports/e200/compilers/GCC \ 10 | ${CHIBIOS}/os/common/ports/e200/devices/SPC560Bxx \ 11 | ${CHIBIOS}/os/rt/ports/e200 \ 12 | ${CHIBIOS}/os/rt/ports/e200/compilers/GCC 13 | 14 | PORTLD = ${CHIBIOS}/os/common/ports/e200/compilers/GCC/ld 15 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/rt/ports/e200/compilers/GCC/mk/port_spc560dxx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/RT e200z0 SPC560Dxx port files. 2 | PORTSRC = ${CHIBIOS}/os/rt/ports/e200/chcore.c 3 | 4 | PORTASM = $(CHIBIOS)/os/common/ports/e200/devices/SPC560Dxx/boot.s \ 5 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/vectors.s \ 6 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/crt0.s \ 7 | $(CHIBIOS)/os/rt/ports/e200/compilers/GCC/ivor.s 8 | 9 | PORTINC = ${CHIBIOS}/os/common/ports/e200/compilers/GCC \ 10 | ${CHIBIOS}/os/common/ports/e200/devices/SPC560Dxx \ 11 | ${CHIBIOS}/os/rt/ports/e200 \ 12 | ${CHIBIOS}/os/rt/ports/e200/compilers/GCC 13 | 14 | PORTLD = ${CHIBIOS}/os/common/ports/e200/compilers/GCC/ld 15 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/rt/ports/e200/compilers/GCC/mk/port_spc560pxx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/RT e200z0 SPC560Pxx port files. 2 | PORTSRC = ${CHIBIOS}/os/rt/ports/e200/chcore.c 3 | 4 | PORTASM = $(CHIBIOS)/os/common/ports/e200/devices/SPC560Pxx/boot.s \ 5 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/vectors.s \ 6 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/crt0.s \ 7 | $(CHIBIOS)/os/rt/ports/e200/compilers/GCC/ivor.s 8 | 9 | PORTINC = ${CHIBIOS}/os/common/ports/e200/compilers/GCC \ 10 | ${CHIBIOS}/os/common/ports/e200/devices/SPC560Pxx \ 11 | ${CHIBIOS}/os/rt/ports/e200 \ 12 | ${CHIBIOS}/os/rt/ports/e200/compilers/GCC 13 | 14 | PORTLD = ${CHIBIOS}/os/common/ports/e200/compilers/GCC/ld 15 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/rt/ports/e200/compilers/GCC/mk/port_spc563mxx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/RT e200z3 SPC563Mxx port files. 2 | PORTSRC = ${CHIBIOS}/os/rt/ports/e200/chcore.c 3 | 4 | PORTASM = $(CHIBIOS)/os/common/ports/e200/devices/SPC563Mxx/boot.s \ 5 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/vectors.s \ 6 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/crt0.s \ 7 | $(CHIBIOS)/os/rt/ports/e200/compilers/GCC/ivor.s 8 | 9 | PORTINC = ${CHIBIOS}/os/common/ports/e200/compilers/GCC \ 10 | ${CHIBIOS}/os/common/ports/e200/devices/SPC563Mxx \ 11 | ${CHIBIOS}/os/rt/ports/e200 \ 12 | ${CHIBIOS}/os/rt/ports/e200/compilers/GCC 13 | 14 | PORTLD = ${CHIBIOS}/os/common/ports/e200/compilers/GCC/ld 15 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/rt/ports/e200/compilers/GCC/mk/port_spc564axx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/RT e200z4 SPC564Axx port files. 2 | PORTSRC = ${CHIBIOS}/os/rt/ports/e200/chcore.c 3 | 4 | PORTASM = $(CHIBIOS)/os/common/ports/e200/devices/SPC564Axx/boot.s \ 5 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/vectors.s \ 6 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/crt0.s \ 7 | $(CHIBIOS)/os/rt/ports/e200/compilers/GCC/ivor.s 8 | 9 | PORTINC = ${CHIBIOS}/os/common/ports/e200/compilers/GCC \ 10 | ${CHIBIOS}/os/common/ports/e200/devices/SPC564Axx \ 11 | ${CHIBIOS}/os/rt/ports/e200 \ 12 | ${CHIBIOS}/os/rt/ports/e200/compilers/GCC 13 | 14 | PORTLD = ${CHIBIOS}/os/common/ports/e200/compilers/GCC/ld 15 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/rt/ports/e200/compilers/GCC/mk/port_spc56ecxx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/RT e200z4 SPC56ECxx port files. 2 | PORTSRC = ${CHIBIOS}/os/rt/ports/e200/chcore.c 3 | 4 | PORTASM = $(CHIBIOS)/os/common/ports/e200/devices/SPC56ECxx/boot.s \ 5 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/vectors.s \ 6 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/crt0.s \ 7 | $(CHIBIOS)/os/rt/ports/e200/compilers/GCC/ivor.s 8 | 9 | PORTINC = ${CHIBIOS}/os/common/ports/e200/compilers/GCC \ 10 | ${CHIBIOS}/os/common/ports/e200/devices/SPC56ECxx \ 11 | ${CHIBIOS}/os/rt/ports/e200 \ 12 | ${CHIBIOS}/os/rt/ports/e200/compilers/GCC 13 | 14 | PORTLD = ${CHIBIOS}/os/common/ports/e200/compilers/GCC/ld 15 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/rt/ports/e200/compilers/GCC/mk/port_spc56elxx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/RT e200z4 SPC56ELxx port files. 2 | PORTSRC = ${CHIBIOS}/os/rt/ports/e200/chcore.c 3 | 4 | PORTASM = $(CHIBIOS)/os/common/ports/e200/devices/SPC56ELxx/boot.s \ 5 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/vectors.s \ 6 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/crt0.s \ 7 | $(CHIBIOS)/os/rt/ports/e200/compilers/GCC/ivor.s 8 | 9 | PORTINC = ${CHIBIOS}/os/common/ports/e200/compilers/GCC \ 10 | ${CHIBIOS}/os/common/ports/e200/devices/SPC56ELxx \ 11 | ${CHIBIOS}/os/rt/ports/e200 \ 12 | ${CHIBIOS}/os/rt/ports/e200/compilers/GCC 13 | 14 | PORTLD = ${CHIBIOS}/os/common/ports/e200/compilers/GCC/ld 15 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/rt/ports/e200/compilers/GCC/mk/port_spc57emxx.mk: -------------------------------------------------------------------------------- 1 | # List of the ChibiOS/RT e200z4 SPC57EMxx port files. 2 | PORTSRC = ${CHIBIOS}/os/rt/ports/e200/chcore.c 3 | 4 | PORTASM = $(CHIBIOS)/os/common/ports/e200/devices/SPC57EMxx/boot.s \ 5 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/vectors.s \ 6 | $(CHIBIOS)/os/common/ports/e200/compilers/GCC/crt0.s \ 7 | $(CHIBIOS)/os/rt/ports/e200/compilers/GCC/ivor.s 8 | 9 | PORTINC = ${CHIBIOS}/os/common/ports/e200/compilers/GCC \ 10 | ${CHIBIOS}/os/common/ports/e200/devices/SPC57EMxx \ 11 | ${CHIBIOS}/os/rt/ports/e200 \ 12 | ${CHIBIOS}/os/rt/ports/e200/compilers/GCC 13 | 14 | PORTLD = ${CHIBIOS}/os/common/ports/e200/compilers/GCC/ld 15 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/various/cpp_wrappers/chcpp.mk: -------------------------------------------------------------------------------- 1 | # C++ wrapper files. 2 | CHCPPSRC = ${CHIBIOS}/os/various/cpp_wrappers/ch.cpp \ 3 | ${CHIBIOS}/os/various/cpp_wrappers/syscalls_cpp.cpp 4 | 5 | CHCPPINC = ${CHIBIOS}/os/various/cpp_wrappers 6 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/various/cpp_wrappers/syscalls_cpp.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SYSCALLS_CPP_HPP_ 2 | #define SYSCALLS_CPP_HPP_ 3 | 4 | /* The ABI requires a 32-bit type.*/ 5 | typedef int __guard; 6 | 7 | int __cxa_guard_acquire(__guard *); 8 | void __cxa_guard_release (__guard *); 9 | void __cxa_guard_abort (__guard *); 10 | 11 | void *__dso_handle = NULL; 12 | 13 | #endif /* SYSCALLS_CPP_HPP_ */ 14 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/various/fatfs_bindings/fatfs.mk: -------------------------------------------------------------------------------- 1 | # FATFS files. 2 | FATFSSRC = ${CHIBIOS}/os/various/fatfs_bindings/fatfs_diskio.c \ 3 | ${CHIBIOS}/os/various/fatfs_bindings/fatfs_syscall.c \ 4 | ${CHIBIOS}/ext/fatfs/src/ff.c \ 5 | ${CHIBIOS}/ext/fatfs/src/option/unicode.c 6 | 7 | FATFSINC = ${CHIBIOS}/ext/fatfs/src 8 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/various/fatfs_bindings/readme.txt: -------------------------------------------------------------------------------- 1 | This directory contains the ChibiOS/RT "official" bindings with the FatFS 2 | library by ChaN: http://elm-chan.org 3 | 4 | In order to use FatFS within ChibiOS/RT project, unzip FatFS under 5 | ./ext/fatfs then include $(CHIBIOS)/os/various/fatfs_bindings/fatfs.mk 6 | in your makefile. 7 | -------------------------------------------------------------------------------- /ChibiOS_3.0.5/os/various/lwip_bindings/readme.txt: -------------------------------------------------------------------------------- 1 | This directory contains the ChibiOS/RT "official" bindings with the lwIP 2 | TCP/IP stack: http://savannah.nongnu.org/projects/lwip 3 | 4 | In order to use lwIP within ChibiOS/RT project, unzip lwIP under 5 | ./ext/lwip-1.4.0 then include $(CHIBIOS)/os/various/lwip_bindings/lwip.mk 6 | in your makefile. 7 | -------------------------------------------------------------------------------- /applications/applications.mk: -------------------------------------------------------------------------------- 1 | APPSRC = applications/app.c \ 2 | applications/app_ppm.c \ 3 | applications/app_adc.c \ 4 | applications/app_sten.c \ 5 | applications/app_uartcomm.c \ 6 | applications/app_nunchuk.c \ 7 | applications/app_balance.c \ 8 | applications/app_pas.c \ 9 | applications/app_custom.c 10 | 11 | APPINC = applications 12 | -------------------------------------------------------------------------------- /applications/er/er_qml.h: -------------------------------------------------------------------------------- 1 | // This file is autogenerated by VESC Tool 2 | 3 | #ifndef ER_QML_H_ 4 | #define ER_QML_H_ 5 | 6 | #include "datatypes.h" 7 | #include 8 | #include 9 | 10 | // Constants 11 | #define DATA_QML_APP_SIZE 4394 12 | 13 | // Variables 14 | extern uint8_t data_qml_app[]; 15 | 16 | // ER_QML_H_ 17 | #endif 18 | -------------------------------------------------------------------------------- /applications/finn/finn_qml.h: -------------------------------------------------------------------------------- 1 | // This file is autogenerated by VESC Tool 2 | 3 | #ifndef FINN_QML_H_ 4 | #define FINN_QML_H_ 5 | 6 | #include "datatypes.h" 7 | #include 8 | #include 9 | 10 | // Constants 11 | #define DATA_QML_APP_SIZE 3103 12 | 13 | // Variables 14 | extern uint8_t data_qml_app[]; 15 | 16 | // FINN_QML_H_ 17 | #endif 18 | -------------------------------------------------------------------------------- /blackmagic/blackmagic.mk: -------------------------------------------------------------------------------- 1 | BLACKMAGICSRC = blackmagic/bm_if.c \ 2 | blackmagic/swdptap.c \ 3 | blackmagic/timing.c \ 4 | blackmagic/platform.c \ 5 | blackmagic/exception.c \ 6 | blackmagic/target/swdptap_generic.c \ 7 | blackmagic/target/target.c \ 8 | blackmagic/target/adiv5_swdp.c \ 9 | blackmagic/target/adiv5.c \ 10 | blackmagic/target/cortexm.c \ 11 | blackmagic/target/nrf51.c \ 12 | blackmagic/target/stm32f1.c \ 13 | blackmagic/target/stm32f4.c \ 14 | blackmagic/target/stm32h7.c \ 15 | blackmagic/target/stm32l0.c \ 16 | blackmagic/target/stm32l4.c 17 | 18 | BLACKMAGICINC = blackmagic \ 19 | blackmagic/target 20 | -------------------------------------------------------------------------------- /blackmagic/target/flashstub/README.md: -------------------------------------------------------------------------------- 1 | Flash Stubs 2 | =========== 3 | 4 | These are simple routines for programming the flash on various Cortex-M 5 | microcontrollers. The routines should be provided with the naked attribute 6 | as the stack may not be available, and must not make any function calls. 7 | The stub must call `stub_exit(code)` provided by `stub.h` to return control 8 | to the debugger. Up to 4 word sized parameters may be taken. 9 | 10 | These stubs are compiled instructions comma separated hex values in the 11 | resulting `*.stub` files here, which may be included in the drivers for the 12 | specific device. The drivers call these flash stubs on the target by calling 13 | `cortexm_run_stub` defined in `cortexm.h`. 14 | -------------------------------------------------------------------------------- /blackmagic/target/flashstub/nrf51.stub: -------------------------------------------------------------------------------- 1 | 0x2300, 0x2601, 0x4D06, 0x1AC9, 0x18C4, 0x429A, 0xD800, 0xBE00, 0x58CF, 0x6027, 0x682C, 0x4234, 0xD0FC, 0x3304, 0xE7F4, 0x46C0, 0xE400, 0x4001, -------------------------------------------------------------------------------- /buzzer.c: -------------------------------------------------------------------------------- 1 | #include "buzzer.h" 2 | 3 | #include "conf_general.h" 4 | #include "mc_interface.h" // Motor control functions 5 | 6 | // Default to using servo pin 7 | #ifdef EXT_BUZZER_ON 8 | #define CUSTOM_BUZZER 9 | #else 10 | #define EXT_BUZZER_ON() palSetPad(HW_ICU_GPIO, HW_ICU_PIN) 11 | #define EXT_BUZZER_OFF() palClearPad(HW_ICU_GPIO, HW_ICU_PIN) 12 | #endif 13 | 14 | void buzzer_init(void) { 15 | #ifndef CUSTOM_BUZZER 16 | // External Buzzer (using servo pin!) 17 | palSetPadMode(HW_ICU_GPIO, HW_ICU_PIN, 18 | PAL_MODE_OUTPUT_PUSHPULL | 19 | PAL_STM32_OSPEED_HIGHEST); 20 | EXT_BUZZER_OFF(); 21 | #endif 22 | } 23 | 24 | void beep_off() 25 | { 26 | EXT_BUZZER_OFF(); 27 | } 28 | 29 | void beep_on() 30 | { 31 | EXT_BUZZER_ON(); 32 | } 33 | -------------------------------------------------------------------------------- /buzzer.h: -------------------------------------------------------------------------------- 1 | #ifndef BUZZER_H_ 2 | #define BUZZER_H_ 3 | 4 | #include "ch.h" // ChibiOS 5 | #include "hal.h" // ChibiOS HAL 6 | 7 | void buzzer_init(void); 8 | void beep_off(void); 9 | void beep_on(void); 10 | 11 | #endif /* BUZZER_H_ */ 12 | -------------------------------------------------------------------------------- /comm/comm.mk: -------------------------------------------------------------------------------- 1 | CSRC += \ 2 | comm/commands.c \ 3 | comm/comm_usb_serial.c \ 4 | comm/comm_usb.c \ 5 | comm/comm_can.c \ 6 | comm/packet.c \ 7 | comm/log.c 8 | 9 | INCDIR += comm 10 | 11 | -------------------------------------------------------------------------------- /comm/comm_usb_serial.h: -------------------------------------------------------------------------------- 1 | #ifndef COMM_USB_SERIAL_H_ 2 | #define COMM_USB_SERIAL_H_ 3 | 4 | // Variables 5 | extern SerialUSBDriver SDU1; 6 | 7 | // Functions 8 | void comm_usb_serial_init(void); 9 | int comm_usb_serial_is_active(void); 10 | int comm_usb_serial_configured_cnt(void); 11 | 12 | #endif /* COMM_USB_SERIAL_H_ */ 13 | -------------------------------------------------------------------------------- /driver/driver.mk: -------------------------------------------------------------------------------- 1 | CSRC += \ 2 | driver/eeprom.c \ 3 | driver/i2c_bb.c \ 4 | driver/ledpwm.c \ 5 | driver/servo_dec.c \ 6 | driver/servo_simple.c \ 7 | driver/spi_bb.c \ 8 | driver/timer.c 9 | 10 | CSRC += \ 11 | driver/lora/SX1278.c \ 12 | driver/lora/lora.c \ 13 | driver/lora/SX1278_hw.c 14 | 15 | CSRC += \ 16 | driver/nrf/spi_sw.c \ 17 | driver/nrf/rf.c \ 18 | driver/nrf/rfhelp.c \ 19 | driver/nrf/nrf_driver.c 20 | 21 | INCDIR += \ 22 | driver \ 23 | driver/lora \ 24 | driver/nrf 25 | 26 | -------------------------------------------------------------------------------- /driver/lora/lora.h: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | 4 | #ifndef HWCONF_RFM95W_H_ 5 | #define HWCONF_RFM95W_H_ 6 | 7 | #include "datatypes.h" 8 | #include "SX1278.h" 9 | #include "SX1278_hw.h" 10 | 11 | // Functions 12 | void lora_init(void); 13 | void lora_stop(void); 14 | 15 | #endif /* HWCONF_DRV8301_H_ */ 16 | -------------------------------------------------------------------------------- /encoder/encoder.mk: -------------------------------------------------------------------------------- 1 | ENCSRC = encoder/encoder.c \ 2 | encoder/encoder_cfg.c \ 3 | encoder/enc_abi.c \ 4 | encoder/enc_ad2s1205.c \ 5 | encoder/enc_as5x47u.c \ 6 | encoder/enc_as504x.c \ 7 | encoder/enc_bissc.c \ 8 | encoder/enc_mt6816.c \ 9 | encoder/enc_sincos.c \ 10 | encoder/enc_tle5012.c \ 11 | encoder/enc_ts5700n8501.c 12 | 13 | ENCINC = encoder 14 | -------------------------------------------------------------------------------- /firmware_metadata.h: -------------------------------------------------------------------------------- 1 | #ifndef FIRMWARE_METADATA_H 2 | #define FIRMWARE_METADATA_H 3 | 4 | //#define STRING2(x) #x 5 | //#define STRING(x) STRING2(x) 6 | //#pragma message "ARM_GCC_VERSION = " STRING(ARM_GCC_VERSION) 7 | 8 | // Track the git branch name 9 | #ifndef GIT_BRANCH_NAME 10 | #define GIT_BRANCH_NAME "undefined" 11 | #endif 12 | 13 | // Track the git hash version 14 | #ifndef GIT_COMMIT_HASH 15 | #define GIT_COMMIT_HASH "undefined" 16 | #endif 17 | 18 | // Track the cross-compiler version 19 | #ifndef ARM_GCC_VERSION 20 | #define ARM_GCC_VERSION "undefined" 21 | #endif 22 | 23 | 24 | #endif // FIRMWARE_METADATA_H 25 | -------------------------------------------------------------------------------- /hwconf/hwconf.mk: -------------------------------------------------------------------------------- 1 | HWSRC = \ 2 | hwconf/board.c \ 3 | hwconf/hw.c \ 4 | hwconf/drv8301.c \ 5 | hwconf/drv8305.c \ 6 | hwconf/drv8320s.c \ 7 | hwconf/drv8323s.c \ 8 | hwconf/luna/bbshd/luna_display_serial.c \ 9 | hwconf/luna/m600/luna_m600_display.c \ 10 | hwconf/si8900.c \ 11 | hwconf/shutdown.c \ 12 | 13 | HWINC = hwconf \ 14 | hwconf/luna \ 15 | hwconf/other 16 | -------------------------------------------------------------------------------- /hwconf/luna/bbshd/qmlui_luna_bbshd.h: -------------------------------------------------------------------------------- 1 | // This file is autogenerated by VESC Tool 2 | 3 | #ifndef QMLUI_LUNA_BBSHD_H_ 4 | #define QMLUI_LUNA_BBSHD_H_ 5 | 6 | #include "datatypes.h" 7 | #include 8 | #include 9 | 10 | // Constants 11 | #define DATA_QML_HW_SIZE 5953 12 | 13 | // Variables 14 | extern uint8_t data_qml_hw[]; 15 | 16 | // QMLUI_LUNA_BBSHD_H_ 17 | #endif 18 | -------------------------------------------------------------------------------- /hwconf/luna/m600/qmlui_luna_m600.h: -------------------------------------------------------------------------------- 1 | // This file is autogenerated by VESC Tool 2 | 3 | #ifndef QMLUI_LUNA_M600_H_ 4 | #define QMLUI_LUNA_M600_H_ 5 | 6 | #include "datatypes.h" 7 | #include 8 | #include 9 | 10 | // Constants 11 | #define DATA_QML_HW_SIZE 6659 12 | 13 | // Variables 14 | extern uint8_t data_qml_hw[]; 15 | 16 | // QMLUI_LUNA_M600_H_ 17 | #endif 18 | -------------------------------------------------------------------------------- /hwconf/stm32f4xx_conf.h: -------------------------------------------------------------------------------- 1 | #ifndef __STM32F4xx_CONF_H 2 | #define __STM32F4xx_CONF_H 3 | 4 | #define USE_RTOS 0 5 | 6 | #include "misc.h" 7 | #include "stm32f4_gpio_af.h" 8 | #include "stm32f4xx_dma.h" 9 | #include "stm32f4xx_adc.h" 10 | #include "stm32f4xx_exti.h" 11 | #include "stm32f4xx_flash.h" 12 | #include "stm32f4xx_rcc.h" 13 | #include "stm32f4xx_syscfg.h" 14 | #include "stm32f4xx_tim.h" 15 | #include "stm32f4xx_wwdg.h" 16 | #include "stm32f4xx_iwdg.h" 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /hwconf/stormcore/100D/hw_stormcore_100d.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_STORMCORE_100D_H_ 2 | #define HW_STORMCORE_100D_H_ 3 | 4 | #define HW_VER_IS_100D 5 | 6 | #include "hw_stormcore_100d_core.h" 7 | 8 | #endif /* HW_STORMCORE_100D_H_ */ 9 | -------------------------------------------------------------------------------- /hwconf/stormcore/100D/hw_stormcore_100d_no_limits.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_STORMCORE_100D_NO_LIMITS_H_ 2 | #define HW_STORMCORE_100D_NO_LIMITS_H_ 3 | 4 | #define HW_VER_IS_100D 5 | #define DISABLE_HW_LIMITS 6 | 7 | #include "hw_stormcore_100d.h" 8 | 9 | #endif /* HW_STORMCORE_100D_NO_LIMITS_H_ */ 10 | -------------------------------------------------------------------------------- /hwconf/stormcore/100D/hw_stormcore_100d_parallel.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_STORMCORE_100D_PARALLEL_H_ 2 | #define HW_STORMCORE_100D_PARALLEL_H_ 3 | 4 | #define HW_VER_IS_100D 5 | #define HW_HAS_DUAL_PARALLEL 6 | 7 | #include "hw_stormcore_100d_core.h" 8 | 9 | #endif /* HW_STORMCORE_100D_PARALLEL_H_ */ 10 | -------------------------------------------------------------------------------- /hwconf/stormcore/100D/hw_stormcore_100d_v2.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_STORMCORE_100D_V2_H_ 2 | #define HW_STORMCORE_100D_V2_H_ 3 | 4 | #define HW_VER_IS_100D_V2 5 | 6 | #include "hw_stormcore_100d_core.h" 7 | 8 | #endif /* HW_STORMCORE_100D_V2_H_ */ 9 | -------------------------------------------------------------------------------- /hwconf/stormcore/100D/hw_stormcore_100d_v2_no_limits.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_STORMCORE_100D_V2_NO_LIMITS_H_ 2 | #define HW_STORMCORE_100D_V2_NO_LIMITS_H_ 3 | 4 | #define HW_VER_IS_100D_V2 5 | #define DISABLE_HW_LIMITS 6 | 7 | #include "hw_stormcore_100d_v2.h" 8 | 9 | #endif /* HW_STORMCORE_100D_V2_NO_LIMITS_H_ */ 10 | -------------------------------------------------------------------------------- /hwconf/stormcore/100D/hw_stormcore_100dx.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_STORMCORE_100DX_H_ 2 | #define HW_STORMCORE_100DX_H_ 3 | 4 | #define HW_VER_IS_100DX 5 | 6 | #include "hw_stormcore_100d_core.h" 7 | 8 | #endif /* HW_STORMCORE_100DX_H_ */ 9 | -------------------------------------------------------------------------------- /hwconf/stormcore/100D/hw_stormcore_100dx_no_limits.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_STORMCORE_100DX_NO_LIMITS_H_ 2 | #define HW_STORMCORE_100DX_NO_LIMITS_H_ 3 | 4 | #define HW_VER_IS_100DX 5 | #define DISABLE_HW_LIMITS 6 | 7 | #include "hw_stormcore_100dx.h" 8 | 9 | #endif /* HW_STORMCORE_100DX_NO_LIMITS_H_ */ 10 | -------------------------------------------------------------------------------- /hwconf/stormcore/100D/hw_stormcore_100dx_parallel.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_STORMCORE_100D_PARALLEL_H_ 2 | #define HW_STORMCORE_100D_PARALLEL_H_ 3 | 4 | #define HW_VER_IS_100DX 5 | #define HW_HAS_DUAL_PARALLEL 6 | 7 | #include "hw_stormcore_100d_core.h" 8 | 9 | #endif /* HW_STORMCORE_100D_PARALLEL_H_ */ 10 | -------------------------------------------------------------------------------- /hwconf/stormcore/60D/hw_stormcore_60d+.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_STORMCORE_60D_PLUS_H_ 2 | #define HW_STORMCORE_60D_PLUS_H_ 3 | 4 | #define HW_VER_IS_60D_PLUS 5 | 6 | #include "hw_stormcore_60d_core.h" 7 | 8 | #endif /* HW_STORMCORE_60D_PLUS_H_ */ 9 | -------------------------------------------------------------------------------- /hwconf/stormcore/60D/hw_stormcore_60d+_no_limits.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_STORMCORE_60D_PLUS_NO_LIMITS_H_ 2 | #define HW_STORMCORE_60D_PLUS_NO_LIMITS_H_ 3 | 4 | #define DISABLE_HW_LIMITS 5 | 6 | #include "hw_stormcore_60d+.h" 7 | 8 | #endif /* HW_STORMCORE_60D_PLUS_NO_LIMITS_H_ */ 9 | -------------------------------------------------------------------------------- /hwconf/stormcore/60D/hw_stormcore_60d.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_STORMCORE_60D_H_ 2 | #define HW_STORMCORE_60D_H_ 3 | 4 | #define HW_VER_IS_60D 5 | 6 | #include "hw_stormcore_60d_core.h" 7 | 8 | #endif /* HW_STORMCORE_60D_H_ */ 9 | -------------------------------------------------------------------------------- /hwconf/stormcore/60D/hw_stormcore_60d_no_limits.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_STORMCORE_60D_NO_LIMITS_H_ 2 | #define HW_STORMCORE_60D_NO_LIMITS_H_ 3 | 4 | #define DISABLE_HW_LIMITS 5 | 6 | #include "hw_stormcore_60d.h" 7 | 8 | #endif /* HW_STORMCORE_60D_NO_LIMITS_H_ */ 9 | -------------------------------------------------------------------------------- /hwconf/stormcore/60D/hw_stormcore_60dxs.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_STORMCORE_60DX_H_ 2 | #define HW_STORMCORE_60DX_H_ 3 | 4 | #define HW_VER_IS_60D_XS 5 | 6 | #include "hw_stormcore_60d_core.h" 7 | 8 | #endif /* HW_STORMCORE_60DX_H_ */ 9 | -------------------------------------------------------------------------------- /hwconf/stormcore/60D/hw_stormcore_60dxs_no_limits.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_STORMCORE_60DX_NO_LIMITS_H_ 2 | #define HW_STORMCORE_60DX_NO_LIMITS_H_ 3 | 4 | #define DISABLE_HW_LIMITS 5 | 6 | #include "hw_stormcore_60dxs.h" 7 | 8 | #endif /* HW_STORMCORE_60DX_NO_LIMITS_H_ */ 9 | -------------------------------------------------------------------------------- /hwconf/teamtriforceuk/a50s_v22/hw_a50s_v22_12s.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_A50S_V22_12S_H_ 2 | #define HW_A50S_V22_12S_H_ 3 | 4 | #define HW_A50S_12S 5 | 6 | #define HW_NAME "a50s_12s" 7 | #define CURRENT_AMP_GAIN 20.0 8 | 9 | #include "hw_a50s_v22_core.h" 10 | 11 | #endif /* HW_A50S_V22_12S_H_ */ 12 | -------------------------------------------------------------------------------- /hwconf/teamtriforceuk/a50s_v22/hw_a50s_v22_12s_hg.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_A50S_V22_12S_H_ 2 | #define HW_A50S_V22_12S_H_ 3 | 4 | #define HW_A50S_12S 5 | 6 | #define HW_NAME "a50s_12s_hg" 7 | #define CURRENT_AMP_GAIN 50.0 8 | 9 | #include "hw_a50s_v22_core.h" 10 | 11 | #endif /* HW_A50S_V22_12S_HG_H_ */ 12 | -------------------------------------------------------------------------------- /hwconf/teamtriforceuk/a50s_v22/hw_a50s_v22_6s.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_A50S_V22_6S_H_ 2 | #define HW_A50S_V22_6S_H_ 3 | 4 | #define HW_A50S_6S 5 | 6 | #define HW_NAME "a50s_6s" 7 | #define CURRENT_AMP_GAIN 20.0 8 | 9 | #include "hw_a50s_v22_core.h" 10 | 11 | #endif /* HW_A50S_V22_6S_H_ */ 12 | -------------------------------------------------------------------------------- /hwconf/teamtriforceuk/a50s_v22/hw_a50s_v22_6s_hg.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_A50S_V22_6S_H_ 2 | #define HW_A50S_V22_6S_H_ 3 | 4 | #define HW_A50S_6S 5 | 6 | #define HW_NAME "a50s_6s_hg" 7 | #define CURRENT_AMP_GAIN 50.0 8 | 9 | #include "hw_a50s_v22_core.h" 10 | 11 | #endif /* HW_A50S_V22_6S_HG_H_ */ 12 | -------------------------------------------------------------------------------- /hwconf/teamtriforceuk/a50s_v23/hw_a50s_v23_12s.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_A50S_V23_12S_H_ 2 | #define HW_A50S_V23_12S_H_ 3 | 4 | #define HW_A50S_12S 5 | 6 | #define HW_NAME "a50s_v23_12s" 7 | 8 | 9 | 10 | #include "hw_a50s_v23_core.h" 11 | 12 | #endif /* HW_A50S_V23_12S_H_ */ 13 | -------------------------------------------------------------------------------- /hwconf/teamtriforceuk/a50s_v23/hw_a50s_v23_20s.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_A50S_V23_20S_H_ 2 | #define HW_A50S_V23_20S_H_ 3 | 4 | #define HW_A50S_20S 5 | 6 | #define HW_NAME "a50s_v23_20s" 7 | 8 | 9 | 10 | #include "hw_a50s_v23_core.h" 11 | 12 | #endif /* HW_A50S_V23_20S_H_ */ 13 | -------------------------------------------------------------------------------- /hwconf/teamtriforceuk/a50s_v23/hw_a50s_v23_6s.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_A50S_V23_6S_H_ 2 | #define HW_A50S_V23_6S_H_ 3 | 4 | #define HW_A50S_6S 5 | 6 | #define HW_NAME "a50s_v23_6s" 7 | 8 | #include "hw_a50s_v23_core.h" 9 | 10 | #endif /* HW_A50S_V23_6S_H_ */ 11 | -------------------------------------------------------------------------------- /imu/Fusion/LICENSE: -------------------------------------------------------------------------------- 1 | This software is provided under the GNU General Public License. 2 | 3 | https://www.gnu.org/licenses/gpl.html 4 | -------------------------------------------------------------------------------- /imu/imu.mk: -------------------------------------------------------------------------------- 1 | IMUSRC = imu/mpu9150.c \ 2 | imu/icm20948.c \ 3 | imu/ahrs.c \ 4 | imu/imu.c \ 5 | imu/BMI160_driver/bmi160.c \ 6 | imu/bmi160_wrapper.c \ 7 | imu/lsm6ds3.c \ 8 | imu/Fusion/FusionAhrs.c \ 9 | imu/Fusion/FusionBias.c \ 10 | imu/Fusion/FusionCompass.c 11 | 12 | IMUINC = imu \ 13 | imu/BMI160_driver \ 14 | imu/Fusion 15 | -------------------------------------------------------------------------------- /lispBM/c_libs/conv.py: -------------------------------------------------------------------------------- 1 | import sys,getopt,binascii 2 | 3 | filename = "" 4 | name = "test" 5 | 6 | opts,args = getopt.getopt(sys.argv[1:],'f:n:') 7 | for o,a in opts: 8 | if o == '-f': 9 | filename = a 10 | if o == '-n': 11 | name = a 12 | 13 | with open(filename, "rb") as f: 14 | hexdata = f.read().hex() 15 | tokens = [hexdata[i:i+2] for i in range(0, len(hexdata), 2)] 16 | res = "(def " + name + " [\n" 17 | cnt = 0 18 | for c in tokens: 19 | res += "0x" + c 20 | cnt = cnt + 1 21 | if cnt == 20: 22 | cnt = 0 23 | res += "\n" 24 | else: 25 | res += " " 26 | 27 | if res[-1] == '\n': 28 | res += "])\n" 29 | else: 30 | res += "\n])\n" 31 | print(res) 32 | 33 | -------------------------------------------------------------------------------- /lispBM/c_libs/examples/config/Makefile: -------------------------------------------------------------------------------- 1 | TARGET = config 2 | 3 | SOURCES = code.c conf/buffer.c conf/confparser.c conf/confxml.c 4 | 5 | VESC_C_LIB_PATH=../../ 6 | include $(VESC_C_LIB_PATH)rules.mk 7 | 8 | -------------------------------------------------------------------------------- /lispBM/c_libs/examples/config/conf/confparser.h: -------------------------------------------------------------------------------- 1 | // This file is autogenerated by VESC Tool 2 | 3 | #ifndef CONFPARSER_H_ 4 | #define CONFPARSER_H_ 5 | 6 | #include "datatypes.h" 7 | #include 8 | #include 9 | 10 | // Constants 11 | #define BALANCE_CONFIG_SIGNATURE 32903057 12 | 13 | // Functions 14 | int32_t confparser_serialize_balance_config(uint8_t *buffer, const balance_config *conf); 15 | bool confparser_deserialize_balance_config(const uint8_t *buffer, balance_config *conf); 16 | void confparser_set_defaults_balance_config(balance_config *conf); 17 | 18 | // CONFPARSER_H_ 19 | #endif 20 | -------------------------------------------------------------------------------- /lispBM/c_libs/examples/config/conf/confxml.h: -------------------------------------------------------------------------------- 1 | // This file is autogenerated by VESC Tool 2 | 3 | #ifndef CONFXML_H_ 4 | #define CONFXML_H_ 5 | 6 | #include "datatypes.h" 7 | #include 8 | #include 9 | 10 | // Constants 11 | #define DATA_BALANCE_CONFIG__SIZE 6723 12 | 13 | // Variables 14 | extern uint8_t data_balance_config_[]; 15 | 16 | // CONFXML_H_ 17 | #endif 18 | -------------------------------------------------------------------------------- /lispBM/c_libs/examples/custom_data_comm/Makefile: -------------------------------------------------------------------------------- 1 | TARGET = example 2 | 3 | SOURCES = code.c buffer.c 4 | 5 | VESC_C_LIB_PATH=../../ 6 | include $(VESC_C_LIB_PATH)rules.mk 7 | 8 | -------------------------------------------------------------------------------- /lispBM/c_libs/examples/extension/Makefile: -------------------------------------------------------------------------------- 1 | TARGET = example 2 | 3 | SOURCES = code.c 4 | 5 | VESC_C_LIB_PATH=../../ 6 | include $(VESC_C_LIB_PATH)rules.mk 7 | 8 | -------------------------------------------------------------------------------- /lispBM/c_libs/examples/speed_test/Makefile: -------------------------------------------------------------------------------- 1 | TARGET = example 2 | 3 | SOURCES = code.c 4 | 5 | VESC_C_LIB_PATH=../../ 6 | include $(VESC_C_LIB_PATH)rules.mk 7 | 8 | -------------------------------------------------------------------------------- /lispBM/c_libs/examples/ssd1306/Makefile: -------------------------------------------------------------------------------- 1 | TARGET = ssdacc 2 | 3 | SOURCES = code.c 4 | 5 | VESC_C_LIB_PATH=../../ 6 | include $(VESC_C_LIB_PATH)/rules.mk 7 | 8 | -------------------------------------------------------------------------------- /lispBM/c_libs/examples/thread/Makefile: -------------------------------------------------------------------------------- 1 | TARGET = example 2 | 3 | SOURCES = code.c 4 | 5 | VESC_C_LIB_PATH=../../ 6 | include $(VESC_C_LIB_PATH)rules.mk 7 | 8 | -------------------------------------------------------------------------------- /lispBM/c_libs/examples/ws2812/Makefile: -------------------------------------------------------------------------------- 1 | TARGET = ws2812 2 | 3 | SOURCES = code.c 4 | 5 | USE_STLIB = yes 6 | VESC_C_LIB_PATH=../../ 7 | include $(VESC_C_LIB_PATH)rules.mk 8 | 9 | -------------------------------------------------------------------------------- /lispBM/c_libs/stdperiph_stm32f4/CMSIS/ST/stm32f405xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surfdado/bldc/c7e496a54e599fa2bf65720d5cfe0fd765af0fef/lispBM/c_libs/stdperiph_stm32f4/CMSIS/ST/stm32f405xx.h -------------------------------------------------------------------------------- /lispBM/c_libs/stdperiph_stm32f4/CMSIS/ST/stm32f407xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surfdado/bldc/c7e496a54e599fa2bf65720d5cfe0fd765af0fef/lispBM/c_libs/stdperiph_stm32f4/CMSIS/ST/stm32f407xx.h -------------------------------------------------------------------------------- /lispBM/c_libs/stdperiph_stm32f4/inc/stm32f4xx_conf.h: -------------------------------------------------------------------------------- 1 | #ifndef __STM32F4xx_CONF_H 2 | #define __STM32F4xx_CONF_H 3 | 4 | #define USE_RTOS 0 5 | 6 | #include "misc.h" 7 | #include "stm32f4_gpio_af.h" 8 | #include "stm32f4xx_dma.h" 9 | #include "stm32f4xx_adc.h" 10 | #include "stm32f4xx_exti.h" 11 | #include "stm32f4xx_flash.h" 12 | #include "stm32f4xx_rcc.h" 13 | #include "stm32f4xx_syscfg.h" 14 | #include "stm32f4xx_tim.h" 15 | #include "stm32f4xx_wwdg.h" 16 | #include "stm32f4xx_iwdg.h" 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /lispBM/lispBM/.clang_complete: -------------------------------------------------------------------------------- 1 | -I./include 2 | -I/usr/include -------------------------------------------------------------------------------- /lispBM/lispBM/.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | 3 | addons: 4 | apt: 5 | sources: 6 | - ubuntu-toolchain-r-test 7 | packages: 8 | - gcc-5 9 | - gcc-multilib 10 | 11 | script: 12 | - make 13 | - cd tests; ./run_tests.sh 14 | -------------------------------------------------------------------------------- /lispBM/lispBM/benchmarks/bench_chibi/flash.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | openocd -f stm32f407g.cfg -c "program ./build/lisp_test.elf verify reset exit" 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/benchmarks/bench_chibi/stm32f407g.cfg: -------------------------------------------------------------------------------- 1 | # This is an STM32F4 discovery board with a single STM32F407VGT6 chip. 2 | # http://www.st.com/internet/evalboard/product/252419.jsp 3 | 4 | source [find interface/stlink.cfg] 5 | #source [find interface/stlink-v2.cfg] 6 | 7 | transport select hla_swd 8 | 9 | # increase working area to 64KB 10 | set WORKAREASIZE 0x10000 11 | 12 | source [find target/stm32f4x.cfg] 13 | 14 | reset_config srst_only 15 | -------------------------------------------------------------------------------- /lispBM/lispBM/benchmarks/dec_cnt1.lisp: -------------------------------------------------------------------------------- 1 | (define dec-cnt (lambda (x) 2 | (if (= x 0) 0 (dec-cnt (- x 1))) 3 | )) 4 | 5 | 6 | (dec-cnt 100000) 7 | -------------------------------------------------------------------------------- /lispBM/lispBM/benchmarks/dec_cnt2.lisp: -------------------------------------------------------------------------------- 1 | (define dec-cnt2 (lambda (x) 2 | (match x (0 0) (_ (dec-cnt2 (- x 1)))) 3 | )) 4 | 5 | (dec-cnt2 100000) 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/benchmarks/dec_cnt3.lisp: -------------------------------------------------------------------------------- 1 | (define dec-cnt3 (lambda (x) 2 | (if (> x 0) (dec-cnt3 (- (- (- (- (- (- (- x 1) 1) 1) 1) 1) 1) 1)) 0) 3 | )) 4 | 5 | (dec-cnt3 100000) 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/benchmarks/fibonacci.lisp: -------------------------------------------------------------------------------- 1 | (let ((fib (lambda (n) (if (> 2 n) n (+ (fib (- n 1)) (fib (- n 2))))))) 2 | (fib 23)) 3 | 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/benchmarks/fibonacci_tail.lisp: -------------------------------------------------------------------------------- 1 | (define fib (lambda (n) 2 | (let ((fib0 (lambda (n a b) 3 | (if (= n 0) a 4 | (if (= n 1) b 5 | (fib0 (- n 1) b (+ a b))))))) 6 | (fib0 n 0 1)))) 7 | 8 | 9 | (fib 23) 10 | -------------------------------------------------------------------------------- /lispBM/lispBM/benchmarks/insertionsort.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define insert (lambda (l ls) 3 | (match ls 4 | ( nil (cons l nil)) 5 | ( ((? a) . (? xs)) 6 | (if (< l a) 7 | (cons l (cons a xs)) 8 | (cons a (insert l xs))))))) 9 | 10 | (define sort (lambda (ls) 11 | (match ls 12 | (nil nil) 13 | ( ((? a) . (? xs)) 14 | (insert a (sort xs)))))) 15 | 16 | (sort '(4 2 0 9 1 56 2 4 7)) 17 | -------------------------------------------------------------------------------- /lispBM/lispBM/benchmarks/q2.lisp: -------------------------------------------------------------------------------- 1 | (define q2 (lambda (x y) 2 | (if (or (< x 1) (< y 1)) 1 3 | (+ (q2 (- x (q2 (- x 1) y)) y) 4 | (q2 x (- y (q2 x (- y 1)))))))) 5 | 6 | (q2 6 7) 7 | -------------------------------------------------------------------------------- /lispBM/lispBM/benchmarks/stored_results/benchresult22_01_22_10_11_07: -------------------------------------------------------------------------------- 1 | File, Load_time, Eval_time 2 | q2.lisp, 0.001799999, 1.861400008 3 | dec_cnt2.lisp, 0.001300000, 3.529799938 4 | dec_cnt1.lisp, 0.001300000, 4.334400177 5 | fibonacci.lisp, 0.001300000, 4.466700077 6 | dec_cnt3.lisp, 0.001300000, 1.519600033 7 | tak.lisp, 0.001700000, 4.285699844 8 | fibonacci_tail.lisp, 0.001700000, 0.004999999 9 | -------------------------------------------------------------------------------- /lispBM/lispBM/benchmarks/stored_results/benchresult22_01_22_22_02_57: -------------------------------------------------------------------------------- 1 | File, Load_time, Eval_time 2 | q2.lisp, 0.002000000, 1.89499 3 | dec_cnt2.lisp, 0.001399999, 3.629899978 4 | dec_cnt1.lisp, 0.001399999, 4.436299800 5 | fibonacci.lisp, 0.001399999, 4.482200145 6 | dec_cnt3.lisp, 0.001500000, 1.535199999 7 | tak.lisp, 0.002000000, 4.374100208 8 | fibonacci_tail.lisp, 0.001900000, 0.005200000 9 | insertionsort.lisp, 0.002700000, 0.006099999 10 | -------------------------------------------------------------------------------- /lispBM/lispBM/benchmarks/tak.lisp: -------------------------------------------------------------------------------- 1 | (define tak (lambda (x y z) 2 | (if (not (< y x)) 3 | z 4 | (tak 5 | (tak (- x 1) y z) 6 | (tak (- y 1) z x) 7 | (tak (- z 1) x y))))) 8 | 9 | (tak 18 12 6) 10 | -------------------------------------------------------------------------------- /lispBM/lispBM/chibios-examples/repl-ChibiOS/flash.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | openocd -f stm32f407g.cfg -c "program ./build/lisp_test.elf verify reset exit" 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/chibios-examples/repl-ChibiOS/stm32f407g.cfg: -------------------------------------------------------------------------------- 1 | # This is an STM32F4 discovery board with a single STM32F407VGT6 chip. 2 | # http://www.st.com/internet/evalboard/product/252419.jsp 3 | 4 | source [find interface/stlink.cfg] 5 | #source [find interface/stlink-v2.cfg] 6 | 7 | transport select hla_swd 8 | 9 | # increase working area to 64KB 10 | set WORKAREASIZE 0x10000 11 | 12 | source [find target/stm32f4x.cfg] 13 | 14 | reset_config srst_only 15 | -------------------------------------------------------------------------------- /lispBM/lispBM/chibios-examples/repl-ChibiOS/test_mp.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define fred (lambda () 3 | (progn (print "fred iteration" \#newline ) 4 | (recv ( (apa (? x) 107) (print "fred received apa " x \#newline)) 5 | ( (bepa (?i28 x)) (print "fred received bepa " x \#newline))) 6 | (fred)))) 7 | 8 | (define bella (lambda (pid x) 9 | (progn (print "bella iteration" x \#newline) 10 | (send pid `(apa ,x 107)) 11 | (yield 500000) 12 | (print "bella waking up" \#newline) 13 | (send pid '(bepa 2)) 14 | (yield 500000) 15 | (bella pid (+ x 1))))) 16 | 17 | (define fredpid (spawn '(fred))) 18 | 19 | (spawn '(bella (car fredpid) 0)) 20 | 21 | -------------------------------------------------------------------------------- /lispBM/lispBM/chibios-examples/xmas_dac/flash.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | openocd -f stm32f407g.cfg -c "program ./build/lisp_test.elf verify reset exit" 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/chibios-examples/xmas_dac/stm32f407g.cfg: -------------------------------------------------------------------------------- 1 | # This is an STM32F4 discovery board with a single STM32F407VGT6 chip. 2 | # http://www.st.com/internet/evalboard/product/252419.jsp 3 | 4 | #source [find interface/stlink.cfg] 5 | source [find interface/stlink-v2-1.cfg] 6 | 7 | transport select hla_swd 8 | 9 | # increase working area to 64KB 10 | set WORKAREASIZE 0x10000 11 | 12 | source [find target/stm32f4x.cfg] 13 | 14 | reset_config srst_only 15 | -------------------------------------------------------------------------------- /lispBM/lispBM/doc/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | doxygen 3 | 4 | 5 | 6 | publish: 7 | cp -r html ../../svenssonjoel.github.com/lbmdoc 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/doc/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # LispBM Programming Documentation 4 | 5 | 6 | [Language reference](./lbmref.md) 7 | 8 | 9 | ## Programming manual 10 | 11 | [Chapter 1: Introduction](./manual/ch1_introduction.md) 12 | 13 | [Chapter 2: List processing](./manual/ch2_list_processing.md) 14 | 15 | [Chapter 3: Concurrency](./manual/ch3_concurrency.md) -------------------------------------------------------------------------------- /lispBM/lispBM/doc/images/cons_cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surfdado/bldc/c7e496a54e599fa2bf65720d5cfe0fd765af0fef/lispBM/lispBM/doc/images/cons_cell.png -------------------------------------------------------------------------------- /lispBM/lispBM/doc/images/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surfdado/bldc/c7e496a54e599fa2bf65720d5cfe0fd765af0fef/lispBM/lispBM/doc/images/list.png -------------------------------------------------------------------------------- /lispBM/lispBM/doc/images/pair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surfdado/bldc/c7e496a54e599fa2bf65720d5cfe0fd765af0fef/lispBM/lispBM/doc/images/pair.png -------------------------------------------------------------------------------- /lispBM/lispBM/doc/manual/ch3_examples/hello.lisp: -------------------------------------------------------------------------------- 1 | (defun sleep (x) 2 | (yield (* x 1000000))) 3 | 4 | (defun hello () 5 | (progn 6 | (sleep 10) 7 | (print "hello"))) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/doc/manual/ch3_examples/hello_bye.lisp: -------------------------------------------------------------------------------- 1 | (defun sleep (x) 2 | (yield (* x 1000000))) 3 | 4 | (defun hello () 5 | (progn 6 | (sleep 10) 7 | (print "hello") 8 | (hello))) 9 | 10 | 11 | (defun bye () 12 | (progn 13 | (sleep 5) 14 | (print "bye") 15 | (bye))) 16 | 17 | (spawn hello) 18 | (bye) 19 | -------------------------------------------------------------------------------- /lispBM/lispBM/doc/manual/ch3_examples/hello_repeater.lisp: -------------------------------------------------------------------------------- 1 | (defun sleep (x) 2 | (yield (* x 1000000))) 3 | 4 | (defun hello () 5 | (progn 6 | (sleep 10) 7 | (print "hello") 8 | (hello))) 9 | 10 | 11 | -------------------------------------------------------------------------------- /lispBM/lispBM/doc/manual/ch3_examples/recv_message.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (defun f () 4 | (progn 5 | (recv 6 | ( monkey (print "That's an ape!")) 7 | ( cat (print "What a cute cat!")) 8 | ( _ (print "I dont know what that is!"))) 9 | (f))) 10 | 11 | (spawn f) 12 | -------------------------------------------------------------------------------- /lispBM/lispBM/doc/manual/ch3_examples/recv_message2.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (defun f () 4 | (progn 5 | (recv 6 | ( monkey (print "That's an ape!")) 7 | ( cat (print "What a cute cat!")) 8 | ( (? x) (print "I dont know kind of animal a " x " is!"))) 9 | (f))) 10 | 11 | (spawn f) 12 | -------------------------------------------------------------------------------- /lispBM/lispBM/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | 3 | RUN apt-get update && \ 4 | apt-get install -y --no-install-recommends \ 5 | gcc \ 6 | gcc-multilib \ 7 | make \ 8 | git \ 9 | xxd \ 10 | ca-certificates 11 | 12 | 13 | 14 | RUN git clone https://github.com/svenssonjoel/lispBM.git 15 | WORKDIR "lispBM" 16 | RUN make 17 | WORKDIR "tests" 18 | RUN make 19 | RUN ./run_tests.sh 20 | 21 | 22 | -------------------------------------------------------------------------------- /lispBM/lispBM/docker/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Dockerfile for lispBM 3 | 4 | 5 | # Commands 6 | 7 | 8 | This will build the docker image and run the lispBM tests. 9 | 10 | ``` 11 | docker build -t "lispbm" . 12 | ``` 13 | 14 | 15 | After building you can launch an interarctive session. 16 | 17 | ``` 18 | docker run -i lispbm 19 | ``` 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /lispBM/lispBM/esp-examples/repl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following lines of boilerplate have to be in your project's 2 | # CMakeLists in this exact order for cmake to work correctly 3 | cmake_minimum_required(VERSION 3.5) 4 | 5 | include($ENV{IDF_PATH}/tools/cmake/project.cmake) 6 | get_filename_component(ProjectId ${CMAKE_CURRENT_LIST_DIR} NAME) 7 | string(REPLACE " " "_" ProjectId ${ProjectId}) 8 | project(${ProjectId}) 9 | -------------------------------------------------------------------------------- /lispBM/lispBM/esp-examples/repl/sdkconfig.ci: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surfdado/bldc/c7e496a54e599fa2bf65720d5cfe0fd765af0fef/lispBM/lispBM/esp-examples/repl/sdkconfig.ci -------------------------------------------------------------------------------- /lispBM/lispBM/examples/fibonacci.lisp: -------------------------------------------------------------------------------- 1 | (let ((fib (lambda (n) (if (> 2 n) n (+ (fib (- n 1)) (fib (- n 2))))))) 2 | (fib 23)) 3 | 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/examples/fibonacci_tail.lisp: -------------------------------------------------------------------------------- 1 | (define fib (lambda (n) 2 | (let ((fib0 (lambda (n a b) 3 | (if (= n 0) a 4 | (if (= n 1) b 5 | (fib0 (- n 1) b (+ a b))))))) 6 | (fib0 n 0 1)))) 7 | 8 | 9 | (fib 23) 10 | -------------------------------------------------------------------------------- /lispBM/lispBM/examples/profile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | valgrind --tool=callgrind --callgrind-out-file=cg.out ${*:1} 5 | 6 | gprof2dot -f callgrind cg.out -o cg.dot 7 | 8 | dot -Tpdf cg.dot -o cg.pdf 9 | 10 | rm cg.out 11 | rm cg.dot 12 | -------------------------------------------------------------------------------- /lispBM/lispBM/flash_nrf52_with_stlink.sh: -------------------------------------------------------------------------------- 1 | 2 | #!/bin/bash 3 | 4 | openocd -f interface/stlink.cfg -f target/nrf52.cfg -c "init" -c "program repl-zephyr_build/zephyr/zephyr.hex verify reset exit" 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/include/heap_vis.h: -------------------------------------------------------------------------------- 1 | #ifndef HEAP_VIS_H_ 2 | #define HEAP_VIS_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | /** \file heap_vis.h */ 9 | 10 | /** Create an image representing the current state of the heap. 11 | * This function is not meant for execution on an microcontroller. 12 | */ 13 | void heap_vis_gen_image(void); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /lispBM/lispBM/mascot/lispbm_llama.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surfdado/bldc/c7e496a54e599fa2bf65720d5cfe0fd765af0fef/lispBM/lispBM/mascot/lispbm_llama.png -------------------------------------------------------------------------------- /lispBM/lispBM/mascot/lispbm_llama_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surfdado/bldc/c7e496a54e599fa2bf65720d5cfe0fd765af0fef/lispBM/lispBM/mascot/lispbm_llama_small.png -------------------------------------------------------------------------------- /lispBM/lispBM/mktags.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ctags -e -R * 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/old/repl-ec/Makefile: -------------------------------------------------------------------------------- 1 | 2 | LISPBM := ../ 3 | 4 | LISPBM_USE_COMPRESSION = true 5 | LISPBM_USE_EC_EVAL = true 6 | LISPBM_USE_PRELUDE = true 7 | LISPBM_USE_EXTENSIONS = true 8 | 9 | include $(LISPBM)/lispbm.mk 10 | 11 | CCFLAGS = -m32 -O2 -Wall -Wconversion -pedantic -std=c11 12 | 13 | ifdef HEAP_VIS 14 | CCFLAGS += -DVISUALIZE_HEAP 15 | endif 16 | 17 | all: repl 18 | 19 | debug: CCFLAGS += -g 20 | debug: repl 21 | 22 | repl: repl.c $(LIB) 23 | gcc $(CCFLAGS) $(LISPBM_SRC) $(LISPBM_FLAGS) repl.c -o repl -I../include 24 | 25 | clean: 26 | rm repl 27 | -------------------------------------------------------------------------------- /lispBM/lispBM/old/repl-esp-idf/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following lines of boilerplate have to be in your project's 2 | # CMakeLists in this exact order for cmake to work correctly 3 | cmake_minimum_required(VERSION 3.5) 4 | 5 | set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/led_strip) 6 | 7 | include($ENV{IDF_PATH}/tools/cmake/project.cmake) 8 | project(hello-world) 9 | 10 | idf_build_set_property(COMPILE_OPTIONS "-D_PRELUDE" APPEND) 11 | -------------------------------------------------------------------------------- /lispBM/lispBM/old/repl-esp-idf/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # This is a project Makefile. It is assumed the directory this Makefile resides in is a 3 | # project subdirectory. 4 | # 5 | 6 | PROJECT_NAME := hello-world 7 | 8 | include $(IDF_PATH)/make/project.mk 9 | -------------------------------------------------------------------------------- /lispBM/lispBM/old/repl-esp-idf/README.md: -------------------------------------------------------------------------------- 1 | # ESP32C3 LispBM repl 2 | 3 | Based on the hello world example together with the blinky example from 4 | the esp-idf distribution. -------------------------------------------------------------------------------- /lispBM/lispBM/old/repl-esp-idf/main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register( 2 | SRCS "hello_world_main.c" 3 | "../../src/heap.c" 4 | "../../src/env.c" 5 | "../../src/extensions.c" 6 | "../../src/fundamental.c" 7 | "../../src/eval_cps.c" 8 | "../../src/memory.c" 9 | "../../src/prelude.c" 10 | "../../src/print.c" 11 | "../../src/qq_expand.c" 12 | "../../src/stack.c" 13 | "../../src/symrepr.c" 14 | "../../src/tokpar.c" 15 | 16 | INCLUDE_DIRS "" 17 | "../../include" 18 | "../../src" 19 | ) 20 | -------------------------------------------------------------------------------- /lispBM/lispBM/old/repl-esp-idf/main/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # "main" pseudo-component makefile. 3 | # 4 | # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/old/repl-esp-idf/sdkconfig.ci: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surfdado/bldc/c7e496a54e599fa2bf65720d5cfe0fd765af0fef/lispBM/lispBM/old/repl-esp-idf/sdkconfig.ci -------------------------------------------------------------------------------- /lispBM/lispBM/repl/convmp4.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | for f in *.raw 5 | do 6 | res=${f%.raw}.png 7 | convert -depth 8 -size 512x512+0 rgb:$f -scale 512x512 $res 8 | done 9 | 10 | 11 | ffmpeg -framerate 200 -pattern_type glob -i '*.png' -c:v libx264 -r 30 -pix_fmt yuv420p out.mp4 12 | -------------------------------------------------------------------------------- /lispBM/lispBM/repl/convpng.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | for f in *.raw 5 | do 6 | res=${f%.raw}.png 7 | convert -depth 8 -size 64x64+0 rgb:$f -scale 512x512 $res 8 | done 9 | -------------------------------------------------------------------------------- /lispBM/lispBM/repl/simple.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define fred (lambda () 3 | (progn (print "fred iteration" \#newline ) 4 | (yield 25000) 5 | (fred)))) 6 | 7 | (define bella (lambda (x) 8 | (progn (print "bella iteration" x \#newline) 9 | (yield 50000) 10 | (bella (+ x 1))))) 11 | 12 | 13 | (spawn '(fred) '(bella 0)) 14 | -------------------------------------------------------------------------------- /lispBM/lispBM/repl/simple2.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define fred (lambda () 3 | (progn (print "fred iteration" \#newline ) 4 | (recv ((? x) (print "fred received: " x \#newline))) 5 | (fred)))) 6 | 7 | (define bella (lambda (pid x) 8 | (progn (print "bella iteration " x \#newline) 9 | (send pid x) 10 | (yield 500000) 11 | (bella pid (+ x 1))))) 12 | 13 | (define fredpid (spawn '(fred))) 14 | 15 | (spawn '(bella (car fredpid) 0)) 16 | -------------------------------------------------------------------------------- /lispBM/lispBM/repl/simple3.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define fred (lambda () 3 | (progn (print "fred iteration" \#newline ) 4 | (recv ((apa (? x)) (print "fred received: " x \#newline))) 5 | (fred)))) 6 | 7 | (define bella (lambda (pid x) 8 | (progn (print "bella iteration " x \#newline) 9 | (send pid '(bepa ,x)) 10 | (yield 50000) 11 | (bella pid (+ x 1))))) 12 | 13 | (define fredpid (spawn '(fred))) 14 | 15 | (spawn '(bella (car fredpid) 0)) 16 | -------------------------------------------------------------------------------- /lispBM/lispBM/repl/test_yield.lisp: -------------------------------------------------------------------------------- 1 | 2 | ;; while (true) { 3 | ;; usleep(500000); 4 | ;; printf("hello %d\n", x++); 5 | ;; } 6 | 7 | (let ((f (lambda (x) 8 | (progn 9 | (yield 500000) 10 | (print "hello " x \#newline) 11 | (f (+ x 1)))))) 12 | (f 0)) 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /lispBM/lispBM/runinfer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | make clean 4 | infer run -- make 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/runsa.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | make clean 4 | scan-build-14 -o ./static_analysis make -j4 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/sdlrepl/runinfer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | make clean 4 | infer run -- make all64 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/sdlrepl/runsa.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | make clean 4 | scan-build-10 -o ./static_analysis make -j4 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/sdlrepl/tex1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surfdado/bldc/c7e496a54e599fa2bf65720d5cfe0fd765af0fef/lispBM/lispBM/sdlrepl/tex1.png -------------------------------------------------------------------------------- /lispBM/lispBM/setup_fw_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -d "repl-zephyr_build" ]; then 4 | echo "Build directory exists!" 5 | else 6 | mkdir repl-zephyr_build 7 | cd repl-zephyr_build 8 | cmake -G "Eclipse CDT4 - Unix Makefiles" -DBOARD=nrf52840_pca10056 ../repl-zephyr 9 | fi 10 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_append_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | (eq (append '(1 2 3) '(4 5 6)) '(1 2 3 4 5 6)) 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_append_2.lisp: -------------------------------------------------------------------------------- 1 | 2 | (eq (append '(1) 3 | '(2 3) 4 | '(4 5 6) 5 | '(7 8 9 10)) 6 | '(1 2 3 4 5 6 7 8 9 10)) 7 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_0.lisp: -------------------------------------------------------------------------------- 1 | (= (+ 5u 60u) 65u) 2 | 3 | 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_1.lisp: -------------------------------------------------------------------------------- 1 | (= (+ 1 (- 1)) 0) 2 | 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_10.lisp: -------------------------------------------------------------------------------- 1 | (= (* 2 (- 4)) (- 8)) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_11.lisp: -------------------------------------------------------------------------------- 1 | (= (/ 4 2) 2) 2 | 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_12.lisp: -------------------------------------------------------------------------------- 1 | (= (/ 8 2 2 2) 1) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_13.lisp: -------------------------------------------------------------------------------- 1 | (= (mod 4 2) 0) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_14.lisp: -------------------------------------------------------------------------------- 1 | (= (mod 5 2) 1) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_15.lisp: -------------------------------------------------------------------------------- 1 | (and (= (/ 2 4) 0) 2 | (= (/ 2 4.0) 0.5)) 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_16.lisp: -------------------------------------------------------------------------------- 1 | (= (+ -1 -1) -2) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_17.lisp: -------------------------------------------------------------------------------- 1 | (= (+ -1 1) 0) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_18.lisp: -------------------------------------------------------------------------------- 1 | (= (- -1 1) -2) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_19.lisp: -------------------------------------------------------------------------------- 1 | (= (- 1 -1) 2) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_2.lisp: -------------------------------------------------------------------------------- 1 | (= (+ 1 0xf) 16u) 2 | 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_20.lisp: -------------------------------------------------------------------------------- 1 | (= 3i (+ 1u 2i)) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_21.lisp: -------------------------------------------------------------------------------- 1 | (= 3i64 (+ 1i64 2i64)) 2 | 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_22.lisp: -------------------------------------------------------------------------------- 1 | (= 3u64 (+ 1u64 2u64)) -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_23.lisp: -------------------------------------------------------------------------------- 1 | (= -3i64 (- 3i64)) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_24.lisp: -------------------------------------------------------------------------------- 1 | (= (mod 1100 256) 76) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_3.lisp: -------------------------------------------------------------------------------- 1 | (= (+ 4u32 7u32) 11u32) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_4.lisp: -------------------------------------------------------------------------------- 1 | (= (+ 7u32 (- 7u32)) 0u32) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_5.lisp: -------------------------------------------------------------------------------- 1 | (= (+ 4i32 7i32) 11i32) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_6.lisp: -------------------------------------------------------------------------------- 1 | (= (+ 7i32 (- 7i32)) 0i32) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_7.lisp: -------------------------------------------------------------------------------- 1 | (= (* 2 4) 8) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_8.lisp: -------------------------------------------------------------------------------- 1 | (= (* 2 2 2) 8) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_9.lisp: -------------------------------------------------------------------------------- 1 | (= (* 5.2 4.0) 20.8) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_stress_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | (defun apply (f args) 6 | (eval (cons f args))) 7 | 8 | (defun test-it (n c args res acc) 9 | (if (= n 0) acc 10 | (progn 11 | (define acc (and acc (= (apply c args) res))) 12 | (test-it (- n 1) c args res acc)))) 13 | 14 | (defun arith (a b c d e f g h i j) 15 | (+ a b c d e f g h i j)) 16 | 17 | ;(def n-gc1 (lbm-heap-state 'get-gc-num)) 18 | 19 | (def res (test-it 10000 arith '(1 2 3 4 5 6 7 8 9 10) 55 t)) 20 | 21 | ;(def n-gc2 (lbm-heap-state 'get-gc-num)) 22 | 23 | res 24 | 25 | ;(list n-gc1 n-gc2) 26 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_stress_2.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun apply (f args) 3 | (eval (cons f args))) 4 | 5 | (defun test-it (n c args res acc) 6 | (if (= n 0) acc 7 | (progn 8 | (define acc (and acc (= (apply c args) res))) 9 | (test-it (- n 1) c args res acc)))) 10 | 11 | (defun arith (a b c d e f g h i j) 12 | (* a b c d e f g h i j)) 13 | 14 | (def res (test-it 10000 arith '(1 2 3 4 5 6 7 8 9 10) 362880 t)) 15 | 16 | res 17 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_arith_stress_3.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun apply (f args) 3 | (eval (cons f args))) 4 | 5 | (defun test-it (n c args res acc) 6 | (if (= n 0) acc 7 | (progn 8 | (define acc (and acc (= (apply c args) res))) 9 | (test-it (- n 1) c args res acc)))) 10 | 11 | (defun arith (a b c d e f g h i j) 12 | (+ a b c d e f g h i j)) 13 | 14 | (def res (test-it 10000 arith '(1u32 2u32 3u32 4u32 5u32 6u32 7u32 8u32 9u32 10u32) 55u32 t)) 15 | 16 | res 17 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_0.lisp: -------------------------------------------------------------------------------- 1 | (= (array-read "hello" 3u) \#l) 2 | 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_1.lisp: -------------------------------------------------------------------------------- 1 | (define a "hello") 2 | 3 | (= (array-read a 3u) \#l) 4 | 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_2.lisp: -------------------------------------------------------------------------------- 1 | (let ((a "hello")) 2 | (= (array-read a 3u) \#l)) 3 | 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_3.lisp: -------------------------------------------------------------------------------- 1 | (define arr (array-create type-u32 10)) 2 | 3 | (array-write arr 5 77) 4 | 5 | (= (array-read arr 5) 77) 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_4.lisp: -------------------------------------------------------------------------------- 1 | (define arr (array-create type-i32 10)) 2 | 3 | (array-write arr 5 77) 4 | 5 | (= (array-read arr 5) 77) 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_5.lisp: -------------------------------------------------------------------------------- 1 | (define arr (array-create type-u64 10)) 2 | 3 | (array-write arr 5 77) 4 | 5 | (= (array-read arr 5) 77) 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_6.lisp: -------------------------------------------------------------------------------- 1 | (define arr (array-create type-i64 10)) 2 | 3 | (array-write arr 5 77) 4 | 5 | (= (array-read arr 5) 77) 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_7.lisp: -------------------------------------------------------------------------------- 1 | (define arr (array-create type-float 10)) 2 | 3 | (array-write arr 5 3.14) 4 | 5 | (= (array-read arr 5) 3.14) 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_8.lisp: -------------------------------------------------------------------------------- 1 | (define arr (array-create type-double 10)) 2 | 3 | (array-write arr 5 3.14f64) 4 | 5 | (= (array-read arr 5) 3.14f64) 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_9.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define a [ 1 2 3 4 5 6 7 8 9]) 3 | 4 | (eq (array-read a 0 4) (map to-byte '(1 2 3 4 5))) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_extensions_0.lisp: -------------------------------------------------------------------------------- 1 | (define arr (array-create type-byte 10)) 2 | 3 | (bufset-i8 arr 0 70) 4 | (bufset-i8 arr 1 69) 5 | (bufset-i8 arr 2 68) 6 | (bufset-i8 arr 3 67) 7 | (bufset-i8 arr 4 66) 8 | (bufset-i8 arr 5 65) 9 | (bufset-i8 arr 6 64) 10 | (bufset-i8 arr 7 63) 11 | (bufset-i8 arr 8 62) 12 | (bufset-i8 arr 9 61) 13 | 14 | (and (= (bufget-i8 arr 0) 70) 15 | (= (bufget-i8 arr 1) 69) 16 | (= (bufget-i8 arr 2) 68) 17 | (= (bufget-i8 arr 3) 67) 18 | (= (bufget-i8 arr 4) 66) 19 | (= (bufget-i8 arr 5) 65) 20 | (= (bufget-i8 arr 6) 64) 21 | (= (bufget-i8 arr 7) 63) 22 | (= (bufget-i8 arr 8) 62) 23 | (= (bufget-i8 arr 9) 61)) 24 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_extensions_1.lisp: -------------------------------------------------------------------------------- 1 | (define arr (array-create type-byte 10)) 2 | 3 | (bufset-u8 arr 0 70) 4 | (bufset-u8 arr 1 69) 5 | (bufset-u8 arr 2 68) 6 | (bufset-u8 arr 3 67) 7 | (bufset-u8 arr 4 66) 8 | (bufset-u8 arr 5 65) 9 | (bufset-u8 arr 6 64) 10 | (bufset-u8 arr 7 63) 11 | (bufset-u8 arr 8 62) 12 | (bufset-u8 arr 9 61) 13 | 14 | (and (= (bufget-u8 arr 0) 70) 15 | (= (bufget-u8 arr 1) 69) 16 | (= (bufget-u8 arr 2) 68) 17 | (= (bufget-u8 arr 3) 67) 18 | (= (bufget-u8 arr 4) 66) 19 | (= (bufget-u8 arr 5) 65) 20 | (= (bufget-u8 arr 6) 64) 21 | (= (bufget-u8 arr 7) 63) 22 | (= (bufget-u8 arr 8) 62) 23 | (= (bufget-u8 arr 9) 61)) 24 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_extensions_2.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define arr (array-create type-byte 16)) 3 | 4 | (bufset-u32 arr 0 16777215) 5 | (bufset-u32 arr 4 0xFFFFFFFF) 6 | (bufset-u32 arr 8 10) 7 | (bufset-u32 arr 12 0xDEADBEEF) 8 | 9 | (and (= (bufget-u32 arr 0) 16777215) 10 | (= (bufget-u32 arr 4) 0xFFFFFFFF) 11 | (= (bufget-u32 arr 8) 10) 12 | (= (bufget-u32 arr 12) 0xDEADBEEF)) 13 | 14 | 15 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_extensions_3.lisp: -------------------------------------------------------------------------------- 1 | (define arr (array-create type-byte 16)) 2 | 3 | (bufset-i32 arr 0 16777215) 4 | (bufset-i32 arr 4 0xFFFFFFFF) 5 | (bufset-i32 arr 8 10) 6 | (bufset-i32 arr 12 0xDEADBEEF) 7 | 8 | (and (= (bufget-i32 arr 0) 16777215) 9 | (= (bufget-i32 arr 4) 0xFFFFFFFF) 10 | (= (bufget-i32 arr 8) 10) 11 | (= (bufget-i32 arr 12) 0xDEADBEEF)) 12 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_extensions_4.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define close-enough 3 | (lambda (x y) 4 | (if (> x y) 5 | (< (- x y) 0.0001) 6 | (< (- y x) 0.0001) 7 | ))) 8 | 9 | (define arr (array-create type-byte 16)) 10 | 11 | (bufset-f32 arr 0 3.14) 12 | (bufset-f32 arr 4 666.666) 13 | (bufset-f32 arr 8 100) 14 | (bufset-f32 arr 12 42) 15 | 16 | (and (close-enough (bufget-f32 arr 0) 3.14) 17 | (close-enough (bufget-f32 arr 4) 666.666) 18 | (close-enough (bufget-f32 arr 8) 100) 19 | (close-enough (bufget-f32 arr 12) 42)) 20 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_extensions_5.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define arr (array-create type-byte 16)) 3 | 4 | (free arr) 5 | 6 | (and (eq (car arr) nil) 7 | (eq (cdr arr) nil)) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_extensions_6.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define arr (array-create type-byte 16)) 3 | 4 | (= 16 (buflen arr)) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_extensions_7.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define arr (array-create type-byte 19)) 3 | 4 | (bufset-u8 arr 0 255) 5 | (bufset-u8 arr 1 127) 6 | (bufset-u8 arr 18 1100) 7 | 8 | (and (= (bufget-u8 arr 0) 255) 9 | (= (bufget-u8 arr 1) 127) 10 | (= (bufget-u8 arr 18) (mod 1100 256))) 11 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_extensions_8.lisp: -------------------------------------------------------------------------------- 1 | (define arr (array-create type-byte 10)) 2 | 3 | (bufset-u16 arr 0 65535) 4 | (bufset-u16 arr 2 10) 5 | (bufset-u16 arr 4 11700) 6 | 7 | (and (= (bufget-u16 arr 0) 65535) 8 | (= (bufget-u16 arr 2) 10) 9 | (= (bufget-u16 arr 4) (mod 11700 65536))) 10 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_syntax_0.lisp: -------------------------------------------------------------------------------- 1 | (define arr [type-i32 0 1 2 3 4 5 6 7 8 9 10 11]) 2 | 3 | (and (= (array-read arr 0) 0) 4 | (= (array-read arr 7) 7) 5 | (= (array-read arr 11) 11)) 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_syntax_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | (= (array-size [1 2 3 4 5 6]) 6) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_syntax_10.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (define arr [type-float 1 2 3 4 5]) 4 | 5 | (= (array-read arr 3) 4.0) 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_syntax_14.lisp: -------------------------------------------------------------------------------- 1 | 2 | (def arr [type-i32 1 2 3 4 5 6]) 3 | 4 | (= (array-size arr) 6) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_syntax_15.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define arr [type-i32 1 2 3 4 5 6 7]) 3 | 4 | (= (array-size arr) 7) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_syntax_16.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define arr [ 1 2 3 4 5 6 ]) 3 | 4 | (= (array-size arr) 6) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_syntax_17.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define arr [1 2 3 4 5 6 7]) 3 | 4 | (= (array-size arr) 7) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_syntax_2.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define arr 3 | [ 1 2 3 4 5 6 7 8 9 4 | 1 2 3 4 5 6 7 8 9 5 | 1 2 3 4 5 6 7 8 9 6 | 1 2 3 4 5 6 7 8 9 7 | 1 2 3 4 5 6 7 8 9 8 | 1 2 3 4 5 6 7 8 9 9 | 1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 11 | 1 2 3 4 5 6 7 8 9 12 | 1 2 3 4 5 6 7 8 9 13 | 1 2 3 4 5 6 7 8 9 14 | 1 2 3 4 5 6 7 8 9 15 | 1 2 3 4 5 6 7 8 9 16 | 1 2 3 4 5 6 7 8 9 17 | 1 2 3 4 5 6 7 8 9 18 | ]) 19 | 20 | (= (array-read arr 10) 2) 21 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_syntax_3.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define arr [type-u32 1 2 3 4 5 6]) 3 | 4 | (= (array-read arr 4) 5) -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_syntax_4.lisp: -------------------------------------------------------------------------------- 1 | (define arr [type-float 3.14 1.24 6.28]) 2 | 3 | 4 | (= 6.28 (array-read arr 2)) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_syntax_5.lisp: -------------------------------------------------------------------------------- 1 | (define arr [1 2 3 4 5 6 7 8 9 10]) 2 | 3 | (define arr1 [1 2 3 4 5 6 7 8 9 10]) 4 | 5 | (eq arr arr1) 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_syntax_6.lisp: -------------------------------------------------------------------------------- 1 | (define arr (array-create 10)) 2 | 3 | (define arr1 [0 0 0 0 0 0 0 0 0 0]) 4 | 5 | (eq arr arr1) 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_syntax_7.lisp: -------------------------------------------------------------------------------- 1 | (define arr (array-create 10)) 2 | 3 | (define arr1 [0 0 0 0 1 0 0 0 0 0]) 4 | 5 | (not (eq arr arr1)) 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_syntax_8.lisp: -------------------------------------------------------------------------------- 1 | (eq [1 2 3] [1 2 3]) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_array_syntax_9.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define arr [type-float 1.0 2.0 3.0 4.0 5.0]) 3 | 4 | (= (array-read arr 3) 4.0) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_assoc_0.lisp: -------------------------------------------------------------------------------- 1 | (define alist (list '(1 . a) '(2 . b) '(3 . c) '(4 . d))) 2 | 3 | (and (eq (assoc alist 3) 'c) 4 | (eq (assoc alist 1) 'a)) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_assoc_1.lisp: -------------------------------------------------------------------------------- 1 | (define alist (list '(p . a) '(q . b) '(r . c) '(s . d))) 2 | 3 | (and (eq (assoc alist 'q) 'b) 4 | (eq (assoc alist 's) 'd)) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_assoc_2.lisp: -------------------------------------------------------------------------------- 1 | (define alist (list '(p . a) '(q . b) '(r . c) '(s . d))) 2 | 3 | (setvar 'alist (acons 't 'e alist)) 4 | 5 | (and (eq (assoc alist 'q) 'b) 6 | (eq (assoc alist 's) 'd) 7 | (eq (assoc alist 't) 'e)) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_assoc_3.lisp: -------------------------------------------------------------------------------- 1 | (define alist (list '(1 . a) '(2 . b) '(3 . c) '(4 . d))) 2 | 3 | (setassoc 'alist 3 'e) 4 | 5 | (and (eq (assoc alist 3) 'c) 6 | (eq (assoc alist 1) 'a)) 7 | 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_atomic_0.lisp: -------------------------------------------------------------------------------- 1 | ( = (atomic (+ 1 2) (+ 1 2))) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_atomic_1.lisp: -------------------------------------------------------------------------------- 1 | (define foo (lambda () 2 | (atomic (+ 1 2 3)))) 3 | 4 | (= (foo) 6) 5 | 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_atomic_2.lisp: -------------------------------------------------------------------------------- 1 | (define foo (lambda () 2 | (atomic (+ 1 2 3) 3 | (+ 1 2 4) 4 | (+ 2 4 8) 5 | (+ 3 6 12)))) 6 | 7 | (= (foo) 21) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_atomic_3.lisp: -------------------------------------------------------------------------------- 1 | (define foo (lambda () 2 | (atomic (progn (+ 1 2 3) 3 | (+ 1 2 4) 4 | (+ 2 4 8) 5 | (+ 3 6 12))))) 6 | 7 | (= (foo) 21) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_atomic_4.lisp: -------------------------------------------------------------------------------- 1 | (define foo (lambda () 2 | (atomic (progn (+ 1 2 3) 3 | (+ 1 2 4)) 4 | (progn (+ 2 4 8) 5 | (+ 3 6 12))))) 6 | 7 | (= (foo) 21) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_bitwise_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (and (= (bitwise-or 0xF0 0x0F) 0xFF) 4 | (= (bitwise-and 0xF0 0x0F) 0x00) 5 | (= (bitwise-xor 0xF0 0x0F) 0xFF) 6 | (= (shl 0x0F 4) 0xF0) 7 | (= (shr 0xF0 4) 0x0F)) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_block_unblock_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (defun proc1 (pid) 4 | (progn 5 | (block) 6 | (send pid 'im-done))) 7 | 8 | 9 | (def id (spawn proc1 (self))) 10 | (unblock id) 11 | 12 | (recv 13 | (im-done 't)) 14 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_callcc_0.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (define f (lambda (cc x) 4 | (if (= x 0) 5 | (cc 1000) 6 | x))) 7 | 8 | (define g (lambda (x y) 9 | (+ x (call-cc (lambda (cc) 10 | (f cc y)))))) 11 | 12 | 13 | (and (= (g 1 0) 1001) 14 | (= (g 1 1) 2)) 15 | 16 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_callcc_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define f (lambda (x) (+ x 1))) 3 | 4 | 5 | 6 | (= (f (call-cc (lambda (k) (k 10)))) 11) 7 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_callcc_2.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (eq (call-cc (lambda (k) (k))) 'nil) 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_callcc_3.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define f (lambda (x) 3 | (if (= x 0) 4 | x 5 | ( = 10 6 | (call-cc (lambda (k) (progn (define cc k) (f (- x 1))))))))) 7 | 8 | (f 1) 9 | (cc 10) 10 | 11 | 12 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_callcc_4.lisp: -------------------------------------------------------------------------------- 1 | 2 | (progn 3 | (define f (lambda (x) 4 | (if (= x 0) 5 | x 6 | (= 10 (call-cc (lambda (k) (progn 7 | (define cc k) 8 | (f (- x 1)))))))))) 9 | (f 1) 10 | (cc 10) 11 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_callcc_5.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (eq (progn 4 | (call-cc (lambda (k) (k))) 'nil)) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_car_0.lisp: -------------------------------------------------------------------------------- 1 | 2 | (eq (car 1) nil) 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_car_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | (eq (car '(1 . 2)) 1) 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_car_2.lisp: -------------------------------------------------------------------------------- 1 | 2 | (eq (car [1 2 3]) nil) 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_cdr_0.lisp: -------------------------------------------------------------------------------- 1 | 2 | (eq (cdr 1) nil) 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_cdr_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | (eq (cdr '(1 . 2)) 2) 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_cdr_2.lisp: -------------------------------------------------------------------------------- 1 | 2 | (eq (cdr [1 2 3 4]) nil) 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_char_0.lisp: -------------------------------------------------------------------------------- 1 | (= \#c \#c) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_comments_0.lisp: -------------------------------------------------------------------------------- 1 | ; Test comment 2 | (define a (+ 1 2)) 3 | ; Another test comment 4 | (= a 3) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_comments_2.lisp: -------------------------------------------------------------------------------- 1 | 2 | ;; This is a comment 3 | ;; This is another comment 4 | ;; A third comment? 5 | ;; and a fourth as well? 6 | ;; woa.. 7 | 8 | (= 1 1) ; a commented piece of code 9 | ;; a comment after code with no empty line between 10 | ;; a comment at the end of the file followed by no newline 11 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_comments_3.lisp: -------------------------------------------------------------------------------- 1 | 2 | ;; This is a comment 3 | ;; This is another comment 4 | ;; A third comment? 5 | ;; and a fourth as well? 6 | ;; woa.. 7 | 8 | (= 1 1) ; a commented piece of code 9 | ;; a comment after code with no empty line between 10 | ;; a comment at the end of the file followed by newlines 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_comments_4.lisp: -------------------------------------------------------------------------------- 1 | ;; A pretty long comment aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 2 | 3 | (= 1 1) 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_comments_5.lisp: -------------------------------------------------------------------------------- 1 | 2 | (= 1 1) 3 | 4 | ;; a pretty long comment at the end of the file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_compare_0.lisp: -------------------------------------------------------------------------------- 1 | (and (eq t (> 1 0)) 2 | (eq nil (< 1 0))) 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_compare_1.lisp: -------------------------------------------------------------------------------- 1 | (and (eq t (>= 1 1)) 2 | (eq t (<= 1 1))) 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_compare_2.lisp: -------------------------------------------------------------------------------- 1 | (and (eq t (>= 1 0)) 2 | (eq t (<= 0 1))) 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_compare_3.lisp: -------------------------------------------------------------------------------- 1 | (and (eq nil (>= 0 1)) 2 | (eq nil (<= 1 0))) 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_concurrent_0.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define compute (lambda () 3 | (progn 4 | (recv (((? pid) (? x) (? y)) (send pid (+ x y)))) 5 | (compute)))) 6 | 7 | 8 | (define cpid (spawn compute)) 9 | 10 | (send cpid (list (self) 1 2)) 11 | 12 | (recv ((? x) (= x 3))) 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_concurrent_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define compute (lambda () 3 | (progn 4 | (recv (((? pid) (? x) (? y)) (send pid (+ x y)))) 5 | (compute)))) 6 | 7 | 8 | (define cpid (spawn compute)) 9 | 10 | (send cpid (list (self) 1 2)) 11 | (send cpid (list (self) 2 3)) 12 | (send cpid (list (self) 3 4)) 13 | 14 | (define a (recv ((? x) x))) 15 | (define b (recv ((? x) x))) 16 | (define c (recv ((? x) x))) 17 | 18 | (define elem (lambda (x xs) 19 | (if (eq xs 'nil) nil 20 | (or (eq x (car xs)) (elem x (cdr xs)))))) 21 | 22 | (and (elem a '(3 5 7)) 23 | (elem b '(3 5 7)) 24 | (elem c '(3 5 7))) 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_cond.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (defun f (x) 4 | (cond ( (> x 100) 'lots) 5 | ( (> x 50) 'ok) 6 | ( (> x 0) 'meh))) 7 | 8 | 9 | (and (eq (f 101) 'lots) 10 | (eq (f 100) 'ok) 11 | (eq (f 10) 'meh)) 12 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_cond_0.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (defun b (x) (> x 100)) 4 | 5 | (defun f (x) 6 | (cond ( (b x) 'lots) 7 | ( (> x 50) 'ok) 8 | ( (> x 0) 'meh))) 9 | 10 | 11 | (and (eq (f 101) 'lots) 12 | (eq (f 100) 'ok) 13 | (eq (f 10) 'meh)) 14 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_cond_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (defun f (x) 4 | (let ( (a (+ x 5))) 5 | (cond ( (= a 0) 'zero) 6 | ( (> a 0) 'positive) 7 | ( (< a 0) 'negative)))) 8 | 9 | (and (eq (f -5) 'zero) 10 | (eq (f 0) 'positive) 11 | (eq (f -100) 'negative)) 12 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_cond_2.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x) 3 | (cond ( (> x 0) 'positive) 4 | ( (< x 0) 'negative) 5 | ( 't 'zero))) 6 | 7 | (and (eq (f 0) 'zero) 8 | (eq (f 1) 'positive) 9 | (eq (f -1) 'negative)) 10 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_cond_3.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x) 3 | (cond ( (> x 0) 'positive) 4 | ( (< x 0) 'negative))) 5 | 6 | (and (eq (f 0) nil) 7 | (eq (f 1) 'positive) 8 | (eq (f -1) 'negative)) 9 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_cond_4.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x) 3 | (let ((a (cond (( < x 0) 'negative) 4 | (( = x 0) 'zero) 5 | (( > x 0) 'positive)))) 6 | (cond ( (eq a 'positive) 100) 7 | ( (eq a 'zero) 1000) 8 | ( (eq a 'negative) 10000)))) 9 | 10 | 11 | (and (= (f 0) 1000) 12 | (= (f 1) 100) 13 | (= (f -1) 10000)) 14 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_cossa_0.lisp: -------------------------------------------------------------------------------- 1 | (define alist (list '(1 . a) '(2 . b) '(3 . c) '(4 . d))) 2 | 3 | (and (eq (cossa alist 'c) 3) 4 | (eq (cossa alist 'a) 1)) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_cossa_1.lisp: -------------------------------------------------------------------------------- 1 | (define alist (list '(p . a) '(q . b) '(r . c) '(s . d))) 2 | 3 | (and (eq (cossa alist 'b) 'q) 4 | (eq (cossa alist 'd) 's)) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_cossa_2.lisp: -------------------------------------------------------------------------------- 1 | (define alist (list '(p . a) '(q . b) '(r . c) '(s . d))) 2 | 3 | (setvar 'alist (acons 't 'e alist)) 4 | 5 | (and (eq (cossa alist 'b) 'q) 6 | (eq (cossa alist 'd) 's) 7 | (eq (cossa alist 'e) 't)) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_cossa_3.lisp: -------------------------------------------------------------------------------- 1 | (define alist (list '(1 . a) '(2 . b) '(3 . c) '(4 . d))) 2 | 3 | (setassoc 'alist 3 'e) 4 | 5 | (and (eq (cossa alist 'c) 3) 6 | (eq (cossa alist 'a) 1)) 7 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_def_0.lisp: -------------------------------------------------------------------------------- 1 | (def apa 10) 2 | 3 | (= apa 10) 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_define_0.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define a 1) 3 | 4 | (define b 2) 5 | 6 | (define f (lambda () (+ a b))) 7 | 8 | (= (f) 3) 9 | 10 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_define_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define a 3) 3 | 4 | (eq a 3) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_define_2.lisp: -------------------------------------------------------------------------------- 1 | 2 | (and (= 3 (define bepa 3) ) 3 | (= bepa 3)) 4 | 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_define_3.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | (eq (define n 55) 55) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_dot1.lisp: -------------------------------------------------------------------------------- 1 | (= (car '(1 . 2)) 1) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_dot2.lisp: -------------------------------------------------------------------------------- 1 | (= (cdr '(1 . 2)) 2) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_dot_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define x (vector 1 2 3)) 3 | (define y (vector 1 5 7)) 4 | 5 | (define r (dot x y)) 6 | 7 | (= r 32.0) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_eq_0.lisp: -------------------------------------------------------------------------------- 1 | (eq "hello" "hello") 2 | 3 | 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_eq_1.lisp: -------------------------------------------------------------------------------- 1 | (eq (eq "hello" "hell0") nil) 2 | 3 | 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_eq_2.lisp: -------------------------------------------------------------------------------- 1 | (eq (= 1 2) nil) 2 | 3 | 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_eq_3.lisp: -------------------------------------------------------------------------------- 1 | (= 2 2) 2 | 3 | 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_eq_4.lisp: -------------------------------------------------------------------------------- 1 | (eq 1.2 1.2) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_eq_5.lisp: -------------------------------------------------------------------------------- 1 | (eq 1u32 1u32) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_eq_6.lisp: -------------------------------------------------------------------------------- 1 | (eq 1i32 1i32) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_eq_not_eq_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define a 10) 3 | (define b 20) 4 | (define c 30) 5 | 6 | (and (eq (not (eq a b c)) (not-eq a b c)) 7 | (eq (not (eq a a c)) (not-eq a a c)) 8 | (eq (not (eq a a a)) (not-eq a a a)) 9 | (eq (not (eq b b c)) (not-eq b b c)) 10 | (eq (not (eq b b b)) (not-eq b b b)) 11 | (eq (not (eq c b c)) (not-eq c b c)) 12 | (eq (not (eq c c c)) (not-eq c c c))) 13 | 14 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_eq_not_eq_2.lisp: -------------------------------------------------------------------------------- 1 | (define a 10) 2 | (define b 20) 3 | (define c 30) 4 | 5 | (and (eq (not (= a b c)) (!= a b c)) 6 | (eq (not (= a a c)) (!= a a c)) 7 | (eq (not (= a a a)) (!= a a a)) 8 | (eq (not (= b b c)) (!= b b c)) 9 | (eq (not (= b b b)) (!= b b b)) 10 | (eq (not (= c b c)) (!= c b c)) 11 | (eq (not (= c c c)) (!= c c c))) 12 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_eval_0.lisp: -------------------------------------------------------------------------------- 1 | (= (eval '(+ 1 2)) 3) 2 | 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_eval_1.lisp: -------------------------------------------------------------------------------- 1 | (= (+ 5 (eval '(+ 1 2))) 8) 2 | 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_eval_2.lisp: -------------------------------------------------------------------------------- 1 | (= (+ 5 (eval '(+ 1 2)) 6) 14) 2 | 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_eval_3.lisp: -------------------------------------------------------------------------------- 1 | (= (eval (eval ''(+ 1 2))) 3) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_eval_program_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define prg '( (+ 1 2) (+ 3 4) (+ 10 5))) 3 | 4 | 5 | (= (eval-program prg) 15) 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_eval_program_2.lisp: -------------------------------------------------------------------------------- 1 | (define prg '( (eval-program '( (+ 1 2) (+ 2 3) (+ 10 5))))) 2 | 3 | 4 | (= (eval-program prg) 15) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_eval_program_3.lisp: -------------------------------------------------------------------------------- 1 | (define prg (list (eval-program (list (+ 1 2) (+ 2 3) (+ 10 5))))) 2 | 3 | 4 | (= (eval-program prg) 15) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_eval_program_4.lisp: -------------------------------------------------------------------------------- 1 | (define prg (list (eval-program (list (+ 1 2) (+ 2 3) (+ 10 5))))) 2 | (define r (+ 100 (eval-program prg))) 3 | 4 | 5 | (= (eval-program prg) 15) 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_eval_program_5.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define prg '()) 3 | 4 | (eq (eval-program prg) 'nil) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_event_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | (event-register-handler (self)) 5 | 6 | 7 | (spawn (fn () 8 | (event-sym 'apa))) 9 | 10 | 11 | 12 | (recv ((? x) (eq x 'apa))) 13 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_event_2.lisp: -------------------------------------------------------------------------------- 1 | 2 | (event-register-handler (self)) 3 | 4 | 5 | (spawn (fn () 6 | (event-array 'apa))) 7 | 8 | 9 | 10 | (recv (((? x) . (? arr)) (and (eq x 'apa) (eq arr "hello world")))) 11 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_event_3.lisp: -------------------------------------------------------------------------------- 1 | (event-register-handler (self)) 2 | 3 | 4 | (spawn (fn () 5 | (progn 6 | (event-sym 'apa) 7 | (event-sym 'bepa) 8 | (event-array 'cepa)))) 9 | 10 | 11 | 12 | (recv ( apa 1)) 13 | (recv ( bepa 2)) 14 | (recv (( cepa . (? arr)) 3)) 15 | 16 | 17 | 18 | 't 19 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_event_4.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | (event-register-handler (self)) 5 | 6 | (defun event-sender (n) 7 | (if (= 0 n) () 8 | (progn 9 | (event-sym 'apa) 10 | (event-sender (- n 1))))) 11 | 12 | (spawn event-sender 100) 13 | 14 | 15 | 16 | (and (recv ((? x) (eq x 'apa))) 17 | (recv ((? x) (eq x 'apa))) 18 | (recv ((? x) (eq x 'apa))) 19 | (recv ((? x) (eq x 'apa))) 20 | (recv ((? x) (eq x 'apa))) 21 | (recv ((? x) (eq x 'apa))) 22 | (recv ((? x) (eq x 'apa))) 23 | (recv ((? x) (eq x 'apa))) 24 | (recv ((? x) (eq x 'apa))) 25 | (recv ((? x) (eq x 'apa))) 26 | (recv ((? x) (eq x 'apa)))) 27 | 28 | 29 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_event_5.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | (event-register-handler (self)) 5 | 6 | (defun event-sender (n) 7 | (if (= 0 n) () 8 | (progn 9 | (event-sym 'apa) 10 | (iota 250) ; Trigger GC eventually 11 | (event-sender (- n 1))))) 12 | 13 | (spawn event-sender 100) 14 | 15 | 16 | 17 | (and (recv ((? x) (eq x 'apa))) 18 | (recv ((? x) (eq x 'apa))) 19 | (recv ((? x) (eq x 'apa))) 20 | (recv ((? x) (eq x 'apa))) 21 | (recv ((? x) (eq x 'apa))) 22 | (recv ((? x) (eq x 'apa))) 23 | (recv ((? x) (eq x 'apa))) 24 | (recv ((? x) (eq x 'apa))) 25 | (recv ((? x) (eq x 'apa))) 26 | (recv ((? x) (eq x 'apa))) 27 | (recv ((? x) (eq x 'apa)))) 28 | 29 | 30 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_event_6.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (event-register-handler (self)) 4 | 5 | (defun event-sender (n) 6 | (if (= 0 n) () 7 | (progn 8 | (event-sym 'apa) 9 | (iota 271) ; Trigger GC eventually 10 | (event-sender (- n 1))))) 11 | 12 | (spawn event-sender 100) 13 | 14 | 15 | 16 | (and (recv ((? x) (eq x 'apa))) 17 | (recv ((? x) (eq x 'apa))) 18 | (recv ((? x) (eq x 'apa))) 19 | (recv ((? x) (eq x 'apa))) 20 | (recv ((? x) (eq x 'apa))) 21 | (recv ((? x) (eq x 'apa))) 22 | (recv ((? x) (eq x 'apa))) 23 | (recv ((? x) (eq x 'apa))) 24 | (recv ((? x) (eq x 'apa))) 25 | (recv ((? x) (eq x 'apa))) 26 | (recv ((? x) (eq x 'apa)))) 27 | 28 | 29 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_event_7.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (event-register-handler (self)) 4 | 5 | (defun event-sender (n) 6 | (if (= 0 n) () 7 | (progn 8 | (event-float 3.14) 9 | (iota 250) ; Trigger GC eventually 10 | (event-sender (- n 1))))) 11 | 12 | (spawn event-sender 100) 13 | 14 | 15 | 16 | (and (recv ((? x) (eq x 3.14))) 17 | (recv ((? x) (eq x 3.14))) 18 | (recv ((? x) (eq x 3.14))) 19 | (recv ((? x) (eq x 3.14))) 20 | (recv ((? x) (eq x 3.14))) 21 | (recv ((? x) (eq x 3.14))) 22 | (recv ((? x) (eq x 3.14))) 23 | (recv ((? x) (eq x 3.14))) 24 | (recv ((? x) (eq x 3.14))) 25 | (recv ((? x) (eq x 3.14))) 26 | (recv ((? x) (eq x 3.14))) 27 | ) 28 | 29 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_event_8.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (event-register-handler (self)) 4 | 5 | (defun event-sender (n) 6 | (if (= 0 n) () 7 | (progn 8 | (event-list-of-float 3.14 3.14 3.14) 9 | (iota 250) ; Trigger GC eventually 10 | (event-sender (- n 1))))) 11 | 12 | (spawn event-sender 100) 13 | 14 | (defun check (n) 15 | (if (= n 0) t 16 | (progn 17 | (recv ((? x) (if (eq x '(3.14 3.14 3.14)) 18 | (check (- n 1)) 19 | x)))))) 20 | 21 | (check 70) 22 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_explicit_gc_0.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define f (lambda (x) 3 | (if (= x 0) 4 | 'done 5 | (progn 6 | (gc) 7 | (f (- x 1)))))) 8 | 9 | 10 | (eq (f 100) 'done) 11 | 12 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_extension_0.lisp: -------------------------------------------------------------------------------- 1 | (eq (ext-even 2) t) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_extension_1.lisp: -------------------------------------------------------------------------------- 1 | (eq (ext-odd 1) t) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_extension_2.lisp: -------------------------------------------------------------------------------- 1 | (eq (ext-even 7) nil) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_extension_3.lisp: -------------------------------------------------------------------------------- 1 | (eq (ext-odd 6) nil) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_fib_0.lisp: -------------------------------------------------------------------------------- 1 | (define fib (lambda (n) (if (> 2 n) n (+ (fib (- n 1)) (fib (- n 2)))))) 2 | 3 | (= (fib 10) 55) 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_fib_1.lisp: -------------------------------------------------------------------------------- 1 | (let ((fib (lambda (n) (if (> 2 n) n (+ (fib (- n 1)) (fib (- n 2))))))) (= (fib 10) 55)) 2 | 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_fib_2.lisp: -------------------------------------------------------------------------------- 1 | (define fib 2 | (lambda (n) 3 | (let ((fib0 (lambda (n a b) 4 | (if (= n 0) a 5 | (if (= n 1) b 6 | (fib0 (- n 1) b (+ a b))))))) 7 | (fib0 n 0 1)))) 8 | 9 | 10 | (= (fib 10) 55) 11 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_fib_3.lisp: -------------------------------------------------------------------------------- 1 | (define fib 2 | (lambda (n) 3 | (let ((fib0 (lambda (n a b) 4 | (match n (0 a) 5 | (1 b) 6 | (_ (fib0 (- n 1) b (+ a b))))))) 7 | (fib0 n 0 1)))) 8 | 9 | 10 | (= (fib 10) 55) 11 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_fib_4.lisp: -------------------------------------------------------------------------------- 1 | (define fib0 2 | (lambda (n a b) 3 | (match n (0 a) 4 | (1 b) 5 | (_ (fib0 (- n 1) 6 | b 7 | (+ a b)))))) 8 | 9 | (define fib (lambda (n) 10 | (fib0 n 0 1))) 11 | 12 | 13 | (= (fib 10) 55) 14 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_first_0.lisp: -------------------------------------------------------------------------------- 1 | (= (first '(1 . 2)) 1) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_float_0.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (eq (type-of 1.0e3) type-float) 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_float_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | (eq (type-of 1.0e3f64) type-double) 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_float_2.lisp: -------------------------------------------------------------------------------- 1 | 2 | (eq (type-of 1.0e3f32) type-float) 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_float_3.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (and (< -3.14 3) 4 | (> 3.14 3)) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_float_4.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (and (< -3.14f64 3) 4 | (> 3.14f64 3)) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_float_5.lisp: -------------------------------------------------------------------------------- 1 | 2 | (and (< -3.14f32 3) 3 | (> 3.14f32 3)) 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_fn_0.lisp: -------------------------------------------------------------------------------- 1 | (= ((fn (x) (+ x 1)) 2) 3) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_fold_0.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define fold (lambda (f i xs) 3 | (if (eq xs nil) 4 | i 5 | (fold f (f i (car xs)) (cdr xs))))) 6 | 7 | (= (fold '+ 0 (list 1 2 3 4 5 6 7 8 9 10)) 55) 8 | 9 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_hex_0.lisp: -------------------------------------------------------------------------------- 1 | (= 0xFF 0xFF) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_hof_0.lisp: -------------------------------------------------------------------------------- 1 | (let ((f (lambda (x) (+ x 1))) 2 | (g (lambda (h) (h 1)))) 3 | (= (g f) 2)) 4 | 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_hof_1.lisp: -------------------------------------------------------------------------------- 1 | (let ((f (lambda () (lambda (x) (+ x 1))))) 2 | (= ((f) 1) 2)) 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_hof_2.lisp: -------------------------------------------------------------------------------- 1 | (let ((f (lambda (y) (lambda (x) (+ x y))))) 2 | (=((f 2) 1) 3)) 3 | 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_if_0.lisp: -------------------------------------------------------------------------------- 1 | (eq (if (> 0 1) 'apa 'bepa) 'bepa) 2 | 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_if_1.lisp: -------------------------------------------------------------------------------- 1 | (eq (if (< 0 1) 'apa 'bepa) 'apa) 2 | 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_if_2.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define test (lambda (f x) 3 | (if (f x) 4 | x 5 | (test f (- x 1))))) 6 | 7 | (= (test (lambda (x) (< x 0)) 2) -1) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_if_3.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define test (lambda (x) 3 | (if x 4 | 'something))) 5 | 6 | (and (eq (test 't) 'something) 7 | (eq (test 'nil) 'nil)) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_if_4.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define test (lambda () 3 | (if (ext-numbers 1) 4 | (progn 5 | (define a (+ 1 2)) 6 | (define b (+ 2 3)) 7 | (define c (+ 3 4)) 8 | (+ a b c) 9 | )))) 10 | 11 | (= (test) 15) 12 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_if_5.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (define test (lambda (x) 4 | (progn 5 | (define a (+ 1 2 3 4 5)) 6 | (if x 7 | (progn 8 | (define b 10) 9 | (+ a b)))))) 10 | 11 | (and (eq (test 't) 25) 12 | (eq (test 'nil) 'nil)) 13 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_ix_0.lisp: -------------------------------------------------------------------------------- 1 | (= 7 (ix '(1 2 0 7 3 2 1) 3)) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_ix_1.lisp: -------------------------------------------------------------------------------- 1 | (eq nil (ix '(1 2) 100000)) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_ix_2.lisp: -------------------------------------------------------------------------------- 1 | (= 45 (ix (iota 100) 45)) 2 | 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_ix_3.lisp: -------------------------------------------------------------------------------- 1 | (define apa '(1 2 3 4 5 6 7 8 9 10)) 2 | 3 | 4 | (and (= (ix apa -10) 1) 5 | (= (ix apa 0) 1) 6 | (= (ix apa -9) 2) 7 | (= (ix apa 1) 2)) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_ix_4.lisp: -------------------------------------------------------------------------------- 1 | (define apa '(1 2 3 4 5 6 7 8 9 10)) 2 | 3 | 4 | (and (= (ix apa -6) 5) 5 | (= (ix apa 4) 5) 6 | (= (ix apa -4) 7) 7 | (= (ix apa 6) 7)) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_lambda_0.lisp: -------------------------------------------------------------------------------- 1 | (define f (lambda (x) (+ x 1))) 2 | 3 | (= (f 78) 79) 4 | 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_lambda_1.lisp: -------------------------------------------------------------------------------- 1 | (define f (lambda (x y) (+ x y))) 2 | 3 | (= (f 2 3) 5) 4 | 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_lambda_10.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define f (lambda () 3 | (lambda (n) 4 | (if (= n 0) 5 | 42 6 | ((f) (- n 1)) 7 | )))) 8 | 9 | 10 | (= ((f) 1) 42) 11 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_lambda_11.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define f2 (lambda () (lambda (x) (- x 1)))) 3 | 4 | (define f (lambda (n) ((f2) n) )) 5 | 6 | (= (f 2) 1) 7 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_lambda_2.lisp: -------------------------------------------------------------------------------- 1 | (define f (lambda (x y z) x)) 2 | 3 | (= (f 10 11 12) 10) 4 | 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_lambda_3.lisp: -------------------------------------------------------------------------------- 1 | (define f (lambda (x y z) y)) 2 | 3 | (= (f 10 11 12) 11) 4 | 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_lambda_4.lisp: -------------------------------------------------------------------------------- 1 | (define f (lambda (x y z) z)) 2 | 3 | (= (f 10 11 12) 12) 4 | 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_lambda_5.lisp: -------------------------------------------------------------------------------- 1 | (define f 2 | (lambda () 3 | (lambda (x) (+ x 1)))) 4 | 5 | (= ((f) 1) 2 ) 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_lambda_6.lisp: -------------------------------------------------------------------------------- 1 | (define f (lambda () 2 | (lambda (x) 3 | (+ x 1)))) 4 | 5 | (= ((f) 1) 2) 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_lambda_7.lisp: -------------------------------------------------------------------------------- 1 | (define f (lambda () 2 | (let ((a 1)) 3 | (lambda (x) 4 | (+ x a))))) 5 | 6 | (= ((f) 1) 2) 7 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_lambda_8.lisp: -------------------------------------------------------------------------------- 1 | (define f (lambda () 2 | (let ((a 1)) 3 | (lambda (x) 4 | (let ((b a)) 5 | (+ x b)))))) 6 | 7 | (= ((f) 1) 2) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_lambda_9.lisp: -------------------------------------------------------------------------------- 1 | (define f (lambda () 2 | (let ((a 1)) 3 | (let ((b 2)) 4 | (lambda (x) 5 | (let ((b a)) 6 | (let ((c 3)) 7 | (+ x b)))))))) 8 | 9 | (= ((f) 1) 2) 10 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_let_0.lisp: -------------------------------------------------------------------------------- 1 | 2 | (let ((x 1) 3 | (y 2)) 4 | (= (+ x y) 3)) 5 | 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_let_1.lisp: -------------------------------------------------------------------------------- 1 | (let ((f (lambda (x) (+ x 1)))) (= (f 33) 34)) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_let_10.lisp: -------------------------------------------------------------------------------- 1 | (define ok 2 | (lambda () 3 | (let ((b (+ 12 15))) 4 | (let ((c 25)) 5 | (+ b c))))) 6 | 7 | (define f (lambda (x) 8 | (progn 9 | (ok) 10 | (yield 10) 11 | (if (= x 0) (ok) (f (- x 1)))))) 12 | 13 | (= (f 1000) 52) 14 | 15 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_let_11.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (let ((a (lambda (x) (if (= x 0) 1 (a (- x 1)))))) 4 | (let ((a (lambda (x) (if (= x 0) 2 (a ( - x 1)))))) 5 | (= (a 1) 2))) 6 | 7 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_let_12.lisp: -------------------------------------------------------------------------------- 1 | (let ((f (lambda (x) (if (= x 0) 0 (f (- x 1)))))) 2 | (= (f 2) 0)) 3 | 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_let_2.lisp: -------------------------------------------------------------------------------- 1 | (let ((f (lambda (x) (if (= x 0) 0 (+ x (f (- x 1))))))) (= (f 10) 55)) 2 | 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_let_3.lisp: -------------------------------------------------------------------------------- 1 | (let ((x 0) 2 | (f (lambda (y) (+ y x))) 3 | (g (lambda (x) (+ x 1)))) 4 | (eq (list (f 10) (g 10)) '(10 11))) 5 | 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_let_4.lisp: -------------------------------------------------------------------------------- 1 | (let ((a 4)) 2 | (let ((b 4)) 3 | (= a b))) 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_let_5.lisp: -------------------------------------------------------------------------------- 1 | 2 | (let ((a 5)) 3 | (let ((a 7)) 4 | (= a 7))) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_let_6.lisp: -------------------------------------------------------------------------------- 1 | (let ((a 4)) 2 | (let ((b 5)) 3 | (let ((c 6)) 4 | (= (+ a b c) 15)))) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_let_7.lisp: -------------------------------------------------------------------------------- 1 | (define f (lambda (x) 2 | (let ((a 4)) 3 | (let ((b 5)) 4 | (let ((c 6)) 5 | (if (= x 0) (+ a b c) (f (- x 1)))))))) 6 | 7 | (= (f 1000000) 15) 8 | 9 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_let_8.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (define f (let ((x 200)) 4 | (let ((y 100)) 5 | (lambda (n) 6 | (let ((a 4)) 7 | (let ((b 5)) 8 | (let ((c 6)) 9 | (if (= n 0) (+ x y a b c) (f (- n 1)))))))))) 10 | 11 | (= (f 100000) 315) 12 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_let_9.lisp: -------------------------------------------------------------------------------- 1 | 2 | (let ((f (lambda (x) 3 | (let ((f (lambda (x) (+ x 10)))) 4 | (f 100))))) 5 | (= (f 0) 110)) 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_list_0.lisp: -------------------------------------------------------------------------------- 1 | 2 | (eq (list 1 2 3) '(1 2 3)) 3 | 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_list_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | (eq (list 1 2 (+ 1 2) 4) '(1 2 3 4)) 3 | 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_list_2.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define l '(1 2 3 4 5 6 7 8)) 3 | 4 | (= (length l) 8) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_list_3.lisp: -------------------------------------------------------------------------------- 1 | 2 | (= (length (iota 101)) 101) 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_list_4.lisp: -------------------------------------------------------------------------------- 1 | 2 | (= (length 'nil) 0) 3 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_list_5.lisp: -------------------------------------------------------------------------------- 1 | (eq (list) nil) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_logic_1.lisp: -------------------------------------------------------------------------------- 1 | (eq (and 't 't) 't) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_logic_10.lisp: -------------------------------------------------------------------------------- 1 | (eq (not (not (not (not t)))) t) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_logic_11.lisp: -------------------------------------------------------------------------------- 1 | (eq (not (not (not (not (not t))))) nil) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_logic_12.lisp: -------------------------------------------------------------------------------- 1 | (= (and (let ((apa 1)) apa) (let ((bepa 2)) bepa)) 2) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_logic_2.lisp: -------------------------------------------------------------------------------- 1 | (eq (or 't 'nil) 't) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_logic_3.lisp: -------------------------------------------------------------------------------- 1 | (eq (and 'nil 't) 'nil) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_logic_4.lisp: -------------------------------------------------------------------------------- 1 | (eq (or 'nil 'nil) 'nil) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_logic_5.lisp: -------------------------------------------------------------------------------- 1 | (= (or 'nil 'nil 1) 1) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_logic_6.lisp: -------------------------------------------------------------------------------- 1 | (= (and 1 2 3) 3) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_logic_7.lisp: -------------------------------------------------------------------------------- 1 | (eq (not (and 1 2 3)) nil) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_logic_8.lisp: -------------------------------------------------------------------------------- 1 | (eq (not nil) t) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_logic_9.lisp: -------------------------------------------------------------------------------- 1 | (eq (not t) nil) 2 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_loop_for_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define n 0) 3 | 4 | 5 | (= (loopfor i 0 (<= i 10) (+ i 1) 6 | (define n (+ n i))) 7 | 55) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_loop_foreach_1.lisp: -------------------------------------------------------------------------------- 1 | (define n 0) 2 | 3 | (loopforeach i '(0 1 2 3 4 5 6 7 8 9 10) 4 | (define n (+ n i))) 5 | 6 | (eq n 55) 7 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_loop_range_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define n 0) 3 | 4 | 5 | (looprange i 0 11 6 | (define n (+ n i))) 7 | 8 | (eq n 55) 9 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_loop_while_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define n 0) 3 | 4 | (= (loopwhile (<= n 10) 5 | (define n (+ n 1))) 6 | 11) 7 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_macro_0.lisp: -------------------------------------------------------------------------------- 1 | (define defun (macro (name args body) 2 | `(define ,name (lambda ,args ,body)))) 3 | 4 | (defun f (x y) (+ x y)) 5 | 6 | (= (f 1 2) 3) 7 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_mail_0.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (send (self) 1) 4 | (send (self) 2) 5 | (send (self) 3) 6 | (send (self) 4) 7 | (send (self) 5) 8 | (send (self) 6) 9 | (send (self) 7) 10 | (send (self) 8) 11 | (send (self) 9) 12 | (send (self) 10) 13 | 14 | 15 | (recv ((? x) (define a1 x))) 16 | (recv ((? x) (define a2 x))) 17 | (recv ((? x) (define a3 x))) 18 | (recv ((? x) (define a4 x))) 19 | (recv ((? x) (define a5 x))) 20 | (recv ((? x) (define a6 x))) 21 | (recv ((? x) (define a7 x))) 22 | (recv ((? x) (define a8 x))) 23 | (recv ((? x) (define a9 x))) 24 | (recv ((? x) (define a10 x))) 25 | 26 | (eq (list a1 a2 a3 a4 a5 a6 a7 a8 a9 a10) (list 1 2 3 4 5 6 7 8 9 10)) 27 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_mail_1.lisp: -------------------------------------------------------------------------------- 1 | (send (self) 1) 2 | 3 | (recv ((? x) (define a1 x))) 4 | 5 | (= a1 1) 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_mail_2.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (send (self) 1) 4 | (send (self) 2) 5 | (send (self) 3) 6 | (send (self) 4) 7 | (send (self) 5) 8 | (send (self) 6) 9 | (send (self) 7) 10 | (send (self) 8) 11 | (send (self) 9) 12 | (send (self) 10) 13 | (send (self) 11) 14 | (send (self) 12) 15 | (send (self) 13) 16 | 17 | (recv ((? x) (define a1 x))) 18 | (recv ((? x) (define a2 x))) 19 | (recv ((? x) (define a3 x))) 20 | 21 | (and (= a1 4) 22 | (= a2 5) 23 | (= a3 6)) 24 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_mail_4.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define f (lambda () 3 | (progn 4 | (recv (_ nil)) 5 | (f)))) 6 | 7 | 8 | (spawn f) 9 | 10 | 11 | (yield 10000) 12 | (= 1 1) 13 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_map_0.lisp: -------------------------------------------------------------------------------- 1 | ;;(define map (lambda (f xs) (if (eq xs nil) nil (cons (f (car xs)) (map f (cdr xs)))))) 2 | 3 | (eq (map (lambda (x) (+ x 1)) (list 1 2 3 4 5)) (list 2 3 4 5 6)) 4 | 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_map_1.lisp: -------------------------------------------------------------------------------- 1 | ;; (define map (lambda (f xs) 2 | ;; (let ((accmap (lambda (acc xs) 3 | ;; (if (eq xs nil) 4 | ;; acc 5 | ;; (accmap (cons (f (car xs)) acc) (cdr xs)))))) 6 | ;; (reverse (accmap nil xs))))) 7 | 8 | (eq (map (lambda (x) (+ x 1)) (list 1 2 3 4 5 6)) (list 2 3 4 5 6 7)) 9 | 10 | 11 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_map_10.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x) (+ x 1)) 3 | 4 | (eq (map f '()) nil) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_map_11.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x) (+ x 1)) 3 | 4 | (eq (map f nil) '()) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_map_12.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x) (+ x 1)) 3 | 4 | (eq (map f nil) nil) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_map_3.lisp: -------------------------------------------------------------------------------- 1 | ;; (let ((accmap (lambda (f acc xs) 2 | ;; (if (eq xs nil) 3 | ;; acc 4 | ;; (accmap f (cons (f (car xs)) acc) (cdr xs)))))) 5 | ;; (define map (lambda (f xs) (reverse (accmap f nil xs))))) 6 | 7 | (eq (map (lambda (x) (+ x 1)) (list 1 2 3 4 5 6)) (list 2 3 4 5 6 7)) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_map_4.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define ls (list (list 1 2 3) (list 2 3 4) (list 3 4 5))) 3 | (define rs (list (list 2 3 4) (list 3 4 5) (list 4 5 6))) 4 | 5 | (defun f (x) (+ x 1)) 6 | 7 | (eq (map (lambda (x) (map f x)) ls) rs) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_map_5.lisp: -------------------------------------------------------------------------------- 1 | (define ls (list (list 1 2 3) (list 2 3 4) (list 3 4 5))) 2 | (define rs (list (list 3 2 1) (list 4 3 2) (list 5 4 3))) 3 | 4 | (defun f (x) (+ x 1)) 5 | 6 | (eq (map reverse ls) rs) 7 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_map_6.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x) (+ x 1)) 3 | 4 | (define myfun (map f)) 5 | 6 | (define ls (list (list 1 2 3) (range 2 5))) 7 | (define rs '((2 3 4) (3 4 5))) 8 | 9 | (eq (map myfun ls) rs) 10 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_map_7.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x) (+ x 1)) 3 | 4 | 5 | 6 | (define ls (list (list 1 2 3) (range 2 5))) 7 | (define rs '((2 3 4) (3 4 5))) 8 | 9 | (eq (map (map f) ls) rs) 10 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_map_8.lisp: -------------------------------------------------------------------------------- 1 | (defun f (x) (+ x 1)) 2 | 3 | 4 | (define ls (list (list (list 1 2 3) (range 2 5)))) 5 | (define rs '(((2 3 4) (3 4 5)))) 6 | 7 | (eq (map (map (map f)) ls) rs) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_map_9.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x) (+ x 1)) 3 | 4 | (eq (map f '()) '()) 5 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_0.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define f (lambda (x) 3 | (match x ( (apa (? x)) (+ x 10)) 4 | ( (? x) x)))) 5 | 6 | (= (f '(apa 10)) 20) 7 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define f (lambda (x) 3 | (match x ( (apa (? x)) (+ x 10)) 4 | ( (? x) 10)))) 5 | 6 | (= (f '(foo 3)) 10) 7 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_10.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (= (match "apa" 4 | ("bepa" 0) 5 | ("eepa" 1) 6 | ("kurt" 2) 7 | ("apa" 3) 8 | ("hej" 4)) 9 | 3) 10 | 11 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_11.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x) "apa") 3 | 4 | (= (match (f 0) 5 | ("bepa" 0) 6 | ("eepa" 1) 7 | ("kurt" 2) 8 | ("apa" 3) 9 | ("hej" 4)) 10 | 3) 11 | 12 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_12.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x) "kurt") 3 | 4 | (= (match (f 0) 5 | ("bepa" 0) 6 | ("eepa" 1) 7 | ("kurt" 2) 8 | ("apa" 3) 9 | ("hej" 4)) 10 | 2) 11 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_13.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x y) 3 | (match (cons x y) 4 | ((1 . 2) 'a-symbol))) 5 | 6 | (eq (f 1 2) 'a-symbol) 7 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_14.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x y) 3 | (match `(,x . ,y) 4 | ((1 . 2) 'a-symbol))) 5 | 6 | (eq (f 1 2) 'a-symbol) 7 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_15.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x y) 3 | (match (cons x y) 4 | ((1 . 2) 'a-symbol) 5 | ( _ 'whatever))) 6 | 7 | (eq (f 1 4) 'whatever) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_2.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define f (lambda (ls) 3 | (match ls 4 | ( nil 0 ) 5 | ( ((? x) . (? xs)) (+ x (f xs))) 6 | ( _ 'error-not-a-list)))) 7 | 8 | (= (f '(1 2 3 4)) 10) 9 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_3.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define f (lambda (ls) 3 | (match ls 4 | ( nil 0 ) 5 | ( ( (? c) . (? cd)) (+ c (f c))) 6 | ( _ 'error-not-a-list)))) 7 | 8 | (eq (f 'kurt) 'error-not-a-list) 9 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_4.lisp: -------------------------------------------------------------------------------- 1 | (define f (lambda (ls) 2 | (match ls 3 | ( nil 0 ) 4 | ( (?cons c) (+ (car c) (f (cdr c)))) 5 | ( _ 'error-not-a-list)))) 6 | 7 | (= (f '()) 0) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_5.lisp: -------------------------------------------------------------------------------- 1 | (define f (lambda (ls) 2 | (match ls 3 | ( nil 0 ) 4 | ( (?cons c) (+ (car c) (f (cdr c)))) 5 | ( ? 'error-not-a-list)))) 6 | 7 | (= (f '()) 0) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_6.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x) 3 | (match (type-of x) 4 | (type-i64 (+ 1 x)) 5 | (type-u64 (+ 2 x)) 6 | (type-double (+ 3 x)))) 7 | 8 | 9 | (and (= (f 1i64) 2i64) 10 | (= (f 2u64) 4u64) 11 | (> (f 3.14f64) 6.13f64) 12 | (< (f 3.14f64) 6.15f64)) 13 | 14 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_7.lisp: -------------------------------------------------------------------------------- 1 | 2 | (eq (match (+ 1 2) 3 | ( 3 't) 4 | ( _ 'nil)) 5 | 't) 6 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_8.lisp: -------------------------------------------------------------------------------- 1 | 2 | (define f (lambda (x) (+ x 2))) 3 | 4 | (eq (match (f 1) 5 | ( 3 't) 6 | ( _ 'nil)) 7 | 't) 8 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_9.lisp: -------------------------------------------------------------------------------- 1 | (defun test (x) x) 2 | 3 | ( = (let ((a 1)) 4 | (match (test 75) 5 | (75 a))) 6 | 1) 7 | 8 | ;; (= (let ( (a 1) ) 9 | ;; (test a)) 10 | ;; 1) 11 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_guard_0.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x) 3 | (match x 4 | ( _ (<= x 10) (+ x 1)) 5 | ( _ (> x 10) (+ x 100)))) 6 | 7 | 8 | 9 | (and (= (f 0) 1) 10 | (= (f 2) 3) 11 | (= (f 11) 111)) 12 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_guard_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x) 3 | (match nil 4 | ( _ (<= x 10) (+ x 1)) 5 | ( _ (> x 10) (+ x 100)))) 6 | 7 | 8 | 9 | (and (= (f 0) 1) 10 | (= (f 2) 3) 11 | (= (f 11) 111)) 12 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_guard_2.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x) 3 | (match x 4 | ( (apa (? x)) (<= x 10) (+ x 1)) 5 | ( (apa (? x)) (> x 10) (+ x 100)))) 6 | 7 | 8 | 9 | (and (= (f '(apa 0)) 1) 10 | (= (f '(apa 2)) 3) 11 | (= (f '(apa 11)) 111)) 12 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_guard_3.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x) 3 | (match x 4 | ( (apa (? x) (? y)) (> x y) 'bigger) 5 | ( (apa (? x) (? y)) (< x y) 'smaller))) 6 | 7 | 8 | 9 | (and (eq (f '(apa 0 1)) 'smaller) 10 | (eq (f '(apa 1 0)) 'bigger) 11 | (eq (f '(apa 1000 900)) 'bigger) 12 | (eq (f '(apa 900 1000)) 'smaller)) 13 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_guard_4.lisp: -------------------------------------------------------------------------------- 1 | (defun f (x i) 2 | (match x 3 | ( (apa (? x)) (> x i) 'bigger) 4 | ( (apa (? x)) (< x i) 'smaller))) 5 | 6 | 7 | 8 | (and (eq (f '(apa 0) 1) 'smaller) 9 | (eq (f '(apa 1) 0) 'bigger) 10 | (eq (f '(apa 1000) 900) 'bigger) 11 | (eq (f '(apa 900) 1000) 'smaller)) 12 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_guard_5.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x) 3 | (match x 4 | ( (? x) (eq (type-of x) type-i) 'an-integer) 5 | ( (? x) 'something-else))) 6 | 7 | (and (eq (f 23) 'an-integer) 8 | (eq (f 0.3) 'something-else)) 9 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_guard_6.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x) 3 | (match x 4 | ( (? x) (< x 5) 'smaller) 5 | ( (? x) (> x 5) 'larger) 6 | ( _ 'whatever))) 7 | 8 | (and (eq (f 23) 'larger) 9 | (eq (f 0.3) 'smaller)) 10 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_guard_7.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x) 3 | (match x 4 | ( (? x) (< x 5) (list x 'smaller)) 5 | ( (? x) (> x 5) (list x 'larger)) 6 | ( _ 'whatever))) 7 | 8 | (and (eq (f 23) '(23 larger)) 9 | (eq (f 0.3) '(0.3 smaller))) 10 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_guard_8.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun f (x) 3 | (match x 4 | ( ((? x) . ((? y) . _)) (< x 10) (list y 'smaller)) 5 | ( ((? x) . ((? y) . _)) (> x 10) (list y 'larger)) 6 | ( _ 'whatever))) 7 | 8 | (and (eq (f '(0 1 2 3)) '(1 smaller)) 9 | (eq (f '(11 9 8 7)) '(9 larger))) 10 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_match_guard_9.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (defun larger ( x ) 4 | (> x 10)) 5 | 6 | (defun smaller ( x ) 7 | (< x 10)) 8 | 9 | (defun f (x) 10 | (match x 11 | ( ((? x) . ((? y) . _)) (smaller x) (list y 'smaller)) 12 | ( ((? x) . ((? y) . _)) (larger x) (list y 'larger)) 13 | ( _ 'whatever))) 14 | 15 | (and (eq (f '(0 1 2 3)) '(1 smaller)) 16 | (eq (f '(11 9 8 7)) '(9 larger))) 17 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_matrix_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (def d '(1.0 0.0 0.0 4 | 0.0 1.0 0.0 5 | 0.0 0.0 1.0)) 6 | 7 | (def m (list-to-matrix 3 d)) 8 | 9 | 10 | (def d-new (matrix-to-list m)) 11 | 12 | (eq d-new d) 13 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_memory_1.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (defun repeat (n c) 4 | (if (= n 0) nil 5 | (progn 6 | (c) 7 | (repeat (- n 1) c) 8 | ))) 9 | 10 | 11 | (def n (* 4 (mem-longest-free))) 12 | (repeat 100 (fn () (array-create (- n 1)))) 13 | 14 | t 15 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_memory_2.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (defun repeat (n c) 4 | (if (= n 0) 'repeat-done 5 | (progn 6 | (c) 7 | (repeat (- n 1) c) 8 | ))) 9 | 10 | 11 | (def n (* 4 (mem-longest-free))) 12 | (defun f () (repeat 100 (fn () (array-create (- n 1500))))) 13 | 14 | 15 | 16 | (spawn-trap f) 17 | 18 | 19 | (eq (recv ((exit-error (? tid) (? e)) 'error) 20 | ((exit-ok (? tid) (? r)) r)) 21 | 'repeat-done) 22 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_memory_3.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (def n (* (word-size) (mem-longest-free))) 4 | 5 | (def a (array-create (/ n 2))) 6 | 7 | (defun f () 8 | (progn 9 | (+ 1 2) 10 | (array-create (/ n 2)))) ;; Should not succeed 11 | 12 | 13 | (spawn-trap f) 14 | 15 | 16 | (def res (recv ((exit-error (? tid) (? e)) e) 17 | ((exit-ok (? tid) (? r)) r))) 18 | 19 | (and (eq res out_of_memory) ;; error caught 20 | (= (+ 1 2) 3)) ;; eval is alive 21 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_memory_4.lisp: -------------------------------------------------------------------------------- 1 | 2 | 3 | (def n (* (word-size) (mem-longest-free))) 4 | 5 | (def a (array-create (/ n 4))) 6 | 7 | (defun f () 8 | (array-create (/ n 4))) ;; probably fine 9 | 10 | 11 | (spawn-trap f) 12 | 13 | 14 | (def res (recv ((exit-error (? tid) (? e)) e) 15 | ((exit-ok (? tid) (? r)) r))) 16 | 17 | (and (eq (type-of res) 'type-array ) ;; OK status cought 18 | (= (+ 1 2) 3)) ;; eval is alive 19 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_mutual_rec_0.lisp: -------------------------------------------------------------------------------- 1 | (let ((f (lambda (x) (if (= x 0) 0 (g (- x 1))))) 2 | (g (lambda (x) (if (= x 0) 1 (f (- x 1)))))) 3 | (= (f 11) 1)) 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_mutual_rec_1.lisp: -------------------------------------------------------------------------------- 1 | (let ((f (lambda (x) (if (= x 0) 0 (g (- x 1))))) 2 | (g (lambda (x) (if (= x 0) 1 (f (- x 1)))))) 3 | (= (f 10) 0)) 4 | -------------------------------------------------------------------------------- /lispBM/lispBM/tests/test_n_times.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "BUILDING" 4 | 5 | make clean 6 | make 7 | 8 | n=$1 9 | test=$2 10 | result=0 11 | success_count=0 12 | fail_count=0 13 | 14 | for ((i=0; i 8 | #include 9 | 10 | // Constants 11 | #define DATA_QML_APP_SIZE 1632 12 | 13 | // Variables 14 | extern uint8_t data_qml_app[]; 15 | 16 | // QMLUI_EXAMPLE_APP_H_ 17 | #endif 18 | -------------------------------------------------------------------------------- /qmlui/hw/qmlui_example_hw.h: -------------------------------------------------------------------------------- 1 | // This file is autogenerated by VESC Tool 2 | 3 | #ifndef QMLUI_EXAMPLE_HW_H_ 4 | #define QMLUI_EXAMPLE_HW_H_ 5 | 6 | #include "datatypes.h" 7 | #include 8 | #include 9 | 10 | // Constants 11 | #define DATA_QML_HW_SIZE 1045 12 | 13 | // Variables 14 | extern uint8_t data_qml_hw[]; 15 | 16 | // QMLUI_EXAMPLE_HW_H_ 17 | #endif 18 | -------------------------------------------------------------------------------- /stm32-bv_openocd.cfg: -------------------------------------------------------------------------------- 1 | source [find interface/stlink-v2.cfg] 2 | source [find target/stm32f4x_stlink.cfg] 3 | 4 | # use hardware reset, connect under reset 5 | reset_config srst_only srst_nogate 6 | 7 | -------------------------------------------------------------------------------- /tests/overvoltage_fault/overvoltage_test_v1.ods: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surfdado/bldc/c7e496a54e599fa2bf65720d5cfe0fd765af0fef/tests/overvoltage_fault/overvoltage_test_v1.ods -------------------------------------------------------------------------------- /tests/overvoltage_fault/overvoltage_test_v1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surfdado/bldc/c7e496a54e599fa2bf65720d5cfe0fd765af0fef/tests/overvoltage_fault/overvoltage_test_v1.pdf -------------------------------------------------------------------------------- /tests/overvoltage_fault/overvoltage_test_v2.ods: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surfdado/bldc/c7e496a54e599fa2bf65720d5cfe0fd765af0fef/tests/overvoltage_fault/overvoltage_test_v2.ods -------------------------------------------------------------------------------- /tests/overvoltage_fault/overvoltage_test_v2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surfdado/bldc/c7e496a54e599fa2bf65720d5cfe0fd765af0fef/tests/overvoltage_fault/overvoltage_test_v2.pdf -------------------------------------------------------------------------------- /tests/utils_math/app.h: -------------------------------------------------------------------------------- 1 | #ifndef APP_H 2 | #define APP_H 3 | 4 | #endif // APP_H 5 | -------------------------------------------------------------------------------- /tests/utils_math/ch.h: -------------------------------------------------------------------------------- 1 | #ifndef CH_H 2 | #define CH_H 3 | 4 | typedef int systime_t; 5 | typedef struct { 6 | uint32_t *p_stklimit; 7 | } thread_t; 8 | #endif // CH_H 9 | -------------------------------------------------------------------------------- /tests/utils_math/hal.h: -------------------------------------------------------------------------------- 1 | #ifndef HAL_H 2 | #define HAL_H 3 | 4 | void chSysLock(){} 5 | void chSysUnlock(){} 6 | 7 | int READ_HALL1_2(){ 8 | return 0; 9 | } 10 | int READ_HALL2_2(){ 11 | return 0; 12 | } 13 | int READ_HALL3_2(){ 14 | return 0; 15 | } 16 | int READ_HALL1(){ 17 | return 0; 18 | } 19 | int READ_HALL2(){ 20 | return 0; 21 | } 22 | int READ_HALL3(){ 23 | return 0; 24 | } 25 | 26 | //typedef int systime_t; 27 | #endif // HAL_H 28 | -------------------------------------------------------------------------------- /util/util.mk: -------------------------------------------------------------------------------- 1 | CSRC += \ 2 | util/buffer.c \ 3 | util/crc.c \ 4 | util/digital_filter.c \ 5 | util/mempools.c \ 6 | util/utils_math.c \ 7 | util/utils_sys.c \ 8 | util/worker.c \ 9 | util/lzo/minilzo.c 10 | 11 | INCDIR += \ 12 | util \ 13 | util/lzo 14 | 15 | -------------------------------------------------------------------------------- /util/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef UTILS_H_ 2 | #define UTILS_H_ 3 | 4 | #include "utils_sys.h" 5 | #include "utils_math.h" 6 | 7 | #endif 8 | --------------------------------------------------------------------------------