TeensyDebug and Arduino 2.0 IDE

wearyhacker

Well-known member
The teensy_debug installation python script cannot find the right place to put things in an Arduino IDE 2.x installation. I have hacked it to put most things in the right places under ~/.arduino15/. However I am stuck on where to put boards.local.txt and platform.local.txt.

I have tried ./packages/teensy/hardware/avr/boards.local.txt ./packages/teensy/hardware/avr/1.57.2/boards.local.txt, but neither places seem to work. Has anyone got any suggestions on where the should go. The documentation seems vague on this point.

Thanks
 
Find the location where the boards.txt and platform.txt are located. Copy the .local. files there and restart the IDE and it should work.

On Windows this opens the folder holding the installed board 0.58.3 {for Beta of 1.58} and those text files: %appdata%\..\local\Arduino15\packages\teensy\hardware\avr
 
The location of the boards.txt and platform.txt files is here.
Code:
roger@dragon:~/.arduino15/packages/teensy/hardware/avr/1.57.2$ ls
boards.local.txt  boards.txt  cores  installed.json  keywords.txt  libraries  platform.local.txt  platform.txt

That is one of the locations I tried. I must be missing something else here.
 
I see that isn't 'Windows'. I've made at least one IDE 2 .local. edit that worked - under Windows using "that path".

Though IDE 2 does some caching for those .txt files - not sure if that is causing trouble seeing the results ... in addition to the OS, and maybe having known bugs/issues?

I know I just made some IDE 2 boards.txt edits that DID NOT work from the IDE2 - but do from the (windows) TSET CMDLINE tool used here, that uses the same build Paths as IDE2 as configured by default. Maybe I should try that with a .local. file to test. Was looking to re-enable the LTO compile options that are now commented out.

If you can find a way to have the .local. file preset a known change or addition - or maybe even an error just to prove that the IDE2 is even trying to include them?
 
Made local.txt changes and they were also ignored.

There are cached settings - there is a folder that needs to be removed with IDE 2 closed - See item #4 this post: Arduino-CLI-And-IDE-now-Released-Teensy-Supported!

Note - it may mess up other stuff?
> first T_4.1 build failed on the single opened sketch - opened a second and updated ESP32 board and then it built and responded to the .txt file changes.
 
That got things in the menu on the IDE working. My test sketch compiles. Just got to get it debugging. Do I need to launch gdb nanually in this environmen? I am more used to Platformio.
 
This is driving me nuts.

In the IDE compilation randomly fails. Nothing is being changed, I just have to keep pressing the Verify button until it works. It fails more times than it works. Looking at the output logs the difference is in the compiler flags being used. Unfortunately the build that fails is the one that contains the compiler flags from boards.local.txt. This is the one that fails.
Code:
/home/roger/.arduino15/packages/teensy/tools/teensy-tools/1.57.2/precompile_helper /home/roger/.arduino15/packages/teensy/hardware/avr/1.57.2/cores/teensy4 /tmp/arduino-sketch-CC81A5A23484C7D95A00AD5A53FB6A62 /home/roger/.arduino15/packages/teensy/tools/teensy-compile/5.4.1/arm/bin/arm-none-eabi-g++ -x c++-header -Og -g -DGDB_DUAL_SERIAL -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=157 -DARDUINO=10607 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_DUAL_SERIAL -DLAYOUT_US_ENGLISH -I/home/roger/.arduino15/packages/teensy/hardware/avr/1.57.2/cores/teensy4 /tmp/arduino-sketch-CC81A5A23484C7D95A00AD5A53FB6A62/pch/Arduino.h -o /tmp/arduino-sketch-CC81A5A23484C7D95A00AD5A53FB6A62/pch/Arduino.h.gch
This is the one that works.
Code:
/home/roger/.arduino15/packages/teensy/tools/teensy-tools/1.57.2/precompile_helper /home/roger/.arduino15/packages/teensy/hardware/avr/1.57.2/cores/teensy4 /tmp/arduino-sketch-CC81A5A23484C7D95A00AD5A53FB6A62 /home/roger/.arduino15/packages/teensy/tools/teensy-compile/5.4.1/arm/bin/arm-none-eabi-g++ -x c++-header -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=157 -DARDUINO=10607 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_DUAL_SERIAL -DLAYOUT_US_ENGLISH -I/home/roger/.arduino15/packages/teensy/hardware/avr/1.57.2/cores/teensy4 /tmp/arduino-sketch-CC81A5A23484C7D95A00AD5A53FB6A62/pch/Arduino.h -o /tmp/arduino-sketch-CC81A5A23484C7D95A00AD5A53FB6A62/pch/Arduino.h.gch
It is difficult to make out what is going on. USB_DUAL_SERIAL appears in both but in different places. The "-Og -g -DGDB_DUAL_SERIAL" sequence comes from the boards.local.txt file.

What a mess!
 
Back
Top