MisaghSepehr
Newbie level 6
- Joined
- Jul 15, 2010
- Messages
- 14
- Helped
- 3
- Reputation
- 6
- Reaction score
- 3
- Trophy points
- 1,283
- Activity points
- 1,384
Hello every one;
I'm recently interested in learning ARM microcontroller and I'm a newbie in this field.
in order to experience memory addressing for this microcontroller I have written a program in KEIL uvision for AT91SAM7x256 chip.
after preprocessor instructions this is first line of my program:
BUT when I change this command to:
but compiler gives the error: (Variable_Addressing is the name of my program)
what's the reason? why without initialization compiler gives an error?
and for second state I changed the instruction to:
so the addresses 0x0020 FFF0 and 0x0020 0F00 both are in the SRAM addressin range (64KB=0x0000 FFFF \[\to\] 0x0020 0000 + 0x0000 FFFF = 0x0020 FFFF and both adresses mentioned above are in this range)
what is the reason? (Notice that both addresses are factors of number 4 (as compiler expects for int variable))
I use KEIL \[\mu\]Vision 4.73.0.0 version.
Thank you in advance
I'm recently interested in learning ARM microcontroller and I'm a newbie in this field.
in order to experience memory addressing for this microcontroller I have written a program in KEIL uvision for AT91SAM7x256 chip.
after preprocessor instructions this is first line of my program:
for this instruction I have no errors.int var __attribute__((at(0x00200000)))=0x68;
BUT when I change this command to:
(assume I don't want to initialize the variable at the beginning of the execution)int var __attribute__((at(0x00200000)));
but compiler gives the error: (Variable_Addressing is the name of my program)
.\Variable_Addressing.axf: Error: L6971E: variable_addressing.o(.data) type RW incompatible with variable_addressing.o(.ARM.__AT_0x00200000) type ZI in er RW_IRAM1.
Not enough information to list image symbols.
Finished: 1 information, 0 warning and 1 error messages.
what's the reason? why without initialization compiler gives an error?
and for second state I changed the instruction to:
orint var __attribute__((at(0x0020FFF0)))=0x68;
the compiler gives following error:int var __attribute__((at(0x00200F00)))=0x68;
as you know AT91SAM7x256 has a 64 KB SRAM and address of SRAM first cell is 0x0020 0000..\Variable_Addressing.axf: Error: L6971E: variable_addressing.o(.ARM.__AT_0x0020FFF0) type RW incompatible with sam7.o(STACK) type ZI in er RW_IRAM1.
Not enough information to list image symbols.
Finished: 1 information, 0 warning and 1 error messages.
so the addresses 0x0020 FFF0 and 0x0020 0F00 both are in the SRAM addressin range (64KB=0x0000 FFFF \[\to\] 0x0020 0000 + 0x0000 FFFF = 0x0020 FFFF and both adresses mentioned above are in this range)
what is the reason? (Notice that both addresses are factors of number 4 (as compiler expects for int variable))
I use KEIL \[\mu\]Vision 4.73.0.0 version.
Thank you in advance
Last edited: