[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ARM semihosting issue

From: Peter Maydell
Subject: Re: ARM semihosting issue
Date: Fri, 2 Oct 2020 11:25:41 +0100

On Thu, 1 Oct 2020 at 22:21, Bruno Prado <bruno@dcomp.ufs.br> wrote:
> Thanks for the reply... I am attaching some code and output:
> #include <stdio.h>
> int main() {
>        char name[50] = "Nobody";
>        FILE* file = fopen("name", "r");
>        printf("What is your name?\n");
>        fprintf(stdout, "Reading from file...\n");
>        fscanf(file, "%s", name);
>        fscanf(stdin, "%s", name);
>        printf("My name is %s\n", name);
>        fprintf(stderr, "I am alive!!!\n");
>        fclose(file);
>        return 0;
> }

This is not making direct semihosting calls. The behaviour
of these function calls will depend on whatever the C
standard library implementation you're linking with is doing.

You're not checking for errors from any of your function
calls, incidentally.

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]