SparkFun Forums 

Where electronics enthusiasts find answers.

Everything ARM and LPC
By wcarl
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.
Code: Select all
; <h> Stack Configuration
;   <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>

Stack_Size      EQU     0x00001000

Stack_Mem       SPACE   Stack_Size

; <h> Heap Configuration
;   <o>  Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>

Heap_Size       EQU     0x00000200

                AREA    HEAP, NOINIT, READWRITE, ALIGN=3
Heap_Mem        SPACE   Heap_Size

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!

By cfb
The 32-bit ARM microcontrollers are in a totally different league to the Atmel and PIC devices you have had experience with. You should expect there to be a steeper learning curve with the significantly more powerful, capable and complex ARM devices.

I would recommend that you start off with one of the smaller ARM Cortex-M3 systems aimed at beginners (e.g. an NXP LPC176x mbed board or LPCXpresso board). I would not recommend C if you had no previous programming experience but as you already have then you know what to expect there. You do NOT have to use CMSIS if you do not want to. The book I recommend is Joseph Yiu's "The Definitive Guide to the ARM Cortex-M3". You should also download the User Manual and Datasheet for your chosen microcontroller from the manufacturer's website.

Good Luck!
By cfb
... I should also have mentioned Coridium's PRO-Plus and Super-PRO ARM Cortex-M3 boards. These are extremely easy to get started with.
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]