[fix] update cdkproj settings

This commit is contained in:
qqwang 2021-06-21 12:49:38 +08:00 committed by jzlv
parent 67a94065c0
commit 38a8f4e0a5
59 changed files with 1252 additions and 330 deletions

View file

@ -475,7 +475,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -475,7 +475,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -473,7 +473,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>
@ -789,7 +789,7 @@ Board: bl70x_iot
</AfterMake>
</User>
<Compiler>
<Define>BL702;BL702_EVB;ARCH_RISCV;</Define>
<Define>ARCH_RISCV;</Define>
<Undefine/>
<Optim>Optimize more (-O2)</Optim>
<DebugLevel>Default (-g)</DebugLevel>

View file

@ -475,7 +475,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -475,7 +475,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -475,7 +475,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -475,7 +475,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -480,7 +480,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -483,7 +483,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -486,7 +486,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -475,7 +475,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -473,7 +473,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>
@ -789,7 +789,7 @@ Board: bl70x_iot
</AfterMake>
</User>
<Compiler>
<Define>BL702;BL702_EVB;ARCH_RISCV;</Define>
<Define>ARCH_RISCV;</Define>
<Undefine/>
<Optim>Optimize more (-O2)</Optim>
<DebugLevel>Default (-g)</DebugLevel>

View file

@ -475,7 +475,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -480,7 +480,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -477,7 +477,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>
@ -648,7 +648,7 @@ Board: bl70x_iot
<Undefine/>
<Optim>Optimize more (-O2)</Optim>
<DebugLevel>Default (-g)</DebugLevel>
<IncludePath>$(ProjectPath);$(ProjectPath)../;$(ProjectPath)../../../../components/fatfs;$(ProjectPath)../../../../components/freertos/Source/include;$(ProjectPath)../../../../components/shell;$(ProjectPath)../../../../components/usb_stack/class/audio;$(ProjectPath)../../../../components/usb_stack/class/cdc;$(ProjectPath)../../../../components/usb_stack/class/hid;$(ProjectPath)../../../../components/usb_stack/class/msc;$(ProjectPath)../../../../components/usb_stack/class/video;$(ProjectPath)../../../../components/usb_stack/class/webusb;$(ProjectPath)../../../../components/usb_stack/class/winusb;$(ProjectPath)../../../../components/usb_stack/common;$(ProjectPath)../../../../components/usb_stack/core;$(ProjectPath)../../../../bsp/board/bl706_iot;$(ProjectPath)../../../../bsp/bsp_common/platform;$(ProjectPath)../../../../common/libc/inc;$(ProjectPath)../../../../common/libc/inc/arm_gcc;$(ProjectPath)../../../../common/libc/inc/bits;$(ProjectPath)../../../../common/libc/inc/sys;$(ProjectPath)../../../../common/libc/src;$(ProjectPath)../../../../common/device;$(ProjectPath)../../../../common/list;$(ProjectPath)../../../../common/memheap;$(ProjectPath)../../../../common/misc;$(ProjectPath)../../../../common/ring_buffer;$(ProjectPath)../../../../common/soft_crc;$(ProjectPath)../../../../components/shell;$(ProjectPath)../../../../drivers/bl702_driver/hal_drv/default_config;$(ProjectPath)../../../../drivers/bl702_driver/risc-v/Core/Include;$(ProjectPath)../../../../drivers/bl702_driver/hal_drv/inc;$(ProjectPath)../../../../drivers/bl702_driver/regs;$(ProjectPath)../../../../drivers/bl702_driver/startup;$(ProjectPath)../../../../drivers/bl702_driver/std_drv/inc</IncludePath>
<IncludePath>$(ProjectPath);$(ProjectPath)../;$(ProjectPath)../../../../components/fatfs;$(ProjectPath)../../../../components/freertos/Source/include;$(ProjectPath)../../../../components/shell;$(ProjectPath)../../../../components/usb_stack/class/audio;$(ProjectPath)../../../../components/usb_stack/class/cdc;$(ProjectPath)../../../../components/usb_stack/class/hid;$(ProjectPath)../../../../components/usb_stack/class/msc;$(ProjectPath)../../../../components/usb_stack/class/video;$(ProjectPath)../../../../components/usb_stack/class/webusb;$(ProjectPath)../../../../components/usb_stack/class/winusb;$(ProjectPath)../../../../components/usb_stack/common;$(ProjectPath)../../../../components/usb_stack/core;$(ProjectPath)../../../../bsp/board/bl706_iot;$(ProjectPath)../../../../bsp/bsp_common/platform;$(ProjectPath)../../../../common/libc/inc;$(ProjectPath)../../../../common/libc/inc/arm_gcc;$(ProjectPath)../../../../common/libc/inc/bits;$(ProjectPath)../../../../common/libc/inc/sys;$(ProjectPath)../../../../common/libc/src;$(ProjectPath)../../../../common/device;$(ProjectPath)../../../../common/list;$(ProjectPath)../../../../common/memheap;$(ProjectPath)../../../../common/misc;$(ProjectPath)../../../../common/ring_buffer;$(ProjectPath)../../../../common/soft_crc;$(ProjectPath)../../../../components/shell;$(ProjectPath)../../../../components/freertos/include;$(ProjectPath)../../../../components/freertos/portable/gcc/risc-v/bl702;$(ProjectPath)../../../../drivers/bl702_driver/hal_drv/default_config;$(ProjectPath)../../../../drivers/bl702_driver/risc-v/Core/Include;$(ProjectPath)../../../../drivers/bl702_driver/hal_drv/inc;$(ProjectPath)../../../../drivers/bl702_driver/regs;$(ProjectPath)../../../../drivers/bl702_driver/startup;$(ProjectPath)../../../../drivers/bl702_driver/std_drv/inc</IncludePath>
<OtherFlags>-fshort-enums -fno-common -fms-extensions -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -Wall -Wshift-negative-value -Wchar-subscripts -Wformat -Wuninitialized -Winit-self -fno-jump-tables -Wignored-qualifiers -Wswitch-default -Wunused -Wundef -msmall-data-limit=4</OtherFlags>
<Verbose>no</Verbose>
<Ansi>no</Ansi>
@ -662,9 +662,9 @@ Board: bl70x_iot
<Fstrict>no</Fstrict>
</Compiler>
<Asm>
<Define/>
<Define>portasmHANDLE_INTERRUPT=FreeRTOS_Interrupt_Handler;</Define>
<Undefine/>
<IncludePath>$(ProjectPath);$(ProjectPath)../;$(ProjectPath)../../../../components/fatfs;$(ProjectPath)../../../../components/freertos/Source/include;$(ProjectPath)../../../../components/shell;$(ProjectPath)../../../../components/usb_stack/class/audio;$(ProjectPath)../../../../components/usb_stack/class/cdc;$(ProjectPath)../../../../components/usb_stack/class/hid;$(ProjectPath)../../../../components/usb_stack/class/msc;$(ProjectPath)../../../../components/usb_stack/class/video;$(ProjectPath)../../../../components/usb_stack/class/webusb;$(ProjectPath)../../../../components/usb_stack/class/winusb;$(ProjectPath)../../../../components/usb_stack/common;$(ProjectPath)../../../../components/usb_stack/core;$(ProjectPath)../../../../bsp/board/bl706_iot;$(ProjectPath)../../../../bsp/bsp_common/platform;$(ProjectPath)../../../../common/device;$(ProjectPath)../../../../common/list;$(ProjectPath)../../../../common/memheap;$(ProjectPath)../../../../common/misc;$(ProjectPath)../../../../common/ring_buffer;$(ProjectPath)../../../../common/soft_crc;$(ProjectPath)../../../../components/shell;$(ProjectPath)../../../../drivers/bl702_driver/hal_drv/default_config;$(ProjectPath)../../../../drivers/bl702_driver/hal_drv/inc;$(ProjectPath)../../../../drivers/bl702_driver/risc-v/Core/Include;$(ProjectPath)../../../../drivers/bl702_driver/regs;$(ProjectPath)../../../../drivers/bl702_driver/startup;$(ProjectPath)../../../../drivers/bl702_driver/std_drv/inc;$(ProjectPath)../../../../drivers/bl602_driver/risc-v/Core/Include;$(ProjectPath)../../../../drivers/bl602_driver/startup;$(ProjectPath)../../../../drivers/bl602_driver/hal_drv/inc;$(ProjectPath)../../../../drivers/bl602_driver/hal_drv/default_config;$(ProjectPath)../../../../drivers/bl602_driver/regs;$(ProjectPath)../../../../drivers/bl602_driver/std_drv/inc</IncludePath>
<IncludePath>$(ProjectPath);$(ProjectPath)../;$(ProjectPath)../../../../components/fatfs;$(ProjectPath)../../../../components/freertos/Source/include;$(ProjectPath)../../../../components/shell;$(ProjectPath)../../../../components/usb_stack/class/audio;$(ProjectPath)../../../../components/usb_stack/class/cdc;$(ProjectPath)../../../../components/usb_stack/class/hid;$(ProjectPath)../../../../components/usb_stack/class/msc;$(ProjectPath)../../../../components/usb_stack/class/video;$(ProjectPath)../../../../components/usb_stack/class/webusb;$(ProjectPath)../../../../components/usb_stack/class/winusb;$(ProjectPath)../../../../components/usb_stack/common;$(ProjectPath)../../../../components/usb_stack/core;$(ProjectPath)../../../../bsp/board/bl706_iot;$(ProjectPath)../../../../bsp/bsp_common/platform;$(ProjectPath)../../../../common/device;$(ProjectPath)../../../../common/list;$(ProjectPath)../../../../common/memheap;$(ProjectPath)../../../../common/misc;$(ProjectPath)../../../../common/ring_buffer;$(ProjectPath)../../../../common/soft_crc;$(ProjectPath)../../../../components/shell;$(ProjectPath)../../../../components/freertos/include;$(ProjectPath)../../../../components/freertos/portable/gcc/risc-v/bl702;$(ProjectPath)../../../../drivers/bl702_driver/hal_drv/default_config;$(ProjectPath)../../../../drivers/bl702_driver/hal_drv/inc;$(ProjectPath)../../../../drivers/bl702_driver/risc-v/Core/Include;$(ProjectPath)../../../../drivers/bl702_driver/regs;$(ProjectPath)../../../../drivers/bl702_driver/startup;$(ProjectPath)../../../../drivers/bl702_driver/std_drv/inc</IncludePath>
<OtherFlags/>
<DebugLevel>gdwarf2</DebugLevel>
</Asm>

View file

@ -477,7 +477,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -477,7 +477,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>
@ -788,7 +788,7 @@ Board: bl70x_iot
<UserProgName/>
</BeforeMake>
<AfterMake>
<RunUserProg>yes</RunUserProg>
<RunUserProg>no</RunUserProg>
<UserProgName>$(ProjectPath)../../../../tools/bflb_flash_tool/bflb_mcu_tool.exe --chipname=bl702 --interface=openocd --firmware="$(ProjectPath)/Obj/$(ProjectName).bin" </UserProgName>
</AfterMake>
</User>

View file

@ -477,7 +477,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -0,0 +1,920 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project Name="gpio_int" Version="1" Language="C">
<Description>CPU: RV32IMAFC
Chip: bl70x
Board: bl70x_iot
</Description>
<Dependencies Name="Debug"/>
<VirtualDirectory Name="app">
<File Name="../main.c">
<FileOption/>
</File>
</VirtualDirectory>
<VirtualDirectory Name="chip">
<VirtualDirectory Name="riscv">
<File Name="../../../../drivers/bl702_driver/startup/interrupt.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/startup/system_bl702.c">
<FileOption/>
</File>
</VirtualDirectory>
<VirtualDirectory Name="startup">
<File Name="../../../../drivers/bl702_driver/startup/GCC/entry.S">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/startup/GCC/start_load.c">
<FileOption/>
</File>
</VirtualDirectory>
</VirtualDirectory>
<VirtualDirectory Name="hal">
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dma.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_gpio.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_i2c.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_i2s.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_mtimer.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_pwm.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_spi.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_timer.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_uart.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_usb.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_clock.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_cam.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_mjpeg.c">
<FileOption/>
</File>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_aon.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_cam.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_clock.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_dac.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_dma.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_ef_ctrl.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_emac.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_glb.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_hbn.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_i2c.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_i2c_gpio_sim.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_i2s.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_ir.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_common.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_kys.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_l1c.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_mjpeg.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_pds.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_psram.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_pwm.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_qdec.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_romapi.c" ExcludeProjConfig="BuildSet;CK_Link_Debug;OpenOCD_Debug">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_romdriver.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_sec_dbg.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_sec_eng.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_sf_cfg.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_sf_cfg_ext.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_sf_ctrl.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_sflash.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_sflash_ext.c" ExcludeProjConfig="">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_spi.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_timer.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_uart.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_usb.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_xip_sflash.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_xip_sflash_ext.c">
<FileOption/>
</File>
</VirtualDirectory>
<VirtualDirectory Name="board">
<File Name="../../../../bsp/board/bl706_iot/board.c">
<FileOption/>
</File>
<File Name="../../../../bsp/bsp_common/platform/bflb_platform.c">
<FileOption/>
</File>
</VirtualDirectory>
<VirtualDirectory Name="common">
<File Name="../../../../common/device/drv_device.c">
<FileOption/>
</File>
<File Name="../../../../common/memheap/drv_mmheap.c">
<FileOption/>
</File>
<File Name="../../../../common/ring_buffer/ring_buffer.c">
<FileOption/>
</File>
<File Name="../../../../common/soft_crc/softcrc.c">
<FileOption/>
</File>
<VirtualDirectory Name="libc">
<File Name="../../../../common/libc/src/atof.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/atoi.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/atol.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/atoll.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/atox.c" ExcludeProjConfig="BuildSet;CK_Link_Debug;OpenOCD_Debug">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/bsearch.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/common.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/ctype_isalnum.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/ctype_isalpha.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/ctype_isascii.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/ctype_isblank.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/ctype_iscntrl.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/ctype_isdigit.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/ctype_isgraph.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/ctype_islower.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/ctype_isprint.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/ctype_ispunct.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/ctype_isspace.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/ctype_isupper.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/ctype_isxdigit.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/ctype_tolower.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/ctype_toupper.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/ctypes.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/fnmatch.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/jrand48.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/lrand48.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/memccpy.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/memchr.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/memcmp.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/memcpy.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/memmem.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/memrchr.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/memset.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/memswap.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/mrand48.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/nrand48.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/qsort.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/seed48.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/snprintf.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/sprintf.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/srand48.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/sscanf.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/stdlib.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strcasecmp.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strcat.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strchr.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strcmp.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strcpy.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strcspn.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strlcat.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strlcpy.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strlen.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strncasecmp.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strncat.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strncmp.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strncpy.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strnlen.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strntoimax.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strntoumax.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strpbrk.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strrchr.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strsep.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strspn.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strstr.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strtoimax.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strtok.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strtok_r.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strtol.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strtoll.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strtoul.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strtoull.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strtoumax.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strtox.c" ExcludeProjConfig="BuildSet;CK_Link_Debug;OpenOCD_Debug">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/strxspn.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/vsnprintf.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/vsprintf.c">
<FileOption/>
</File>
<File Name="../../../../common/libc/src/vsscanf.c">
<FileOption/>
</File>
</VirtualDirectory>
<File Name="../../../../common/misc/misc.c">
<FileOption/>
</File>
</VirtualDirectory>
<VirtualDirectory Name="script">
<File Name="../../../../tools/openocd/bl70x_gdb.init">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/regs/bl70x_reg.svc">
<FileOption/>
</File>
</VirtualDirectory>
<MonitorProgress>
<DebugLaunch>154</DebugLaunch>
<FlashOperate>104</FlashOperate>
</MonitorProgress>
<VirtualDirectory Name="components">
<VirtualDirectory Name="fatfs">
<File Name="../../../../components/fatfs/diskio.c">
<FileOption/>
</File>
<File Name="../../../../components/fatfs/ff.c">
<FileOption/>
</File>
<File Name="../../../../components/fatfs/ffsystem.c">
<FileOption/>
</File>
<File Name="../../../../components/fatfs/ffunicode.c">
<FileOption/>
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>
<VirtualDirectory Name="usb_stack">
<VirtualDirectory Name="class">
<VirtualDirectory Name="cdc">
<File Name="../../../../components/usb_stack/class/cdc/usbd_cdc.c">
<FileOption/>
</File>
</VirtualDirectory>
<VirtualDirectory Name="hid">
<File Name="../../../../components/usb_stack/class/hid/usbd_hid.c">
<FileOption/>
</File>
</VirtualDirectory>
<VirtualDirectory Name="msc">
<File Name="../../../../components/usb_stack/class/msc/usbd_msc.c">
<FileOption/>
</File>
</VirtualDirectory>
</VirtualDirectory>
<VirtualDirectory Name="core">
<File Name="../../../../components/usb_stack/core/usbd_core.c">
<FileOption/>
</File>
</VirtualDirectory>
</VirtualDirectory>
</VirtualDirectory>
<Dependencies Name="BuildSet"/>
<BuildConfigs>
<BuildConfig Name="OpenOCD_Debug">
<Target>
<ROMBank Selected="1">
<ROM1>
<InUse>no</InUse>
<Start>0x23000000</Start>
<Size>0x100000</Size>
</ROM1>
<ROM2>
<InUse>no</InUse>
<Start>0x22014000</Start>
<Size>0x4000</Size>
</ROM2>
<ROM3>
<InUse>no</InUse>
<Start>0x42018000</Start>
<Size>0x8000</Size>
</ROM3>
<ROM4>
<InUse>no</InUse>
<Start/>
<Size/>
</ROM4>
<ROM5>
<InUse>no</InUse>
<Start/>
<Size/>
</ROM5>
</ROMBank>
<RAMBank>
<RAM1>
<InUse>yes</InUse>
<Start>0x42020000</Start>
<Size>0xc000</Size>
<Init>yes</Init>
</RAM1>
<RAM2>
<InUse>no</InUse>
<Start/>
<Size/>
<Init>yes</Init>
</RAM2>
<RAM3>
<InUse>no</InUse>
<Start/>
<Size/>
<Init>yes</Init>
</RAM3>
<RAM4>
<InUse>no</InUse>
<Start/>
<Size/>
<Init>yes</Init>
</RAM4>
<RAM5>
<InUse>no</InUse>
<Start/>
<Size/>
<Init>yes</Init>
</RAM5>
</RAMBank>
<CPU>rv32imafc</CPU>
<UseMiniLib>no</UseMiniLib>
<Endian>little</Endian>
<UseHardFloat>no</UseHardFloat>
<UseEnhancedLRW>no</UseEnhancedLRW>
<UseContinueBuild>no</UseContinueBuild>
<UseSemiHost>no</UseSemiHost>
</Target>
<Output>
<OutputName>$(ProjectName)</OutputName>
<Type>Executable</Type>
<CreateHexFile>no</CreateHexFile>
<CreateBinFile>yes</CreateBinFile>
<Preprocessor>no</Preprocessor>
<Disassmeble>yes</Disassmeble>
<CallGraph>no</CallGraph>
<Map>yes</Map>
</Output>
<User>
<BeforeCompile>
<RunUserProg>no</RunUserProg>
<UserProgName/>
</BeforeCompile>
<BeforeMake>
<RunUserProg>no</RunUserProg>
<UserProgName/>
</BeforeMake>
<AfterMake>
<RunUserProg>no</RunUserProg>
<UserProgName>$(ProjectPath)../../../../tools/bflb_flash_tool/bflb_mcu_tool.exe --chipname=bl702 --interface=openocd --firmware="$(ProjectPath)/Obj/$(ProjectName).bin" </UserProgName>
</AfterMake>
</User>
<Compiler>
<Define>ARCH_RISCV;</Define>
<Undefine/>
<Optim>Optimize more (-O2)</Optim>
<DebugLevel>Default (-g)</DebugLevel>
<IncludePath>$(ProjectPath);$(ProjectPath)../;$(ProjectPath)../../../../components/fatfs;$(ProjectPath)../../../../components/freertos/Source/include;$(ProjectPath)../../../../components/shell;$(ProjectPath)../../../../components/usb_stack/class/audio;$(ProjectPath)../../../../components/usb_stack/class/cdc;$(ProjectPath)../../../../components/usb_stack/class/hid;$(ProjectPath)../../../../components/usb_stack/class/msc;$(ProjectPath)../../../../components/usb_stack/class/video;$(ProjectPath)../../../../components/usb_stack/class/webusb;$(ProjectPath)../../../../components/usb_stack/class/winusb;$(ProjectPath)../../../../components/usb_stack/common;$(ProjectPath)../../../../components/usb_stack/core;$(ProjectPath)../../../../bsp/board/bl706_iot;$(ProjectPath)../../../../bsp/bsp_common/platform;$(ProjectPath)../../../../common/libc/inc;$(ProjectPath)../../../../common/libc/inc/arm_gcc;$(ProjectPath)../../../../common/libc/inc/bits;$(ProjectPath)../../../../common/libc/inc/sys;$(ProjectPath)../../../../common/libc/src;$(ProjectPath)../../../../common/device;$(ProjectPath)../../../../common/list;$(ProjectPath)../../../../common/memheap;$(ProjectPath)../../../../common/misc;$(ProjectPath)../../../../common/ring_buffer;$(ProjectPath)../../../../common/soft_crc;$(ProjectPath)../../../../components/shell;$(ProjectPath)../../../../drivers/bl702_driver/hal_drv/default_config;$(ProjectPath)../../../../drivers/bl702_driver/risc-v/Core/Include;$(ProjectPath)../../../../drivers/bl702_driver/hal_drv/inc;$(ProjectPath)../../../../drivers/bl702_driver/regs;$(ProjectPath)../../../../drivers/bl702_driver/startup;$(ProjectPath)../../../../drivers/bl702_driver/std_drv/inc</IncludePath>
<OtherFlags>-fshort-enums -fno-common -fms-extensions -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -Wall -Wshift-negative-value -Wchar-subscripts -Wformat -Wuninitialized -Winit-self -fno-jump-tables -Wignored-qualifiers -Wswitch-default -Wunused -Wundef -msmall-data-limit=4</OtherFlags>
<Verbose>no</Verbose>
<Ansi>no</Ansi>
<Syntax>no</Syntax>
<Pedantic>no</Pedantic>
<PedanticErr>no</PedanticErr>
<InhibitWarn>no</InhibitWarn>
<AllWarn>yes</AllWarn>
<WarnErr>no</WarnErr>
<OneElfS>yes</OneElfS>
<Fstrict>no</Fstrict>
</Compiler>
<Asm>
<Define/>
<Undefine/>
<IncludePath>$(ProjectPath);$(ProjectPath)../;$(ProjectPath)../../../../components/fatfs;$(ProjectPath)../../../../components/freertos/Source/include;$(ProjectPath)../../../../components/shell;$(ProjectPath)../../../../components/usb_stack/class/audio;$(ProjectPath)../../../../components/usb_stack/class/cdc;$(ProjectPath)../../../../components/usb_stack/class/hid;$(ProjectPath)../../../../components/usb_stack/class/msc;$(ProjectPath)../../../../components/usb_stack/class/video;$(ProjectPath)../../../../components/usb_stack/class/webusb;$(ProjectPath)../../../../components/usb_stack/class/winusb;$(ProjectPath)../../../../components/usb_stack/common;$(ProjectPath)../../../../components/usb_stack/core;$(ProjectPath)../../../../bsp/board/bl706_iot;$(ProjectPath)../../../../bsp/bsp_common/platform;$(ProjectPath)../../../../common/device;$(ProjectPath)../../../../common/list;$(ProjectPath)../../../../common/memheap;$(ProjectPath)../../../../common/misc;$(ProjectPath)../../../../common/ring_buffer;$(ProjectPath)../../../../common/soft_crc;$(ProjectPath)../../../../components/shell;$(ProjectPath)../../../../drivers/bl702_driver/hal_drv/default_config;$(ProjectPath)../../../../drivers/bl702_driver/hal_drv/inc;$(ProjectPath)../../../../drivers/bl702_driver/risc-v/Core/Include;$(ProjectPath)../../../../drivers/bl702_driver/regs;$(ProjectPath)../../../../drivers/bl702_driver/startup;$(ProjectPath)../../../../drivers/bl702_driver/std_drv/inc;$(ProjectPath)../../../../drivers/bl602_driver/risc-v/Core/Include;$(ProjectPath)../../../../drivers/bl602_driver/startup;$(ProjectPath)../../../../drivers/bl602_driver/hal_drv/inc;$(ProjectPath)../../../../drivers/bl602_driver/hal_drv/default_config;$(ProjectPath)../../../../drivers/bl602_driver/regs;$(ProjectPath)../../../../drivers/bl602_driver/std_drv/inc</IncludePath>
<OtherFlags/>
<DebugLevel>gdwarf2</DebugLevel>
</Asm>
<Linker>
<Garbage>yes</Garbage>
<Garbage2>yes</Garbage2>
<LDFile>$(ProjectPath)../../../../drivers/bl702_driver/bl702_flash.ld</LDFile>
<LibName/>
<LibPath/>
<OtherFlags/>
<AutoLDFile>no</AutoLDFile>
<LinkType/>
</Linker>
<Debug>
<LoadApplicationAtStartup>yes</LoadApplicationAtStartup>
<Connector>OpenOCD</Connector>
<StopAt>yes</StopAt>
<StopAtText>main</StopAtText>
<InitFile/>
<AfterLoadFile>$(ProjectPath)/../../../../tools/openocd/bl70x_gdb.init</AfterLoadFile>
<AutoRun>yes</AutoRun>
<ResetType>Hard Reset</ResetType>
<SoftResetVal>23000000</SoftResetVal>
<ResetAfterLoad>no</ResetAfterLoad>
<Dumpcore>no</Dumpcore>
<DumpcoreText>$(ProjectPath)/$(ProjectName).cdkcore</DumpcoreText>
<ConfigICE>
<IP>localhost</IP>
<PORT>1025</PORT>
<CPUNumber>0</CPUNumber>
<Clock>2000</Clock>
<Delay>10</Delay>
<WaitReset>50</WaitReset>
<DDC>yes</DDC>
<TRST>no</TRST>
<DebugPrint>no</DebugPrint>
<Connect>Normal</Connect>
<ResetType>Hard Reset</ResetType>
<SoftResetVal>21000000</SoftResetVal>
<RTOSType>Bare Metal</RTOSType>
<DownloadToFlash>yes</DownloadToFlash>
<ResetAfterConnect>yes</ResetAfterConnect>
<GDBName/>
<GDBServerType>Local</GDBServerType>
<OtherFlags>-arch riscv</OtherFlags>
</ConfigICE>
<ConfigSIM>
<SIMTarget/>
<OtherFlags/>
<NoGraphic>yes</NoGraphic>
<Log>no</Log>
<SimTrace>no</SimTrace>
</ConfigSIM>
<ConfigOpenOCD>
<OpenOCDExecutablePath>openocd-hifive</OpenOCDExecutablePath>
<OpenOCDTelnetPortEnable>no</OpenOCDTelnetPortEnable>
<OpenOCDTelnetPort>4444</OpenOCDTelnetPort>
<OpenOCDTclPortEnable>no</OpenOCDTclPortEnable>
<OpenOCDTclPort>6666</OpenOCDTclPort>
<OpenOCDConfigOptions>-f ../../../../tools/openocd/if_rv_dbg_plus.cfg -f ../../../../tools/openocd/tgt_702.cfg</OpenOCDConfigOptions>
</ConfigOpenOCD>
</Debug>
<Flash>
<InitFile/>
<Erase>Erase Sectors</Erase>
<Algorithms Path="">bl70x_flasher.elf</Algorithms>
<Program>yes</Program>
<Verify>yes</Verify>
<ResetAndRun>no</ResetAndRun>
<ResetType>Hard Reset</ResetType>
<SoftResetVal/>
<External>no</External>
<Command/>
<Arguments/>
</Flash>
</BuildConfig>
<BuildConfig Name="CK_Link_Debug">
<Target>
<ROMBank Selected="1">
<ROM1>
<InUse>no</InUse>
<Start>0x23000000</Start>
<Size>0x100000</Size>
</ROM1>
<ROM2>
<InUse>no</InUse>
<Start>0x22014000</Start>
<Size>0x4000</Size>
</ROM2>
<ROM3>
<InUse>no</InUse>
<Start>0x42018000</Start>
<Size>0x8000</Size>
</ROM3>
<ROM4>
<InUse>no</InUse>
<Start/>
<Size/>
</ROM4>
<ROM5>
<InUse>no</InUse>
<Start/>
<Size/>
</ROM5>
</ROMBank>
<RAMBank>
<RAM1>
<InUse>yes</InUse>
<Start>0x42020000</Start>
<Size>0xc000</Size>
<Init>yes</Init>
</RAM1>
<RAM2>
<InUse>no</InUse>
<Start/>
<Size/>
<Init>yes</Init>
</RAM2>
<RAM3>
<InUse>no</InUse>
<Start/>
<Size/>
<Init>yes</Init>
</RAM3>
<RAM4>
<InUse>no</InUse>
<Start/>
<Size/>
<Init>yes</Init>
</RAM4>
<RAM5>
<InUse>no</InUse>
<Start/>
<Size/>
<Init>yes</Init>
</RAM5>
</RAMBank>
<CPU>rv32imafc</CPU>
<UseMiniLib>no</UseMiniLib>
<Endian>little</Endian>
<UseHardFloat>no</UseHardFloat>
<UseEnhancedLRW>no</UseEnhancedLRW>
<UseContinueBuild>no</UseContinueBuild>
<UseSemiHost>no</UseSemiHost>
</Target>
<Output>
<OutputName>$(ProjectName)</OutputName>
<Type>Executable</Type>
<CreateHexFile>no</CreateHexFile>
<CreateBinFile>yes</CreateBinFile>
<Preprocessor>no</Preprocessor>
<Disassmeble>yes</Disassmeble>
<CallGraph>no</CallGraph>
<Map>yes</Map>
</Output>
<User>
<BeforeCompile>
<RunUserProg>no</RunUserProg>
<UserProgName/>
</BeforeCompile>
<BeforeMake>
<RunUserProg>no</RunUserProg>
<UserProgName/>
</BeforeMake>
<AfterMake>
<RunUserProg>no</RunUserProg>
<UserProgName>$(ProjectPath)../../../../tools/bflb_flash_tool/bflb_mcu_tool.exe --chipname=bl702 --interface=openocd --firmware="$(ProjectPath)/Obj/$(ProjectName).bin" </UserProgName>
</AfterMake>
</User>
<Compiler>
<Define>ARCH_RISCV;</Define>
<Undefine/>
<Optim>Optimize more (-O2)</Optim>
<DebugLevel>Default (-g)</DebugLevel>
<IncludePath>$(ProjectPath);$(ProjectPath)../;$(ProjectPath)../../../../components/fatfs;$(ProjectPath)../../../../components/freertos/Source/include;$(ProjectPath)../../../../components/shell;$(ProjectPath)../../../../components/usb_stack/class/audio;$(ProjectPath)../../../../components/usb_stack/class/cdc;$(ProjectPath)../../../../components/usb_stack/class/hid;$(ProjectPath)../../../../components/usb_stack/class/msc;$(ProjectPath)../../../../components/usb_stack/class/video;$(ProjectPath)../../../../components/usb_stack/class/webusb;$(ProjectPath)../../../../components/usb_stack/class/winusb;$(ProjectPath)../../../../components/usb_stack/common;$(ProjectPath)../../../../components/usb_stack/core;$(ProjectPath)../../../../bsp/board/bl706_iot;$(ProjectPath)../../../../bsp/bsp_common/platform;$(ProjectPath)../../../../common/libc/inc;$(ProjectPath)../../../../common/libc/inc/arm_gcc;$(ProjectPath)../../../../common/libc/inc/bits;$(ProjectPath)../../../../common/libc/inc/sys;$(ProjectPath)../../../../common/libc/src;$(ProjectPath)../../../../common/device;$(ProjectPath)../../../../common/list;$(ProjectPath)../../../../common/memheap;$(ProjectPath)../../../../common/misc;$(ProjectPath)../../../../common/ring_buffer;$(ProjectPath)../../../../common/soft_crc;$(ProjectPath)../../../../components/shell;$(ProjectPath)../../../../drivers/bl702_driver/hal_drv/default_config;$(ProjectPath)../../../../drivers/bl702_driver/risc-v/Core/Include;$(ProjectPath)../../../../drivers/bl702_driver/hal_drv/inc;$(ProjectPath)../../../../drivers/bl702_driver/regs;$(ProjectPath)../../../../drivers/bl702_driver/startup;$(ProjectPath)../../../../drivers/bl702_driver/std_drv/inc;$(ProjectPath)../../../../drivers/bl602_driver/risc-v/Core/Include;$(ProjectPath)../../../../drivers/bl602_driver/hal_drv/inc;$(ProjectPath)../../../../drivers/bl602_driver/hal_drv/default_config;$(ProjectPath)../../../../drivers/bl602_driver/regs;$(ProjectPath)../../../../drivers/bl602_driver/std_drv/inc</IncludePath>
<OtherFlags>-fshort-enums -fno-common -fms-extensions -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -Wall -Wshift-negative-value -Wchar-subscripts -Wformat -Wuninitialized -Winit-self -fno-jump-tables -Wignored-qualifiers -Wswitch-default -Wunused -Wundef -msmall-data-limit=4</OtherFlags>
<Verbose>no</Verbose>
<Ansi>no</Ansi>
<Syntax>no</Syntax>
<Pedantic>no</Pedantic>
<PedanticErr>no</PedanticErr>
<InhibitWarn>no</InhibitWarn>
<AllWarn>yes</AllWarn>
<WarnErr>no</WarnErr>
<OneElfS>yes</OneElfS>
<Fstrict>no</Fstrict>
</Compiler>
<Asm>
<Define/>
<Undefine/>
<IncludePath>$(ProjectPath);$(ProjectPath)../;$(ProjectPath)../../../../components/fatfs;$(ProjectPath)../../../../components/freertos/Source/include;$(ProjectPath)../../../../components/shell;$(ProjectPath)../../../../components/usb_stack/class/audio;$(ProjectPath)../../../../components/usb_stack/class/cdc;$(ProjectPath)../../../../components/usb_stack/class/hid;$(ProjectPath)../../../../components/usb_stack/class/msc;$(ProjectPath)../../../../components/usb_stack/class/video;$(ProjectPath)../../../../components/usb_stack/class/webusb;$(ProjectPath)../../../../components/usb_stack/class/winusb;$(ProjectPath)../../../../components/usb_stack/common;$(ProjectPath)../../../../components/usb_stack/core;$(ProjectPath)../../../../bsp/board/bl706_iot;$(ProjectPath)../../../../bsp/bsp_common/platform;$(ProjectPath)../../../../common/device;$(ProjectPath)../../../../common/list;$(ProjectPath)../../../../common/memheap;$(ProjectPath)../../../../common/misc;$(ProjectPath)../../../../common/ring_buffer;$(ProjectPath)../../../../common/soft_crc;$(ProjectPath)../../../../components/shell;$(ProjectPath)../../../../drivers/bl702_driver/hal_drv/default_config;$(ProjectPath)../../../../drivers/bl702_driver/hal_drv/inc;$(ProjectPath)../../../../drivers/bl702_driver/risc-v/Core/Include;$(ProjectPath)../../../../drivers/bl702_driver/regs;$(ProjectPath)../../../../drivers/bl702_driver/startup;$(ProjectPath)../../../../drivers/bl702_driver/std_drv/inc;$(ProjectPath)../../../../drivers/bl602_driver/risc-v/Core/Include;$(ProjectPath)../../../../drivers/bl602_driver/startup;$(ProjectPath)../../../../drivers/bl602_driver/hal_drv/inc;$(ProjectPath)../../../../drivers/bl602_driver/hal_drv/default_config;$(ProjectPath)../../../../drivers/bl602_driver/regs;$(ProjectPath)../../../../drivers/bl602_driver/std_drv/inc</IncludePath>
<OtherFlags/>
<DebugLevel>gdwarf2</DebugLevel>
</Asm>
<Linker>
<Garbage>yes</Garbage>
<Garbage2>yes</Garbage2>
<LDFile>$(ProjectPath)../../../../drivers/bl702_driver/bl702_flash.ld</LDFile>
<LibName/>
<LibPath/>
<OtherFlags/>
<AutoLDFile>no</AutoLDFile>
<LinkType/>
</Linker>
<Debug>
<LoadApplicationAtStartup>yes</LoadApplicationAtStartup>
<Connector>ICE</Connector>
<StopAt>yes</StopAt>
<StopAtText>main</StopAtText>
<InitFile/>
<AfterLoadFile>$(ProjectPath)/../../../../tools/openocd/bl70x_gdb.init</AfterLoadFile>
<AutoRun>yes</AutoRun>
<ResetType>Hard Reset</ResetType>
<SoftResetVal>23000000</SoftResetVal>
<ResetAfterLoad>no</ResetAfterLoad>
<Dumpcore>no</Dumpcore>
<DumpcoreText>$(ProjectPath)/$(ProjectName).cdkcore</DumpcoreText>
<ConfigICE>
<IP>localhost</IP>
<PORT>1025</PORT>
<CPUNumber>0</CPUNumber>
<Clock>2000</Clock>
<Delay>10</Delay>
<WaitReset>50</WaitReset>
<DDC>yes</DDC>
<TRST>no</TRST>
<DebugPrint>no</DebugPrint>
<Connect>Normal</Connect>
<ResetType>Hard Reset</ResetType>
<SoftResetVal>21000000</SoftResetVal>
<RTOSType>Bare Metal</RTOSType>
<DownloadToFlash>yes</DownloadToFlash>
<ResetAfterConnect>yes</ResetAfterConnect>
<GDBName/>
<GDBServerType>Local</GDBServerType>
<OtherFlags>-arch riscv</OtherFlags>
</ConfigICE>
<ConfigSIM>
<SIMTarget/>
<OtherFlags/>
<NoGraphic>yes</NoGraphic>
<Log>no</Log>
<SimTrace>no</SimTrace>
</ConfigSIM>
<ConfigOpenOCD>
<OpenOCDExecutablePath>openocd-hifive</OpenOCDExecutablePath>
<OpenOCDTelnetPortEnable>no</OpenOCDTelnetPortEnable>
<OpenOCDTelnetPort>4444</OpenOCDTelnetPort>
<OpenOCDTclPortEnable>no</OpenOCDTclPortEnable>
<OpenOCDTclPort>6666</OpenOCDTclPort>
<OpenOCDConfigOptions>-f ../../../../tools/openocd/if_rv_dbg_plus.cfg -f ../../../../tools/openocd/tgt_702.cfg</OpenOCDConfigOptions>
</ConfigOpenOCD>
</Debug>
<Flash>
<InitFile/>
<Erase>Erase Sectors</Erase>
<Algorithms Path="">bl70x_flasher.elf</Algorithms>
<Program>yes</Program>
<Verify>yes</Verify>
<ResetAndRun>no</ResetAndRun>
<ResetType>Hard Reset</ResetType>
<SoftResetVal/>
<External>no</External>
<Command/>
<Arguments/>
</Flash>
</BuildConfig>
</BuildConfigs>
<DebugSessions>
<watchExpressions/>
<memoryExpressions>;;;</memoryExpressions>
<statistics>;;MHZ;</statistics>
<peripheralTabs>
<Tab disFormat="Hex">glb</Tab>
<Tab disFormat="Hex">uart</Tab>
</peripheralTabs>
<WatchDisplayFormat>1</WatchDisplayFormat>
<LocalDisplayFormat>1</LocalDisplayFormat>
<debugLayout/>
<memoryTabColSizeExpressions>100:8;100:8;100:8;100:8;</memoryTabColSizeExpressions>
</DebugSessions>
<DebugSessions>
<watchExpressions/>
<memoryExpressions>;;;</memoryExpressions>
<statistics>;;MHZ;</statistics>
<peripheralTabs>
<Tab disFormat="Hex">glb</Tab>
<Tab disFormat="Hex">uart</Tab>
</peripheralTabs>
<WatchDisplayFormat>1</WatchDisplayFormat>
<LocalDisplayFormat>1</LocalDisplayFormat>
<debugLayout/>
<memoryTabColSizeExpressions>100:8;100:8;100:8;100:8;</memoryTabColSizeExpressions>
</DebugSessions>
</Project>

View file

@ -477,7 +477,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -475,7 +475,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -475,7 +475,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -473,7 +473,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -468,7 +468,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../components/shell/drv_shell.c">
<File Name="../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -478,7 +478,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -478,7 +478,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -478,7 +478,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -480,7 +480,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -480,7 +480,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -480,7 +480,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -477,7 +477,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>
@ -793,7 +793,7 @@ Board: bl70x_iot
</AfterMake>
</User>
<Compiler>
<Define>BL702;BL702_EVB;ARCH_RISCV;</Define>
<Define>ARCH_RISCV;</Define>
<Undefine/>
<Optim>Optimize more (-O2)</Optim>
<DebugLevel>Default (-g)</DebugLevel>

View file

@ -1,5 +1,5 @@
set(mains main.c)
generate_bin()
set(mains main.c)
generate_bin()

View file

@ -477,7 +477,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -1,87 +1,87 @@
/**
* @file pwm_dc_motor.c
* @brief
*
* Copyright (c) 2021 Bouffalolab team
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
*/
#include "hal_pwm.h"
#include "hal_gpio.h"
#include "hal_clock.h"
int main(void)
{
pwm_dutycycle_config_t pwm_cfg[2];
pwm_cfg[0].threshold_low = 0;
pwm_cfg[0].threshold_high = 0;
pwm_cfg[1].threshold_low = 0;
pwm_cfg[1].threshold_high = 0;
bflb_platform_init(0);
pwm_register(PWM_CH0_INDEX, "dc_motor_ch0", DEVICE_OFLAG_RDWR);
pwm_register(PWM_CH1_INDEX, "dc_motor_ch1", DEVICE_OFLAG_RDWR);
struct device *dc_motor_ch0 = device_find("dc_motor_ch0");
struct device *dc_motor_ch1 = device_find("dc_motor_ch1");
if (dc_motor_ch0) {
PWM_DEV(dc_motor_ch0)->period = 32; //frequence = 32M/1/32 = 1Mhz
PWM_DEV(dc_motor_ch0)->threshold_low = 16;
PWM_DEV(dc_motor_ch0)->threshold_high = 32;
device_open(dc_motor_ch0, DEVICE_OFLAG_STREAM_TX);
pwm_channel_start(dc_motor_ch0);
}
if (dc_motor_ch1) {
PWM_DEV(dc_motor_ch1)->period = 32; //frequence = 32M/1/32 = 1Mhz
PWM_DEV(dc_motor_ch1)->threshold_low = 16;
PWM_DEV(dc_motor_ch1)->threshold_high = 32;
device_open(dc_motor_ch1, DEVICE_OFLAG_STREAM_TX);
pwm_channel_start(dc_motor_ch1);
}
while (1) {
pwm_cfg[1].threshold_low = 0;
pwm_cfg[1].threshold_high = 0;
device_control(dc_motor_ch1, DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG, &pwm_cfg[1]);
for (pwm_cfg[0].threshold_high = 16; pwm_cfg[0].threshold_high <= 32; pwm_cfg[0].threshold_high++) {
device_control(dc_motor_ch0, DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG, &pwm_cfg[0]);
bflb_platform_delay_ms(1000);
}
for (pwm_cfg[0].threshold_high = 32; 16 <= pwm_cfg[0].threshold_high && pwm_cfg[0].threshold_high <= 32; pwm_cfg[0].threshold_high--) {
device_control(dc_motor_ch0, DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG, &pwm_cfg[0]);
bflb_platform_delay_ms(1000);
}
pwm_cfg[0].threshold_low = 0;
pwm_cfg[0].threshold_high = 0;
device_control(dc_motor_ch0, DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG, &pwm_cfg[0]);
for (pwm_cfg[1].threshold_high = 16; pwm_cfg[1].threshold_high <= 32; pwm_cfg[1].threshold_high++) {
device_control(dc_motor_ch1, DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG, &pwm_cfg[1]);
bflb_platform_delay_ms(1000);
}
for (pwm_cfg[1].threshold_high = 32; 16 <= pwm_cfg[1].threshold_high && pwm_cfg[1].threshold_high <= 32; pwm_cfg[1].threshold_high--) {
device_control(dc_motor_ch1, DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG, &pwm_cfg[1]);
bflb_platform_delay_ms(1000);
}
}
}
/**
* @file pwm_dc_motor.c
* @brief
*
* Copyright (c) 2021 Bouffalolab team
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
*/
#include "hal_pwm.h"
#include "hal_gpio.h"
#include "hal_clock.h"
int main(void)
{
pwm_dutycycle_config_t pwm_cfg[2];
pwm_cfg[0].threshold_low = 0;
pwm_cfg[0].threshold_high = 0;
pwm_cfg[1].threshold_low = 0;
pwm_cfg[1].threshold_high = 0;
bflb_platform_init(0);
pwm_register(PWM_CH0_INDEX, "dc_motor_ch0", DEVICE_OFLAG_RDWR);
pwm_register(PWM_CH1_INDEX, "dc_motor_ch1", DEVICE_OFLAG_RDWR);
struct device *dc_motor_ch0 = device_find("dc_motor_ch0");
struct device *dc_motor_ch1 = device_find("dc_motor_ch1");
if (dc_motor_ch0) {
PWM_DEV(dc_motor_ch0)->period = 32; //frequence = 32K/1/32 = 1Khz
PWM_DEV(dc_motor_ch0)->threshold_low = 16;
PWM_DEV(dc_motor_ch0)->threshold_high = 32;
device_open(dc_motor_ch0, DEVICE_OFLAG_STREAM_TX);
pwm_channel_start(dc_motor_ch0);
}
if (dc_motor_ch1) {
PWM_DEV(dc_motor_ch1)->period = 32; //frequence = 32K/1/32 = 1Khz
PWM_DEV(dc_motor_ch1)->threshold_low = 16;
PWM_DEV(dc_motor_ch1)->threshold_high = 32;
device_open(dc_motor_ch1, DEVICE_OFLAG_STREAM_TX);
pwm_channel_start(dc_motor_ch1);
}
while (1) {
pwm_cfg[1].threshold_low = 0;
pwm_cfg[1].threshold_high = 0;
device_control(dc_motor_ch1, DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG, &pwm_cfg[1]);
for (pwm_cfg[0].threshold_high = 16; pwm_cfg[0].threshold_high <= 32; pwm_cfg[0].threshold_high++) {
device_control(dc_motor_ch0, DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG, &pwm_cfg[0]);
bflb_platform_delay_ms(1000);
}
for (pwm_cfg[0].threshold_high = 32; 16 <= pwm_cfg[0].threshold_high && pwm_cfg[0].threshold_high <= 32; pwm_cfg[0].threshold_high--) {
device_control(dc_motor_ch0, DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG, &pwm_cfg[0]);
bflb_platform_delay_ms(1000);
}
pwm_cfg[0].threshold_low = 0;
pwm_cfg[0].threshold_high = 0;
device_control(dc_motor_ch0, DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG, &pwm_cfg[0]);
for (pwm_cfg[1].threshold_high = 16; pwm_cfg[1].threshold_high <= 32; pwm_cfg[1].threshold_high++) {
device_control(dc_motor_ch1, DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG, &pwm_cfg[1]);
bflb_platform_delay_ms(1000);
}
for (pwm_cfg[1].threshold_high = 32; 16 <= pwm_cfg[1].threshold_high && pwm_cfg[1].threshold_high <= 32; pwm_cfg[1].threshold_high--) {
device_control(dc_motor_ch1, DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG, &pwm_cfg[1]);
bflb_platform_delay_ms(1000);
}
}
}

View file

@ -1,14 +1,16 @@
**board/bl706_iot/pinmux_config.h** 中 **CONFIG_GPIO20_FUNC**、**CONFIG_GPIO21_FUNC** 选择 **GPIO_FUN_PWM**
**board/bl706_iot/clock_config.h** 中
- **BSP_PWM_CLOCK_SOURCE** 选择 **ROOT_CLOCK_SOURCE_RC_32K**,也可选择其他时钟源,用其他时钟源时应注意 case 中的设置要匹配
- **BSP_PWM_CLOCK_DIV** 设置成 **1**
将两个通道分别接到 H 桥或半桥的两个通道
```bash
$ make APP=pwm_dc_motor BOARD=bl706_iot
```
**board/bl706_iot/pinmux_config.h** 中 **CONFIG_GPIO20_FUNC**、**CONFIG_GPIO21_FUNC** 选择 **GPIO_FUN_PWM**
**board/bl706_iot/clock_config.h** 中
- **BSP_PWM_CLOCK_SOURCE** 选择 **ROOT_CLOCK_SOURCE_RC_32K**,也可选择其他时钟源,用其他时钟源时应注意 case 中的设置要匹配
- **BSP_PWM_CLOCK_DIV** 设置成 **1**
将两个通道分别接到 H 桥或半桥的两个通道
```bash
$ make APP=pwm_dc_motor BOARD=bl706_iot
```
**正常运行后GPIO20 和 GPIO21 引脚分别先后输出 PWM 波**

View file

@ -477,7 +477,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -1,5 +1,5 @@
set(mains main.c)
generate_bin()
set(mains main.c)
generate_bin()

View file

@ -477,7 +477,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -1,139 +1,139 @@
/**
* @file pwm_step_motor.c
* @brief
*
* Copyright (c) 2021 Bouffalolab team
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
*/
#include "hal_pwm.h"
#include "hal_gpio.h"
#include "hal_clock.h"
/* 一二相励磁八拍A+B+,B+,B+A-,A-,A-B-,B-,B-A+,A+。。。。)
___ ___ ___
CH0 |___ ___ ___ ___ ___|
___ ___ ___
CH1 ___| |___ ___ ___ ___
___ ___ ___
CH2 ___ ___ ___| |___ ___
___ ___ ___
CH3 ___ ___ ___ ___ ___|
*/
struct device *motor_ch0;
struct device *motor_ch1;
struct device *motor_ch2;
struct device *motor_ch3;
enum motor_dir_type {
CW,
CCW,
STOP
};
void motor_set_dir(enum motor_dir_type dir)
{
pwm_dutycycle_config_t pwm_cfg[4];
if (dir == CW) {
pwm_cfg[0].threshold_low = 2;
pwm_cfg[0].threshold_high = 7;
pwm_cfg[1].threshold_low = 1;
pwm_cfg[1].threshold_high = 4;
pwm_cfg[2].threshold_low = 3;
pwm_cfg[2].threshold_high = 6;
pwm_cfg[3].threshold_low = 5;
pwm_cfg[3].threshold_high = 8;
}
else if (dir == CCW) {
pwm_cfg[0].threshold_low = 2;
pwm_cfg[0].threshold_high = 7;
pwm_cfg[1].threshold_low = 5;
pwm_cfg[1].threshold_high = 8;
pwm_cfg[2].threshold_low = 3;
pwm_cfg[2].threshold_high = 6;
pwm_cfg[3].threshold_low = 1;
pwm_cfg[3].threshold_high = 4;
} else if (dir == STOP) {
pwm_cfg[0].threshold_low = 0;
pwm_cfg[0].threshold_high = 0;
pwm_cfg[1].threshold_low = 0;
pwm_cfg[1].threshold_high = 0;
pwm_cfg[2].threshold_low = 0;
pwm_cfg[2].threshold_high = 0;
pwm_cfg[3].threshold_low = 0;
pwm_cfg[3].threshold_high = 0;
}
device_control(motor_ch0, DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG, &pwm_cfg[0]);
device_control(motor_ch1, DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG, &pwm_cfg[1]);
device_control(motor_ch2, DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG, &pwm_cfg[2]);
device_control(motor_ch3, DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG, &pwm_cfg[3]);
}
int main(void)
{
bflb_platform_init(0);
pwm_register(PWM_CH0_INDEX, "motor_ch0", DEVICE_OFLAG_RDWR);
pwm_register(PWM_CH1_INDEX, "motor_ch1", DEVICE_OFLAG_RDWR);
pwm_register(PWM_CH2_INDEX, "motor_ch2", DEVICE_OFLAG_RDWR);
pwm_register(PWM_CH3_INDEX, "motor_ch3", DEVICE_OFLAG_RDWR);
motor_ch0 = device_find("motor_ch0");
motor_ch1 = device_find("motor_ch1");
motor_ch2 = device_find("motor_ch2");
motor_ch3 = device_find("motor_ch3");
if (motor_ch0) {
PWM_DEV(motor_ch0)->period = 8; //frequence = 32K/32/8 = 125hz
PWM_DEV(motor_ch0)->threshold_low = 2;
PWM_DEV(motor_ch0)->threshold_high = 7;
PWM_DEV(motor_ch0)->polarity_invert_mode = ENABLE;
device_open(motor_ch0, DEVICE_OFLAG_STREAM_TX);
}
if (motor_ch1) {
PWM_DEV(motor_ch1)->period = 8; //frequence = 32K/32/8 = 125hz
PWM_DEV(motor_ch1)->threshold_low = 1;
PWM_DEV(motor_ch1)->threshold_high = 4;
device_open(motor_ch1, DEVICE_OFLAG_STREAM_TX);
}
if (motor_ch2) {
PWM_DEV(motor_ch2)->period = 8; //frequence = 32K/32/8 = 125hz
PWM_DEV(motor_ch2)->threshold_low = 3;
PWM_DEV(motor_ch2)->threshold_high = 6;
device_open(motor_ch2, DEVICE_OFLAG_STREAM_TX);
}
if (motor_ch3) {
PWM_DEV(motor_ch3)->period = 8; //frequence = 32K/32/8 = 125hz
PWM_DEV(motor_ch3)->threshold_low = 5;
PWM_DEV(motor_ch3)->threshold_high = 8;
device_open(motor_ch3, DEVICE_OFLAG_STREAM_TX);
}
pwm_channel_start(motor_ch0);
pwm_channel_start(motor_ch1);
pwm_channel_start(motor_ch2);
pwm_channel_start(motor_ch3);
while (1) {
motor_set_dir(CW);
bflb_platform_delay_ms(5000);
motor_set_dir(CCW);
bflb_platform_delay_ms(5000);
}
}
/**
* @file pwm_step_motor.c
* @brief
*
* Copyright (c) 2021 Bouffalolab team
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
*/
#include "hal_pwm.h"
#include "hal_gpio.h"
#include "hal_clock.h"
/* 一二相励磁八拍A+B+,B+,B+A-,A-,A-B-,B-,B-A+,A+。。。。)
___ ___ ___
CH0 |___ ___ ___ ___ ___|
___ ___ ___
CH1 ___| |___ ___ ___ ___
___ ___ ___
CH2 ___ ___ ___| |___ ___
___ ___ ___
CH3 ___ ___ ___ ___ ___|
*/
struct device *motor_ch0;
struct device *motor_ch1;
struct device *motor_ch2;
struct device *motor_ch3;
enum motor_dir_type {
CW,
CCW,
STOP
};
void motor_set_dir(enum motor_dir_type dir)
{
pwm_dutycycle_config_t pwm_cfg[4];
if (dir == CW) {
pwm_cfg[0].threshold_low = 2;
pwm_cfg[0].threshold_high = 7;
pwm_cfg[1].threshold_low = 1;
pwm_cfg[1].threshold_high = 4;
pwm_cfg[2].threshold_low = 3;
pwm_cfg[2].threshold_high = 6;
pwm_cfg[3].threshold_low = 5;
pwm_cfg[3].threshold_high = 8;
}
else if (dir == CCW) {
pwm_cfg[0].threshold_low = 2;
pwm_cfg[0].threshold_high = 7;
pwm_cfg[1].threshold_low = 5;
pwm_cfg[1].threshold_high = 8;
pwm_cfg[2].threshold_low = 3;
pwm_cfg[2].threshold_high = 6;
pwm_cfg[3].threshold_low = 1;
pwm_cfg[3].threshold_high = 4;
} else if (dir == STOP) {
pwm_cfg[0].threshold_low = 0;
pwm_cfg[0].threshold_high = 0;
pwm_cfg[1].threshold_low = 0;
pwm_cfg[1].threshold_high = 0;
pwm_cfg[2].threshold_low = 0;
pwm_cfg[2].threshold_high = 0;
pwm_cfg[3].threshold_low = 0;
pwm_cfg[3].threshold_high = 0;
}
device_control(motor_ch0, DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG, &pwm_cfg[0]);
device_control(motor_ch1, DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG, &pwm_cfg[1]);
device_control(motor_ch2, DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG, &pwm_cfg[2]);
device_control(motor_ch3, DEIVCE_CTRL_PWM_DUTYCYCLE_CONFIG, &pwm_cfg[3]);
}
int main(void)
{
bflb_platform_init(0);
pwm_register(PWM_CH0_INDEX, "motor_ch0", DEVICE_OFLAG_RDWR);
pwm_register(PWM_CH1_INDEX, "motor_ch1", DEVICE_OFLAG_RDWR);
pwm_register(PWM_CH2_INDEX, "motor_ch2", DEVICE_OFLAG_RDWR);
pwm_register(PWM_CH3_INDEX, "motor_ch3", DEVICE_OFLAG_RDWR);
motor_ch0 = device_find("motor_ch0");
motor_ch1 = device_find("motor_ch1");
motor_ch2 = device_find("motor_ch2");
motor_ch3 = device_find("motor_ch3");
if (motor_ch0) {
PWM_DEV(motor_ch0)->period = 8; //frequence = 32K/32/8 = 125hz
PWM_DEV(motor_ch0)->threshold_low = 2;
PWM_DEV(motor_ch0)->threshold_high = 7;
PWM_DEV(motor_ch0)->polarity_invert_mode = ENABLE;
device_open(motor_ch0, DEVICE_OFLAG_STREAM_TX);
}
if (motor_ch1) {
PWM_DEV(motor_ch1)->period = 8; //frequence = 32K/32/8 = 125hz
PWM_DEV(motor_ch1)->threshold_low = 1;
PWM_DEV(motor_ch1)->threshold_high = 4;
device_open(motor_ch1, DEVICE_OFLAG_STREAM_TX);
}
if (motor_ch2) {
PWM_DEV(motor_ch2)->period = 8; //frequence = 32K/32/8 = 125hz
PWM_DEV(motor_ch2)->threshold_low = 3;
PWM_DEV(motor_ch2)->threshold_high = 6;
device_open(motor_ch2, DEVICE_OFLAG_STREAM_TX);
}
if (motor_ch3) {
PWM_DEV(motor_ch3)->period = 8; //frequence = 32K/32/8 = 125hz
PWM_DEV(motor_ch3)->threshold_low = 5;
PWM_DEV(motor_ch3)->threshold_high = 8;
device_open(motor_ch3, DEVICE_OFLAG_STREAM_TX);
}
pwm_channel_start(motor_ch0);
pwm_channel_start(motor_ch1);
pwm_channel_start(motor_ch2);
pwm_channel_start(motor_ch3);
while (1) {
motor_set_dir(CW);
bflb_platform_delay_ms(5000);
motor_set_dir(CCW);
bflb_platform_delay_ms(5000);
}
}

View file

@ -1,17 +1,17 @@
**board/bl706_iot/pinmux_config.h** 中, 以下宏设置成 **GPIO_FUN_PWM**
- **CONFIG_GPIO10_FUNC**
- **CONFIG_GPIO11_FUNC**
- **CONFIG_GPIO12_FUNC**
- **CONFIG_GPIO3_FUNC**
**board/bl706_iot/clock_config.h** 中
- **BSP_PWM_CLOCK_SOURCE** 选择 **ROOT_CLOCK_SOURCE_RC_32K**,
- **BSP_PWM_CLOCK_DIV** 设置成 **32**
```bash
$ make APP=pwm_it BOARD=bl706_iot
**board/bl706_iot/pinmux_config.h** 中, 以下宏设置成 **GPIO_FUN_PWM**
- **CONFIG_GPIO10_FUNC**
- **CONFIG_GPIO11_FUNC**
- **CONFIG_GPIO12_FUNC**
- **CONFIG_GPIO3_FUNC**
**board/bl706_iot/clock_config.h** 中
- **BSP_PWM_CLOCK_SOURCE** 选择 **ROOT_CLOCK_SOURCE_RC_32K**,
- **BSP_PWM_CLOCK_DIV** 设置成 **32**
```bash
$ make APP=pwm_it BOARD=bl706_iot
```

View file

@ -468,7 +468,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../components/shell/drv_shell.c">
<File Name="../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -481,7 +481,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -476,7 +476,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>
@ -792,7 +792,7 @@ Board: bl70x_iot
</AfterMake>
</User>
<Compiler>
<Define>BL702;BL702_EVB;ARCH_RISCV;</Define>
<Define>ARCH_RISCV;</Define>
<Undefine/>
<Optim>Optimize more (-O2)</Optim>
<DebugLevel>Default (-g)</DebugLevel>

View file

@ -478,7 +478,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -475,7 +475,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -477,7 +477,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -477,7 +477,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -475,7 +475,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -473,7 +473,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>
@ -789,7 +789,7 @@ Board: bl70x_iot
</AfterMake>
</User>
<Compiler>
<Define>BL702;BL702_EVB;ARCH_RISCV;</Define>
<Define>ARCH_RISCV;</Define>
<Undefine/>
<Optim>Optimize more (-O2)</Optim>
<DebugLevel>Default (-g)</DebugLevel>

View file

@ -475,7 +475,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -475,7 +475,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -479,7 +479,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project Name="usb_cdc_loopback" Version="1" Language="C">
<Project Name="usb_cdc_acm2" Version="1" Language="C">
<Description>CPU: RV32IMAFC
Chip: bl70x
Board: bl70x_iot
@ -478,7 +478,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -478,7 +478,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -479,7 +479,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -473,7 +473,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>
@ -789,7 +789,7 @@ Board: bl70x_iot
</AfterMake>
</User>
<Compiler>
<Define>BL702;BL702_EVB;ARCH_RISCV;</Define>
<Define>ARCH_RISCV;</Define>
<Undefine/>
<Optim>Optimize more (-O2)</Optim>
<DebugLevel>Default (-g)</DebugLevel>

View file

@ -478,7 +478,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -479,7 +479,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>

View file

@ -486,7 +486,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<VirtualDirectory Name="shell">
<File Name="../../../../components/shell/drv_shell.c">
<File Name="../../../../components/shell/shell.c">
<FileOption/>
</File>
</VirtualDirectory>
@ -807,7 +807,7 @@ Board: bl70x_iot
</AfterMake>
</User>
<Compiler>
<Define>BL702;BL702_EVB;ARCH_RISCV;</Define>
<Define>ARCH_RISCV;</Define>
<Undefine/>
<Optim>Optimize more (-O2)</Optim>
<DebugLevel>Default (-g)</DebugLevel>