⚠️
嗨,...感谢您来论坛。令人兴奋的消息!我们现在正在迁至我们的新论坛平台,将提供更好的功能,并包含在主对话框网站中。所有帖子和帐户都已迁移。我们现在只接受新论坛上的流量 - 请发布任何新线程https://www.dialog-seminile.com/support.。我们将在未来几天修复错误/优化搜索和标记。
10个帖子/ 0新
最后一篇
ddustin
离线
最后一次露面:1 year 2 months ago
加入:2016-04-20 22:12
rom vs ram.

在Dev Pro Board上使用智能片段“BLE_PERITELAL”项目和“QSPI”部署方法时,程序存储在哪里?

Is it being stored in RAM taking up 110KB of ram (leaving a mere 15KB for running) or is it stored somewhere else?

如何减小使用的RAM的大小,使得MBedTL有足够的RAM运行?

Device:
PM_DIALOG.
离线
最后一次露面:3天15小时前
职员
加入:2018-02-08 11:03
Hi ddustin,

Hi ddustin,

按Program_qspi_serial_win或program_qspi_jtag_win时,应用程序代码存储在QSPI Flash中而不是进入RAM。由于代码未下载INT RAM,以防您想要为MBedTLS拥有足够的RAM,因此您应该增加可用的RAM的可用区域。因此,我强烈建议您通过配置来增加总堆大小configtotal_heap_size.在自定义custom_config_qspi.h标题文件中的宏。

谢谢,PM_DIALOG.

ddustin
离线
最后一次露面:1 year 2 months ago
加入:2016-04-20 22:12


你好,

Thanks for your help!

使用示例项目BLE_PLEIWAWAL,我提高了堆大小:

#define configTOTAL_HEAP_SIZE 40000 /* This is the FreeRTOS Total Heap Size */

在构建时,我收到此错误:

Building target: ble_peripheral.elf
调用:交叉臂C链接器
C:/ Diasemi / SmartsnippetsStudio / GCC / 4_9-2015Q1 / Bin /../ Lib / GCC / ARM-None-EABI / 4.9.3 /../../../../ ARM-None-EABI /bin/ld.exe: ble_peripheral.elf section `RETENTION_RAM0' will not fit in region `RetRAM0'
C:/ Diasemi / SmartsnippetsStudio / GCC / 4_9-2015Q1 / Bin /../ Lib / GCC / ARM-None-EABI / 4.9.3 /../../../../ ARM-None-EABI /bin / ld.exe:区域`retram0'溢出到19488年字节
collect2.exe: error: ld returned 1 exit status
制作:*** [ble_peripheral.elf]错误1

降低堆大小为20,512允许程序编译,但是对于MBedTLS不留出足够的内存来执行基本的“Crypto_Asymmetric_key_Pair_Gen”操作。

ddustin
离线
最后一次露面:1 year 2 months ago
加入:2016-04-20 22:12


HM可能不再是内存问题。它在一个新的地方崩溃:

hw_watchdog_handle_int() at hw_watchdog.c:111 0x7fc4286
NMI_HandlerC() at hw_watchdog.c:143 0x7fc42f2
() at 0xfffffff9
Bignum.c:889 0x80011A8的Mbedtls_mpi_add_abs()
ECP_CURVES.C的ECP_MOD_KOBLITZ():1,271 0x8003030
ECP_Curves.c:1,322 0x800304e处的ecp_mod_p256k1()
ecp_modp() at ecp.c:678 0x8001cc4
ECP_ADD_MIXED()在ECP.C:1,048 0x800272E
ecp_mul_comb_core() at ecp.c:1,297 0x8002be6
ECP_MUL_COMB()在ECP.C:1,400 0x8002BE6
MBEDTLS_ECP_MUL()在ECP.C:1,632 0x8002E72
MBEDTLS_ECP_GEN_KEYPAIR_BASE()在ECP.C:1,892 0x8002EFC
mbedtls_ecp_gen_keypair() at ecp.c:1,903 0x8002f24
MBEDTLS_ECP_GEN_KEY()在ECP.C:1,917 0x8002F4E
crypto_asymmetric_key_pair_gen() at bo_crypto.c:320 0x800e8d2
main() at main.c:129 0x800e9fa

这个后退是什么意思?

编辑:我相信我认为这一点。我已经修改了configtotal_heap_size,也是__heap_size。我相信Malloc正在返回导致崩溃的无效内存。

#define configtotal_heap_size 20512 / *这是freertos total堆大小* /
#define __HEAP_SIZE 8000

我猜我不应该修改__heap_size。增加可用内存以使用MBedTL的正确方法是什么?

PM_DIALOG.
离线
最后一次露面:3天15小时前
职员
加入:2018-02-08 11:03
Hi ddustin,

Hi ddustin,

对不起,但我有点混淆你的描述。如果您在更改总堆大小的情况下解决了问题,请澄清您是否可以澄清您的问题?

谢谢,PM_DIALOG.

ddustin
离线
最后一次露面:1 year 2 months ago
加入:2016-04-20 22:12
No the problem is still the

No the problem is still the same. When adding the crypto routines to the ble_peripheral example program and using the configTOTAL_HEAP_SIZE macro to set it to 20,000, the program still haults inside of the crypto library in a way the implies it is out of memory.

请帮忙。如何使用BLE堆栈和加密惯例进行项目?

PM_DIALOG.
离线
最后一次露面:3天15小时前
职员
加入:2018-02-08 11:03
Hi ddustin,

Hi ddustin,

你应该减少最小RAM的大小imum allowable size that you can compile you project and maximize the heap size to the maximum size, for example 70000 in order to increase the allocated memory. So, you should increase the heap size and decrease the RAM size. Also, you have to use the OS_FREE)_ and OS_MALLOC() for the tasks. Please, try that and let me know.

谢谢,PM_DIALOG.

ddustin
离线
最后一次露面:1 year 2 months ago
加入:2016-04-20 22:12
I was able to get the ble

通过关闭DG_CONFIGUSE_WDOG并删除看门狗的所有使用,我能够使用Crypto获取BLE_Peripheral示例程序。

这个看门狗用于和为什么它被启用打破加密惯例?

PM_DIALOG.
离线
最后一次露面:3天15小时前
职员
加入:2018-02-08 11:03
Hi ddustin,

Hi ddustin,

看门狗机制是一种特殊的硬件计时器,可用于在软件执行期间自动检测意外的系统行为。DA1468X系列设备包含一个由10.24 ms时钟脉冲驱动的8位下计数器,导致最大2.6秒超时。为了获取更多关于DA1468x系列设备中实现的看门狗(WDOG)机制的更多信息,我会非常建议您阅读该部分5重启分析 - WDOGof the调试技巧教程(HTML)tutorial from our support page. Be aware that you could find very useful documentation in the DA14680 tab of our portal. Also, it is strongly recommended to have a look at the DA14680 datasheet, section30个看门狗定时器。所以,你的代码在使用加密例程时获得堆栈的原因是已经采取了很长时间的东西,而不是看门狗超时。当您使用异步事件而且您不知道要收到它们时,最好的做法是冻结WDOG,直到您获得活动。既然你得到它,你应该再次激活和重新加载它。通常,WDOG用于同步事件。WDOG是一个计数器反转,固件应该在常规时间段和超时之前重新加载它。如果您发现上述任何答案有用请标记其中一个接受。

谢谢,PM_DIALOG.

ddustin
离线
最后一次露面:1 year 2 months ago
加入:2016-04-20 22:12
Thanks for the help!

Thanks for the help!