Explanation for IAP RAM reservation on LPC1768

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

Explanation for IAP RAM reservation on LPC1768

ソリューションへジャンプ
103件の閲覧回数
avigt
Contributor I

In a legacy LPC1768/9 MBED project I have to maintain, there is a linker script that narrows the usable RAM range on the top end by 32 bytes. In other words, whereas the true size of SRAM is 32k and the start address is 0x10000000, the imposed end address is 0x10007FE0 (instead of 0x10008000 as one would expect). The brief explanation given for this was "used by IAP functions".

Is this true? Is there some fixed-address memory use of the IAP API? If so, does anyone have a documentation link or more explanation as to why this is?

ラベル(1)
0 件の賞賛
返信
1 解決策
42件の閲覧回数
jcxz
Contributor III

See paragraph 32.3.2.8 of "User manual" (UM10360):

32.3.2.8 RAM used by IAP command handler
Flash programming commands use the top 32 bytes of on-chip RAM. The maximum stack usage in the user allocated stack space is 128 bytes and it grows downwards.

I don't know what is "on-chip RAM" means in that paragraph. According to memory map LPC1768, it could be either:

  • or: "On-chip SRAM 0x10000000 ... 0x10007FFF"
  • or: "AHB SRAM 0x2007C000 ... 0x20083FFF".

I think it's most likely the first range: 0x10000000 ... 0x10007FFF.

 

But if you don't call IAP from your firmware, then you don't need to worry about these 32 bytes.

元の投稿で解決策を見る

2 返答(返信)
20件の閲覧回数
JosephGarland
Fresh Out Contributor

It's always intriguing to uncover the "why" behind these hardware-software interactions. My current "why" is usually focused on clearing lines in games. I've been really enjoying Geometry Dash lately, specifically the satisfying feeling of clearing rows and keeping the board from filling up. It's a nice way to unwind and keep my brain engaged with pattern recognition. Regarding your IAP functions query, does that narrow RAM range cause significant limitations in your project?

0 件の賞賛
返信
43件の閲覧回数
jcxz
Contributor III

See paragraph 32.3.2.8 of "User manual" (UM10360):

32.3.2.8 RAM used by IAP command handler
Flash programming commands use the top 32 bytes of on-chip RAM. The maximum stack usage in the user allocated stack space is 128 bytes and it grows downwards.

I don't know what is "on-chip RAM" means in that paragraph. According to memory map LPC1768, it could be either:

  • or: "On-chip SRAM 0x10000000 ... 0x10007FFF"
  • or: "AHB SRAM 0x2007C000 ... 0x20083FFF".

I think it's most likely the first range: 0x10000000 ... 0x10007FFF.

 

But if you don't call IAP from your firmware, then you don't need to worry about these 32 bytes.

%3CLINGO-SUB%20id%3D%22lingo-sub-2420094%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ELPC1768%E3%81%AB%E3%81%8A%E3%81%91%E3%82%8BIAP%20RAM%E4%BA%88%E7%B4%84%E3%81%AB%E9%96%A2%E3%81%99%E3%82%8B%E8%AA%AC%E6%98%8E%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2420094%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E7%A7%81%E3%81%8C%E4%BF%9D%E5%AE%88%E3%82%92%E6%8B%85%E5%BD%93%E3%81%97%E3%81%A6%E3%81%84%E3%82%8B%E6%97%A7%E5%BC%8F%E3%81%AELPC1768%2F9%20MBED%E3%83%97%E3%83%AD%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%AB%E3%81%AF%E3%80%81%E4%BD%BF%E7%94%A8%E5%8F%AF%E8%83%BD%E3%81%AARAM%E7%AF%84%E5%9B%B2%E3%81%AE%E4%B8%8A%E9%99%90%E3%82%9232%E3%83%90%E3%82%A4%E3%83%88%E7%8B%AD%E3%82%81%E3%82%8B%E3%83%AA%E3%83%B3%E3%82%AB%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%E3%81%A4%E3%81%BE%E3%82%8A%E3%80%81SRAM%E3%81%AE%E5%AE%9F%E9%9A%9B%E3%81%AE%E3%82%B5%E3%82%A4%E3%82%BA%E3%81%AF32k%E3%81%A7%E9%96%8B%E5%A7%8B%E3%82%A2%E3%83%89%E3%83%AC%E3%82%B9%E3%81%AF0x10000000%E3%81%A7%E3%81%82%E3%82%8B%E3%81%AE%E3%81%AB%E5%AF%BE%E3%81%97%E3%80%81%E5%BC%B7%E5%88%B6%E7%9A%84%E3%81%AB%E8%A8%AD%E5%AE%9A%E3%81%95%E3%82%8C%E3%81%9F%E7%B5%82%E4%BA%86%E3%82%A2%E3%83%89%E3%83%AC%E3%82%B9%E3%81%AF0x10007FE0%EF%BC%88%E4%BA%88%E6%83%B3%E3%81%95%E3%82%8C%E3%82%8B0x10008000%E3%81%A7%E3%81%AF%E3%81%AA%E3%81%8F%EF%BC%89%E3%81%A7%E3%81%82%E3%82%8B%E3%80%82%E3%81%93%E3%82%8C%E3%81%AB%E9%96%A2%E3%81%99%E3%82%8B%E7%B0%A1%E5%8D%98%E3%81%AA%E8%AA%AC%E6%98%8E%E3%81%AF%E3%80%81%E3%80%8CIAP%E6%A9%9F%E8%83%BD%E3%81%A7%E4%BD%BF%E7%94%A8%E3%81%95%E3%82%8C%E3%82%8B%E3%80%8D%E3%81%A8%E3%81%84%E3%81%86%E3%82%82%E3%81%AE%E3%81%A0%E3%81%A3%E3%81%9F%E3%80%82%3C%2FP%3E%3CP%3E%E3%81%93%E3%82%8C%E3%81%AF%E6%9C%AC%E5%BD%93%E3%81%A7%E3%81%99%E3%81%8B%EF%BC%9FIAP%20API%E3%81%AB%E3%81%AF%E3%80%81%E5%9B%BA%E5%AE%9A%E3%82%A2%E3%83%89%E3%83%AC%E3%82%B9%E3%81%AE%E3%83%A1%E3%83%A2%E3%83%AA%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E9%83%A8%E5%88%86%E3%81%AF%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%81%8B%EF%BC%9F%E3%82%82%E3%81%97%E3%81%9D%E3%81%86%E3%81%AA%E3%82%89%E3%80%81%E3%81%AA%E3%81%9C%E3%81%9D%E3%81%86%E3%81%AA%E3%82%8B%E3%81%AE%E3%81%8B%E3%80%81%E3%83%89%E3%82%AD%E3%83%A5%E3%83%A1%E3%83%B3%E3%83%88%E3%83%AA%E3%83%B3%E3%82%AF%E3%82%84%E3%82%82%E3%81%A3%E3%81%A8%E8%A9%B3%E3%81%97%E3%81%84%E8%AA%AC%E6%98%8E%E3%82%92%E3%81%8A%E6%8C%81%E3%81%A1%E3%81%AE%E6%96%B9%E3%81%AF%E3%81%84%E3%82%89%E3%81%A3%E3%81%97%E3%82%83%E3%81%84%E3%81%BE%E3%81%99%E3%81%8B%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2420094%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3ELPC17xx%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2420355%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Explanation%20for%20IAP%20RAM%20reservation%20on%20LPC1768%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2420355%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E3%80%8C%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC%E3%83%9E%E3%83%8B%E3%83%A5%E3%82%A2%E3%83%AB%E3%80%8D(UM10360)%E3%81%AE32.3.2.8%E6%AE%B5%E8%90%BD%E3%82%92%E5%8F%82%E7%85%A7%E3%81%97%E3%81%A6%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84%3A%3C%2FP%3E%3CBLOCKQUOTE%3E%3CP%3E32.3.2.8%20IAP%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%83%8F%E3%83%B3%E3%83%89%E3%83%A9%E3%81%8C%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8BRAM%3CBR%20%2F%3E%E3%83%95%E3%83%A9%E3%83%83%E3%82%B7%E3%83%A5%E3%83%A1%E3%83%A2%E3%83%AA%E3%81%AE%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%81%AF%E3%80%81%E3%82%AA%E3%83%B3%E3%83%81%E3%83%83%E3%83%97RAM%E3%81%AE%E4%B8%8A%E4%BD%8D32%E3%83%90%E3%82%A4%E3%83%88%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC%E5%89%B2%E3%82%8A%E5%BD%93%E3%81%A6%E3%81%95%E3%82%8C%E3%81%9F%E3%82%B9%E3%82%BF%E3%83%83%E3%82%AF%E9%A0%98%E5%9F%9F%E3%81%AE%E6%9C%80%E5%A4%A7%E3%82%B9%E3%82%BF%E3%83%83%E3%82%AF%E4%BD%BF%E7%94%A8%E9%87%8F%E3%81%AF128%E3%83%90%E3%82%A4%E3%83%88%E3%81%A7%E3%80%81%E3%81%9D%E3%81%AE%E4%BD%BF%E7%94%A8%E9%87%8F%E3%81%AF%E6%B8%9B%E5%B0%91%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3CP%3E%E3%81%9D%E3%81%AE%E6%AE%B5%E8%90%BD%E3%81%AB%E3%81%82%E3%82%8B%E3%80%8C%E3%82%AA%E3%83%B3%E3%83%81%E3%83%83%E3%83%97RAM%E3%80%8D%E3%81%8C%E4%BD%95%E3%82%92%E6%84%8F%E5%91%B3%E3%81%99%E3%82%8B%E3%81%AE%E3%81%8B%E5%88%86%E3%81%8B%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%E3%83%A1%E3%83%A2%E3%83%AA%E3%83%9E%E3%83%83%E3%83%97LPC1768%E3%81%AB%E3%82%88%E3%82%8B%E3%81%A8%E3%80%81%E3%81%9D%E3%82%8C%E3%81%AF%3CSPAN%3E%E4%BB%A5%E4%B8%8B%E3%81%AE%E3%81%84%E3%81%9A%E3%82%8C%E3%81%8B%3C%2FSPAN%3E%E3%81%A7%E3%81%82%E3%82%8B%E5%8F%AF%E8%83%BD%E6%80%A7%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%3A%3C%2FP%3E%3CUL%3E%3CLI%3E%3CSPAN%3E%E3%81%BE%E3%81%9F%E3%81%AF%3A%20%22%E3%82%AA%E3%83%B3%E3%83%81%E3%83%83%E3%83%97SRAM%200x10000000%20...%200x10007FFF%22%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3E%E3%81%BE%E3%81%9F%E3%81%AF%3A%20%22AHB%20SRAM%200x2007C000%20...%200x20083FFF%22%E3%80%82%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%E3%81%8A%E3%81%9D%E3%82%89%E3%81%8F%E6%9C%80%E5%88%9D%E3%81%AE%E7%AF%84%E5%9B%B2%E3%80%810x10000000%20...%200x10007FFF%20%E3%81%A0%E3%81%A8%E6%80%9D%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%E3%81%97%E3%81%8B%E3%81%97%E3%80%81%E3%83%95%E3%82%A1%E3%83%BC%E3%83%A0%E3%82%A6%E3%82%A7%E3%82%A2%E3%81%8B%E3%82%89IAP%E3%82%92%E5%91%BC%E3%81%B3%E5%87%BA%E3%81%95%E3%81%AA%E3%81%84%E5%A0%B4%E5%90%88%E3%81%AF%E3%80%81%E3%81%93%E3%82%8C%E3%82%89%E3%81%AE32%E3%83%90%E3%82%A4%E3%83%88%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6%E5%BF%83%E9%85%8D%E3%81%99%E3%82%8B%E5%BF%85%E8%A6%81%E3%81%AF%E3%81%82%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E