Norimasa Okamoto / Mbed 2 deprecated lpcterm2

Dependencies:   SWD mbed USBLocalFileSystem BaseDAP USBDAP

prev_homepage

Table of Contents

    semihostingの使い方

    mbedとLPC1114FN28をSWD接続

    mbedLPC1114FN28
    p21dp12(SWDIO)
    p22dp3(SWCLK)

    SWD

    プログラム作成 For example:

    main.cpp on LPC1114FN28

    #include "mbed.h"
    #include "SWDSerial.h"
    SWDSerial pc;
    LocalFileSystem local("local");
    
    int main()
    {
        FILE* fp = fopen("/local/MBED.HTM", "r"); // SYS_OPEN
        if (fp) {
            for(int i = 0; i < 176; i++) {
                pc.putc(fgetc(fp)); // SYS_READ,SYS_WRITEC
            }
            fclose(fp); // SYS_CLOSE
        }
        exit(0); // SYS_EXIT
    }
    

    Import librarySWDSerial

    output stream library using SYS_WRITEC(0x03).

    実行する run:

    semihosting

    Warning

    表示速度はUARTより非常に遅いです。Display speed is very slow than UART.

    lets enjoy printf debugging!


    All wikipages