Hello, I was wondering if someone could give me some assistance. I am current using the TM4C1294 - Tiva micro-controller and attempting to store a few lists which I would like to use in a Main.c file. The lists are a little too big to store the data inside my program. (I also need to access the consistently within the nanosecond timeframe (<<100 ns).
The program consists of main.c (C & ASM), system_tm4c129.c,TM4C1294NCPDT.h & startup_TM4C129.s
I have attempted to store data in "startup_TM4C129.s" (Right at the end)
AREA Table, DATA, READONLY STANDARD_COLOURS DCB 0,0,0,0 ;No Colour / OFF DCB 255,0,0,0 ;Green DCB 0,255,0,0 ;Red And the list goes on....
The data can be successfully compiled however I am unsure about whether this data can make it past the complication stage (I doubt it).
I am trying to access this list from my main.c(within an assembly insertion) and all I can typically get is #29: expected an expression (LDR R5, =STANDARD_COLOURS). I have been editing the startup.s file but I can't seem to get this working.
I am trying to transfer the address of the table STANDARD_COLOURS(starup.s) to a register so that I can perform successive fast calculations in a consistent manner.
In the past (Solely Assembly program) I have been able to run through a data table but I may have complicated things by trying to use mixed assembly.
Any help would be greatly appreciated - I have spent a considerable amount of time but my expertise is definitely not in programming...
If you have global variables, then C and assembler can each access the variables just by having the variable exported from one of the source files. The linker will properly adjust the references to the variable.
I forgot to mention - ARM has the ABI well documented, i.e. which registers that are used for parameter passing and for passing return values. And which registers that must keep their content when a function returns.
Keil and ARM have lots of useful documents that you might retrieve while you go hunting for the documentation of the processor instructions.