I would like to enable the True Random Number Generator to create advertising intervals to prevent collision among several units.
I'm editing the DA1458x_beacon_v_5.40.2 project files.
In DA1458x_config_advanced.h I define:
#define CFG_TRNG
Using Keil uVision v5.27.1.0 I click rebuild all target files. I then end up with this error:
。\ out_580 \ dialog_beacon_580.axf:错误:l6218e:未定义的符号trng_acquire(由Arch_System.O引用)。
At first the trng.h file gave me an error:错误:未知类型名称“uint8_t”
To fix this error I added this to trng.h:
#include
#include“compiler.h”//内联函数
#include "stdbool.h"
The error went away, but I still have the L6218E linker error.
Have anyone else run into this problem?
Thank you for your time.
关键词:
设备:
Hi dlo,
目前不支持DA14580产品的灯塔,因为我们已亚博电竞菠菜搬入DA15585 / 56产品系列和新SDK6。请在我们的支持网站上查看DA14585 / 6:
//www.xmece.com/products/connectivity/bluetooth-low-energy/smartbond-da14585-and-da14586
有一个名为Multi-Sensor Kit的参考设计,支持信标实现。请注意,建议使用DA14585 IOT Multi传感器开发套件进行新设计。
https://www.dialog-seminile.com/produ亚博电竞菠菜cts/da14585-iot-multi-sensor-development-kit.
If you are not interested in moving into DA14585/6, please use one of the examples of SDK5.0.4 which is the attest SDK for DA14580/1/3 products.
Regarding your question for True Random Number Generator (TRNG),it is not existed as a hardware block, but we have an available API of this kind of usage, so I would highly recommended to have a look at the SDK and follow the USE_TRNG definition. You can get a 128-bit random number by calling the function trng_acquire() from trng.h/c library. To enable the True Random Number Generator you need to define the CFG_TRNG flag. A random number is generated at system initialization and used to seed the C standard library random number generator. In order to get from the 580 a random number the SDK uses the radio module and by altering the values of the radio registers it obtains the random number. Please, check the source code of trng_acquire() function.
Thanks, PM_Dialog
你好pm_dialog,
我们已经在生产环境中,因此我们无法切换到DA14585 / 6。
I am following the SDK example and enable the CFG_TRNG flag as previously posted in the original question. Following the code I could see USE_TRNG is set to 1 when CFG_TRNG is defined, however as you see in my previous comment, when I try to build. I get this linker error that doesn't seem to make any sense since I can see the include files for the trg.h and .c file included but somehow it's not able to link to the trng_acquire() function.
这是非常紧急的在这一点上,我们需要重新lease this firmware for mass production.
Ho dlo,
The L6218E linker error is typically relating to variable declarations. Could you please send me a screenshot?
Thanks, PM_DIalog
This is the build log:
重建启动:项目:Dialog_BeAcon
***使用Compiler'V5.06更新6(Build 750)',文件夹:'C:\ Keil_v5 \ ARM \ ARMCC \ Bin'
重建目标'beaccon_580'
assembling boot_vectors.s...
compiling system_ARMCM0.c...
compiling arch_console.c...
compiling nvds.c...
编译hardfault_handler.c.
编译nmi_handler.c.
编译syscntl.c ...
compiling uart_ext_wkup.c...
compiling arch_sleep.c...
compiling jump_table.c...
compiling arch_main.c...
compling Arch_patch.c ...
compiling adc.c...
compiling spi.c...
compiling gpio.c...
compiling spi_flash.c...
编译ARCH_SYSTEM.C ...
compiling prf_utils.c...
compiling gapm.c...
编译Bass.c.
compiling rf_580.c...
compiling rwip.c...
编译rwble.c.
compiling bass_task.c...
compling spotar_task.c.
compling spotar.c.
compiling diss.c...
compling dist_task.c ...
compiling app_default_handlers.c...
compiling app_security_task.c...
compiling app_msg_utils.c...
编译app_security.c.
compiling app.c...
编译app_task.c ...
compiling app_entry_point.c...
compling app_easy_msg_utils.c ...
compiling app_bass.c...
compiling app_bass_task.c...
compiling app_diss.c...
compling app_diss_task.c.
compiling app_easy_timer.c...
compiling app_easy_security.c...
compiling app_spotar_task.c...
compling app_spotar.c ...
compiling adc_notify.c...
编译adc_notify_task.c ...
compling device_config.c.
compling device_config_task.c ...
compling user_periph_setup.c.
compling user_adc_notify.c.
compiling user_device_config.c...
compiling user_device_config_task.c...
compiling user_adc_notify_task.c...
compiling crc32.c...
compiling user_config_storage.c...
compiling user_dialog_beacon.c...
compiling battery.c...
compling user_beacon_utilities.cn ...
链接......
。\ out_580 \ dialog_beacon_580.axf:错误:l6218e:未定义的符号trng_acquire(由Arch_System.O引用)。
Not enough information to produce a SYMDEFs file.
没有足够的信息来生成反馈文件。
Not enough information to list image symbols.
没有足够的信息来列出图像映射中的加载地址。
完成:4个信息,0警告和1条错误消息。
“。\ out_580 \ dialog_beacon_580.axf” - 1错误(s),0警告。
目标未创建。
建立时间过去:00:00:08
Hi dlo,
Did you have include the trng library in arch_system file? I am not able to replicate your issue. Are you using the trng_acquire in this file?
Thanks, PM_DIalog
I didn't edit the arch_system file. I do see in the file the following, which I assume has been tested and works:
#if (USE_TRNG)
#include "trng.h" // True random number generator API
#endif
在包括路径中build, I see the folder trng is included.
Hi dlo,
我打开了项目,正如您在附加快照的IMG1中看到的,TRNG,UART2和SYSTICK驱动程序未被正确包含。按照附件中找到的步骤操作,以便再次删除并添加它们。驱动程序位于DA1458X_BEACON \ v_5.40.2 \ SDK_580 \ SDK \ Platflick \ Driver文件夹路径下。之后,我能够编译项目。
Thanks, PM_Dialog
非常感谢你的帮助!