Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SWD mbed USBLocalFileSystem BaseDAP USBDAP
prev_homepage
semihostingの使い方¶
mbedとLPC1114FN28をSWD接続
| mbed | LPC1114FN28 | |
|---|---|---|
| p21 | dp12(SWDIO) | |
| p22 | dp3(SWCLK) |
プログラム作成 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:
Warning
表示速度はUARTより非常に遅いです。Display speed is very slow than UART.
lets enjoy printf debugging!
