Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FRDM-K20D50M: Upload doesn't work, but Pio debug works #10

Open
smile5 opened this issue Apr 29, 2020 · 4 comments
Open

FRDM-K20D50M: Upload doesn't work, but Pio debug works #10

smile5 opened this issue Apr 29, 2020 · 4 comments

Comments

@smile5
Copy link

smile5 commented Apr 29, 2020

Hello
I have trouble with upload. Debug work fine, but when I upload, platformio tell me is ok, but firmware doesn't launch after jlink reset the board.

 Downloading file [.pio/build/frdm_k20d50m/firmware.bin]...
Comparing flash   [100%] Done.
Erasing flash     [100%] Done.
Programming flash [100%] Done.
Verifying flash   [100%] Done.
J-Link: Flash download: Bank 0 @ 0x00000000: 2 ranges affected (32768 bytes)
J-Link: Flash download: Total time needed: 1.165s (Prepare: 0.041s, Compare: 0.034s, Erase: 0.221s, Program: 0.857s, Verify: 0.003s, Restore: 0.006s)
O.K.

Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
AfterResetTarget()


Script processing completed.

====== [SUCCESS] Took 23.15 seconds ======================

Terminal will be reused by tasks, press any key to close it.

here is my platformio.ini

;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:frdm_k20d50m]
platform = freescalekinetis
board = frdm_k20d50m
framework = mbed
debug_tool = jlink
; SWD interface

upload_protocol = jlink

; JTAG interface
;upload_protocol = cmsis-dap

with kinetis studio, no trouble.

Thanks a lot

@valeros
Copy link
Member

valeros commented Apr 30, 2020

Could you please try to compile and upload using the following config:

[env:frdm_k20d50m]
platform = freescalekinetis
board = frdm_k20d50m
build_type = debug
framework = mbed
debug_tool = jlink
upload_protocol = jlink

@smile5
Copy link
Author

smile5 commented Apr 30, 2020

The same result, code il not executing.

On the board, the blue led is On. The code i compile is the blinking example.

@smile5
Copy link
Author

smile5 commented Apr 30, 2020

It's a trouble with the bin files. Using JFlashLite.exe or JLink give the same result blue led on, and no blink.

@sidgwick
Copy link

build_type = debug

add this line to my platformio.ini works for me, what happend to the result binary without that line?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants