Upload_protocol issue Kinetis FRDM-K66F

Hello,

I’m making the move from the Arduino IDE to Platformio, and really enjoying the more sophisticated environment. I’m also prototyping a project on the NXP Kinetis FRDM-K66F board.

I’ve come across a few issues with uploading code to the board. According to the wiki, the platform should support mbed, cmsis-dap and jlink upload protocols. However I could not get mbed or cmsis-dap to work. The only working upload protocol was jlink.

I also can not get the onboard debugger to work, but I feel that issue is because of the upload protocol issue above.

Can anyone offer any guidance on these issues?

Many thanks in advance

1 Like

code successfully compiled but will not bootload into the device and specifing the upload port (upload_port = COM6), meanwhile i have succefully upload code using the nxp ide but dont work on platformio. please can someone help tell where have i have gone wrong.

Can you state your full platformio.ini, the code you’re uploading and the error message you’re getting?

neither

[env:frdm_k66f]
platform = freescalekinetis
board = frdm_k66f
framework = mbed
upload_protocol =  jlink

nor

[env:frdm_k66f]
platform = freescalekinetis
board = frdm_k66f
framework = mbed
upload_port = COM6

the both configuration did not work

I can impossibly say anything about this without seeing the upload logs and code you’re trying to upload.

I guess restarting or patiently waiting finally paid off. using the configuration below, it worked.

[env:frdm_k66f]
platform = freescalekinetis
board = frdm_k66f
framework = mbed
upload_protocol =  jlink

I have gotten this board for over 2years now and I guess I am starting to love it just as it started working. I learned it has up to 5 or 6 UART but I have only been able to find 2; the USB and the UART1;

static UnbufferedSerial pc(USBTX, USBRX);
static UnbufferedSerial uart(D1, D0);

others remain a mystery as the pinout didn’t specify. Any help will go a long way.
Thanks

I found this doc and I guess it can help resolve this question

With that board, PlatformIO will be giving you mbed-os 6.9.0

with these mbed-os files: mbed-os/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_K66F at mbed-os-6.9.0 · ARMmbed/mbed-os · GitHub

Especially interesting for you are the pin mappings as per

All possible serial TX pins are listed, and beneath them the RX pins.

Special pin names are listed in

So, for this board you have 5 UART peripherals available (UART_0 to UART_4), with the connection to the on-board USB-to-serial converter already taking up UART0 with PTB17 and PTB16.

With this pin list you can thus construct all serial objects that the chip has.

The exact same information, but in more graphical form, could have obtained from

https://os.mbed.com/platforms/FRDM-K66F/