How to scanf() from PC through J-Link? fread??

  • How to scanf() from PC through J-Link? fread??

    The sequel to a printf thread ...

    More importantly, is it possible to fopen/fread files from the PC through the J-Link debugger? If so, what has to be done to configure it? An example would be greatly appreciated.

    Thanks,
    Jonathan
  • Toward semihosting...?

    It looks like semihosting is the answer...?

    There are some vague hints in UM08001_JLinkARM.pdf, but it seems to be just a reworded version of ARM's DUI0058.pdf ("Debug Target Guide")

    using codesourcery gcc
    - i have regular programs up and running via j-link, up to and including a usb stack
    - modified generic-hosted.ld was needed just to get a program with printf to compile
    - stepping through with ti's code composer studio (ccs) shows that SWI 0x123456 IS getting called

    however the ultimate behavior in ccs (via onboard debugger) vs j-link via gdb is different. with j-link it hangs on the printf...how am i supposed to configure gdb correctly? any help would be greatly appreciated...
  • gave up on semihosting. printf would have been nice but unnecessary for my purposes

    there is an undocumented function that is usable albeit (harmlessly?) buggy ("Reply contains invalid hex digit 116")

    Hint:
    Use the following function, which is also undocumented:
    (gdb) monitor help

    The post was edited 1 time, last by ypeels ().