You'd think that for a Technical Writer, I'd be more willing to RTFM.
So, my task today was to get my HelloWorld program to compile and maybe run.
The first thing I had to figure out was a scatter file to get past the error I was fighting with yesterday. I put one together from "ADS 1.2 Build Tools - Errors and Warnings".
Once I had that saved and included in the Options for Target dialog, my
HelloWorld.axf: Error: L6206E: Entry point (0x00000000) lies outside the image.
error from yesterday went away, but I got another build error:
HelloWorld.axf: Error: L6204E: Entry point (0x00000000) does not point to an instruction.
This one puzzled me for a few minutes -- after all, I had an entry point. I noodled around until I realized that I didn't have any valid instructions. This version of the program was as follows:
AREA HelloWorld, CODE, READONLY ;
ENTRY ;
mystart
stop
END
I just wanted it to build, after all. I didn't expect it to do anything.
I added a couple of commands. I also dug back through the Gibson book to see if there was anything else I needed to be doing to be using the Keil tools. The result was a build-able program.
Here's the code, btw:
; A Hello World type of program intended to see if I can get something to compile.
; Name: HelloWorld.s
; spliced together from Gibson's example on p. 40.
AREA HelloWorld, CODE, READONLY ;
ENTRY ;
EXPORT Reset_Handler ;
Reset_Handler
mystart
MOV R3, R3 ;
MOV R3, #25 ;
stop
BAL stop ;
END ;
(I know the semicolons are not necessary eol, but I can't help myself.)
After that, I got the following error:
*** error 65: access violation at 0xFFFFFFFC : no 'read' permission
Of course, this is not a build error, it is an error error.
-aah, progress.
Up for tomorrow: Try to figure out why the debugger Disassembly pane displays code that doesn't resemble the code I wrote.
Monday, December 7, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment