RTCS TCP/IP Task stack size reduction

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

RTCS TCP/IP Task stack size reduction

ソリューションへジャンプ
1,863件の閲覧回数
CarlFST60L
Senior Contributor II

Hi Guys,

I am using RTCS which creates a TCP/IP task with 3K of RAM but for my DHCP / TCP / UDP software I have only seen it use well under 1Kb of RAM.

Is it safe to reduce this a little to say 1.5K of RAM? What situations will the TCP/IP task use more RAM?

Here is my task stack usage:

Interrupt stack:    size 00001024    used 00000416

SIZE                  USED                 TASK ID      NAME

00000896(00000380)    00000692(000002B4)   00010001     MAIN_TASK

00000512(00000200)    00000392(00000188)   00010002     X_Task

00000768(00000300)    00000416(000001A0)   00010003     XX_Task

00002304(00000900)    00002144(00000860)   00010004     XXX_Task

00001280(00000500)    00000556(0000022C)   00010005     XXXX_Task

00003328(00000D00)    00002956(00000B8C)   00010006     ETH0_Task

00003000(00000BB8)    00000740(000002E4)   00010007     TCP/IP

0 件の賞賛
返信
1 解決策
1,272件の閲覧回数
DavidS
NXP Employee
NXP Employee

Hi Carl,

Not certain if this solves the issue but...

Hands-on Workshop: Tower System Solutions, Part 3: Optimizing and Configuring an MQX™ RTOS, Intermed...FTF-ENT-F0081Enabling TechnologiesOperating SystemsHands-on Workshop

PDF

The above is from our www.freescale.com/ftf link, click on America's and then Technical Sessions Library.

The general rule of thumb for task stack space is start big and reduce "carefully".

If you have a IDE with TAD (task aware debugging), after running the application through its paces, you can look at the stack space used to get idea of how to adjust.

Regards,

David

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,272件の閲覧回数
CarlFST60L
Senior Contributor II

Ok, so I have done some testing...

I can safely reduce the TCP/IP stack, but this is not he problem.

The problem is the TX/RX buffer size are not shown in the task stack usage, I just noticed the high water go crazy. We only send or receive 256 bytes but it has allocated 4K in and 4K out buffers!

RCTS.jpg

0 件の賞賛
返信
1,273件の閲覧回数
DavidS
NXP Employee
NXP Employee

Hi Carl,

Not certain if this solves the issue but...

Hands-on Workshop: Tower System Solutions, Part 3: Optimizing and Configuring an MQX™ RTOS, Intermed...FTF-ENT-F0081Enabling TechnologiesOperating SystemsHands-on Workshop

PDF

The above is from our www.freescale.com/ftf link, click on America's and then Technical Sessions Library.

The general rule of thumb for task stack space is start big and reduce "carefully".

If you have a IDE with TAD (task aware debugging), after running the application through its paces, you can look at the stack space used to get idea of how to adjust.

Regards,

David

0 件の賞賛
返信