/* Specify the memory areas RAM 16 Kb */
MEMORY
{
SRAM : ORIGIN = 0x1FFFF000, LENGTH = 0x00004000
}
1. this is our RAM region which is specified in the linker file so i used the 0x1ffff000 as base address
2. As you mentioned i didn't write the stack area but still i face the previous warnings and it doesn't get into main function ,here is the modified code
ram_test_3:
ldr r2, =__HeapBase /* Base address to start Heap segment 0x1ffff494*/
ldr r1, =0 /* Counter to keep track of address during write operation */
ldr r3, =320 /*Size of data segment 0x500 = 1280 bytes /4(each adress having 4 bytes) = 320 */
loop_3:
ldr r0, =0xaaaaaaaa
ldr r7, [r2]
str r0, [r2] /* Copy the values into register */
ldr r4, [r2]
cmp r4, r0
bne error
ldr r0, =0x55555555
str r0, [r2] /* Copy the values into register */
ldr r4, [r2]
cmp r4, r0
bne error
str r7, [r2]
adds r2, #4 /* increments the address by 4 bytes */
adds r1, #1
cmp r1, r3
blt loop_3 /*if r2 less than 0x200003f0 Branch less than - BLT the loop continues */
ram_test_2:
ldr r2, =__bss_start__ /* Base address to start bss segment 0x1ffff494*/
ldr r1, =0 /* Counter to keep track of address during write operation */
ldr r3, =496 /*Size of data segment 0x7c0 = 1984 bytes/4 = 496 */
loop_2:
ldr r0, =0xaaaaaaaa
ldr r7, [r2]
str r0, [r2] /* Copy the values into register */
ldr r4, [r2]
cmp r4, r0
bne error
ldr r0, =0x55555555
str r0, [r2] /* Copy the values into register */
ldr r4, [r2]
cmp r4, r0
bne error
str r7, [r2]
adds r2, #4 /* increments the address by 4 bytes */
adds r1, #1
cmp r1, r3
blt loop_2 /*if r2 less than 0x200003f0 Branch less than - BLT the loop continues */
ram_test_1:
ldr r2, =__data_start__ /* Base address to start data segment 0x1ffff000*/
ldr r1, =0 /* Counter to keep track of address during write operation */
ldr r3, =293 /*Size of data segment 0x494 = 1172bytes / 4 = 293 */
loop_1:
ldr r0, =0xaaaaaaaa
ldr r7, [r2]
str r0, [r2] /* Copy the values into register */
ldr r4, [r2]
cmp r4, r0
bne error
ldr r0, =0x55555555
str r0, [r2] /* Copy the values into register */
ldr r4, [r2]
cmp r4, r0
bne error
str r7, [r2]
adds r2, #4 /* increments the address by 4 bytes */
adds r1, #1
cmp r1, r3
blt loop_1 /*if r2 less than 0x200003f0 Branch less than - BLT the loop continues */
ram_test_4:
ldr r2, =0x2000500 /* Base address to start Remaining segments 0x200000f0*/
ldr r1, =0 /* Counter to keep track of address during write operation */
ldr r3, =2745 /*Size of Remaining segment 10,980 bytes/4(each adress having 4 bytes) */
loop_4:
ldr r0, =0xaaaaaaaa
ldr r7, [r2]
str r0, [r2] /* Copy the values into register */
ldr r4, [r2]
cmp r4, r0
bne error
ldr r0, =0x55555555
str r0, [r2] /* Copy the values into register */
ldr r4, [r2]
cmp r4, r0
bne error
str r7, [r2]
adds r2, #4 /* increments the address by 4 bytes */
adds r1, #1
cmp r1, r3
blt loop_4 /*if r2 less than 0x200003f0 Branch less than - BLT the loop continues */
3. Is there any ways to over come the warnings mentioned?
4. Is it possible to read write the entire SRAM region, except Stack in the startup code for testing purpose ?
5.I want to know what is the process happening in the SRAM before startup code execution.
kindly clarify