mirror of
https://github.com/Fishwaldo/bl_mcu_sdk.git
synced 2025-07-06 04:48:44 +00:00
[feat][examples/spi] add oled ssd1306 driver and badapple demo
This commit is contained in:
parent
97760e3633
commit
dc34d62ad7
7 changed files with 6708 additions and 0 deletions
5
examples/spi/spi_oled_badapple/CMakeLists.txt
Normal file
5
examples/spi/spi_oled_badapple/CMakeLists.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
set(BSP_COMMON_DIR ${CMAKE_SOURCE_DIR}/bsp/bsp_common)
|
||||
set(TARGET_REQUIRED_PRIVATE_INCLUDE ${BSP_COMMON_DIR}/ssd1306 examples/my_case/ssd1306)
|
||||
set(TARGET_REQUIRED_SRCS ${BSP_COMMON_DIR}/ssd1306/ssd1306.c)
|
||||
set(mains main.c)
|
||||
generate_bin()
|
5320
examples/spi/spi_oled_badapple/badapple.h
Normal file
5320
examples/spi/spi_oled_badapple/badapple.h
Normal file
File diff suppressed because it is too large
Load diff
708
examples/spi/spi_oled_badapple/cdk/ssd1306.cdkproj
Normal file
708
examples/spi/spi_oled_badapple/cdk/ssd1306.cdkproj
Normal file
|
@ -0,0 +1,708 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Project Name="ssd1306" 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>
|
||||
<File Name="../badapple.h">
|
||||
<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="bsp">
|
||||
<VirtualDirectory Name="board">
|
||||
<File Name="../../../../bsp/board/bl702/board.c">
|
||||
<FileOption/>
|
||||
</File>
|
||||
</VirtualDirectory>
|
||||
<VirtualDirectory Name="bsp_common">
|
||||
<File Name="../../../../bsp/bsp_common/platform/bflb_platform.c">
|
||||
<FileOption/>
|
||||
</File>
|
||||
<File Name="../../../../bsp/bsp_common/platform/syscalls.c">
|
||||
<FileOption/>
|
||||
</File>
|
||||
<VirtualDirectory Name="ssd1306">
|
||||
<File Name="../../../../bsp/bsp_common/ssd1306/ssd1306.c"/>
|
||||
<File Name="../../../../bsp/bsp_common/ssd1306/ssd1306.h"/>
|
||||
</VirtualDirectory>
|
||||
</VirtualDirectory>
|
||||
</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>
|
||||
<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>
|
||||
<File Name="../readme.md">
|
||||
<FileOption/>
|
||||
</File>
|
||||
</VirtualDirectory>
|
||||
<MonitorProgress>
|
||||
<DebugLaunch>90</DebugLaunch>
|
||||
<FlashOperate>37</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"/>
|
||||
<Dependencies Name="CK_Link_Debug"/>
|
||||
<Dependencies Name="OpenOCD_Debug"/>
|
||||
<DebugSessions>
|
||||
<watchExpressions/>
|
||||
<memoryExpressions>0x23000000;;;</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>
|
||||
<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>yes</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;BFLB_USE_HAL_DRIVER;bl706_iot</Define>
|
||||
<Undefine/>
|
||||
<Optim>Optimize more (-O2)</Optim>
|
||||
<DebugLevel>Default (-g)</DebugLevel>
|
||||
<IncludePath>$(ProjectPath);$(ProjectPath)../;$(ProjectPath)../../../../bsp/board/bl702;$(ProjectPath)../../../../bsp/bsp_common/platform;$(ProjectPath)../../../../common/device;$(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/list;$(ProjectPath)../../../../common/memheap;$(ProjectPath)../../../../common/misc;$(ProjectPath)../../../../common/ring_buffer;$(ProjectPath)../../../../common/soft_crc;$(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)../../../../drivers/bl702_driver/hal_drv/default_config;$(ProjectPath)../../../../drivers/bl702_driver/hal_drv/inc;$(ProjectPath)../../../../drivers/bl702_driver/regs;$(ProjectPath)../../../../drivers/bl702_driver/risc-v/Core/Include;$(ProjectPath)../../../../drivers/bl702_driver/startup;$(ProjectPath)../../../../drivers/bl702_driver/std_drv/inc;$(ProjectPath)/../../../../bsp/bsp_common/ssd1306</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 -Wignored-qualifiers -Wunused -Wundef -msmall-data-limit=4 -std=c99</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)../../../../bsp/board/bl702;$(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/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)../../../../drivers/bl602_driver/hal_drv/default_config;$(ProjectPath)../../../../drivers/bl602_driver/hal_drv/inc;$(ProjectPath)../../../../drivers/bl602_driver/regs;$(ProjectPath)../../../../drivers/bl602_driver/risc-v/Core/Include;$(ProjectPath)../../../../drivers/bl602_driver/startup;$(ProjectPath)../../../../drivers/bl602_driver/std_drv/inc;$(ProjectPath)../../../../drivers/bl702_driver/hal_drv/default_config;$(ProjectPath)../../../../drivers/bl702_driver/hal_drv/inc;$(ProjectPath)../../../../drivers/bl702_driver/regs;$(ProjectPath)../../../../drivers/bl702_driver/risc-v/Core/Include;$(ProjectPath)../../../../drivers/bl702_driver/startup;$(ProjectPath)../../../../drivers/bl702_driver/std_drv/inc;$(ProjectPath)/../../../../bsp/bsp_common/ssd1306</IncludePath>
|
||||
<OtherFlags/>
|
||||
<DebugLevel>gdwarf2</DebugLevel>
|
||||
</Asm>
|
||||
<Linker>
|
||||
<Garbage>yes</Garbage>
|
||||
<Garbage2>yes</Garbage2>
|
||||
<LDFile>$(ProjectPath)../../../../drivers/bl702_driver/bl702_flash.ld</LDFile>
|
||||
<LibName>c</LibName>
|
||||
<LibPath/>
|
||||
<OtherFlags>--specs=nano.specs -u _printf_float</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>
|
||||
<AfterResetFile/>
|
||||
<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>yes</External>
|
||||
<Command>$(ProjectPath)/../../../../tools/bflb_flash_tool/bflb_mcu_tool.exe</Command>
|
||||
<Arguments>--chipname=bl702 --firmware="$(ProjectPath)/Obj/$(ProjectName).bin"</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>yes</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;BFLB_USE_HAL_DRIVER;bl706_iot</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/bl702;$(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 -Wignored-qualifiers -Wunused -Wundef -msmall-data-limit=4 -std=c99</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/bl702;$(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>c</LibName>
|
||||
<LibPath/>
|
||||
<OtherFlags>--specs=nano.specs</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>
|
||||
<AfterResetFile/>
|
||||
<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>$(ProjectPath)/../../../../tools/bflb_flash_tool/bflb_mcu_tool.exe</Command>
|
||||
<Arguments>--chipname=bl702 --firmware="$(ProjectPath)/Obj/$(ProjectName).bin" </Arguments>
|
||||
</Flash>
|
||||
</BuildConfig>
|
||||
</BuildConfigs>
|
||||
</Project>
|
35
examples/spi/spi_oled_badapple/main.c
Normal file
35
examples/spi/spi_oled_badapple/main.c
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include "hal_spi.h"
|
||||
#include "hal_gpio.h"
|
||||
#include "ssd1306.h"
|
||||
#include "badapple.h"
|
||||
|
||||
void oled_draw_logo(uint8_t x, uint8_t y, uint8_t index, uint8_t mode);
|
||||
void badapple_display(void);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
bflb_platform_init(0);
|
||||
oled_init();
|
||||
|
||||
oled_draw_bmp(0, 0, (unsigned char *)logo, 0, 1);
|
||||
oled_show();
|
||||
bflb_platform_delay_ms(2000);
|
||||
oled_draw_bmp(0, 0, (unsigned char *)logo, 1, 1);
|
||||
oled_show();
|
||||
bflb_platform_delay_ms(2000);
|
||||
|
||||
while (1)
|
||||
badapple_display();
|
||||
|
||||
BL_CASE_SUCCESS;
|
||||
}
|
||||
|
||||
void badapple_display(void)
|
||||
{
|
||||
uint8_t t;
|
||||
for (t = 0; t < 175; t++) {
|
||||
oled_draw_bmp(0, 0, (unsigned char *)Image, t, 1);
|
||||
oled_show();
|
||||
bflb_platform_delay_ms(200);
|
||||
}
|
||||
}
|
5
examples/spi/spi_oled_badapple/readme.md
Normal file
5
examples/spi/spi_oled_badapple/readme.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
```bash
|
||||
|
||||
$ make APP=spi_oled_badapple BOARD=bl706_avb
|
||||
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue