Allow our main to accept arguments
This commit is contained in:
parent
c41cd3b75e
commit
f89da621d9
|
@ -57,7 +57,11 @@
|
|||
#include <stdint.h>
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int
|
||||
#if PLATFORM_MAIN_ACCEPTS_ARGS
|
||||
main(int argc, char **argv)
|
||||
#else
|
||||
main(void)
|
||||
#endif
|
||||
{
|
||||
platform_init_stage_one();
|
||||
|
||||
|
|
|
@ -98,6 +98,18 @@
|
|||
#define PLATFORM_PROVIDES_MAIN_LOOP 0
|
||||
#endif
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
* Controls whether the main function accepts arguments
|
||||
*
|
||||
* By default our main does not accept arguments. However, when running on
|
||||
* native targets, command line arguments to main are required.
|
||||
*/
|
||||
#ifdef PLATFORM_CONF_MAIN_ACCEPTS_ARGS
|
||||
#define PLATFORM_MAIN_ACCEPTS_ARGS PLATFORM_CONF_MAIN_ACCEPTS_ARGS
|
||||
#else
|
||||
#define PLATFORM_MAIN_ACCEPTS_ARGS 0
|
||||
#endif
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
* \brief Basic (Stage 1) platform driver initialisation.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue