helloworld example on TWR-K64F120M

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

helloworld example on TWR-K64F120M

Jump to solution
656 Views
kalden_srcinc
Contributor IV

I am trying to get the serial terminal working with the TWR-K64F120M.  I have the hello world demo program building and running on the target, but I can never see anything coming out on my PC.  I have the JLink openSDA application running on the board and gdb is able to connect, load a program, and step through code no problem.  I can see things initialize and the code gets to my PRINTF line.  I can also see the activity LED on the board go crazy while printf is executing, so I believe everything on the board is actually running properly.

 

Now, on the linux side, when I plug into the USB debug port on the board I see a /dev/ttyACM0 device appear.  I believe this is meant to be the virtual serial port connected to the K64.  I am running the following to open a terminal to it:  sudo screen /dev/ttyACM0 115200

Nothing ever shows up though.  Am I going about this wrong?  Maybe I have a jumper on the board set wrong?  Any tips would be appreciated.

 

Thanks

Labels (1)
0 Kudos
1 Solution
492 Views
kalden_srcinc
Contributor IV

I figured it out.  The first problem was I was not initializing the JLink GDB server properly.  I needed to provided some switches: ./JLinkGDBServer -select USB -device MK64FN1M0xxx12 -if SWD -speed 1000

The next problem was the J10/J15 jumpers on the board were not what I expected.  Based on the documentation, I had to do the opposite of what I would expect to route UART1 to the virtual serial port.

View solution in original post

0 Kudos
2 Replies
493 Views
kalden_srcinc
Contributor IV

I figured it out.  The first problem was I was not initializing the JLink GDB server properly.  I needed to provided some switches: ./JLinkGDBServer -select USB -device MK64FN1M0xxx12 -if SWD -speed 1000

The next problem was the J10/J15 jumpers on the board were not what I expected.  Based on the documentation, I had to do the opposite of what I would expect to route UART1 to the virtual serial port.

0 Kudos
492 Views
kalden_srcinc
Contributor IV

My mistake.  It appears that it is getting stuck at fput_pad (print_scan.c:509  inside _doprint) within the PRINTF call

0 Kudos