I'm using the soft-core Cortex-M0,keil uvision 5,vivado 14.4 i interfaced an accelerator with my arm architecture,
when i do this ,everything was alright in the vivado simulator
volatile signed int *rega = (volatile signed int *) 0x59000000; *rega=45;
but when i try this
volatile signed int *rega = (volatile signed int *) 0x59000000; int A[]={45,45}; *rega=A[0];
the simulation doesn't work,ther's no access to the register:0x59000000
really i can't understand if i do this: int A[]={1,1}; *rega=A[0]; *rega=4; the result of simulation: int A[]={1,1}; --> hADDR=0x0000fff0 nd HWDATA =1 --> hADDR=0x0000fff4 nd HWDATA =1
*rega=A[0]; --> hADDR=0x59000000 nd HWDATA =X
*rega=4; --> hADDR=0x59000000 nd HWDATA =4
May be you are not initializing the statics properly?
Review ALL the code that is being executed, and step through it.
Try:
static const int A[]={1,1}; *rega=A[0]; *rega=4;
thanks a lot, it works
I've another question, the same error when declaring a void function
void kalman(int A[2][2]){ volatile signed int *rega = (volatile signed int *) 0x59000000; *rega=74; } int main(void) {
static int A[2][2]={{4,5}, {11,10}}; kalman(A); }
Ok, so doesn't that suggest you have a problem with your code initializing the statics properly? You should probably look at the memory described in the scatter file, and how the load regions are initializing.
why if i do like that the HWDARA= 129??
void kalman(int a){
volatile signed int *rega = (volatile signed int *) 0x59000000; *rega=a;
} int main(void){ static int b; b=4;
kalman(b); }
Why? Do you not understand what you are being told or observing? Is there someone in your project group that has some more experience and insight? Your manager perhaps, or the person assigning the project?
You need to evaluate ALL the code being run in your system, and very specifically the startup and system code, the code unpacking the runtimes load region, the functionality of the RAM, and how the memory is described in the scatter file.