mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-14 00:37:44 -04:00
* Use new version of CI-CD Actions, checkout@v3 instead of checkout@v2 on all jobs * Use cSpell spell check, and use ubuntu-20.04 for formatting check * Add in bot formatting action * Update freertos_demo.yml and freertos_plus_demo.yml files to increase github log readability * Add in a Qemu demo onto the workflows.
38 lines
965 B
C
38 lines
965 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
int main( int argc, char * argv[] )
|
|
{
|
|
setvbuf( stdout, NULL, _IONBF, 0 );
|
|
FILE * fp;
|
|
char path[ 256 ];
|
|
char cmd[ 256 ];
|
|
|
|
/* Open the command for reading. */
|
|
fp = popen("find . -name RTOSDemo.out", "r");
|
|
/* Read the output a line at a time - output it. */
|
|
while( fgets( path, sizeof( path ), fp ) != NULL )
|
|
{
|
|
printf( "Path: %s\n", path );
|
|
}
|
|
|
|
sprintf(cmd, "qemu-system-arm -machine mps2-an385 -monitor null -semihosting --semihosting-config enable=on,target=native -serial stdio -nographic -kernel %s", path);
|
|
printf("cmd= %s\n", cmd);
|
|
fp = popen( cmd, "r" );
|
|
if( fp == NULL )
|
|
{
|
|
printf( "Failed to run command\n" );
|
|
exit( 1 );
|
|
}
|
|
|
|
/* Read the output a line at a time - output it. */
|
|
while( fgets( path, sizeof( path ), fp ) != NULL )
|
|
{
|
|
printf( "%s", path );
|
|
}
|
|
|
|
/* close */
|
|
pclose( fp );
|
|
|
|
return 0;
|
|
}
|