hush

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: PRINTF with mbed #8439
    hush
    Participant

    Ok, I figured out the serial based printing for mbed. I followed this link here for terminal setup:
    https://developer.mbed.org/handbook/SerialPC
    Unfortunately though, it looks like all printing to VS Output Console is either hijacked by mbed or just not working for whatever reason.

    in reply to: PRINTF with mbed #8438
    hush
    Participant

    I tried creating a new ARM mbed project from scratch. I used…

    Board: NUCLEO_F411RE
    Floating Point: Hardware w/ Software interface
    C Lib Type: Default
    Reduce C++ Bins (checked)

    Debug method: OpenOCD
    Prog Interface: ST-Link v2.1
    Debug Transport: use default
    Before Debugging: Load into Flash/RAM

    #include <mbed.h>

    DigitalOut g_LED(LED1);
    Serial pc(USBTX, USBRX);

    int main()
    {
    for (;;)
    {
    g_LED = 1;
    wait_ms(500);
    g_LED = 0;
    wait_ms(500);

    printf(“Nothing happening here. Test int %d”, 100);
    printf(“Breaks don’t seem to help: %d\n”, 100);
    pc.printf(“This doesn’t do anything either”);
    }
    }

    This produces the default “LEDBlink” example. The LED blinks fine, but the printf still doesn’t work as in my project like I describe above. This is a very simple example, so I expect this should work out of the box without any problems. Are you not seeing this if you try it with a STM32 board? Again, I still don’t get the popup about semihosting which sounds very suspicious to me. Thanks for looking into this.

     

    in reply to: PRINTF with mbed #8436
    hush
    Participant

    No, I don’t believe I’m using Segger J-Link. I’m using ST’s VLink version 2.1 with OpenOCD.

    in reply to: How to include files in STM32F4xx_StdPeriph_Driver #8380
    hush
    Participant

    So I figured out that ST uses 2 completely different APIs for development. The older one is based on the standard peripherals (marked legacy in visualGDB), and the newer one uses HAL functionality designed to remove that.

    The problem here is that the VisualGDB example at http://visualgdb.com/tutorials/arm/stm32/pwm/  uses the older method, but the VisualGDB install instructions use the newer HAL and Cube functionality. That was really confusing, and took me the better part of a day to understand. It would be nice if this info was explained at the top of the examples.

    in reply to: How to Add New Libraries #8290
    hush
    Participant

    Yep, the “Import Folder Recursively” option was exactly what I needed. I am able to compile and execute the example project with this. I also used the “Exclude from Project” option on the few files I didn’t need in that folder.

    Thanks!

Viewing 5 posts - 1 through 5 (of 5 total)