This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C & Assembly

Hello,I'm using the soft-core Cortex-M0,keil uvision 5,vivado 14.4
i interfaced an adder with my arm architecture
first,i used the assembly language, the simulation in vivado simulator worked correctly.
my first assembly code--->
--------------------------------------------
Reset_Handler PROC
GLOBAL Reset_Handler
ENTRY
LDR R1,=0x59000000
LDR R0,=0x33
STR R0,[R1]
-------------------------------------------
Now, i want to use C nd Assembly language but simulation doesn't work, it can't access to the adder registers
the second assembly-->
----------------------------------------------------
Reset_Handler PROC
GLOBAL Reset_Handler
ENTRY
IMPORT __main
LDR R0, =__main
BX R0
ENDP
---------------------------------------------------------
the C code-->
-----------------------------------------------------------
#define AAA 0x59000000
int main(void) {
*(unsigned int*)AAA=0x44 ; }
--------------------------------------------------------
i can't know what's my fault