AEHadi

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • AEHadi
    Participant

    I have also used stdio’s IO operations like the code below.

    printf(“bla\n”);
    char str1[] = “towrite\n”;
    //scanf(“%s”, str1);

    FILE* fp = fopen(“SemiOut.txt”, “w”);
    //fprintf(fp, “%s”, “ToWrite\n”);
    fwrite(str1, 1, sizeof(str1), fp);

    fclose(fp);

    However these did not do anything in hardware. Only in simulation.

     

    • This reply was modified 3 years, 7 months ago by AEHadi.
    in reply to: semihosting is not showing up in visualgdb output #30147
    AEHadi
    Participant

    I just found the problem. I left out \n at the end of printf . However I still find it strange that the console still never showed up like in the other project does even without the \n.

    in reply to: semihosting is not showing up in visualgdb output #30144
    AEHadi
    Participant

    I’m very confused. In that tutorial it says to NOT choose “Support semihosting” and instead choose what I chose. Otherwise I’ll get a “multiple definition of _isatty” error. just as the tutorial points out on step 10.

     

    Also, if I do choose “support semihosting”  and then uncheck “fast semihosting and embeedded profiler” in the frameforks tab, it gives me a different error of unable to find FastSemihosting.h . But again, I had these same settings in a different templated project and it worked. Why not this one.

    • This reply was modified 3 years, 8 months ago by AEHadi.
    in reply to: can't get unit tests to show up in test explorer #30048
    AEHadi
    Participant

    I have updated support. I wish your tutorials were more clear that custom edition of visual gdb is needed for unit testing support. I have went ahead and got a license for this. It seems to work now except for a few quirks. When using google test

    • google test: when selecting a single test to run from test explorer, it will sometimes just delete the test from the explorer and not run.
    • google test: when encountering a printf() using the semihosting setting explained above, it will just hang on it (not the case for tinyembed).
    • tinyembed: when running line IsRunningUnitTests() it will hang on it. This does not happen in the templated project. only when recreating it with all same settings.

    Finally, I am having problems with preprocessors when using cmake’s target_compile_definitions(). intellisense does not notice the global preprocessor is defined and thus confusingly leaves sections of code faded when they shouldn’t be. Should I create a new thread for this? Also I am unable to install visualGDB to visual studio 2019. it just gives an error message shown in image q1.

    • This reply was modified 3 years, 8 months ago by AEHadi.
    Attachments:
    You must be logged in to view attached files.
Viewing 4 posts - 1 through 4 (of 4 total)