Arm Community
Site
Search
User
Site
Search
User
Support forums
Keil forum
LPC845 - ARM Compiler V6 - Declaring and using constants in LP845_startup.s assembly code
Jump...
Cancel
State
Not Answered
Locked
Locked
Replies
0 replies
Subscribers
23 subscribers
Views
1559 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
How was your experience today?
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
LPC845 - ARM Compiler V6 - Declaring and using constants in LP845_startup.s assembly code
SudeshS108
over 5 years ago
I am looking for an example with the Arm V6 compiler, for reading and writing
GPREG0 register of the PMU on the L
PC845.s?
Specifically, how do you do something like a #define in the assembly code with the ARM V6 compiler?
For the V5 compiler, I can do something like this:
DL_SIG_ADDR EQU 0x40020004 ; GPREG0 address is
0x40020004
And then use it in the assembly code like so, where I load the GPREG0 address into R1 and then I can read the contents of this register:
LDR R1, =DL_SIG_ADDR
LDR
R2
, [R
1
]
But for the V6 compiler, if I use the "EQU" instruction, I get a compiler error as follows:
Build started: Project: osr_boot_lpc845_brk
*** Using Compiler 'V6.14', folder: 'C:\Keil_v5\ARM\ARMCLANG\Bin'
Build target 'osr_app_lpc845_brk release'
startup/startup_LPC845.s(94): error: unexpected token in argument list
DL_SIG_ADDR EQU 0x40020004
^
assembling startup_LPC845.s...
"release\osr_boot_lpc845_brk.out" - 1 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed: 00:00:00