We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I'm trying to get some arm assembly code to work with macros. I'm using free download version of keil tools. is the macro language the same syntax for armasm arm tools and free download keil tools?
I wanted to use conditional compile macros like:
[ "$var1" = "" LDR r0, =0x1234 | LDR $var1, =0x1234 ]
which is a syntax that works with the ARM compiler, but the keil download is giving me an error.
And the error message I get only points to the line that invokes the macro. Is there a way to get the keil free download to output what the code looks like AFTER all the macro substitution is done?
So, it looks like the problem wasn't my macro at all. It was that my macro was in a file that I had created on Linux and pulled over to Windows.
I created a new project and a new file that did nothing but get my macro file and call the macro once. When I pulled the macro file into the project, the tool said something about the file having bad newline characters and that it would try to fix it. (I can't remember the exact message).
When I tried to assemble, I got the same error message which was something about bad characters at end of line.
I thought "bad characters" meant that my macro had a typo in it somewhere, like MACRO without MEND, or something like that. But this was the first time it had complained about the newline cahracters when I imported teh file, so I wondered if it was a Linux/Windows issue.
So then I wiped out the project and created a new startup.s file, and I retyped the macro from scratch (no cut and paste, nothing to get some old newline characters) and then called the macro in a simple bit of code.
It compiled just fine.
So, somehow the newlines from Linux totally confused the tool, and the error message I got at first wasn't clear that it was a problem with "\n" rather than a problem with a typo in my macro text like a missing MEND or END or ] or whatever.
Argh.
Anyway, thanks for the help, sorry for the false alarm.