Hello,
I am trying to learn how to use the device, not the innermost working of the VSLI design. :-) I am consulting the Reference Manuals, but they are proving to be a challenge.
Please let me give some background, indicating what I know, and what I am trying to learn...
I have been a C/C++ developer for decades in Windows and Linux. I also have experience with small MCUs, 8 and 16bit, mostly in the PIC Microchip line. I am migrating toward working in a project at my employer which is ARM based (short explanation, it's moving knowledge and support inside, off of contractor dependence)
To begin with, I have already been through the first two books by Valvano, and they were very helpful. I am using the TI CCS environment and their TM4C boards. However, the goal is the ARM V7 device by TI (Sitara AM335x), so I moved up to a BeagleBone board.
I have already done plenty of sample, simple programs accessing ports, registers, etc. But the ultimate project is using TI RTOS. However, support from their community if horrible (in my experience, over the past 10 months).
Suddenly, trying to use the RTOS, accessing a port gives me a databus fault. TI's position is use their libs... except they don't have samples and libs for what I need. (they pushed something that was not complete or comprehensive... how nice of them)
I am NOT expecting anyone here to support that suite of software. I just explain it to show the roadblock I encountered and how I am trying to learn from it.
I have been able to narrow down to that fact that my earlier samples didn't use the MMU, but the TI RTOS appears to be enabling it. I can just turn it back off, but there are tables that can be set to control memory access, and that appears to be what is going on. I am trying to understand the way the device itself works. I always try to learn from these types of roadblocks. And I don't have their source to use as tutorial or figure out what is being done.
So I have been going through the ARMV7 Architecture Ref manual (ARM - ARM), and finding it amazingly difficult. Many things are referenced in one place, only to be defined many pages later. It is almost like I have to read the document backwards. I have seen this in the way the document mentions the power of secure mode, privilege levels, virtual memory with access control, etc...
So, that said, I am looking for material that can "teach" the specifics of programming the ARMv7, as I already have learned the basic materials for ARM in general from Valvano's books for the Cortex-M TM4C devices .
Valvano's books do not deal with the alternate CPSR or other banked registers. Nor does the device he uses have the features of the A8 device anyway. For example, I was able to learn the register banking concept from the Cortex-A8 TRM document. But the rest is proving to be quite challenging without materials that are designed as educational introduction materials (starting small and building on it, with sample assembly code).
I do see there are videos, and I would be willing to use them. But I I would first want to know which ones would give me the value in what I am trying to learn, so as to not spend the money or time covering material I already know.
Thank you for any advice.
-Scott
Hi. There is no complete books about how to program Cortex M4 processors in all aspects.
I will describe you my way of understanding how to program System on Chip (SoC) with Cortex M4 core (it does not matter M3, M4, M7 or A-,R- series, concept the same).
My first experience is Freescale(NXP) Tower system with main SoC of Freescale(NXP) Kinetis K70 (Cortex M4 core). All that I knew at the beginning stage is ANSI C language and low-power nature of microcontrollers. For programming the SoC I used bare metal codes in combination with K70 sub-family reference manual (this manual provides comprehensive information about how system boots from reset stage).
So, first I studied SoC sub-family (or family) reference manual to understand how system boots and from what place first. In parallel I studied Cortex M4 (and also M3) Technical Reference Manual to understand core modules and how to program them. Second, I have programmed an evaluation board for educational purposes, so I used solely bare metal codes.
Later I have started to program Atmel Sam5d2 Xplained (SoC Sam5d2 family) evaluation board with bare metals (the main core Cortex A5). I used SAMA5D2 Series Datasheet (family reference manual) from Atmel and Cortex-A Series Programmer's Guide from ARM, and also I used Cortex A5 Technical Reference Manual.
I have problems with understanding of memory protection goals in embedded systems, and particularly with central protection systems like MMU (memory management unit) and MPU (memory protection unit). That is why I started to study Operating Systems to understand their role in embedded systems and other computers. You can try to fix this lack of knowledge in your mind reading a book, for example, Modern Operating Systems (author Andrew S. Tanenbaum). After reading a memory management chapter of the book I understand the main purpose of Memory Management Unit.
So, in conclusion, the basic approach I use is - >
- first, what system you need and for what goals, what do you want from your system to do;
- second, choose appropriate system and try to find family reference manual about this system, how it boots, what modules it includes, what functionalities it provides;
- third, find out a specification of the core of the processor of the system to download Technical Reference Manual and programming guide (if it exists), it doesn't matter if the system is multiprocessor system even with clusters of processors (in such a case you need to study more technical reference manuals), there always exists general approach to boot multiprocessor system which is described in family reference manual. ARM also provides Architecture Reference Manuals (there is no need to read all manual) which explains everything which could be implemented in such version of core.
- fourth, you need reference manual for Operating System (in your case is RTOS) to understand programming interfaces and features of the system.
And also you need some tools for code writing, compilation, linking and loading into target device.
Thanks for your reply.
Unfortunately for me, there is an existing project done by some contractors I need to start contributing to. So I don't have a choice of what devices to use. The devices, environment, loading and debugging, are already selected. I am using a BeagleBone for my education component, because it's the same device in the existing project.
The TI device tech ref manuals are horrible. To figure out how the boot process works was back in chapter 26 on page 5,000+. And the assumption necessary in reading their manual is that you have already internalized everything in "ARM Architecture Reference Manual ARMv7-A..." because it mostly provides specifications of how the internal peripherals were implemented.
So, I am looking for a good path that can be regarded as a "HowTo" for beginners. Your's looked good, and I have some things on my own.
I have solved my problem original, both in getting a good understanding of the MMU, as well as where all the TI Sys/Bios packages are screwed up not configuring access to the peripheral memory sections.
I found a good blog from someone, although rather old, plus I ordered an ARM book also rather old, but appears to cover what I want to learn. Here are links for anyone who also wishes to do some learning.
http://www.embedded-bits.co.uk/2011/writeanmlo/
https://www.elsevier.com/books/arm-system-developers-guide/sloss/978-1-55860-874-0
Thanks.
hello,
I totally disagree that TI manuals are horrible.
Did you try training.ti.com? They have workshop series on TI- RTOS as well as on M4, maybe more....
BTW - I am not TI employee.
I've been through the web site, all over it, many times, including all the Eric Wilbur videos and MindShare labs. His material is very good, but doesn't go into the detail level I was looking for in Armv7 (Sitara). I started out with this material on Tiva.
None of it details the MMU, the operating modes, the banked registers, etc. I got that from ARM docs here on "Arm.com"
I've also been through pages and pages of things, only to discover "Opps... that doesn't apply to the newer versions of [ BIOS, RTOS, NDK, PDK, TivaWare, etc...] "
They are pushing stuff out so fast, and it's untested. I've got headers that are loaded with syntax errors and won't even compile!
Just trying to follow the instructions to install and build the Am335x PDK doesn't work. I asked, and an "e2e" reply I got was "Yes, just ignore that and use the prebuilt libs".
If there are other and better "instruction manuals" I haven't ever seen them. I'm referring to the Tech Ref manuals that almost should be read backwards... There are places they document some operation being based on setting "X", but there is nothing that defines "X" until about 200 pages later.
If this is "normal" than I'm just not used to "TI normal". All the ref manuals I've read from other suppliers are not organized that way.
Anyway, the level of detail I'm needing to learn is better learned from the ARM docs, not from the TI docs.
I would recommend ARM M3/M4 book by Joseph Yiu. author is ARM designer and his books are highly recommended.
good luck and have fun!