I created an array with a few numbers in it. I need to know in which registers are the stored in the ARM Cortex A8 processor of the C6A816x.
Thanks
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I created an array with a few numbers in it. I need to know in which registers are the stored in the ARM Cortex A8 processor of the C6A816x.
Thanks
#include <stdio.h> /* * hello.c */ int main(void) { printf("Hello World!\n"); int i,a[10],swap,c,d; for(i=0;i<10;i++) { a[i] = 10-i; } for (c = 0 ; c < 9; c++) { for (d = 0 ; d < 9 - c; d++) { if (a[d] > a[d+1]) /* For decreasing order use < */ { swap = a[d]; a[d] = a[d+1]; a[d+1] = swap; } } } for ( c = 0 ; c < 10 ; c++ ) printf("%d\n", a[c]); return 0; }
I am new to CCS and am trying simple sorting code just to see where the data and instruction get seated in the memory
The array (int a[10]) is stored not into the Cortex-A8 ARM core registers, but into the DM816x device L3 (On-Chip Memory Controller) OCMC0 RAM0 memory, starting from 0x4030510C (a[0] is at that location). See the attached screen shots:
The DM816x internal L3 OCMC RAM is in two parts:
L3 OCMC0 RAM0 : start from 0x40300000 to 0x4033FFFF (256KB)
L3 OCMC1 RAM1 : start from 0x40400000 to 0x4043FFFF (256KB)
Regards,
Pavel