9 posts / 0 new
Last post
hrg
Offline
Last seen:2 years 5 months ago
Guru
加入:2014-08-05 13:37
Code size exceeding the SRAM

Hi Dialog Team ,

1)Am using an I2C eeprom as external memory to boot from it.After booting through this eeprom (mirroring to SRAM ) ,will this I2c lines will be free ie. can i use the same port0_2 & 0_3 for another component (say and I2C RTC) .Because i have declared the RTC I2c pins in the source code which is dumped into the eeprom . Since EEPROM is using the I2c for Booting will the SDA and SCL lines will always be busy ?

2) suppose if the code size is exceeding the size of SRAM (42kB) whihc boots from EEPROM ,then how will it copy the code to SRAM ?will it be copying the code in part by part ,taking some addtional time for each fetch ?

Thankyou.

hrg
Offline
Last seen:2 years 5 months ago
Guru
加入:2014-08-05 13:37
Hi Dialog Team awaiting for

Hi Dialog Team awaiting for your response !

JE_Dialog
Offline
Last seen:11 hours 37 min ago
Staff
加入:2013-12-05 14:02
Hello hrg, for (1), i dont

hello hrg,for(1),我不相信你可以做到这一点。我会仔细检查实验室。

For (2) : memory swap is a complex task on the 14580 : we dont recommend to go above the 32kB SRAM . Simply put , the device image (profiles+application etc.) should be within the 32kB limit.

BR JE_Dialog

gayan_gamage
Offline
Last seen:4 years 9 months ago
加入:2016-04-28 21:23
你好,你为什么不推荐

你好,你为什么不推荐to go beyond 32KB SRAM, my application needs 35KBRam. With the version 5, the code is bulky and i really have to add some modules which are essential like SPOTA

MT_dialog
Offline
Last seen:2 months 3 weeks ago
Staff
加入:2015-06-08 11:34
Hi gayan_gamage,

Hi gayan_gamage,

There are limitations that you will have to consider, the fact that you are going beyond the 32K bytes of code that means that you will not be able to use the OTP memory, without using the OTP memory you will not be able to use the deep sleep feature. Other than that, you can use more space but you will have to change the mapping of your image in the scatterfile and consider the amount of RAM usage during runtime. Last but not least, in order to compile an image larger than the 32K you will need a full license for keil, since the evaluation version compiles up to 32K data.

Thanks MT_dialog

gayan_gamage
Offline
Last seen:4 years 9 months ago
加入:2016-04-28 21:23
Hi,

Hi,

I have the full license. The extended sleep should be fine, I changed the scatter file according to an instruction I saw at (from this forum ) . Please see the attached and let me know if that is exactly what the (bottom description) is about. I had issues using that. See also instruction 1. and b. conflicts (9000 vs 7bco). Do I have to comment all of the code inside the if sections for a.
Please have a look at the code and let me know.

1.通过更改散射文件并将ER_IROM5设置为ER_IROM5 0x20000440 0x7BC0来增加ER_IROM5以获得0xFF空间。

2. Increase the code space in the ER_IROM5 by removing the RW_IRAM50 and add the available space in the ER_IROM5 section. Also you can move the RW_IRAM51 in a different address. A possible candidate to include the non-retained heap is the ZI_RET20 section. By doing this a continuous memory area from 0x20000440 to 0x20009000 of almost 35kB will be available for source code and RW data. In order to implement this follow the below instructions.

a. Remove the RW_IRAM50 and RW_IRAM51 sections

湾将ER_IROM5的大小更改为ER_IROM5 0x20000440(0x9000 - 0x440)

c. The non retention heap will be moved, say in ZI_RET20, by adding the following line jump_table.o(heap_mem_area_not_ret) in both ZI_RET20 definitions.

Attachment:
MT_dialog
Offline
Last seen:2 months 3 weeks ago
Staff
加入:2015-06-08 11:34
Hi gayan_gamage,

Hi gayan_gamage,

In the forum post you ve found are presented some tips in order for the user to extend the memory of his system beyond the 32K limit, the above tips are not applicable all of them at the same time, since some of them confilcting with each other, as you ve noticed. You will have to study the needs of your application and adapt your scatterfile according to your requirements. Regarding your scatterfile, in the LR_IROM5 at the ER_IROM5 you ve set the size to 0x9000 from 0x20000440 thats 0x20009440 and overlaps with the RW_IRAM52 area, try setting the size to (0x9000 - 0x440).

Thanks MT_dialog

hrg
Offline
Last seen:2 years 5 months ago
Guru
加入:2014-08-05 13:37
Thankyou JE_Dialog . Please

Thankyou JE_Dialog . Please check (1) and confirm asap .If the same port cannot be used then ,do we need to use some other port in the software ?

JE_Dialog
Offline
Last seen:11 hours 37 min ago
Staff
加入:2013-12-05 14:02
Hello hrg, for (1) : yes, you

Hello hrg, for (1) : yes, you can do that :

There is however a 'but'.. The address of the I2C RTC should be different to the address of I2C memory.
RTC's may have an address setting (.e.g. A0) possibility.

BR JE_Dialog