Hi,
I'm new to the C6727 (and TI chips in general) and I was really hoping not to have to code any assembly on this platform as it seems a bit tricky, but here I am!
Our C-code runs as a module that gets called from a system which we have no control over. It is uncertain how much stack memory is available to us, and since we need quite a bit of stack I would like to set the stack pointer to a place in memory which is allocated for us. In pseudocode it would look like so:
void ModuleEntry(void* pOurMemory) {
// Save stack pointer (B15) somewhere and point B15 to pOurMemory
asm("...");
// Call our code
DoStuffThatPutsLotsOf MemOnStack();
// Restore B15
asm("...");
}
Are there any pitfalls on doing this on the C6727? Also, if someone would be so kind as give me some pointers on how to write this in assembly I'd appreciate it. Especially on how to access C variables from asm() since it does not seem to have the option to take C variables as input and output parameters, as is possible with asm() statements on some other compilers.
Thanks,
TINewbie