So I have quite a bit of experience writing software for Windows (C# and .NET, got an internship while in high school) and a few years ago started writing C code for Atmel and PIC chips while in school for an EE degree. That was a relatively easy transition to wrap my head around.
Now I recently started trying to get into the ARM world and I have had nothing but struggles so far. Maybe I am looking in the wrong places for help but I have spent hours upon hours searching the internet, reading PDFs, reading blogs, reading ARM documentation and while I understand some things I still feel like my knowledge is insufficient to be productive. Is this just me being unrealistic and trying to learn too much at once, is ARM and all the supporting tools (Keil and all of it’s features and quirks) too much for one person to learn as a side hobby? It may be that it’s just too much or maybe like I said I’m looking in the wrong places. Or maybe I am in the right direction and it just takes significantly more time to learn.
It just all seems significantly more convoluted than Atmel for instance. The fact that you have to use CMSIS (which I don’t even really understand the place of), all the stuff about memory maps, scatter files, startup files, SystemInit(). Atmel was just a single header file with all the register definitions, however many C files you needed/wanted. But now there is all of this code being written for you and I hate it because I don’t know what any of the code that Keil wrote under hood is doing. I want to understand it but every time I look at the startup file etc. and try and lookup what the instructions mean I get thoroughly lost. I kind of understand what I see but ultimately I could not reproduce it and that bothers me as like I said I want to know how the stuff works not just accept that it works.
I specifically titled this post “memory map and keil questions” cause my most current road block is trying to understand what these lines of code do.
; <h> Stack Configuration
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
Stack_Size EQU 0x00001000
AREA STACK, NOINIT, READWRITE, ALIGN=3
Stack_Mem SPACE Stack_Size
__initial_sp
; <h> Heap Configuration
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
Heap_Size EQU 0x00000200
AREA HEAP, NOINIT, READWRITE, ALIGN=3
__heap_base
Heap_Mem SPACE Heap_Size
__heap_limit
PRESERVE8
THUMB
My initial research would make me inclined to think I cannot up the stack size past the largest continuous clock of SRAM which is 40kB. But if I need more than 40kB of SRAM do I need to declare new ‘AREA’ (whatever that is) or is the compiler smart enough to decipher this number and put the SRAM into each isolated section on its own. I couldn’t find the answer online.
In general as I stated I just don’t know that I feel knowledgeable enough to be using ARM. So I am looking for suggestions on how to learn all these detailed things that I feel I should know.
I would appreciate any thoughts on books or other good resources to look into. Thanks in advance!
Wes