ARM and ARMv7-M ELF support; STM32F4Discovery ELF loader test configuration
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5264 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
449d1d82e4
commit
f863b72ced
@ -333,8 +333,8 @@ examples/elf
|
|||||||
include the path to the genromfs executable.
|
include the path to the genromfs executable.
|
||||||
|
|
||||||
3. ELF size: The ELF files in this example are, be default, quite large
|
3. ELF size: The ELF files in this example are, be default, quite large
|
||||||
because they include a lot of "build garbage". You can greately reduce the
|
because they include a lot of "build garbage". You can greatly reduce the
|
||||||
size of the ELF binaries are using the objcopy --strip-unneeded command to
|
size of the ELF binaries are using the 'objcopy --strip-unneeded' command to
|
||||||
remove un-necessary information from the ELF files.
|
remove un-necessary information from the ELF files.
|
||||||
|
|
||||||
4. Simulator. You cannot use this example with the the NuttX simulator on
|
4. Simulator. You cannot use this example with the the NuttX simulator on
|
||||||
|
@ -74,6 +74,10 @@ static int leaf(int *some_arg)
|
|||||||
printf("leaf: Calling longjmp() with %d\n", some_local_variable);
|
printf("leaf: Calling longjmp() with %d\n", some_local_variable);
|
||||||
|
|
||||||
longjmp(env, some_local_variable);
|
longjmp(env, some_local_variable);
|
||||||
|
|
||||||
|
/* We should not get here */
|
||||||
|
|
||||||
|
return -ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int function(int some_arg)
|
static int function(int some_arg)
|
||||||
|
@ -93,7 +93,7 @@ void sigusr1_sighandler(int signo)
|
|||||||
void sigusr2_sigaction(int signo, siginfo_t *siginfo, void *arg)
|
void sigusr2_sigaction(int signo, siginfo_t *siginfo, void *arg)
|
||||||
{
|
{
|
||||||
printf("sigusr2_sigaction: Received SIGUSR2, signo=%d siginfo=%p arg=%p\n",
|
printf("sigusr2_sigaction: Received SIGUSR2, signo=%d siginfo=%p arg=%p\n",
|
||||||
signo, siginfo, arg);
|
signo, siginfo, arg);
|
||||||
|
|
||||||
#ifdef HAVE_SIGQUEUE
|
#ifdef HAVE_SIGQUEUE
|
||||||
if (siginfo)
|
if (siginfo)
|
||||||
@ -163,7 +163,7 @@ int main(int argc, char **argv)
|
|||||||
if (old_sigusr1_sighandler == SIG_ERR)
|
if (old_sigusr1_sighandler == SIG_ERR)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Failed to install SIGUSR1 handler, errno=%d\n",
|
fprintf(stderr, "Failed to install SIGUSR1 handler, errno=%d\n",
|
||||||
errno);
|
errno);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ int main(int argc, char **argv)
|
|||||||
if (status != 0)
|
if (status != 0)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Failed to install SIGUSR2 handler, errno=%d\n",
|
fprintf(stderr, "Failed to install SIGUSR2 handler, errno=%d\n",
|
||||||
errno);
|
errno);
|
||||||
exit(2);
|
exit(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -263,7 +263,7 @@ int main(int argc, char **argv)
|
|||||||
if (old_sigusr2_sighandler == SIG_ERR)
|
if (old_sigusr2_sighandler == SIG_ERR)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Failed to install SIGUSR2 handler, errno=%d\n",
|
fprintf(stderr, "Failed to install SIGUSR2 handler, errno=%d\n",
|
||||||
errno);
|
errno);
|
||||||
exit(7);
|
exit(7);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -275,8 +275,8 @@ int main(int argc, char **argv)
|
|||||||
if ((void*)old_sigusr2_sighandler != (void*)sigusr2_sigaction)
|
if ((void*)old_sigusr2_sighandler != (void*)sigusr2_sigaction)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Old SIGUSR2 signhanlder (%p) is not sigusr2_sigation (%p)\n",
|
"Old SIGUSR2 signhanlder (%p) is not sigusr2_sigation (%p)\n",
|
||||||
old_sigusr2_sighandler, sigusr2_sigaction);
|
old_sigusr2_sighandler, sigusr2_sigaction);
|
||||||
exit(8);
|
exit(8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,6 +74,10 @@ static int leaf(int *some_arg)
|
|||||||
printf("leaf: Calling longjmp() with %d\n", some_local_variable);
|
printf("leaf: Calling longjmp() with %d\n", some_local_variable);
|
||||||
|
|
||||||
longjmp(env, some_local_variable);
|
longjmp(env, some_local_variable);
|
||||||
|
|
||||||
|
/* We should not get here */
|
||||||
|
|
||||||
|
return -ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int function(int some_arg)
|
static int function(int some_arg)
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@ -93,7 +94,7 @@ void sigusr1_sighandler(int signo)
|
|||||||
void sigusr2_sigaction(int signo, siginfo_t *siginfo, void *arg)
|
void sigusr2_sigaction(int signo, siginfo_t *siginfo, void *arg)
|
||||||
{
|
{
|
||||||
printf("sigusr2_sigaction: Received SIGUSR2, signo=%d siginfo=%p arg=%p\n",
|
printf("sigusr2_sigaction: Received SIGUSR2, signo=%d siginfo=%p arg=%p\n",
|
||||||
signo, siginfo, arg);
|
signo, siginfo, arg);
|
||||||
|
|
||||||
#ifdef HAVE_SIGQUEUE
|
#ifdef HAVE_SIGQUEUE
|
||||||
if (siginfo)
|
if (siginfo)
|
||||||
@ -163,7 +164,7 @@ int main(int argc, char **argv)
|
|||||||
if (old_sigusr1_sighandler == SIG_ERR)
|
if (old_sigusr1_sighandler == SIG_ERR)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Failed to install SIGUSR1 handler, errno=%d\n",
|
fprintf(stderr, "Failed to install SIGUSR1 handler, errno=%d\n",
|
||||||
errno);
|
errno);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,7 +183,7 @@ int main(int argc, char **argv)
|
|||||||
if (status != 0)
|
if (status != 0)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Failed to install SIGUSR2 handler, errno=%d\n",
|
fprintf(stderr, "Failed to install SIGUSR2 handler, errno=%d\n",
|
||||||
errno);
|
errno);
|
||||||
exit(2);
|
exit(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -263,7 +264,7 @@ int main(int argc, char **argv)
|
|||||||
if (old_sigusr2_sighandler == SIG_ERR)
|
if (old_sigusr2_sighandler == SIG_ERR)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Failed to install SIGUSR2 handler, errno=%d\n",
|
fprintf(stderr, "Failed to install SIGUSR2 handler, errno=%d\n",
|
||||||
errno);
|
errno);
|
||||||
exit(7);
|
exit(7);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -275,8 +276,8 @@ int main(int argc, char **argv)
|
|||||||
if ((void*)old_sigusr2_sighandler != (void*)sigusr2_sigaction)
|
if ((void*)old_sigusr2_sighandler != (void*)sigusr2_sigaction)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Old SIGUSR2 signhanlder (%p) is not sigusr2_sigation (%p)\n",
|
"Old SIGUSR2 signhanlder (%p) is not sigusr2_sigation (%p)\n",
|
||||||
old_sigusr2_sighandler, sigusr2_sigaction);
|
old_sigusr2_sighandler, sigusr2_sigaction);
|
||||||
exit(8);
|
exit(8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user