Configure DA14585 IoT Air Quality Index under Eclipse/GCC

⚠️
嗨,...感谢您来论坛。令人兴奋的消息!我们现在正在迁至我们的新论坛平台,将提供更好的功能,并包含在主对话框网站中。所有帖子和帐户都已迁移。我们现在只接受新论坛上的流量 - 请发布任何新线程https://www.dialog-seminile.com/support.。我们将在未来几天修复错误/优化搜索和标记。
7 posts / 0 new
最后一篇
达特雷古斯
离线
最后一次露面:10个月1周前
加入:2016-09-28 16:05
Configure DA14585 IoT Air Quality Index under Eclipse/GCC

我正在使用Eclipse / GCC熟悉DA14585 IOT Multi传感器开发套件。我通过AN-B064中的步骤并成功编译并运行调试器,没有问题。

我决定尝试按照UM-B-101第4.2.4节的说明配置空气质量指数。在定义IAQ\u ENABLED后,出现以下错误:

C:/IoT_MSK/DA14585_IOTP/v6.160.4/projects/target_apps/common/lib/bsec/user_iaq.c:86: undefined reference to `bsec_init'
C:/iot_msk/da14585_iotp/v6.160.4/projects/target_apps/common/lib/bsec/user_iaq.c:99:未定义引用“bsec_set_state”
C:/iot_msk/da14585_iotp/v6.160.4/projects/target_apps/common/lib/bsec/user_iaq.c:101:未定义引用“bsec_init”
C:/iot_msk/da14585_iotp/v6.160.4/projects/target_apps/common/lib/bsec/user_iaq.c:117:未定义引用`bsec_update_subscrection'
./bsec_l​​ib/user_iaq.o:在功能`update_iaq'中:
C:/IoT\u MSK/DA14585\u IOTP/v6.160.4/projects/target\u apps/common/lib/bsec/user\u iaq.C:145:未定义对“bsec\u sensor\u control”的引用
C:/IoT_MSK/DA14585_IOTP/v6.160.4/projects/target_apps/common/lib/bsec/user_iaq.c:169: undefined reference to `bsec_do_steps'
collect2.exe:错误:ld返回1退出状态

I'm guessing the linker doesn't know what to do with user_iaq.c. because everthing in it only exists when IAQ_ENABLED is defined.

Any ideas on how to fix this? I'm obviously new to Eclipse/GCC.

Thanks

Device:
PM_DIALOG.
离线
最后一次露面:12 hours 4 min ago
职员
加入:2018-02-08 11:03
Hi dsteury,

Hi dsteury,

Thanks for your question online. Let me check it and try to replicate it, and I will get back to you as soon as possible.

谢谢,PM_DIALOG.

PM_DIALOG.
离线
最后一次露面:12 hours 4 min ago
职员
加入:2018-02-08 11:03
Hi dsteury,

Hi dsteury,

请阅读4.2.4配置空气质量指数UM-B-101: DA14585 IoT Multi Sensor Development Kit Developer Guide文档。

计算空气质量索引(AQI)的Bosch BSEC库不包括在默认配置中(IAQ_ENabled未定义)。如果用户想编译包含此库的图像,则应删除其他功能以增益所需的内存空间。例如,这可以通过以下步骤完成:

1. Remove the VCNL4010 proximity sensor and undefine VCNL4010_OPTO_SENSOR_AVAILABLE from da1458x_config_basic.h.

2.禁用“运动后”特性通过定义WAYS_ADVERTISE in user_app_iot_config.h. This also removes the low power configuration parts of ICM426xx driver.

3. Disable the fast accelerometer calibration and undefine ALWAYS_ USE_FAST_ACC_CAL in user_app_iot_config.h.

4.建立。

5.从da1458x_config_basic.h定义iaq_enabled

6.再次建立。生成的IOT585.HEX现在包括AQI功能。

谢谢,PM_DIALOG.

达特雷古斯
离线
最后一次露面:10个月1周前
加入:2016-09-28 16:05
我确实阅读了4.2.4节

我确实阅读了4.2.4节配置了UM-B-101的空气质量指数,我认为我正确地正确地说明了。也许我错过了什么;所以,我会再次跑步。

我删除了我的整个SDK目录,并从zip文件中重新提取到C:\DA14585\u IOTP\u v6.160.4。然后我打开SmartSnippets,进入IDE(记得我使用的是Eclipse/GCC)并重新导入项目,这样我就可以从头开始了。我建立了项目,运行了调试器,一切正常。

1. Remove the VCNL4010 proximity sensor and undefine VCNL4010_OPTO_SENSOR_AVAILABLE from da1458x_config_basic.h.

I'm not exactly sure what is meant by "Remove the VCNL4010". Does that mean I'm supposed to physically remove the part from the board, or am I supposed to delete the virtual folder vcnl4010 from the project, or does this mean something else? I'm not sure what to do; so, I'm not doing anything.

I am changing line 75 in da1458x_config_basic.h from this:

#define VCNL4010_OPTO_SENSOR_AVAILABLE

为此:

#undef VCNL4010_OPTO_SENSOR_AVAILABLE

保存存档。

2.禁用“运动后”特性通过定义WAYS_ADVERTISE in user_app_iot_config.h. This also removes the low power configuration parts of ICM426xx driver.

我正在改变user_app_iot_config的第24行:

#undef alway_advertise //禁用运动功能唤醒

为此:

#define ALWAYS_ADVERTISE //Disables wake on motion feature

保存存档。

3. Disable the fast accelerometer calibration and undefine ALWAYS_ USE_FAST_ACC_CAL in user_app_iot_config.h.

I searched user_app_iot_config.h for ALWAYS_ USE_FAST_ACC_CAL and it's not there; however, there is a USE_FAST_ACC_CAL (without the "ALWAYS_" in front), so I figure this is a typo and change line 41 from this:

#define USE_FAST_ACC_CAL

为此:

#未定义使用\u FAST \u ACC \u CAL

保存存档。

4.建立。

I built, ran debugger, opened IoT Sensors and can see the proximity sensor is no longer working; so, I figure I've done everything ok up to this point.

5.从da1458x_config_basic.h定义iaq_enabled

I'm changine line 88 of da1458x_config_basic.h from this:

#undef iaq_enabled //包括IAQ库,在船上处理气体数据

为此:

#define iaq_enabled //包括IAQ库,船上的过程气体数据

保存存档。

6.再次建立。生成的IOT585.HEX现在包括AQI功能。

I built again and I get 7 errors. When I open the console, here's what I see at the end of the window:

collect_gcc_options =' - mcpu = cortex-m0'''-mthumb''-os''-fmessage-length = 0''-fsigned-char''-function-sections''-fdata-sections''-g3'' -t''./ldscript_common.lds''-l ../../../../../../../../../项目/ target_apps / iot / common_iot_files / lib'' -l ../ ....../ ../ ....../ ../../。。/../../../SDK_585/sdk/common_project_files/misc' '-L../../../../../../SDK_585/sdk/platform/system_library/output/GCC' '-specs=nano.specs' '-specs=nosys.specs' '-v' '-o' 'iot585.elf'
C:/diasemi/smartsnippetsstudio2.0.10/gcc/7-2018-q2/bin / lib / gcc / arm-none-eabi / 7.3.1 / collect2.exe -plugin c:/diasemi/smartsnippetsstudio2.0.10/GCC / 7-2018-Q2 / BIN / ... lib / gcc / arm-none-eabi / 7.3.1 / liblto_plugin-0.dll -plugin-opt = c:/diasemi/smartsnippetsstudio2.0.10/gcc/7-2018-q2 / bin / bin / arm-none-eabi / 7.3.1 / lto-wrapper.exe -plugin-opt = -freesolution = c:\ david \ appdata \ local \ temp \ ccokcoya。res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lg_nano -plugin-opt=-pass-through=-lc_nano -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc_nano -plugin-opt=-pass-through=-lnosys -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc_nano -plugin-opt=-pass-through=-lnosys --sysroot=c:\diasemi\smartsnippetsstudio2.0.10\gcc\7-2018-q2\bin\../arm-none-eabi -X -o iot585.elf c:/diasemi/smartsnippetsstudio2.0.10/gcc/7-2018-q2/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v6-m/crti.o c:/diasemi/smartsnippetsstudio2.0.10/gcc/7-2018-q2/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v6-m/crtbegin.o c:/diasemi/smartsnippetsstudio2.0.10/gcc/7-2018-q2/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/crt0.o -L../../../../../../projects/target_apps/iot/common_iot_files/lib -L../../../../../../SDK_585/sdk/common_project_files/misc -L../../../../../../SDK_585/sdk/platform/system_library/output/GCC -Lc:/diasemi/smartsnippetsstudio2.0.10/gcc/7-2018-q2/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v6-m -Lc:/diasemi/smartsnippetsstudio2.0.10/gcc/7-2018-q2/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v6-m -Lc:/diasemi/smartsnippetsstudio2.0.10/gcc/7-2018-q2/bin/../arm-none-eabi/lib/thumb/v6-m -Lc:/diasemi/smartsnippetsstudio2.0.10/gcc/7-2018-q2/bin/../lib/gcc/arm-none-eabi/7.3.1 -Lc:/diasemi/smartsnippetsstudio2.0.10/gcc/7-2018-q2/bin/../lib/gcc -Lc:/diasemi/smartsnippetsstudio2.0.10/gcc/7-2018-q2/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib -Lc:/diasemi/smartsnippetsstudio2.0.10/gcc/7-2018-q2/bin/../arm-none-eabi/lib --gc-sections -Map iot585.map --no-wchar-size-warning ./wkup_adapter/wkup_adapter.o ./vcnl4010/vcnl4010.o ./vcnl4010/vcnl4010_impl.o ./user_sfl/user_sfl_util.o ./user_sensors/user_sensor_config.o ./user_sensors/user_sensor_raw.o ./user_sensors/user_sensor_sfl.o ./user_sensors/user_sensors.o ./user_profiles/dws.o ./user_profiles/dws_task.o ./user_platform/i2c_gpio_extender.o ./user_platform/sensors_periph_interface.o ./user_platform/user_iot_dk_utils.o ./user_platform/user_periph_setup.o ./user_app/user_dws.o ./user_app/user_dws_reports.o ./user_app/user_dws_task.o ./user_app/user_iot.o ./sensors_interface/sensors_interface.o ./sensors_interface/sensors_interface_api.o ./sensor_calibration/basic_acc_cal.o ./sensor_calibration/basic_autocal.o ./sensor_calibration/basic_prox_cal.o ./sensor_calibration/sensor_calibration.o ./sensor_calibration/static_calibration.o ./sdk_profiles/attm_db_128.o ./sdk_profiles/bass.o ./sdk_profiles/bass_task.o ./sdk_profiles/custom_common.o ./sdk_profiles/diss.o ./sdk_profiles/diss_task.o ./sdk_profiles/prf.o ./sdk_profiles/prf_utils.o ./sdk_profiles/proxr.o ./sdk_profiles/proxr_task.o ./sdk_profiles/suotar.o ./sdk_profiles/suotar_task.o ./sdk_driver/adc.o ./sdk_driver/battery.o ./sdk_driver/gpio.o ./sdk_driver/hw_otpc.o ./sdk_driver/sky66111.o ./sdk_driver/spi.o ./sdk_driver/spi_flash.o ./sdk_driver/syscntl.o ./sdk_driver/systick.o ./sdk_driver/timer0.o ./sdk_driver/trng.o ./sdk_driver/uart2.o ./sdk_driver/wkupct_quadec.o ./sdk_boot/hardfault_handler.o ./sdk_boot/ivtable_DA14585_586.o ./sdk_boot/nmi_handler.o ./sdk_boot/startup_DA14585_586.o ./sdk_boot/system_DA14585_586.o ./sdk_ble/rf_585.o ./sdk_ble/rwble.o ./sdk_ble/rwip.o ./sdk_arch/arch_console.o ./sdk_arch/arch_main.o ./sdk_arch/arch_rom.o ./sdk_arch/arch_sleep.o ./sdk_arch/arch_system.o ./sdk_arch/jump_table.o ./sdk_arch/nvds.o ./sdk_app/app.o ./sdk_app/app_bass.o ./sdk_app/app_bass_task.o ./sdk_app/app_customs.o ./sdk_app/app_customs_common.o ./sdk_app/app_customs_task.o ./sdk_app/app_default_handlers.o ./sdk_app/app_diss.o ./sdk_app/app_diss_task.o ./sdk_app/app_easy_msg_utils.o ./sdk_app/app_easy_security.o ./sdk_app/app_easy_timer.o ./sdk_app/app_entry_point.o ./sdk_app/app_msg_utils.o ./sdk_app/app_proxr.o ./sdk_app/app_proxr_task.o ./sdk_app/app_security.o ./sdk_app/app_security_task.o ./sdk_app/app_suotar.o ./sdk_app/app_suotar_task.o ./sdk_app/app_task.o ./icm426xx/Icm426xxDriver.o ./icm426xx/Icm426xxDriver_HL.o ./icm426xx/Icm426xxTransport.o ./icm426xx/Icm426xx_impl.o ./driver_adaptation_layer/environmental_bme680.o ./driver_adaptation_layer/magneto_ak099.o ./driver_adaptation_layer/motion_bmi160.o ./driver_adaptation_layer/motion_icm4X6.o ./driver_adaptation_layer/optical_vcnl4010.o ./bsec_lib/user_iaq.o ./bmi160/bmi160.o ./bmi160/bmi160_impl.o ./bme680/bme680.o ./bme680/bme680_impl.o ./ak09915/ak09915.o ./ak09915/ak09915_impl.o -lsystem_library -lsensor_fusion -lsensor_calibration --start-group -lgcc -lg_nano -lc_nano --end-group --start-group -lgcc -lc_nano -lnosys --end-group --start-group -lgcc -lc_nano -lnosys --end-group c:/diasemi/smartsnippetsstudio2.0.10/gcc/7-2018-q2/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v6-m/crtend.o c:/diasemi/smartsnippetsstudio2.0.10/gcc/7-2018-q2/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v6-m/crtn.o -T ./ldscript_common.lds
./bsec_l​​ib/user_iaq.o:在function` init_iaq'中:
C:/da14585_iotp_v6.160.4/da14585_iotp/v6.160.4/projects/target_apps/common/lib/bsec/user_iaq.c:86:未定义引用`bsec_init'
C:/da14585_iotp_v6.160.4/da14585_iotp/v6.160.4/projects/target_apps/common/lib/bsec/user_iaq.c:99:未定义引用“bsec_set_state”
C:/da14585_iotp_v6.160.4/da14585_iotp/v6.160.4/projects/target_apps/common/lib/bsec/user_iaq.c:101:未定义引用“bsec_init”
C:/DA14585\u IOTP\u v6.160.4/DA14585\u IOTP/v6.160.4/projects/target\u apps/common/lib/bsec/user\u iaq.C:117:未定义对“bsec\u update\u subscription”的引用
./bsec_l​​ib/user_iaq.o:在功能`update_iaq'中:
C:/da14585_iotp_v6.160.4/da14585_iotp/v6.160.4/projects/target_apps/common/lib/bsec/user_iaq.c:145:未定义引用“bsec_sensor_control”
c:/da14585_iotp_v6.160.4/da14585_iotp/v6.160.4/projects/target_apps/common/lib/bsec/user_iaq.c:169:未定义的参考“bsec_do_steps”
collect2.exe:错误:ld返回1退出状态
make: *** [iot585.elf] Error 1

10:41:19 Build完成(占用1米:49s.426ms)

如果我做错了,请告诉我。

Thanks

PM_DIALOG.
离线
最后一次露面:12 hours 4 min ago
职员
加入:2018-02-08 11:03
Hi dsteury,

Hi dsteury,

My apologies for the delay. I got feedback from the Team. Unfortunately, Bosch library has big memory demands in the GCC project. As a result, it is not possible to enable the Air Quality Configuration in GCC based project.

谢谢,PM_DIALOG.

达特雷古斯
离线
最后一次露面:10个月1周前
加入:2016-09-28 16:05
谢谢你的回复。

谢谢你的回复。

These steps essentially reduced the code size so that the Air Quality Index code would fit when compiling with Keil. I guess GCC isn't as efficient as Keil when it comes to optimization (I don't know because I don't have access to Keil), but this doesn't really answer the question as to why there are a bunch of undefined references to bsec_init, bsec_set_state, bsec_update_subscription, bec_sensor_control and bsec_do_steps.

I did some more digging and it looks like these functions exist in a library called libalgobsec_full.lib, which is in the same directory as user_iaq.c. I went through some pain trying to get GCC to use this library. In the end, I figured it out, but I came to the same conclusion that this code won't fit in the part. In theory, I think more code for the other sensors could be ripped out to make the Air Quality Index work, but I'm not really sure.

我包括我曾经使用过GCC使用库的步骤,以便其他人不必弄清楚这一点(就像我这样的)。

链接器已经在寻找/ projects / target_apps / iot / common_files / lib中的一些库。我能够通过执行以下步骤获取链接器以查找此库:

1.将libalgobsec_full.lib复制/项目/ target_apps / common / lib / bsec到/ projects / target_apps / iot / common_iot_files

2.将“.lib”扩展名重命名为“.a”,以便文件名是'libalgobsec_full.a'(我注意到这个目录中的其他库有.a版本。当我做了一个文件比较时,我注意到了.lib和.a版本是相同的。)

3. In Eclipse right click iot585 project, Properties, C/C++ General, Paths and Symbols, then under Libraries tab Add 'algobsec_full' (do not use 'libalgobsec', make sure the don't include the 'lib' in front)

4.确保在上面的步骤5中定义IAQ_ENABLED。

5.建造

链接器不应抱怨上述函数的未定义引用,但现在一系列不同的错误出现在:

c:/diasemi/smartsnippetsstudio2.0.10/gcc/7-2018-q2/bin/./lib/gcc/arm none eabi/7.3.1/../../../../../arm none eabi/bin/ld.exe:iot585.elf节“i.bsec\u GasHumidityBaselineTracker\u isBaselineAllowedAdapt”将不适用于区域“LR\u IROM3”

PM_DIALOG.
离线
最后一次露面:12 hours 4 min ago
职员
加入:2018-02-08 11:03
Hi dsteury,

Hi dsteury,

非常感谢您的迹象,很高兴您能够降低代码大小。

谢谢,PM_DIALOG.