⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
8个帖子/ 0新
Last post
bobspam@free.fr.
Offline
Last seen:1 month 2 days ago
Joined:2018-06-20 08:07
Freertos 10和Posix

Hello

I am willing to use the posix lib from amazon-freertos located at :
https://github.com/aws/amazon-freertos.
It is packaged with freertos 10 while the DA1468x SDK is packaged with freertos 8.

是否有任何路线图,指示是否计划升级时?

Thank you in advance

ST

Keywords:
Device:
PM_Dialog
Offline
Last seen:4 hours 44 min ago
Staff
Joined:2018-02-08 11:03
Hi bobspam@free.fr,

Hibobspam@free.fr.,

我们正在DA1468X SDK中使用Freertos 10支持。释放的预期时间线是2019年Q2。

谢谢, PM_Dialog

bobspam@free.fr.
Offline
Last seen:1 month 2 days ago
Joined:2018-06-20 08:07
Hello

Hello

Thank you for your answer. It is good to know but I can not wait 6 month.

我用10个替换了大部分Freertos 8档。从亚马逊的POSIX LIB将新版本与亚马逊的汇编最终确定如果:
- ARM_C0/port.c and portmacro.h are not updated. (new version implements Thumb-2 that end-up to some compilation errors)
——激活configSUPPORT_STATIC_ALLOCATION。的following statements must be included in main.c :
https://www.freertos.org/a00110.html#configSUPPORT_STATIC_ALLOCATION
- #define configIDLE_TASK_STACK_SIZE 60 (the figure 60 has been reported to be used in some other Cortex-M0 projects)

我结束了
Building target: FreeRTOS_Demo.elf
Invoking: Cross ARM C Linker
[...]
C:/程序文件(x86)/ diasemi / smartsnippetsstudio / gcc / 4_9-2015q3 / bin / s / lib / gcc / arm-none-eabi / 4.9.3 / ../../../../ARM-None-EABI / bin / ld.exe:freertos_demo.elf部分`.bss'不适合区域`RAM'
C:/程序文件(x86)/ diasemi / smartsnippetsstudio / gcc / 4_9-2015q3 / bin / s / lib / gcc / arm-none-eabi / 4.9.3 / ../../../../arm-none-eabi/bin/ld.exe: region RAM overflowed with stack
C:/程序文件(x86)/ diasemi / smartsnippetsstudio / gcc / 4_9-2015q3 / bin / s / lib / gcc / arm-none-eabi / 4.9.3 / ../../../../ARM-None-EABI / bin / ld.exe:区域`RAM'溢出864个字节

Meaning that I need to clean-up the SDK by removing unused features...

To be continued

PM_Dialog
Offline
Last seen:4 hours 44 min ago
Staff
Joined:2018-02-08 11:03
Hi bobspam@free.fr,

Hibobspam@free.fr.,

As it has already been mentioned in the precious post, the is not currently supported. Although, glad that you replaced most of FreeRTOS 8 files by 10 ones and thanks for the indication.

谢谢, PM_Dialog

bobspam@free.fr.
Offline
Last seen:1 month 2 days ago
Joined:2018-06-20 08:07
Hi PM_Dialog,

Hi PM_Dialog,

A few days of work later

- DA14683 SDK can be compiled successfully with arm-none-eabi-gcc version 15:6.3.1+svn253039-1build1 delivered in standard with Ubuntu LTS 18.0.4. Default configuration of the compiler is broken but homemade Makefile withnostdlib.activated on both compilation and linking finally works.
- The following sequence must be linked manually : crt0.o crti.o crtbegin.o [-L paths] [user objects] [gcc libs] [C libs] [gcc libs] crtend.o crtn.o ( thanks to Gentoo forum :https://dev.gentoo.org/~vapier/crt.txt). This sequence does not seem to be properly set in Eclipse environment. To be checked; because it seems that there are some system headers used and redefinition happens when trying to use amazon POSIX libs.

- FreeRTOS files from amazon repository can be used "as is" to replace the V8 delivered in the SDK
- V8 ARM_C0/port.c and portmacro.h must still be used because of implementation of DA1468x low level features
- #define configSUPPORT_STATIC_ALLOCATION 1 (with functions added to main.c. see previously)
- #define configUSE_POSIX_ERRNO 1 must be added in FreeRTOSConfig.h
- 要清理某些标题文件的一些相对路径,以避免使用V8报头
- remove PRIVILEDGE_DATA redefinition in V10 mpu_wrappers.h
- 使用空的freertos_posix_portable.h从其他目标

- POSIX files from amazon repository can be added to the project and compiled as is.

freertos_retarget works fine on USB dev kit using this configuration.

I still need to check POSIX implementation of amazon before going on but all this sounds mature and ready to be used so you should consider to move forward and bring it into the SDK. POSIX libs is a very efficient way to prototype software under linux and to bring it down to embedded systems.

To be continued...

bobspam@free.fr.
Offline
Last seen:1 month 2 days ago
Joined:2018-06-20 08:07
Hello

Hello

I do confirm that there is no major difference between FreeRTOS 8 embedded in the SDK and FreeRTOS 10 maintained by Amazon.

Porting ARM_C0/port.c and portmacro.h is straightforward. Source code is identical with one exception at the beginning of assembly sections where FreeRTOS 10 enable the usage of Thumb2.

I do confirm that it works easily and that POSIX adaptation layer is also working.
pthread_create is OK.

Heap consumption is higher so memory map must be checked, "stack overflow" and "malloc failed" hooks must be activated to get proper debug.

亚马逊版本缺少pthread_cancel函数以正确执行服务析构函数。这在不设计关闭的系统中不应该是至关重要的。

最好的祝福

PM_Dialog
Offline
Last seen:4 hours 44 min ago
Staff
Joined:2018-02-08 11:03
Hi bobspam@free.fr,

Hibobspam@free.fr.,

谢谢for your indications.

谢谢, PM_Dialog

bobspam@free.fr.
Offline
Last seen:1 month 2 days ago
Joined:2018-06-20 08:07
Hello,

Hello,

Amazon implementation of pthread uses a very low level of stack memory for a created thread.
必须使用pthread_attr_t来通过手动设置每个线程的堆栈大小来获得整个系统的正确行为。

I also do confirm that mutex and message queue works too.
Condition variables and semaphore are still to be tested on my side.

的Amazon software is delivered with a lot of other nice stuff
- MQTT
- PKCS11
- TLS.

Next version of DA1468x might be 256k of internal memory :-)

谢谢