A very green PlatformIO user here. So far I am amazed with this!
I have a Teensy 3.2 (MK20DX256VLH7) bare metal board which I finally figured out how to get it compiled without errors. However, I want to make a modification to one of the Teensy core files and make that modification only for the current project.
I tried copying that file into the lib “folder” in the project explorer pane, but compilations do not seem to recognize that file and use the original core file by default.
What am I doing wrong?
Also, I am using a J-Link to download the compiled/linked code, but I only see options for debugging in the Run menu. Pressing the —> button on the bottom bar of VSCode calls up the TeensyLoader application, but I want to upload via SWD through the J-Link. Can I specify that somehow?
If you put a modified version of one of the core files (I assume from framework-arduinoteensy), putting that file in to lib/ won’t do what you want, because the original file still exists and would also be compiled in (-> double definition). Also you probably didn’t have the right folder structure if you put it directly in lib/ (but doesn’t matter).
and when I hit the —> button after compiling I got this:
J-Link Command File read successfully.
Processing script file...
J-Link connection not established yet but required for command.
Connecting to J-Link via USB...O.K.
Firmware: J-Link V10 compiled Apr 23 2020 16:49:14
Hardware version: V10.10
License(s): FlashBP, GDB
Target connection not established yet but required for command.
Device "MK20DX256XXX10" selected.
Connecting to target via SWD
Cannot connect to target.
Now the device is an MK20DX256VLH7, not XXX10. How did that change?