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...
When going across files you want to export the symbol(s) on the assembler side and prototype them as externals on the C side.
Hi Weston,
Thanks for the information. I will start to do some digging. You wouldn't happen to have an example for something similar (Probably a bit too hopeful here) ?
Would it be a new symbol such as (Or should I put the data inside one of these Exception Handlers?)
GPIOT_Handler\ PROC EXPORT GPIOT_Handler [WEAK] B . ENDP
Thanks again for such a fast response.
Martin