Search results

  1. C

    teensy_loader_cli executable for windows?

    Old thread... but the easiest way to to get the compiled teensy_loader_cli for your OS is to use PlatformIO, install the Teensy board and then get the file out of it. The paths: Linux: `$ENV{HOME}/.platformio` Windows `$ENV{USERPROFILE}/.platformio` and then the folder...
  2. C

    "multiple definition of" error when using std::function with argument (teensy41, platformio)

    No idea what the real issue was here, but it was more complicated than just "linker order" considering I was using PlatformIO and I got different results based on code (not config). I ended up removing platformio, detail here...
  3. C

    CLion without PlatformIO?

    Old thread, but I finally had to remove platformio. Posting this here for anyone else that comes by. This has only been used on Linux. Not sure what happens on Windows or macOS. ### Arduino The Arduino IDE is used for the compiler, Teensy cores and libraries. All updates are handled through...
  4. C

    "multiple definition of" error when using std::function with argument (teensy41, platformio)

    Exactly. The commit where my proposed change is in the Arduino code explains the issue. https://github.com/arduino/ArduinoCore-avr/commit/4e469e0c83799ad6d3698e7cfa51ef8a5f2a2c76
  5. C

    "multiple definition of" error when using std::function with argument (teensy41, platformio)

    It's not clear that this problem is reproducible in the arduino ide as it doesn't support multiple files. I believe this to be a linking order issue. Without multiple source files you can't have ordering. The issue is easy to see. The original arduino new.cpp had a limitation that it never...
  6. C

    "multiple definition of" error when using std::function with argument (teensy41, platformio)

    Paul any reason to not mark the new and delete functions as weak? It seems that at one point the arduino code did not, but looking at this code now they are. https://github.com/arduino/ArduinoCore-avr/blob/master/cores/arduino/new
  7. C

    "multiple definition of" error when using std::function with argument (teensy41, platformio)

    See related to the SPI library. It seems to be using "new" and "delete". If I remove my code that uses the SPI1 then it works.
  8. C

    "multiple definition of" error when using std::function with argument (teensy41, platformio)

    If I manually add the weak attribute to the delete functions in new.cpp it works. Again, not a good idea. __attribute__((weak)) void operator delete(void * ptr) { free(ptr); } __attribute__((weak)) void operator delete[](void * ptr) { free(ptr); } __attribute__((weak)) void operator...
  9. C

    "multiple definition of" error when using std::function with argument (teensy41, platformio)

    Ive made some progress but still dont fully understand. What I think is going on is that when the stdlib is being included it somewhere includes the same functions that are in "\.platformio\packages\framework-arduinoteensy\cores\teensy4\new.cpp" like "operator delete(void*)". The linker sees...
  10. C

    "multiple definition of" error when using std::function with argument (teensy41, platformio)

    Teensy 4.1 1.58 Clion 2023.3.4 PlatformIO 6.1.13 toolchain-gccarmnoneeabi-teensy 11.3.1 Windows 11 platformio.ini (nothing interesting) Im trying to create a function callback in a class. If the callback takes an argument it fails. This works: std::function<void()> onChanged_; This does not...
  11. C

    CLion without PlatformIO?

    That one is dead too. This is the latest: https://github.com/technyon/Arduino-CMake-Toolchain
  12. C

    CLion without PlatformIO?

    Ive found several projects that attempted this, then died.. this seems like the latest iteration of the zombie. https://github.com/a9183756-gh/Arduino-CMake-Toolchain
  13. C

    CLion without PlatformIO?

    Anyone using CLion without PlatformIO? If so, how? I spent the last 5 hrs chasing down why the Wire library was not working only to find out everything is busted if you set "build_type = debug" in platformio.ini...
  14. C

    No USB serial with Teensy 4.x compiled Optimize: Debug

    To anyone else that comes along here, this bug also effects the Wire library.
  15. C

    SPI1 and Serial1 and pin 39 input together?

    PS, I tried to change the post title to me more useful/searchable to other but I dont see that is possible.
  16. C

    SPI1 and Serial1 and pin 39 input together?

    Your 2nd code is what I have and I think it works. I just dont have the knowledge to look inside the SPI class to know if using pin 39 as INPUT_PULLUP would mess up SPI somehow. There is a lot of bitwise operations on the register flags going on in there. I still think putting this in the SPI...
  17. C

    SPI1 and Serial1 and pin 39 input together?

    Thanks again. To be clear the Teensy is master and the TLC9547 is slave. I think by the fact were down in the weeds looking at if register flags conflict or not is an indication this is a thing to avoid, hence why it should be more explicit in the docs. For me, luckily I only put components on...
  18. C

    SPI1 and Serial1 and pin 39 input together?

    Thanks for the link. I already have full control of the ordering of when the code is called so can setup my digital input pin after SPI1... but that doesn't really answer my question. Does that cause any issues? If I set pin 39 input mode to input_pullup after it's been set as the miso for spi1...
  19. C

    SPI1 and Serial1 and pin 39 input together?

    Setup - Teensy 4.1 - TLC9547 LED driver which is a slave only SPI device; its connected via SPI1 with alternative pins (MOSI1:26, SCK1:27, CS1:38); MISO is not used or connected for this component as its not needed* - Serial1 with pins (RX1:0, TX1:1) - Digital input switch on pin 39 All three...
  20. C

    Issues with String append in class constructor initializer

    Thank you. That's exactly what I thought was happening. Since the local String b is beating created just after a, it is being put in the same memory position as a so the pointers are now pointing at the same place. Except both a and b don't really exist anymore, but the memory is still there...
  21. C

    Issues with String append in class constructor initializer

    If I ditch the "const char*" and use a String everywhere it seeems to work. Id still like to know why the above code doesnt work though. class ComponentY { public: explicit ComponentY(const String& name) { this->name_ = name; } String name() const { return...
  22. C

    Issues with String append in class constructor initializer

    Ive been struggling getting String appending to work. There seems to be a memory/pointer issue I cant figure out. Im not a C/C++ expert so its very likely Im doing something wrong, but Ive spent all day on this and cant get it figured out. This is being used for a serial logger. Any help would...
  23. C

    SPI pins teensy 4.1

    Old thread.. but I have a relevant question. I understand the Teensy 4.1 has 3 SPI with corresponding pins.. but do you have to use those pins or can you use any digital out pins? Im controlling a slow slave device and dont need the fastest implementation.
  24. C

    Teensy 4 HardwareSerial pins not going to 0?

    I had always been using COM1 on the UPA and Serial1 on the Teensy; that part was fine. the AC noise also went away when I wired them up properly. Here it is working. Ignore the janky wiring as all of this was just meant to be a proof of concept...
  25. C

    Teensy 4 HardwareSerial pins not going to 0?

    About 2 minutes after I closed down my computer in frustration last night I realized I had wired TX-TX and RX-RX. #whammy
  26. C

    Teensy 4 HardwareSerial pins not going to 0?

    I have a Teensy 4 and am connecting it via Serial1 to a 4D Display 43DCT via a 4D-UPA (breakout board for the display). The UPA docs state it is 3.3V logic, with 5V power either from USB or external power. The display and UPA work fine when connected via its USB serial so I know that is working...
  27. C

    Teensy 4.1 Unconnected Power and GND Pins

    What should be done with the unconnected power pins if powered via USB? - Vin - 2x 3.3V I noticed on this usage of a Teensy 4.1 the 3.3V are connected to a 10n capacitor. https://gitlab.com/CrazzyFrenchDude/peenaple_v1.1b/-/blob/master/PeeNaPle_V1.1b_Fab_Files/PeeNaPle_V1.1b_Schematic.pdf...
  28. C

    Program button for two Teensys

    I have 2 Teensy 4.0s and I would like to connect a single momentary switch to program both Teensys. Do I need a diode between the Teensy program pins and the switch input? If not, I would be connecting two pins with 3.3V high. The other pin of the switch would connect to ground. If I do needs...
  29. C

    Dual Teensy 4.0 Board for Sensor Input and Motor Control - Review

    Hello all, I'm looking for feedback on the below design. We are more software people than electronics/hardware people and this is our first board. Hopefully there is enough detail here. I have a set of questions Id like to get answered, plus if anyone sees anything else that should be fixed...
Back
Top