STM8: Cosmic compiler: save virtual register c_lreg. Add details on Cosmic virtual registers to documentation. IAR compiler: Add __task to entry points to reduce unnecessary stack usage.

This commit is contained in:
Kelvin Lawson
2010-05-27 00:38:45 +01:00
parent c0c953b476
commit 5402faf224
7 changed files with 191 additions and 72 deletions

View File

@@ -122,8 +122,15 @@ static void main_thread_func (uint32_t data);
*
* Sets up the STM8 hardware resources (system tick timer interrupt) necessary
* for the OS to be started. Creates an application thread and starts the OS.
*
* If the compiler supports it, stack space can be saved by preventing
* the function from saving registers on entry. This is because we
* are called directly by the C startup assembler, and know that we will
* never return from here. The NO_REG_SAVE macro is used to denote such
* functions in a compiler-agnostic way, though not all compilers support it.
*
*/
void main ( void )
NO_REG_SAVE void main ( void )
{
int8_t status;
@@ -164,7 +171,10 @@ void main ( void )
}
/* There was an error starting the OS if we reach here */
return;
while (1)
{
}
}