Defining Heap Segment in external ram in IAR M32c Renesas

Nov 05, 2007 8 Replies

For my application purpose i used an external 128k Sram to M30845fjg renesas m32c controller.



I modified the linker file by defining the heap sizes in externa addresses, but i was unable to have the heap segment.



when iam placing data in ex-ram it was getting read, but the heap is no going to allocate even though the map file is locating the heap ranges.



can u help me to get out of this.


Due to some problem, My reply has not got posted. I am posting it onceagain.

Check the following :

1) Memory Overlap in the Linker Script / Linker Command File. 2) Proper invokation of Heap Memory Allocation w.r.t linker script. See, if you are allocating within the defined range. 3) Even though you have allocated the Heap memory correctly by directing it to refer to the external memory, Did you check if the external memory is operational / enabled at the time of allocation ? 4) Proper chip-selects for the external SRAM memory. 5) Do a basic sanity check of your external SRAM to find if it is working properly. a) Data bus wiring check ( test the bus one bit at a time. The data bus passes the test if each data bit can be set to 0 and 1, independently of the other data bits.) that is , Walking 1's test. b) Address Bus check - Perform read/write similar to data bus check

- can try with "power-of-two" addresses read/write to check every bit Write to one of the addresses and check if there is any overwriting in other address .

Karthik Balaguru

Also , Take care of the influence(Re-Mapping/Address Shifting) due to MMU (If you use MMU).

Karthik Balaguru

Check the following :

1) Memory Overlap in the Linker Script / Linker Command File. 2) Proper invokation of Heap Memory Allocation w.r.t linker script. See, if you are allocating within the defined range. 3) Even though you have allocated the Heap memory correctly by directing it to refer to the external memory, Did you check if the external memory is operational / enabled at the time of allocation ? 4) Proper chip-selects for the external SRAM memory. 5) Do a basic sanity check of your external SRAM to find if it is working properly. a) Data bus wiring check ( test the bus one bit at a time. The data bus passes the test if each data bit can be set to 0 and 1, independently of the other data bits.) that is , Walking 1's test. b) Address Bus check - Perform read/write similar to data bus check

- can try with "power-of-two" addresses read/write to check every bit Write to one of the addresses and check if there is any overwriting in other address .

Karthik Balaguru

Appologies. I wonder why this message appears very late. Refer my earlier post in this same thread in which i have mentioned as below - " Due to some problem, My reply has not got posted. I am posting it onceagain. "

Strange, but how did the above message(re-post) got posted and this message(original message) arrives after that ? Actually this message(Original message) was posted before that message(re-post) !!! :(:(. Strange :(:(:( !!!!

Karthik Balaguru

First of all thanking for ur valueable reply, i tried ur suggestions bu still no change in the problem.

File.

what u said at the time of allocating,how can we check this.

mode 0, with seperate bus.

Regards srikanthn

Ok.

Ok.

Ok. Is the Memory Read and Write operation possible in the allocation region.

If you are using your own allocation routine. Then, modify it to read and print the data from the region or write some data into the region and read-back with delay before allocation.

.>> 4) no chip-selects iam using for the external SRAM memory, iam using

Ok. Thats fine.

Did you try those, Walking 1s , Basic Sanity checks, Address Bus , Data Bus checks w.r.t SRAM ?

Karthik Balaguru

chip-selects iam using for the external SRAM memory, iam using

Do you use MMU ?

Kawrthik Balaguru

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required