10-01-2021 11:56 PM
I followed the instructions in section 5 of the BHI260AB SDK Quick Start Guide in order to use the VirtBSXLeanDeviceOrientation and VirtBSXCustomAccelDataSource custom virtual drivers, and I got the following errors:
The specific changes I made were to add the following lines to the end of the board config file:
and to add the following lines to ENABLED_DRIVERS in config.7189_di03_rtos_bhi260.cmake:
I'm using BHI260AB SDK version 1.1.6.
Solved! Go to Solution.
10-09-2021 04:50 AM
Hello NoahAndrews-REV,
Could you share your SW code for review?
10-11-2021 09:29 PM - edited 10-11-2021 09:30 PM
I narrowed down the issue, it occurs when you call printf() with a parameter, like so:
printf("ldo %d %d\n", g_output.orientation[0], g_output.orientation[1]);
Note that I'm using the GCC compiler, not the MetaWare compiler.
10-11-2021 10:05 PM
Hello Noah,
We are talking in perosn, so I will close this issue.
Simply saying that it's required to create custom virutal driver if you want custom virtual driver.
Thanks,
09-12-2023 11:41 AM - edited 09-12-2023 11:44 AM
Hello Minhwan,
I am facing simillar issue, but whíle using external library and unable to link. I am using SDK 1.1.6 version and BHI260AB. Could you share the soultion here?
Error Log:
[61/65] Building C object user/CMakeFiles/user-flash-793988c50c03f635ad347bd7d2b7eb35.dir/config_strings_Bosch_SHUTTLE_BHI260Custom.c.obj
[62/65] Linking C executable user\user-ram-793988c50c03f635ad347bd7d2b7eb35
FAILED: user/user-ram-793988c50c03f635ad347bd7d2b7eb35 user/user-ram-793988c50c03f635ad347bd7d2b7eb35.lib.inc
cmd.exe /C "cmd.exe /C "cd /D C:\Users\KAG1ST\Documents\BHI260AB_SDK_1.1.6\build\user && C:\Users\KAG1ST\Documents\BHI260AB_SDK_1.1.6\win64\cmake\bin\cmake.exe -E remove C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/build/user/user-ram-793988c50c03f635ad347bd7d2b7eb35.usage.csv && cd /D C:\Users\KAG1ST\Documents\BHI260AB_SDK_1.1.6\build\user && C:\Users\KAG1ST\Documents\BHI260AB_SDK_1.1.6\win64\cmake\bin\cmake.exe -P C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/cmake/force_include.cmake 1 C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/build/user/user-ram-793988c50c03f635ad347bd7d2b7eb35.lib.inc C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/build/user/user-ram-793988c50c03f635ad347bd7d2b7eb35.data/libs C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/build/user/user-ram-793988c50c03f635ad347bd7d2b7eb35.data/sections && cd C:\Users\KAG1ST\Documents\BHI260AB_SDK_1.1.6\build" && C:\arc_gnu\bin\arc-elf32-gcc.exe -mno-sdata -Os -include "C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/common/includes/hw_versions.h" -Werror -Wno-error=deprecated-declarations -g -DROM_NAME=bosch_rom -DROM_VERSION=ROM_7189_DI02 -DUSE_RTOS=1 -DRAM_BANKS_OPTIONAL_MAX=7 -DUSE_FLASH_BOOTLOADER=0 -DENCRYPT_USER_PAYLOAD=0 -DMAX_FLASH_FW_SIZE_SECTORS=2046 -DBHI260_OTP_SENSOR_CALIBRATION -DBHI260_ACCEL_RANGE_OFFSET -DBHI260_GYRO_SENSITIVITY_CORRECTION -DBHI260_GYRO_TIMOSC_PLL -nostartfiles -fno-stack-check -mlong-calls -DBHY2_KLIO_PAGE=9 -D__T7189__ -DDEVICE=0x7189 @"C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/common/7189/gcc.arg" -DVERSION=5991 -DVERSION_BUGFIX=5991 -DVERSION_MAJOR=3 -DVERSION_MINOR=0 -DBUILD_DATE="" -DBUILD_TIME="" -DI2C_QUEUE_SIZE=40 -DCONFIG_HAS_FLOAT_MATRIX=0 -DCONFIG_HAS_BOSCH_EXT_DATA=1 -DLARGE_DECIMATION -DPLACEHOLDER_SENSOR_API -DVIRTUAL_MODE_CHANGE -UVIRTUAL_CURRENT_CONSUMPTION -DVIRTUAL_EXPANSION_DATA -DHAS_ACTUAL_RATE -DINTF_STREAMING -e_start -Wl,--start-group -lm -u gEM7189Config -Wl,-T"C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/kernel/kernel-linker.cmd" -u gFwHeader -u gUserEntries -u header_copy_offset -Bdefine:_BUILD_YEAR=2021 -Bdefine:_BUILD_MONTH=4 -Bdefine:_BUILD_DAY=16 -Bdefine:_BUILD_HOUR=13 -Bdefine:_BUILD_MINUTE=26 -Bdefine:_BUILD_SECOND=27 -Bdefine:USER_VERSION=5991 -ffunction-sections -fdata-sections -u gFwHeader_copy -Wl,-e -Wl,user_init @"C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/build/user/user-ram-793988c50c03f635ad347bd7d2b7eb35.lib.inc" user/CMakeFiles/user.dir/main.c.obj user/CMakeFiles/user.dir/stack_check.c.obj user/CMakeFiles/user.dir/hooks.c.obj user/CMakeFiles/user-ram-793988c50c03f635ad347bd7d2b7eb35.dir/config_strings_Bosch_SHUTTLE_BHI260Custom.c.obj -o user\user-ram-793988c50c03f635ad347bd7d2b7eb35 ../kernel/liblibkernel.a libusercrt.a ../drivers/BHI260Accel/libBHI260Accel.a ../drivers/BHI260Gyro/libBHI260Gyro.a ../drivers/BHI260Accel/libBHI260Accel.a ../drivers/BHI260Gyro/libBHI260Gyro.a drivers_custom/VirtBSXAccOcean/libVirtBSXAccOcean.a drivers_custom/VirtBSXGyroOcean/libVirtBSXGyroOcean.a drivers_custom/VirtBSXSensor/libVirtBSXSensor.a ../drivers/VirtBSX/libVirtBSX.a drivers/VirtBSXAccel/libVirtBSXAccel.a drivers/VirtBSXWakeupLinearAccel/libVirtBSXWakeupLinearAccel.a user/RamPatches/libRamPatches.a ../libs/MetawareDouble/libMetawareDouble.a ../libs/MetawarePrintf/libMetawarePrintf.a libs/ocean12_FurtherReduced/libocean12_FurtherReduced.a -Xlinker -Map=user\user-ram-793988c50c03f635ad347bd7d2b7eb35.map -Wl,--end-group && cmd.exe /C "cd /D C:\Users\KAG1ST\Documents\BHI260AB_SDK_1.1.6\build\user && C:\Users\KAG1ST\Documents\BHI260AB_SDK_1.1.6\win64\bin\initdat -q user-ram-793988c50c03f635ad347bd7d2b7eb35 user-ram-793988c50c03f635ad347bd7d2b7eb35 !data !lit !bss ~.ram_keys ~.fw_header ~.fw_header_offset ~.em7189_descriptor .phys_sensor_descriptors .virt_sensor_descriptors .timer_sensor_descriptors ~.reclaim ~.vectors ~.fw_header_copy && cd /D C:\Users\KAG1ST\Documents\BHI260AB_SDK_1.1.6\build\user && C:\Users\KAG1ST\Documents\BHI260AB_SDK_1.1.6\win64\cmake\bin\cmake.exe -P C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/cmake/allocations.cmake C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/build/user/user-ram-793988c50c03f635ad347bd7d2b7eb35.usage.csv C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/build/user/user-ram-793988c50c03f635ad347bd7d2b7eb35.data/libs""
c:/arc_gnu/bin/../lib/gcc/arc-snps-elf/12.2.1/../../../../arc-snps-elf/bin/ld.exe: c:/arc_gnu/bin/../lib/gcc/arc-snps-elf/12.2.1/../../../../arc-snps-elf/lib/em4_fpus\libnosys.a(sbrk.o): in function `_sbrk':
sbrk.c:(.text._sbrk+0x10): undefined reference to `end'
c:/arc_gnu/bin/../lib/gcc/arc-snps-elf/12.2.1/../../../../arc-snps-elf/bin/ld.exe: sbrk.c:(.text._sbrk+0x10): undefined reference to `end'
collect2.exe: error: ld returned 1 exit status
[63/65] Linking C executable user\user-flash-793988c50c03f635ad347bd7d2b7eb35
FAILED: user/user-flash-793988c50c03f635ad347bd7d2b7eb35 user/user-flash-793988c50c03f635ad347bd7d2b7eb35.lib.inc
cmd.exe /C "cmd.exe /C "cd /D C:\Users\KAG1ST\Documents\BHI260AB_SDK_1.1.6\build\user && C:\Users\KAG1ST\Documents\BHI260AB_SDK_1.1.6\win64\cmake\bin\cmake.exe -E remove C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/build/user/user-flash-793988c50c03f635ad347bd7d2b7eb35.usage.csv && cd /D C:\Users\KAG1ST\Documents\BHI260AB_SDK_1.1.6\build\user && C:\Users\KAG1ST\Documents\BHI260AB_SDK_1.1.6\win64\cmake\bin\cmake.exe -P C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/cmake/force_include.cmake 1 C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/build/user/user-flash-793988c50c03f635ad347bd7d2b7eb35.lib.inc C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/build/user/user-flash-793988c50c03f635ad347bd7d2b7eb35.data/libs C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/build/user/user-flash-793988c50c03f635ad347bd7d2b7eb35.data/sections && cd C:\Users\KAG1ST\Documents\BHI260AB_SDK_1.1.6\build" && C:\arc_gnu\bin\arc-elf32-gcc.exe -mno-sdata -Os -include "C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/common/includes/hw_versions.h" -Werror -Wno-error=deprecated-declarations -g -DROM_NAME=bosch_rom -DROM_VERSION=ROM_7189_DI02 -DUSE_RTOS=1 -DRAM_BANKS_OPTIONAL_MAX=7 -DUSE_FLASH_BOOTLOADER=0 -DENCRYPT_USER_PAYLOAD=0 -DMAX_FLASH_FW_SIZE_SECTORS=2046 -DBHI260_OTP_SENSOR_CALIBRATION -DBHI260_ACCEL_RANGE_OFFSET -DBHI260_GYRO_SENSITIVITY_CORRECTION -DBHI260_GYRO_TIMOSC_PLL -nostartfiles -fno-stack-check -mlong-calls -DBHY2_KLIO_PAGE=9 -D__T7189__ -DDEVICE=0x7189 @"C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/common/7189/gcc.arg" -DVERSION=5991 -DVERSION_BUGFIX=5991 -DVERSION_MAJOR=3 -DVERSION_MINOR=0 -DBUILD_DATE="" -DBUILD_TIME="" -DI2C_QUEUE_SIZE=40 -DCONFIG_HAS_FLOAT_MATRIX=0 -DCONFIG_HAS_BOSCH_EXT_DATA=1 -DLARGE_DECIMATION -DPLACEHOLDER_SENSOR_API -DVIRTUAL_MODE_CHANGE -UVIRTUAL_CURRENT_CONSUMPTION -DVIRTUAL_EXPANSION_DATA -DHAS_ACTUAL_RATE -DINTF_STREAMING -e_start -Wl,--start-group -lm -u gEM7189Config -Wl,-T"C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/kernel/kernel-flash-linker.cmd" -u gFwHeader -u gUserEntries -u header_copy_offset -Bdefine:_BUILD_YEAR=2021 -Bdefine:_BUILD_MONTH=4 -Bdefine:_BUILD_DAY=16 -Bdefine:_BUILD_HOUR=13 -Bdefine:_BUILD_MINUTE=26 -Bdefine:_BUILD_SECOND=27 -Bdefine:USER_VERSION=5991 -ffunction-sections -fdata-sections -u gFwHeader_copy -Wl,-e -Wl,user_init @"C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/build/user/user-flash-793988c50c03f635ad347bd7d2b7eb35.lib.inc" user/CMakeFiles/user.dir/main.c.obj user/CMakeFiles/user.dir/stack_check.c.obj user/CMakeFiles/user.dir/hooks.c.obj user/CMakeFiles/user-flash-793988c50c03f635ad347bd7d2b7eb35.dir/config_strings_Bosch_SHUTTLE_BHI260Custom.c.obj -o user\user-flash-793988c50c03f635ad347bd7d2b7eb35 ../kernel/liblibkernel-flash.a libusercrt-flash.a ../drivers/BHI260Accel/libBHI260Accel.a ../drivers/BHI260Gyro/libBHI260Gyro.a ../drivers/BHI260Accel/libBHI260Accel.a ../drivers/BHI260Gyro/libBHI260Gyro.a drivers_custom/VirtBSXAccOcean/libVirtBSXAccOcean.a drivers_custom/VirtBSXGyroOcean/libVirtBSXGyroOcean.a drivers_custom/VirtBSXSensor/libVirtBSXSensor.a ../drivers/VirtBSX/libVirtBSX.a drivers/VirtBSXAccel/libVirtBSXAccel.a drivers/VirtBSXWakeupLinearAccel/libVirtBSXWakeupLinearAccel.a user/RamPatches/libRamPatches-flash.a ../libs/MetawareDouble/libMetawareDouble.a ../libs/MetawarePrintf/libMetawarePrintf.a libs/ocean12_FurtherReduced/libocean12_FurtherReduced.a -Xlinker -Map=user\user-flash-793988c50c03f635ad347bd7d2b7eb35.map -Wl,--end-group && cmd.exe /C "cd /D C:\Users\KAG1ST\Documents\BHI260AB_SDK_1.1.6\build\user && C:\Users\KAG1ST\Documents\BHI260AB_SDK_1.1.6\win64\bin\initdat -q -Xnocompress user-flash-793988c50c03f635ad347bd7d2b7eb35 user-flash-793988c50c03f635ad347bd7d2b7eb35 !data !lit !bss .reclaim_data ~.flash_fw_header ~.flash_fw_header_offset ~.vectors ~.flash_fw_header_copy && cd /D C:\Users\KAG1ST\Documents\BHI260AB_SDK_1.1.6\build\user && C:\Users\KAG1ST\Documents\BHI260AB_SDK_1.1.6\win64\cmake\bin\cmake.exe -P C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/cmake/allocations.cmake C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/build/user/user-flash-793988c50c03f635ad347bd7d2b7eb35.usage.csv C:/Users/KAG1ST/Documents/BHI260AB_SDK_1.1.6/build/user/user-flash-793988c50c03f635ad347bd7d2b7eb35.data/libs""
c:/arc_gnu/bin/../lib/gcc/arc-snps-elf/12.2.1/../../../../arc-snps-elf/bin/ld.exe: c:/arc_gnu/bin/../lib/gcc/arc-snps-elf/12.2.1/../../../../arc-snps-elf/lib/em4_fpus\libnosys.a(sbrk.o): in function `_sbrk':
sbrk.c:(.text._sbrk+0x10): undefined reference to `end'
c:/arc_gnu/bin/../lib/gcc/arc-snps-elf/12.2.1/../../../../arc-snps-elf/bin/ld.exe: sbrk.c:(.text._sbrk+0x10): undefined reference to `end'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Error running cmake build
"build.bat" terminated with exit code 1. Build might be incomplete.
14:47:02 Build Failed. 4 errors, 0 warnings. (took 8s.457ms)
Thank you.