Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Q: Global variables with C and ASM / pass argument from ASM to C function ?

2005-04-15 by ateichtmann

Hi,

im using CrossWorks and LPC2106 and have the following question:

I want to make a ram check before main (in the module crt0.s).
Therefore, i have to pass the result of the ram check in some way to 
main. Maybe, there are two solutions:

1. Modify the main function to pass an argument from crt0:
int main(int ResultRAMCheck)
I dont know, how to modify main() in this way and how to pass an 
argument from an assembler module to a C function.

2. define a global variable, that is known in main.c and in crt0.s
Im not sure, if this works, and i dont know how to declare global 
variables in the assembler module.

Thanks for all hints.

Regards
Arvid

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.