By the way, I'm not jumping into the Keil tools without any preliminaries. I read Gibson's ARM Assembly Language, an Introduction. I was hoping that would be enough to get me to a "Hello World" level.
Not quite.
The first thing that struck me is the degree to which this is embedded programming. Doing C doesn't involve first choosing a target architecture.
ARM programming does, however, so the first choice I was faced with was to pick a chip to write to. I started with "ARM7 (Big Endian)", which I assumed (and still assume) is vanilla.
I then copied a few lines of sample code from Gibson's book, tried to build it, and got my first error:
HelloWorld.axf: Error: L6206E: Entry point (0x00000000) lies outside the image.
Okey-dokey.
Let's try the same thing with another chip, say something from Samsung:
First, this selection got me the option to create a Startup.s file. OK. That file assumed an entry point in a C program and blew an error when it didn't find it.
NP: I commented out a couple of offending IMPORT statements and got a compile.
After a side-trip through creating a separate source file, I decided to try simply adding my basic code to the startup file. That compiled, but the debugger didn't reach it.
A couple more misadventures in a different project later, I decided to go back to my first HelloWorld and troubleshoot the first error some more. As far as I can tell, there's a map file that defines the image. The linker settings that I found (Options for Target dialog) are requesting a 0 sized region for my code.
Which explains why my entry point is outside it.
The next thing I'll try is digging through the linker settings, looking for a way to set the sizes if the relevant parts of the memory map.
No comments:
Post a Comment