[fix] update examples cdk project

This commit is contained in:
jzlv 2021-06-04 17:51:00 +08:00
parent c2f3072455
commit 5cca7f0193
57 changed files with 473 additions and 547 deletions

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -25,11 +25,10 @@
#define ADC_SCAN_NUM (50)
uint8_t PinList[] = {GPIO_PIN_11, GPIO_PIN_12};
adc_channel_t posChList[] = {ADC_CHANNEL3};
adc_channel_t negChList[] = {ADC_CHANNEL4};
adc_res_val_t result_val;
adc_channel_val_t result_val;
struct device* adc_test;
@ -37,31 +36,29 @@ int main(void)
{
bflb_platform_init(0);
adc_user_cfg_t adc_user_cfg;
adc_channel_cfg_t adc_channel_cfg;
adc_user_cfg.dma_en = DISABLE; // disable dma
adc_user_cfg.conv_mode = ADC_CON_CONV; // continuous conversion
adc_user_cfg.in_mode = ADC_DIFFERENTIAL_IN; // differential input mode
adc_user_cfg.pinList = PinList;
adc_user_cfg.posChList = posChList;
adc_user_cfg.negChList = negChList;
adc_user_cfg.num = sizeof(posChList)/sizeof(adc_channel_t);
adc_channel_cfg.pos_channel = posChList;
adc_channel_cfg.neg_channel = negChList;
adc_channel_cfg.num = 1;
MSG("adc one-shot differential test case \r\n");
adc_register(ADC0_INDEX, "adc_one_diff", DEVICE_OFLAG_STREAM_RX, &adc_user_cfg);
adc_register(ADC0_INDEX, "adc_one_diff", DEVICE_OFLAG_STREAM_RX);
adc_test = device_find("adc_one_diff");
if(adc_test)
{
ADC_DEV(adc_test)->differential_mode = ENABLE;
ADC_DEV(adc_test)->continuous_conv_mode = ENABLE;
device_open(adc_test, DEVICE_OFLAG_STREAM_RX);
device_control(adc_test,DEVICE_CTRL_ADC_CHANNEL_CONFIG,&adc_channel_cfg);
MSG("adc device find success\r\n");
}
device_control(adc_test,DEVICE_CTRL_RESUME,0);
adc_channel_start(adc_test);
while (1)
{
device_read(adc_test, 0, (void *)&result_val,sizeof(result_val)/sizeof(adc_res_val_t));
device_read(adc_test, 0, (void *)&result_val,sizeof(result_val)/sizeof(adc_channel_val_t));
if(result_val.volt <= 0)
{
result_val.volt = -result_val.volt;

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -23,11 +23,10 @@
#include "hal_adc.h"
#include "hal_gpio.h"
uint8_t PinList[] = {GPIO_PIN_12};
adc_channel_t posChList[] = {ADC_CHANNEL4};
adc_channel_t negChList[] = {ADC_CHANNEL_GND};
adc_res_val_t result_val;
adc_channel_val_t result_val;
struct device* adc_test;
@ -35,34 +34,31 @@ int main(void)
{
bflb_platform_init(0);
adc_user_cfg_t adc_user_cfg;
adc_channel_cfg_t adc_channel_cfg;
adc_user_cfg.dma_en = DISABLE; // disable dma
adc_user_cfg.conv_mode = ADC_CON_CONV; // continuous conversion
adc_user_cfg.in_mode = ADC_SINGLE_ENDED_IN; // single-ended input mode
adc_user_cfg.pinList = PinList;
adc_user_cfg.posChList = posChList;
adc_user_cfg.negChList = negChList;
adc_user_cfg.num = sizeof(posChList)/sizeof(adc_channel_t);
adc_channel_cfg.pos_channel = posChList;
adc_channel_cfg.neg_channel = negChList;
adc_channel_cfg.num = 1;
MSG("adc continue single ended test case \r\n");
adc_register(ADC0_INDEX, "adc_continue_single", DEVICE_OFLAG_STREAM_RX, &adc_user_cfg);
adc_register(ADC0_INDEX, "adc_continue_single", DEVICE_OFLAG_STREAM_RX);
adc_test = device_find("adc_continue_single");
if(adc_test)
{
ADC_DEV(adc_test)->continuous_conv_mode = ENABLE;
device_open(adc_test, DEVICE_OFLAG_STREAM_RX);
device_control(adc_test,DEVICE_CTRL_ADC_CHANNEL_CONFIG,&adc_channel_cfg);
MSG("adc device find success\r\n");
}
device_control(adc_test,DEVICE_CTRL_RESUME,0);
adc_channel_start(adc_test);
while (1)
{
device_read(adc_test, 0, (void *)&result_val,sizeof(result_val)/sizeof(adc_res_val_t));
device_read(adc_test, 0, (void *)&result_val,sizeof(result_val)/sizeof(adc_channel_val_t));
MSG("PosId = %d NegId = %d V= %d mV \r\n",result_val.posChan,result_val.negChan,(uint32_t)(result_val.volt * 1000));
// bflb_platform_delay_ms(500);
bflb_platform_delay_ms(500);
}
}

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -38,10 +38,9 @@ typedef struct {
uint16_t keyValue[KEY_FILTER_NUM];
}adc_keys_status;
uint8_t PinList[] = {GPIO_PIN_18};
adc_channel_t posChList[] = {ADC_CHANNEL8};
adc_channel_t negChList[] = {ADC_CHANNEL_GND};
adc_res_val_t result_val;
adc_channel_val_t result_val;
adc_keys_status key_machine;
@ -92,7 +91,7 @@ static int get_adc_key_value(uint32_t Vmv){
volatile uint16_t key_num[5] = {0};
uint8_t bigger = 0, i = 0, j = 0;
if(Vmv > KEY0_ADC_VALUE && Vmv < KEY4_ADC_VALUE + KEY_MEASURE_OFFSET){
if(Vmv >= KEY0_ADC_VALUE && Vmv <= KEY4_ADC_VALUE + KEY_MEASURE_OFFSET){
key_machine.keyValue[key_machine.vaildKeyNum] = get_adc_value_range(Vmv);
key_machine.vaildKeyNum++;
@ -150,32 +149,30 @@ int main(void)
bflb_platform_init(0);
uint16_t keyValue=0;
adc_user_cfg_t adc_user_cfg;
adc_channel_cfg_t adc_channel_cfg;
adc_user_cfg.dma_en = DISABLE;
adc_user_cfg.conv_mode = ADC_CON_CONV;
adc_user_cfg.in_mode = ADC_SINGLE_ENDED_IN;
adc_channel_cfg.pos_channel = posChList;
adc_channel_cfg.neg_channel = negChList;
adc_channel_cfg.num = 1;
adc_user_cfg.pinList = PinList;
adc_user_cfg.posChList = posChList;
adc_user_cfg.negChList = negChList;
adc_user_cfg.num = sizeof(posChList)/sizeof(adc_channel_t);
adc_register(ADC0_INDEX, "adc_key", DEVICE_OFLAG_STREAM_RX, &adc_user_cfg);
adc_register(ADC0_INDEX, "adc_key", DEVICE_OFLAG_STREAM_RX);
adc_key = device_find("adc_key");
if(adc_key)
{
ADC_DEV(adc_key)->continuous_conv_mode = ENABLE;
device_open(adc_key, DEVICE_OFLAG_STREAM_RX);
device_control(adc_key,DEVICE_CTRL_ADC_CHANNEL_CONFIG,&adc_channel_cfg);
}else{
MSG("device open failed\r\n");
}
device_control(adc_key,DEVICE_CTRL_RESUME,0);
key_machine_init();
adc_channel_start(adc_key);
while (1)
{
device_read(adc_key,0,(void *)&result_val,1);

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -25,11 +25,10 @@
#define ADC_SCAN_NUM (50)
uint8_t PinList[] = {GPIO_PIN_11, GPIO_PIN_12};
adc_channel_t posChList[] = {ADC_CHANNEL3};
adc_channel_t negChList[] = {ADC_CHANNEL4};
adc_res_val_t result_val;
adc_channel_val_t result_val;
struct device* adc_test;
@ -37,31 +36,28 @@ int main(void)
{
bflb_platform_init(0);
adc_user_cfg_t adc_user_cfg;
adc_channel_cfg_t adc_channel_cfg;
adc_user_cfg.dma_en = DISABLE; // disable dma
adc_user_cfg.conv_mode = ADC_ONE_CONV; // single conversion
adc_user_cfg.in_mode = ADC_DIFFERENTIAL_IN; // differential input mode
adc_user_cfg.pinList = PinList;
adc_user_cfg.posChList = posChList;
adc_user_cfg.negChList = negChList;
adc_user_cfg.num = sizeof(posChList)/sizeof(adc_channel_t);
adc_channel_cfg.pos_channel = posChList;
adc_channel_cfg.neg_channel = negChList;
adc_channel_cfg.num = 1;
MSG("adc one-shot differential test case \r\n");
adc_register(ADC0_INDEX, "adc_one_diff", DEVICE_OFLAG_STREAM_RX, &adc_user_cfg);
adc_register(ADC0_INDEX, "adc_one_diff", DEVICE_OFLAG_STREAM_RX);
adc_test = device_find("adc_one_diff");
if(adc_test)
{
ADC_DEV(adc_test)->differential_mode = ENABLE;
device_open(adc_test, DEVICE_OFLAG_STREAM_RX);
device_control(adc_test,DEVICE_CTRL_ADC_CHANNEL_CONFIG,&adc_channel_cfg);
MSG("adc device find success\r\n");
}
for(uint32_t i = 0; i < ADC_SCAN_NUM; i++ )
{
device_control(adc_test,DEVICE_CTRL_RESUME,0);
device_read(adc_test, 0, (void *)&result_val,sizeof(result_val)/sizeof(adc_res_val_t));
adc_channel_start(adc_test);
device_read(adc_test, 0, (void *)&result_val,sizeof(result_val)/sizeof(adc_channel_val_t));
if(result_val.volt <= 0)
{
result_val.volt = -result_val.volt;

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -25,11 +25,10 @@
#define ADC_SCAN_NUM (100)
uint8_t PinList[] = {GPIO_PIN_11};
adc_channel_t posChList[] = {ADC_CHANNEL3};
adc_channel_t negChList[] = {ADC_CHANNEL_GND};
adc_res_val_t result_val;
adc_channel_val_t result_val;
struct device* adc_test;
@ -37,31 +36,27 @@ int main(void)
{
bflb_platform_init(0);
adc_user_cfg_t adc_user_cfg;
adc_channel_cfg_t adc_channel_cfg;
adc_user_cfg.dma_en = DISABLE; // disable dma
adc_user_cfg.conv_mode = ADC_ONE_CONV; // single conversion
adc_user_cfg.in_mode = ADC_SINGLE_ENDED_IN; // single-ended input mode
adc_user_cfg.pinList = PinList;
adc_user_cfg.posChList = posChList;
adc_user_cfg.negChList = negChList;
adc_user_cfg.num = sizeof(posChList)/sizeof(adc_channel_t);
adc_channel_cfg.pos_channel = posChList;
adc_channel_cfg.neg_channel = negChList;
adc_channel_cfg.num = 1;
MSG("adc one-shot single ended test case \r\n");
adc_register(ADC0_INDEX, "adc_one_single", DEVICE_OFLAG_STREAM_RX, &adc_user_cfg);
adc_register(ADC0_INDEX, "adc_one_single", DEVICE_OFLAG_STREAM_RX);
adc_test = device_find("adc_one_single");
if(adc_test)
{
device_open(adc_test, DEVICE_OFLAG_STREAM_RX);
device_control(adc_test,DEVICE_CTRL_ADC_CHANNEL_CONFIG,&adc_channel_cfg);
MSG("adc device find success\r\n");
}
for(uint32_t i = 0; i < ADC_SCAN_NUM; i++ )
{
device_control(adc_test,DEVICE_CTRL_RESUME,0);
device_read(adc_test, 0, (void *)&result_val,sizeof(result_val)/sizeof(adc_res_val_t));
adc_channel_start(adc_test);
device_read(adc_test, 0, (void *)&result_val,sizeof(result_val)/sizeof(adc_channel_val_t));
MSG("PosId = %d NegId = %d V= %d mV \r\n",result_val.posChan,result_val.negChan,(uint32_t)(result_val.volt * 1000));
bflb_platform_delay_ms(500);
}

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -25,11 +25,10 @@
#define ADC_SCAN_NUM (50)
uint8_t PinList[] = {GPIO_PIN_11,GPIO_PIN_12};
adc_channel_t posChList[] = {ADC_CHANNEL3,ADC_CHANNEL4};
adc_channel_t negChList[] = {ADC_CHANNEL_GND,ADC_CHANNEL_GND};
adc_res_val_t result_val;
adc_channel_val_t result_val;
struct device* adc_test;
@ -37,31 +36,28 @@ int main(void)
{
bflb_platform_init(0);
adc_user_cfg_t adc_user_cfg;
adc_channel_cfg_t adc_channel_cfg;
adc_user_cfg.dma_en = DISABLE; // disable dma
adc_user_cfg.conv_mode = ADC_CON_CONV; // single conversion
adc_user_cfg.in_mode = ADC_SINGLE_ENDED_IN; // single-ended input mode
adc_user_cfg.pinList = PinList;
adc_user_cfg.posChList = posChList;
adc_user_cfg.negChList = negChList;
adc_user_cfg.num = sizeof(posChList)/sizeof(adc_channel_t);
adc_channel_cfg.pos_channel = posChList;
adc_channel_cfg.neg_channel = negChList;
adc_channel_cfg.num = 2;
MSG("adc one-shot single ended test case \r\n");
adc_register(ADC0_INDEX, "adc_one_single", DEVICE_OFLAG_STREAM_RX, &adc_user_cfg);
adc_register(ADC0_INDEX, "adc_one_single", DEVICE_OFLAG_STREAM_RX);
adc_test = device_find("adc_one_single");
if(adc_test)
{
ADC_DEV(adc_test)->continuous_conv_mode = ENABLE;
device_open(adc_test, DEVICE_OFLAG_STREAM_RX);
device_control(adc_test,DEVICE_CTRL_ADC_CHANNEL_CONFIG,&adc_channel_cfg);
MSG("adc device find success\r\n");
}
for(uint32_t i = 0; i < ADC_SCAN_NUM; i++ )
{
device_control(adc_test,DEVICE_CTRL_RESUME,0);
device_read(adc_test, 0, (void *)&result_val,sizeof(result_val)/sizeof(adc_res_val_t));
adc_channel_start(adc_test);
device_read(adc_test, 0, (void *)&result_val,sizeof(result_val)/sizeof(adc_channel_val_t));
MSG("PosId = %d NegId = %d V= %d mV \r\n",result_val.posChan,result_val.negChan,(uint32_t)(result_val.volt * 1000));
// bflb_platform_delay_ms(10);
}

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -23,36 +23,32 @@
#include "hal_adc.h"
#include "hal_gpio.h"
uint8_t PinList[] = {GPIO_PIN_18}; // ADC Pin list setting
adc_channel_t posChList[] = {ADC_CHANNEL_VABT_HALF}; // ADC Positive channel list setting
adc_channel_t negChList[] = {ADC_CHANNEL_GND}; // ADC Negative channel list setting
struct device* vbat_test;
adc_res_val_t result;
adc_channel_val_t result;
int main(void)
{
bflb_platform_init(0);
adc_user_cfg_t adc_user_cfg;
adc_channel_cfg_t adc_channel_cfg;
adc_user_cfg.dma_en = DISABLE; // disable dma
adc_user_cfg.conv_mode = ADC_ONE_CONV; // single conversion
adc_user_cfg.in_mode = ADC_SINGLE_ENDED_IN; // single-ended input mode
adc_channel_cfg.pos_channel = posChList;
adc_channel_cfg.neg_channel = negChList;
adc_channel_cfg.num = 1;
adc_user_cfg.pinList = PinList;
adc_user_cfg.posChList = posChList;
adc_user_cfg.negChList = negChList;
adc_user_cfg.num = sizeof(posChList)/sizeof(adc_channel_t);
adc_register(ADC0_INDEX, "adc_vbat_test", DEVICE_OFLAG_STREAM_RX, &adc_user_cfg);
adc_register(ADC0_INDEX, "adc_vbat_test", DEVICE_OFLAG_STREAM_RX);
vbat_test = device_find("adc_vbat_test");
if(vbat_test)
{
MSG("adc vbat test device find success\r\n");
device_open(vbat_test,DEVICE_OFLAG_STREAM_RX);
device_control(vbat_test,DEVICE_CTRL_ADC_VBAT_ON,NULL);
device_control(vbat_test,DEVICE_CTRL_ADC_CHANNEL_CONFIG,&adc_channel_cfg);
}
while(1){
@ -60,7 +56,7 @@ int main(void)
MSG("adc vbat test case\r\n");
for(uint8_t i=0;i<10;i++)
{
device_control(vbat_test,DEVICE_CTRL_RESUME,NULL);
adc_channel_start(vbat_test);
device_read(vbat_test,0,&result,1);
MSG("vBat = %d mV\n",(uint32_t)(result.volt * 2000));

View file

@ -7,23 +7,30 @@
<Project Name="adc_one_shot_single_ended" Path="adc/adc_one_shot_single_ended/cdk/adc_one_shot_single_ended.cdkproj" Active="No"/>
<Project Name="adc_scan_single_ended" Path="adc/adc_scan_single_ended/cdk/adc_scan_single_ended.cdkproj" Active="No"/>
<Project Name="adc_vbat_poll" Path="adc/adc_vbat_poll/cdk/adc_vbat_poll.cdkproj" Active="No"/>
<Project Name="coremark" Path="coremark/cdk/coremark.cdkproj" Active="No"/>
<Project Name="dac_dma" Path="dac/dac_dma/cdk/dac_dma.cdkproj" Active="No"/>
<Project Name="dhrystone" Path="dhrystone/cdk/dhrystone.cdkproj" Active="No"/>
<Project Name="dma_m2m" Path="dma/dma_m2m/cdk/dma_m2m.cdkproj" Active="No"/>
<Project Name="gpio_blink" Path="gpio/gpio_blink/cdk/gpio_blink.cdkproj" Active="No"/>
<Project Name="i2c_at24cxx" Path="i2c/i2c_at24cxx/cdk/i2c_at24cxx.cdkproj" Active="No"/>
<Project Name="i2c_bmp180" Path="i2c/i2c_bmp180/cdk/i2c_bmp180.cdkproj" Active="No"/>
<Project Name="i2s_dma" Path="i2s/i2s_dma/cdk/i2s_dma.cdkproj" Active="No"/>
<Project Name="memheap" Path="memheap/cdk/memheap.cdkproj" Active="No"/>
<Project Name="spi_dma_sd" Path="spi/spi_dma_sd/cdk/spi_dma_sd.cdkproj" Active="No"/>
<Project Name="spi_loopback" Path="spi/spi_loopback/cdk/spi_loopback.cdkproj" Active="No"/>
<Project Name="spi_lcd" Path="spi/spi_lcd/cdk/spi_lcd.cdkproj" Active="No"/>
<Project Name="uart_dma" Path="uart/uart_dma/cdk/uart_dma.cdkproj" Active="No"/>
<Project Name="uart_echo" Path="uart/uart_echo/cdk/uart_echo.cdkproj" Active="No"/>
<Project Name="uart_poll" Path="uart/uart_poll/cdk/uart_poll.cdkproj" Active="No"/>
<Project Name="uart_rx_it" Path="uart/uart_rx_it/cdk/uart_rx_it.cdkproj" Active="No"/>
<Project Name="usb_cdc_loopback" Path="usb/usb_cdc_loopback/cdk/usb_cdc_loopback.cdkproj" Active="No"/>
<Project Name="usb_cdc_msc" Path="usb/usb_cdc_msc/cdk/usb_cdc_msc.cdkproj" Active="No"/>
<Project Name="usb_msc_ram" Path="usb/usb_msc_ram/cdk/usb_msc_ram.cdkproj" Active="No"/>
<Project Name="usb_msc_sd" Path="usb/usb_msc_sd/cdk/usb_msc_sd.cdkproj" Active="No"/>
<Project Name="usb2uart_ftdi" Path="usb/usb2uart_ft232r/cdk/usb2uart_ftdi.cdkproj" Active="No"/>
<Project Name="usb2uart_st" Path="usb/usb2uart/cdk/usb2uart_st.cdkproj" Active="No"/>
<Project Name="usb_video" Path="usb/usb_video/cdk/usb_video.cdkproj" Active="No"/>
<Project Name="pwm_breath_led" Path="pwm/pwm_breath_led/cdk/pwm_breath_led.cdkproj" Active="No"/>
<Project Name="flash_rw_test" Path="flash/flash_rw_test/cdk/flash_rw_test.cdkproj" Active="No"/>
<BuildMatrix>
<WorkspaceConfiguration Name="Debug" Selected="yes">
<Environment/>
@ -34,24 +41,31 @@
<Project Name="adc_one_shot_single_ended" ConfigName="BuildSet"/>
<Project Name="adc_scan_single_ended" ConfigName="BuildSet"/>
<Project Name="adc_vbat_poll" ConfigName="BuildSet"/>
<Project Name="coremark" ConfigName="BuildSet"/>
<Project Name="dac_dma" ConfigName="BuildSet"/>
<Project Name="dac_poll" ConfigName="BuildSet"/>
<Project Name="dhrystone" ConfigName="BuildSet"/>
<Project Name="dma_m2m" ConfigName="BuildSet"/>
<Project Name="gpio_blink" ConfigName="BuildSet"/>
<Project Name="i2c_at24cxx" ConfigName="BuildSet"/>
<Project Name="i2c_bmp180" ConfigName="BuildSet"/>
<Project Name="i2s_dma" ConfigName="BuildSet"/>
<Project Name="memheap" ConfigName="BuildSet"/>
<Project Name="spi_dma_sd" ConfigName="BuildSet"/>
<Project Name="spi_loopback" ConfigName="BuildSet"/>
<Project Name="spi_lcd" ConfigName="BuildSet"/>
<Project Name="uart_dma" ConfigName="BuildSet"/>
<Project Name="uart_echo" ConfigName="BuildSet"/>
<Project Name="uart_poll" ConfigName="BuildSet"/>
<Project Name="uart_rx_it" ConfigName="BuildSet"/>
<Project Name="usb_cdc_loopback" ConfigName="BuildSet"/>
<Project Name="usb_cdc_msc" ConfigName="BuildSet"/>
<Project Name="pwm_breath_led" ConfigName="BuildSet"/>
<Project Name="usb_msc_ram" ConfigName="BuildSet"/>
<Project Name="usb_msc_sd" ConfigName="BuildSet"/>
<Project Name="usb2uart_ftdi" ConfigName="BuildSet"/>
<Project Name="usb2uart_st" ConfigName="BuildSet"/>
<Project Name="usb_video" ConfigName="BuildSet"/>
<Project Name="pwm_breath_led" ConfigName="BuildSet"/>
<Project Name="flash_rw_test" ConfigName="BuildSet"/>
</WorkspaceConfiguration>
</BuildMatrix>
</CDK_Workspace>

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,12 @@ Board: bl70x_iot
<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">
@ -455,7 +458,7 @@ Board: bl70x_iot
</File>
</VirtualDirectory>
<MonitorProgress>
<DebugLaunch>154</DebugLaunch>
<DebugLaunch>80</DebugLaunch>
<FlashOperate>104</FlashOperate>
</MonitorProgress>
<VirtualDirectory Name="components">
@ -504,32 +507,6 @@ Board: bl70x_iot
</VirtualDirectory>
</VirtualDirectory>
<Dependencies Name="BuildSet"/>
<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>
<BuildConfigs>
<BuildConfig Name="BuildSet">
<Target>
@ -620,8 +597,8 @@ Board: bl70x_iot
<UserProgName/>
</BeforeMake>
<AfterMake>
<RunUserProg>no</RunUserProg>
<UserProgName>$(ProjectPath)../../../../tools/bflb_flash_tool/bflb_mcu_tool.exe --chipname=bl702 --firmware="D:/BouffaloLabWS/cdk_ws/bl_mcu_sdk/examples/hellowd/Obj/helloworld.bin" </UserProgName>
<RunUserProg>yes</RunUserProg>
<UserProgName>$(ProjectPath)../../../../tools/bflb_flash_tool/bflb_mcu_tool.exe --chipname=bl702 --interface=openocd --firmware="$(ProjectPath)/Obj/$(ProjectName).bin" </UserProgName>
</AfterMake>
</User>
<Compiler>
@ -661,7 +638,7 @@ Board: bl70x_iot
</Linker>
<Debug>
<LoadApplicationAtStartup>yes</LoadApplicationAtStartup>
<Connector>ICE</Connector>
<Connector>OpenOCD</Connector>
<StopAt>yes</StopAt>
<StopAtText>main</StopAtText>
<InitFile/>
@ -700,18 +677,18 @@ Board: bl70x_iot
<SimTrace>no</SimTrace>
</ConfigSIM>
<ConfigOpenOCD>
<OpenOCDExecutablePath>openocd-bl702</OpenOCDExecutablePath>
<OpenOCDExecutablePath>openocd-mingw32</OpenOCDExecutablePath>
<OpenOCDTelnetPortEnable>no</OpenOCDTelnetPortEnable>
<OpenOCDTelnetPort>4444</OpenOCDTelnetPort>
<OpenOCDTclPortEnable>no</OpenOCDTclPortEnable>
<OpenOCDTclPort>6666</OpenOCDTclPort>
<OpenOCDConfigOptions>-f openocd_bl702_evb.cfg</OpenOCDConfigOptions>
<OpenOCDConfigOptions>-f ../../../../tools/openocd/if_702_hack.cfg -f ../../../../tools/openocd/tgt_702.cfg</OpenOCDConfigOptions>
</ConfigOpenOCD>
</Debug>
<Flash>
<InitFile/>
<Erase>Erase Sectors</Erase>
<Algorithms Path="">bl702_flasher.elf</Algorithms>
<Algorithms Path="">bl70x_flasher.elf</Algorithms>
<Program>yes</Program>
<Verify>yes</Verify>
<ResetAndRun>no</ResetAndRun>
@ -723,4 +700,30 @@ Board: bl70x_iot
</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

@ -1,5 +1,4 @@
set(mains main.c)
#set(TARGET_REQUIRED_SRCS apple.c)
generate_bin()

View file

@ -1,227 +0,0 @@
/****************************************************************************************
* @file map.txt
*
* @brief This file is the map file (gnuarm or armgcc).
*
* Copyright (C) BouffaloLab 2018
*
****************************************************************************************
*/
/* configure the CPU type */
OUTPUT_ARCH( "riscv" )
/* link with the standard c library */
INPUT(-lc)
/* link with the standard GCC library */
INPUT(-lgcc)
/* configure the entry point */
ENTRY(_enter)
StackSize = 0x1000; /* 4KB */
HeapSize = 0x1000; /* 4KB */
MEMORY
{
xip_memory (rx) : ORIGIN = 0x23000000, LENGTH = 4096K
itcm_memory (rx) : ORIGIN = 0x22014000, LENGTH = 16K
dtcm_memory (rx) : ORIGIN = 0x42018000, LENGTH = 32K
ram_memory (!rx) : ORIGIN = 0x42020000, LENGTH = 48K
}
SECTIONS
{
PROVIDE(__metal_chicken_bit = 0);
.text :
{
. = ALIGN(4);
__text_code_start__ = .;
KEEP (*(.text.metal.init.enter))
KEEP (*(SORT_NONE(.init)))
/* section information for finsh shell */
. = ALIGN(4);
_shell_command_start = .;
KEEP(*(shellCommand))
_shell_command_end = .;
/* section information for usb desc */
. = ALIGN(4);
_usb_desc_start = .;
KEEP(*(usb_desc))
. = ALIGN(4);
_usb_desc_end = .;
*(.text)
*(.text.*)
/*put .rodata**/
*(EXCLUDE_FILE( *bl602_glb.o \
*bl602_pds.o \
*bl602_common.o \
*bl602_sf_cfg.o \
*bl602_sf_ctrl.o \
*bl602_sflash.o \
*bl602_xip_sflash.o \
*bl602_ef_ctrl.o) .rodata*)
*(.rodata)
*(.rodata.*)
*(.srodata)
*(.srodata.*)
. = ALIGN(4);
__text_code_end__ = .;
} > xip_memory
. = ALIGN(4);
__itcm_load_addr = .;
.itcm_region : AT (__itcm_load_addr)
{
. = ALIGN(4);
__tcm_code_start__ = .;
*(.tcm_code)
*(.tcm_const)
*(.sclock_rlt_code)
*(.sclock_rlt_const)
*bl602_glb.o*(.rodata*)
*bl602_pds.o*(.rodata*)
*bl602_common.o*(.rodata*)
*bl602_sf_cfg.o*(.rodata*)
*bl602_sf_ctrl.o*(.rodata*)
*bl602_sflash.o*(.rodata*)
*bl602_xip_sflash.o*(.rodata*)
*bl602_ef_ctrl.o*(.rodata*)
. = ALIGN(4);
__tcm_code_end__ = .;
} > itcm_memory
__dtcm_load_addr = __itcm_load_addr + SIZEOF(.itcm_region);
.dtcm_region : AT (__dtcm_load_addr)
{
. = ALIGN(4);
__tcm_data_start__ = .;
*(.tcm_data)
/* *finger_print.o(.data*) */
. = ALIGN(4);
__tcm_data_end__ = .;
} > dtcm_memory
/* .heap_dummy section doesn't contains any symbols. It is only
* used for linker to calculate size of heap sections, and assign
* values to heap symbols later */
.heap_dummy (NOLOAD):
{
. = ALIGN(0x4);
. = . + HeapSize;
. = ALIGN(0x4);
} > dtcm_memory
_HeapBase = ORIGIN(dtcm_memory) + LENGTH(dtcm_memory) - StackSize - HeapSize;
_HeapSize = HeapSize;
/* Check if data + heap + stack exceeds RAM limit */
ASSERT(_HeapBase >= __tcm_data_end__, "region RAM overflowed with stack")
/*************************************************************************/
/* .stack_dummy section doesn't contains any symbols. It is only
* used for linker to calculate size of stack sections, and assign
* values to stack symbols later */
.stack_dummy (NOLOAD):
{
. = ALIGN(0x4);
. = . + StackSize;
. = ALIGN(0x4);
} > dtcm_memory
/* Set stack top to end of RAM, and stack limit move down by
* size of stack_dummy section */
__StackTop = ORIGIN(dtcm_memory) + LENGTH(dtcm_memory);
PROVIDE( __freertos_irq_stack_top = __StackTop);
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
/* Check if data + heap + stack exceeds RAM limit */
ASSERT(__StackLimit >= __tcm_data_end__, "region RAM overflowed with stack")
/*************************************************************************/
__system_ram_load_addr = __dtcm_load_addr + SIZEOF(.dtcm_region);
.system_ram_data_region : AT (__system_ram_load_addr)
{
. = ALIGN(4);
__system_ram_data_start__ = .;
*(.system_ram)
. = ALIGN(4);
__system_ram_data_end__ = .;
} > ram_memory
__ram_load_addr = __system_ram_load_addr + SIZEOF(.system_ram_data_region);
/* Data section */
RAM_DATA : AT (__ram_load_addr)
{
. = ALIGN(4);
__ram_data_start__ = .;
PROVIDE( __global_pointer$ = . + 0x800 );
*(.data)
*(.data.*)
*(.sdata)
*(.sdata.*)
*(.sdata2)
*(.sdata2.*)
. = ALIGN(4);
__ram_data_end__ = .;
} > ram_memory
.bss (NOLOAD) :
{
. = ALIGN(4);
__bss_start__ = .;
*(.bss*)
*(.sbss*)
*(COMMON)
. = ALIGN(4);
__bss_end__ = .;
} > ram_memory
.noinit_data (NOLOAD) :
{
. = ALIGN(4);
__noinit_data_start__ = .;
*(.noinit_data*)
. = ALIGN(4);
__noinit_data_end__ = .;
} > ram_memory
.heap (NOLOAD):
{
. = ALIGN(4);
__HeapBase = .;
/*__end__ = .;*/
/*end = __end__;*/
KEEP(*(.heap*))
. = ALIGN(4);
__HeapLimit = .;
} > ram_memory
__HeapLimit = ORIGIN(ram_memory) + LENGTH(ram_memory);
}

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,12 @@ Board: bl70x_iot
<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">
@ -645,7 +648,7 @@ Board: bl70x_iot
<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</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)../../../../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>
@ -711,7 +714,7 @@ Board: bl70x_iot
<Flash>
<InitFile/>
<Erase>Erase Sectors</Erase>
<Algorithms Path="">bl702_flasher.elf</Algorithms>
<Algorithms Path="">bl70x_flasher.elf</Algorithms>
<Program>yes</Program>
<Verify>yes</Verify>
<ResetAndRun>no</ResetAndRun>

View file

@ -20,14 +20,17 @@
* under the License.
*
*/
#include "hal_uart.h"
int main(void)
{
bflb_platform_init(0);
MSG("hello world!\r\n");
while(1)
{
MSG("hello world!\r\n");
bflb_platform_delay_ms(1000);
}
}

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -56,6 +56,5 @@ int main(void)
{
MSG("\r\n i2c case\r\n");
bflb_platform_delay_ms(1000);
// DEBUG("GPIO_PIN_RESET\r\n");
}
}

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -49,6 +49,5 @@ int main(void)
{
MSG("\r\n i2c case\r\n");
bflb_platform_delay_ms(1000);
// DEBUG("GPIO_PIN_RESET\r\n");
}
}

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -20,19 +20,24 @@
* License for the specific language governing permissions and limitations
* under the License.
*
* Note:
*
* This Case is currently based on BL706_AVB development board with ili9341 controller screen.
* If you use other hardware platforms, please modify the pin Settings by yourself.
*
* This routine audio playback requires transcoding the audio into PCM encoding and exporting it as an audio array.
* See fhm_onechannel_16k_20.h for audio array examples , and i2s/script for transcoding scripts.
*
* Your should Short connect func1 and func2 jump cap on 706_AVB Board,and Plug the Audio Codec Board(ES8388) whit speaker into the HD11 interface.
* Audio default configuration is
*
* bitwith= 16
* datarate = 16khz ,
* channel number= 1 ,
*
* if you want to play different wav format source , pleases modify this case .
*
*/
/***************************************************************************
* bl706_avb 使
* pcm
* fhm_onechannel_16k_20.h i2s/script
*
* 使 bl706_avb
* 1. func1 func2
* 2. Decode HD11 Decode ES8388
* 3.
* 4. 16kHz sampl_freq_hz = 16*1000
*
* *************************************************************************/
#include "hal_i2s.h"
#include "hal_gpio.h"
#include "hal_dma.h"

View file

@ -1,7 +1,7 @@
set(BSP_COMMON_DIR ${CMAKE_SOURCE_DIR}/bsp/bsp_common)
set(TARGET_REQUIRED_LIBS fatfs)
set(TARGET_REQUIRED_PRIVATE_INCLUDE ${BSP_COMMON_DIR}/es8388 ${BSP_COMMON_DIR}/spi_sd)
set(TARGET_REQUIRED_SRCS ${BSP_COMMON_DIR}/es8388/bsp_es8388.c ${BSP_COMMON_DIR}/fatfs/fatfs_spi_sd.c ${BSP_COMMON_DIR}/spi_sd/bsp_spi_sd.c ./wav_play_form_sd_card.c)
set(TARGET_REQUIRED_PRIVATE_INCLUDE ${BSP_COMMON_DIR}/es8388 ${BSP_COMMON_DIR}/spi_sd )
set(TARGET_REQUIRED_SRCS ${BSP_COMMON_DIR}/es8388/bsp_es8388.c ${BSP_COMMON_DIR}/fatfs/fatfs_spi_sd.c ${BSP_COMMON_DIR}/spi_sd/bsp_spi_sd.c ./wav_play_form_sd_card.c ./shell.c)
set(mains main.c)
generate_bin()

View file

@ -19,19 +19,20 @@
* License for the specific language governing permissions and limitations
* under the License.
*
* Note:
*
* This Case is currently based on BL706_AVB development board with ili9341 controller screen.
* If you use other hardware platforms, please modify the pin Settings by yourself.
*
* This routine audio playback requires transcoding the audio into PCM encoding and exporting it as an audio array.
* See fhm_onechannel_16k_20.h for audio array examples , and i2s/script for transcoding scripts.
*
* Your should Short connect func1 and func2 jump cap on 706_AVB Board,and Plug the Audio Codec Board(ES8388) whit speaker into the HD11 interface , and connect SD Card with SPI ports.
*
* You need to fill in the correct audio file path which in SD Card file systems in audio_init(), please refer to line 58 of this code, this version only support Engilsh path.
*
* This case use shell module to complete human-computer interaction.
*/
/***************************************************************************
* bl706_avb 使
* WAV
*
* 使 bl706_avb
* 1. func1 func2
* 2. SD 线 HD13 SPI bl706_avb pinout
* 2. Decode HD11 Decode ES8388
* 3.
* 4. audio_init() 54
*
* *************************************************************************/
#include "ff.h"
#include "wav_play_form_sd_card.h"
@ -49,10 +50,13 @@ int main(void)
fatfs_sd_driver_register();
sd_wav_play_register(&Audio_Dev);
res = f_mount(&Fs_1,"1:",1);
res = f_mount(&Fs_1,"sd:",1);
f_chdrive("sd:");
f_chdir("./wav_test");
if(res==FR_OK)
{
if(Audio_Dev.audio_init(&Audio_Dev,"1:wav_test/test9_44100_stereo_s32(24bit).wav") == 0)
if(Audio_Dev.audio_init(&Audio_Dev,"sd:/wav_test/test9_44100_stereo_s32(24bit).wav") == 0)
{
MSG("Audio Init success\r\n");
}else{
@ -66,13 +70,16 @@ int main(void)
/* start/stop test */
Audio_Dev.audio_control(&Audio_Dev,AUDIO_CMD_START,NULL);
/*
bflb_platform_delay_ms(10000);
Audio_Dev.audio_control(&Audio_Dev,AUDIO_CMD_STOP,NULL);
bflb_platform_delay_ms(5000);
Audio_Dev.audio_control(&Audio_Dev,AUDIO_CMD_START,NULL);
bflb_platform_delay_ms(5000);
*/
/* volume test */
/*
for(uint32_t vol=0; vol<80; vol++)
{
Audio_Dev.audio_control(&Audio_Dev,AUDIO_CMD_VOLUME,(void *)vol);
@ -83,6 +90,7 @@ int main(void)
Audio_Dev.audio_control(&Audio_Dev,AUDIO_CMD_VOLUME,(void *)vol);
bflb_platform_delay_ms(100);
}
*/
Audio_Dev.audio_control(&Audio_Dev,AUDIO_CMD_VOLUME,(void *)30);

View file

@ -1,3 +1,26 @@
/**
* @file wav_play_form_sd_card.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 "bsp_es8388.h"
#include "hal_i2s.h"
#include "hal_dma.h"
@ -108,6 +131,7 @@ static int sd_wav_play_init(audio_dev_t *audio_dev, const TCHAR* path)
audio_dev->buff_using = 1;
audio_dev->device = (struct device*)NULL;
audio_dev->audio_state = 0;
f_close(&Wav_Fp);
res = f_open(&Wav_Fp, path, FA_READ);
@ -119,6 +143,7 @@ static int sd_wav_play_init(audio_dev_t *audio_dev, const TCHAR* path)
MSG("wav file open error\r\n");
return 1;
}
/* Parse the WAV file */
res = wav_data_parser(buff, &Wav_Information);
if (res == 0)
{
@ -136,11 +161,27 @@ static int sd_wav_play_init(audio_dev_t *audio_dev, const TCHAR* path)
return 1;
}
audio_dev->device = device_find("I2S");
if(audio_dev->device)
{
device_close(audio_dev->device);
}
else
{
i2s_register(I2S0_INDEX,"I2S",DEVICE_OFLAG_RDWR);
audio_dev->device = device_find("I2S");
}
dma_register(DMA0_CH2_INDEX, "i2s_ch2", DEVICE_OFLAG_RDWR);
struct device *dma_ch2 = device_find("i2s_ch2");
if(dma_ch2)
{
device_close(dma_ch2);
}
else
{
dma_register(DMA0_CH2_INDEX, "i2s_ch2", DEVICE_OFLAG_RDWR);
dma_ch2 = device_find("i2s_ch2");
}
if((audio_dev->device) && dma_ch2)
{
@ -223,6 +264,7 @@ static int sd_wav_play_init(audio_dev_t *audio_dev, const TCHAR* path)
f_read(&Wav_Fp,audio_dev->buff[1], audio_dev->buff_size_max, &num);
audio_dev->buff_data_size[1] = num;
}
audio_dev->audio_state = 1;
}
else{
return 1;
@ -236,15 +278,26 @@ static int sd_wav_play_control(struct audio_dev *audio_dev, AUDIO_CMD_t cmd, voi
switch (cmd)
{
case AUDIO_CMD_START:
if(audio_dev->audio_state)
{
res = device_write(audio_dev->device,0,audio_dev->buff[!audio_dev->buff_using],audio_dev->buff_data_size[!audio_dev->buff_using]);
audio_dev->audio_state = 1;
audio_dev->audio_state = 2;
res = 0;
}
break;
case AUDIO_CMD_STOP:
audio_dev->audio_state = 0;
if(audio_dev->audio_state)
{
audio_dev->audio_state = 1;
res=0;
}
break;
case AUDIO_CMD_VOLUME:
if(audio_dev->audio_state)
{
res = ES8388_Set_Voice_Volume((uint32_t)args);
res=0;
}
break;
default:
break;
@ -258,12 +311,13 @@ static int sd_wav_play_callback(audio_dev_t *audio_dev)
uint8_t buff_using = audio_dev->buff_using;
if(audio_dev->buff_data_size[!buff_using] )
{
if(audio_dev->audio_state)
/* start i2s-dma */
if(audio_dev->audio_state == 2 && audio_dev->buff[!buff_using])
{
device_write(audio_dev->device, 0, audio_dev->buff[!buff_using], audio_dev->buff_data_size[!buff_using]);
audio_dev->buff_using = !buff_using;
}
/* fill data */
if (audio_dev->wav_information->chunk_format.bits_per_sample / 8 == 3)
{
f_read(&Wav_Fp, audio_dev->buff[buff_using], audio_dev->buff_size_max / 4 * 3, &num);
@ -275,9 +329,25 @@ static int sd_wav_play_callback(audio_dev_t *audio_dev)
}
audio_dev->buff_data_size[buff_using] = num;
}
if(num==0 && audio_dev->buff_data_size[0]==0 && audio_dev->buff_data_size[1]==0)
/* play end, refill the buff for next time*/
if(num==0 && audio_dev->buff_data_size[!buff_using]==0 )
{
f_lseek(&Wav_Fp, audio_dev->wav_information->chunk_data_offset+sizeof(chunk_data_t));
if(audio_dev->wav_information->chunk_format.bits_per_sample/8 == 3)
{
f_read(&Wav_Fp,audio_dev->buff[0], audio_dev->buff_size_max/4*3, &num);
audio_dev->buff_data_size[0] = pcm_24bit_to_32bit(audio_dev->buff[0],num);
f_read(&Wav_Fp,audio_dev->buff[1], audio_dev->buff_size_max/4*3, &num);
audio_dev->buff_data_size[1] = pcm_24bit_to_32bit(audio_dev->buff[1],num);
}
else
{
f_read(&Wav_Fp,audio_dev->buff[0], audio_dev->buff_size_max, &num);
audio_dev->buff_data_size[0] = num;
f_read(&Wav_Fp,audio_dev->buff[1], audio_dev->buff_size_max, &num);
audio_dev->buff_data_size[1] = num;
}
audio_dev->audio_state = 1;
MSG("End of the play\r\n");
}
return 0;
@ -294,6 +364,7 @@ int sd_wav_play_register(audio_dev_t *audio_dev)
audio_dev->buff[1] = Data_Buff1;
audio_dev->buff_data_size[0] = 0;
audio_dev->buff_data_size[1] = 0;
audio_dev->audio_state = 0;
audio_dev->buff_size_max = sizeof(Data_Buff1);
return 0;
}

View file

@ -1,3 +1,26 @@
/**
* @file wav_play_form_sd_card.h
* @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.
*
*/
#ifndef __MAV_PLAY_H__
#define __MAV_PLAY_H__

View file

@ -1,9 +1,10 @@
set(BSP_COMMON_DIR ${CMAKE_SOURCE_DIR}/bsp/bsp_common)
set(TARGET_REQUIRED_LIBS fatfs lvgl)
set(LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/lvgl_flash.ld)
set(TARGET_REQUIRED_PRIVATE_INCLUDE ${BSP_COMMON_DIR}/il9341 ${BSP_COMMON_DIR}/lvgl)
set(TARGET_REQUIRED_PRIVATE_INCLUDE ${BSP_COMMON_DIR}/il9341 ${BSP_COMMON_DIR}/lvgl ${BSP_COMMON_DIR}/touch ${BSP_COMMON_DIR}/spi_sd)
file(GLOB_RECURSE sources "${CMAKE_CURRENT_SOURCE_DIR}/demo/*.c")
set(TARGET_REQUIRED_SRCS ${sources} ${BSP_COMMON_DIR}/il9341/bsp_il9341.c ${BSP_COMMON_DIR}/lvgl/lv_port_disp.c)
set(TARGET_REQUIRED_SRCS ${sources} ${BSP_COMMON_DIR}/il9341/bsp_il9341.c ${BSP_COMMON_DIR}/lvgl/lv_port_disp.c ${BSP_COMMON_DIR}/lvgl/lv_port_indev.c ${BSP_COMMON_DIR}/lvgl/lv_port_fs.c
${BSP_COMMON_DIR}/touch/xpt2046.c ${BSP_COMMON_DIR}/touch/touch.c ${BSP_COMMON_DIR}/fatfs/fatfs_spi_sd.c ${BSP_COMMON_DIR}/spi_sd/bsp_spi_sd.c)
set(mains main.c)
generate_bin()

View file

@ -110,8 +110,8 @@ void lv_demo_printer(void)
bg_color_act = LV_DEMO_PRINTER_BLUE;
lv_theme_t * th = lv_demo_printer_theme_init(LV_COLOR_BLACK, LV_COLOR_BLACK,
0, &lv_font_montserrat_8, &lv_font_montserrat_8,
&lv_font_montserrat_8, &lv_font_montserrat_8);
0, &lv_font_montserrat_12, &lv_font_montserrat_12,
&lv_font_montserrat_12, &lv_font_montserrat_12);
lv_theme_set_act(th);
lv_obj_t * scr = lv_obj_create(NULL, NULL);

View file

@ -19,32 +19,41 @@
* License for the specific language governing permissions and limitations
* under the License.
*
* Note:
*
* This Case is currently based on BL706_AVB development board with ili9341 controller screen.
* If you use other hardware platforms, please modify the pin Settings by yourself
*
* Your should Short connect func1 and func2 jump cap on 706_AVB Board,and Plug the screen into the HD13 interface
* Then the hardware for lvgl case testing is available.
*
*
*/
/***************************************************************************
* bl706_avb 使
* ili9341
*
* 使 bl706_avb
* 1. func1 func2
* 2. SPI HD13
*
* *************************************************************************/
// #include "drv_shell.h"
#include "hal_spi.h"
#include "hal_gpio.h"
#include "hal_dma.h"
#include "lv_port_disp.h"
#include "bsp_il9341.h"
#include "xpt2046.h"
#include "lv_port_disp.h"
#include "lv_port_indev.h"
#include "lvgl.h"
#include "lv_examples.h"
/* lvgl log cb */
void lv_log_print_g_cb(lv_log_level_t level, const char *path, uint32_t line, const char *name, const char *str)
{
MSG("L:%d,",level);
MSG("N:%s,",name);
MSG("D:%s\r\n,",str);
switch (level)
{
case LV_LOG_LEVEL_ERROR: MSG("ERROR: "); break;
case LV_LOG_LEVEL_WARN: MSG("WARNING: "); break;
case LV_LOG_LEVEL_INFO: MSG("INFO: "); break;
case LV_LOG_LEVEL_TRACE: MSG("TRACE: "); break;
default: break;
}
MSG("%s- ",name);
MSG(" %s\r\n,",str);
}
int main(void)
@ -55,6 +64,7 @@ int main(void)
lv_init();
lv_port_disp_init();
lv_port_indev_init();
lv_demo_benchmark();

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,12 @@ Board: bl70x_iot
<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">
@ -450,10 +453,12 @@ Board: bl70x_iot
<File Name="../../../../tools/openocd/bl70x_gdb.init">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/regs/bl70x_reg.svc"/>
<File Name="../../../../drivers/bl702_driver/regs/bl70x_reg.svc">
<FileOption/>
</File>
</VirtualDirectory>
<MonitorProgress>
<DebugLaunch>154</DebugLaunch>
<DebugLaunch>155</DebugLaunch>
<FlashOperate>104</FlashOperate>
</MonitorProgress>
<VirtualDirectory Name="components">
@ -683,7 +688,7 @@ Board: bl70x_iot
<Flash>
<InitFile/>
<Erase>Erase Sectors</Erase>
<Algorithms Path="">bl702_flasher.elf</Algorithms>
<Algorithms Path="">bl70x_flasher.elf</Algorithms>
<Program>yes</Program>
<Verify>yes</Verify>
<ResetAndRun>no</ResetAndRun>

View file

@ -46,17 +46,18 @@ int main(void)
if (led_breath)
{
device_open(led_breath, 0);
device_open(led_breath, DEVICE_OFLAG_STREAM_TX);
pwm_channel_start(led_breath);
}
while (1)
{
for (pwm_cfg.dutyCycle = 0; pwm_cfg.dutyCycle < 100; pwm_cfg.dutyCycle++)
for (pwm_cfg.dutycycle = 0; pwm_cfg.dutycycle < 100; pwm_cfg.dutycycle++)
{
device_control(led_breath, DEVICE_CTRL_CONFIG, &pwm_cfg);
bflb_platform_delay_ms(10);
}
for (pwm_cfg.dutyCycle = 100; pwm_cfg.dutyCycle > 0; pwm_cfg.dutyCycle--)
for (pwm_cfg.dutycycle = 100; pwm_cfg.dutycycle > 0; pwm_cfg.dutycycle--)
{
device_control(led_breath, DEVICE_CTRL_CONFIG, &pwm_cfg);
bflb_platform_delay_ms(10);

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">
@ -195,7 +196,9 @@ Board: bl70x_iot
<File Name="../../../../bsp/bsp_common/platform/bflb_platform.c">
<FileOption/>
</File>
<File Name="../../../../bsp/bsp_common/il9341/bsp_il9341.c"/>
<File Name="../../../../bsp/bsp_common/il9341/bsp_il9341.c">
<FileOption/>
</File>
</VirtualDirectory>
<VirtualDirectory Name="common">
<File Name="../../../../common/device/drv_device.c">
@ -630,7 +633,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)../../../../bsp/bsp_common/il9341;$(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)../../../../bsp/bsp_common/il9341;$(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>
@ -646,7 +649,7 @@ Board: bl70x_iot
<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)../../../../bsp/bsp_common/il9341;$(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</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)../../../../bsp/bsp_common/il9341;$(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>

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -24,13 +24,8 @@
#include "hal_uart.h"
#include "hal_dma.h"
struct device *dma_ch2;
uint8_t src_buffer[4100] __attribute__((section(".system_ram")));
uint8_t mmheap_default_pool[2048] __attribute__((section(".system_ram")));
uint8_t dma_tc_flag0 = 0;
uint8_t dma_tc_flag1 = 0;
static uint8_t src_buffer[4100] __attribute__((section(".system_ram")));
static uint8_t dma_tc_flag0 = 0;
void dma_ch2_irq_callback(struct device *dev, void *args, uint32_t size, uint32_t state)
{
@ -64,7 +59,7 @@ int main(void)
}
dma_register(DMA0_CH2_INDEX, "ch2", DEVICE_OFLAG_RDWR);
dma_ch2 = device_find("ch2");
struct device* dma_ch2 = device_find("ch2");
if (dma_ch2)
{
device_open(dma_ch2, 0);

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -30,7 +30,7 @@ int main(void)
if (uart1)
{
device_open(uart1, DEVICE_OFLAG_STREAM_TX); //uart0 tx dma mode
device_open(uart1, DEVICE_OFLAG_STREAM_TX);
MSG("device find success\r\n");
}
device_write(uart1,0,buffer,10);

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -54,19 +54,19 @@ int main(void)
bflb_platform_init(0);
uart_register(UART1_INDEX, "uart1", DEVICE_OFLAG_RDWR);
struct device *uart = device_find("uart1");
struct device *uart1 = device_find("uart1");
if (uart)
if (uart1)
{
device_open(uart, DEVICE_OFLAG_STREAM_TX | DEVICE_OFLAG_INT_RX); //uart0 tx dma mode
device_set_callback(uart, uart_irq_callback);
device_control(uart, DEVICE_CTRL_SET_INT, (void *)(UART_RX_FIFO_IT|UART_RTO_IT));
device_open(uart1, DEVICE_OFLAG_STREAM_TX | DEVICE_OFLAG_INT_RX);
device_set_callback(uart1, uart_irq_callback);
device_control(uart1, DEVICE_CTRL_SET_INT, (void *)(UART_RX_FIFO_IT|UART_RTO_IT));
}
while (1)
{
device_write(uart,0,string,strlen(string));
device_write(uart1,0,string,strlen(string));
bflb_platform_delay_ms(1000);
}
}

View file

@ -25,6 +25,8 @@
#include "usbd_cdc.h"
#include "uart_interface.h"
#include "bl702_ef_ctrl.h"
#include "bl702_glb.h"
#include "hal_gpio.h"
#define CDC_IN_EP 0x82
#define CDC_OUT_EP 0x01
@ -154,19 +156,19 @@ uint32_t usbd_cdc_filter_callback(uint8_t* data, uint32_t len)
uart1_rts_init();
if(data[pattern_len]=='0'||data[pattern_len]==0){
usbd_cdc_acm_set_dtr(0);
dtr_pin_set(1);
MSG("DTR0\r\n");
}
if(data[pattern_len]=='1'||data[pattern_len]==1){
usbd_cdc_acm_set_dtr(1);
dtr_pin_set(0);
MSG("DTR1\r\n");
}
if(data[pattern_len+1]=='0'||data[pattern_len+1]==0){
usbd_cdc_acm_set_rts(0);
rts_pin_set(1);
MSG("RTS0\r\n");
}
if(data[pattern_len+1]=='1'||data[pattern_len+1]==1){
usbd_cdc_acm_set_rts(1);
rts_pin_set(0);
MSG("RTS1\r\n");
}
//delay=atoi(( char *)&data[pattern_len+1]);
@ -175,11 +177,11 @@ uint32_t usbd_cdc_filter_callback(uint8_t* data, uint32_t len)
}
bflb_platform_delay_ms(delay);
if(data[pattern_len+1]=='0'||data[pattern_len+1]==0){
usbd_cdc_acm_set_rts(1);
rts_pin_set(0);
MSG("RTS1\r\n");
}
if(data[pattern_len+1]=='1'||data[pattern_len+1]==1){
usbd_cdc_acm_set_rts(0);
rts_pin_set(1);
MSG("RTS0\r\n");
}
bflb_platform_delay_ms(delay);
@ -220,12 +222,12 @@ void usbd_cdc_acm_set_line_coding(uint32_t baudrate, uint8_t databits, uint8_t p
void usbd_cdc_acm_set_dtr(bool dtr)
{
dtr_pin_set(!dtr);
//dtr_pin_set(!dtr);
}
void usbd_cdc_acm_set_rts(bool rts)
{
rts_pin_set(!rts);
//rts_pin_set(!rts);
}
usbd_class_t cdc_class;
@ -246,14 +248,27 @@ usbd_endpoint_t cdc_in_ep =
extern struct device* usb_dc_init(void);
// #define BL702
#ifdef BL702
#define UART_DTR_PIN GPIO_PIN_37
#define UART_RTS_PIN GPIO_PIN_33
#else
#define UART_DTR_PIN GPIO_PIN_22
#define UART_RTS_PIN GPIO_PIN_21
#endif
int main(void)
{
uint8_t chipid[8];
uint8_t chipid2[6];
#ifdef BL702
GLB_Select_Internal_Flash();
#endif
bflb_platform_init(0);
uart_ringbuffer_init();
uart1_init();
uart1_set_dtr_rts(UART_DTR_PIN,UART_RTS_PIN);
uart1_dtr_deinit();
uart1_rts_deinit();
@ -281,6 +296,7 @@ int main(void)
device_control(usb_fs, DEVICE_CTRL_SET_INT, (void *)(USB_EP1_DATA_OUT_IT | USB_EP2_DATA_IN_IT));
}
while(!usb_device_is_configured());
while (1)
{
uart_send_from_ringbuffer();

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -1,5 +1,6 @@
set(BSP_COMMON_DIR ${CMAKE_SOURCE_DIR}/bsp/bsp_common)
set(TARGET_REQUIRED_LIBS usb_stack)
set(LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/usb_cdc_msc.ld)
set(TARGET_REQUIRED_PRIVATE_INCLUDE ${BSP_COMMON_DIR}/usb ${BSP_COMMON_DIR}/spi_sd)
set(TARGET_REQUIRED_SRCS ${BSP_COMMON_DIR}/usb/usb_dc.c ${BSP_COMMON_DIR}/usb/uart_interface.c ${BSP_COMMON_DIR}/spi_sd/bsp_spi_sd.c)
set(mains main.c)

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -128,7 +128,7 @@ USB_DESC_SECTION const uint8_t cdc_msc_descriptor[] =
};
#define BLOCK_SIZE 512
#define BLOCK_COUNT 48
#define BLOCK_COUNT 32
typedef struct
{

View file

@ -1,5 +1,6 @@
set(BSP_COMMON_DIR ${CMAKE_SOURCE_DIR}/bsp/bsp_common)
set(TARGET_REQUIRED_LIBS usb_stack)
set(LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/usb_msc_ram.ld)
set(TARGET_REQUIRED_PRIVATE_INCLUDE ${BSP_COMMON_DIR}/usb ${BSP_COMMON_DIR}/spi_sd)
set(TARGET_REQUIRED_SRCS ${BSP_COMMON_DIR}/usb/usb_dc.c ${BSP_COMMON_DIR}/usb/uart_interface.c ${BSP_COMMON_DIR}/spi_sd/bsp_spi_sd.c)
set(mains main.c)

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">

View file

@ -32,9 +32,6 @@ Board: bl70x_iot
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_adc.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_camera.c">
<FileOption/>
</File>
<File Name="../../../../drivers/bl702_driver/hal_drv/src/hal_dac.c">
<FileOption/>
</File>
@ -71,6 +68,10 @@ Board: bl70x_iot
<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"/>
</VirtualDirectory>
<VirtualDirectory Name="std">
<File Name="../../../../drivers/bl702_driver/std_drv/src/bl702_acomp.c">