コード例 #1
0
ファイル: main.c プロジェクト: Pedersen175/DAN-uMon
int
Cstart(void)
{
	char	**argv;
	int		argc;

	/* Connect the application to the monitor.  This must be done
	 * prior to the application making any other attempts to use the
	 * "mon_" functions provided by the monitor.
	 */
	monConnect((int(*)())(*(unsigned long *)MONCOMPTR),(void *)0,(void *)0);

	/* When the monitor starts up an application, it stores the argument
	 * list internally.  The call to mon_getargv() retrieves the arg list
	 * for use by this application...
	 */
	mon_getargv(&argc,&argv);

	/* Call main, then exit with the return from main().
	 */
	mon_appexit(main(argc,argv));

	/* Won't get here. */
	return(0);
}
コード例 #2
0
ファイル: main.c プロジェクト: Pedersen175/DAN-uMon
/* CstartAlt():
 * Demonstrates the use of the "call -a" command in uMon. 
 * For example, if for some reason you wanted to do this...
 * Load the application then load the symtbl file using
 * "make TARGET_IP=1.2.3.4 sym", then issue these commands:
 *
 *  tfs -v ld app
 *  call -a %CstartAlt one two three
 *
 * The "call -a" command in uMon correctly sets up the function
 * call parameters so that the following function would see 4
 * arguments (including arg0), with argv[1] thru argv[3] being
 * pointers to each of the number strings (i.e. "one", "two", "three")
 * and argv[0] being the ascii-coded-hex address of the function
 * CstartAlt.
 */
int
CstartAlt(int argc, char *argv[])
{
	monConnect((int(*)())(*(unsigned long *)MONCOMPTR),(void *)0,(void *)0);
	main(argc,argv);
	mon_appexit(0);
	return(0);
}
コード例 #3
0
ファイル: main1.c プロジェクト: Pedersen175/DAN-uMon
int
start(void)
{
	int	argc;
	char	**argv;

	monConnect((int(*)())(*(unsigned long *)MONCOMPTR),(void *)0,(void *)0);

	/* Extract argc/argv from structure and call main(): */
	mon_getargv(&argc, &argv);

	/* Call main, then return to monitor. */
	return(main(argc, argv));
}
コード例 #4
0
ファイル: umonrtemsglue.c プロジェクト: 0871087123/rtems
void rtems_umon_connect(void)
{
  int(*moncomptr)(int,void *,void *,void *);

  if ( rtems_umon_connected )
    return;

  rtems_umon_connected = 1;

  moncomptr = rtems_bsp_get_umon_monptr();
  monConnect(
    moncomptr,                                    /* monitor base */
    (void *)0,                                    /* lock */
    (void *)0                                     /* unlock */
  );
}
コード例 #5
0
ファイル: demo_app.c プロジェクト: dan-sw/DAN-uMon
int
start(void)
{
    char	**argv;
    int		argc;

    /* Connect the application to the monitor.  This must be done
     * prior to the application making any other attempts to use the
     * "mon_" functions provided by the monitor.
     */
    monConnect((int(*)())(*(unsigned long *)MONCOMPTR),(void *)0,(void *)0);

    /* Extract argc/argv from structure and call main():
     */
    mon_getargv(&argc,&argv);

    /* Call main, then return to monitor.
     */
    return(main(argc,argv));
}