Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: ftrias

Page 1 of 4 1 2 3 4

Search: Search took 0.00 seconds.

  1. 1. The library, as currently written, doesn't...

    1. The library, as currently written, doesn't halt the Teensy on startup. So your "starting" point is not reliable. Right now, you have to either use "halt()" in your code or place a breakpoint and...
  2. I changed the API for setBreakpoint and removed...

    I changed the API for setBreakpoint and removed the numbrer. Just call:



    debug.setBreakpoint(testme)


    The code was in a comment in the examples so I missed it.

    The first Warning is not a...
  3. I'm guessing you've got the USB Serial names...

    I'm guessing you've got the USB Serial names reversed. Arduino thinks COM52 is the first serial port. Did you try changing the Port from the menu?
  4. I presume this is Windows? Is the file...

    I presume this is Windows? Is the file teensy_debug.exe in the right location? I wonder if the mixed use of "/" and "\" might be a problem? In any case, all teensy_debug does is try to figure out...
  5. The installer is looking for a directory...

    The installer is looking for a directory "hardware/teensy" inside your Arduino directory. If it's not there, it complains.

    Since you have a non-standard install, it's probably best to just set up...
  6. Thanks for the heads up about the warnings. I'll...

    Thanks for the heads up about the warnings. I'll fix that.

    I suppose "O0" is not really needed. I just put it in so that the compiler won't optimize away functions and lines in my trivial...
  7. Take over Serial is a bit tricky. It works by...

    Take over Serial is a bit tricky. It works by using a "#define" to redirect "Serial" to "debug" in TeensyDebug.h. The "debug" object will format data so that GDB will print it. If any of your...
  8. I fixed support for Teensy 3 to git. It should...

    I fixed support for Teensy 3 to git. It should work now using the Flash Patch feature to set/clear breakpoints in Flash. You can have a maximum of 5 breakpoints. Stepping line-by-line over the end of...
  9. Replies
    10
    Views
    1,421

    I just found this project and wanted to mention a...

    I just found this project and wanted to mention a similar project I've been working on that does allow dynamic breakpoints and code stepping:...
  10. For what it's worth, this is not too bad:...

    For what it's worth, this is not too bad: https://www.gdbgui.com/

    You can create a file `customize.py` in the `....hardware/tools` directory with the below (changing the path for 'g') and it...
  11. It's a bug. I updated the install script to...

    It's a bug. I updated the install script to accommodate a missing /usr/local/bin/arduino.
  12. Replies
    442
    Views
    98,798

    RAM in many embedded systems, including Teensy,...

    RAM in many embedded systems, including Teensy, is divided into three parts:

    1. Static variables - fixed size at the start of RAM (may also place code here)
    2. Heap - allocated with new() and...
  13. This is a bug with the shenanigans I have to pull...

    This is a bug with the shenanigans I have to pull to get GDB to work calling code dynamically. I just committed some changes that may fix this most of the time.



    As for the T3, I had a plan...
  14. An excellent suggestion. Added...

    An excellent suggestion. Added `debug.isGDBConnected()`.
  15. It wasn't documented (I just added it), but...

    It wasn't documented (I just added it), but object `debug` inherits from class `Print`. Thus it supports print, println, etc. to print to the GDB console.



    debug.print(testvalue, HEX);
  16. I updated Github today with these fixes: 1....

    I updated Github today with these fixes:

    1. Reduce serial polling to 0.5 milliseconds. This should increase responsiveness. Will look at alternatives @defragster suggested.
    2. Fix `p func()` that...
  17. Breakpoints are slow because TeensyDebug only...

    Breakpoints are slow because TeensyDebug only processes GDB commands every 5ms. When a breakpoint is hit, Teensy notifies GDB right away. GDB sends a number of commands (clear breakpoints, get...
  18. All it does is: 1. copy the source files...

    All it does is:

    1. copy the source files (*.cpp, *.h) to a directory named TeensyDebug in your library directory
    2. customize and copy boards.local.txt and platforms.local.txt to...
  19. Run the install program with the -i option as in:...

    Run the install program with the -i option as in: teensy_debug -i=c:\Arduino-1.8.12
  20. Replies
    24
    Views
    590

    That extra "noise" could be some other library...

    That extra "noise" could be some other library sending data over the serial port that GDB is using.

    In any case, I moved the discussion to it's own thread since the origin of this thread is not...
  21. Replies
    24
    Views
    590

    I moved the discussion to a new thread since this...

    I moved the discussion to a new thread since this is not really related to the original question:...
  22. Using GDB with Teensy without hardware debugger, first Beta

    I put together a library that allows GDB (included in Teensyduino) to perform source-level debugging on the Teensy without debugging hardware (no need for JTAG, SWD, etc). It uses GDB's Remote Serial...
  23. Replies
    24
    Views
    590

    I was really excited when I first saw gdb-py....

    I was really excited when I first saw gdb-py. It's too bad it is missing the python library, as you noticed. It probably should have been statically linked. It's useless as it stands. Python is not...
  24. Replies
    24
    Views
    590

    I just realized that there is a tool...

    I just realized that there is a tool "arm-none-eabi-gdb-py", which is GDB with an embedded Python interpreter. If `run.command` (the Python component that adds the menu & opens GDB automatically on a...
  25. Replies
    24
    Views
    590

    I put together some code that allows GDB to...

    I put together some code that allows GDB to perform source-level debugging on the Teensy without an external debug interface (no need for SWD, etc). It uses GDB's Remote Serial Protocol to...
  26. Replies
    24
    Views
    590

    That's what I'm hoping to do. I've got something...

    That's what I'm hoping to do. I've got something minimal working and it's all looking very doable on the Teensy 4. Hopefully I will put it on github over the weekend for testing/feedback.

    I also...
  27. Replies
    24
    Views
    590

    Everything is doable except to set/clear hardware...

    Everything is doable except to set/clear hardware pins. The gdb remote protocol...
  28. Replies
    24
    Views
    590

    I just realized that the Teensy 4 places all user...

    I just realized that the Teensy 4 places all user code in RAM so setting breakpoints in this way should work fine.
  29. Replies
    24
    Views
    590

    GDB stubs on Teensy proposal

    I gave this some thought over the weekend and I think live debugging is possible even if C_DEBUGEN cannot be changed. The idea is to use a GDB stub to remotely debug the Teensy and instead of using...
  30. Replies
    24
    Views
    590

    That's unfortunate. The previous threads also...

    That's unfortunate. The previous threads also suggested using Flash Patch Control Register FP_REMAP to do something similar to a breakpoint by remapping the instruction to a fault of some sort (or,...
  31. Replies
    24
    Views
    590

    Sleeping to disable C_DEBUGEN

    I was hoping that the Debug Monitor ISR would help with a low level project. After reading https://forum.pjrc.com/threads/26358-Software-Debugger-Stack and...
  32. Replies
    442
    Views
    98,798

    Great catch! I have committed your suggested...

    Great catch! I have committed your suggested change to github.
  33. Replies
    12
    Views
    3,688

    Compiling Rust code is possible, but not within...

    Compiling Rust code is possible, but not within the Arduino IDE [1]. You need to create a Makefile.

    For example, if you want to include a function from rust, you would code it as follows:


    ...
  34. Replies
    442
    Views
    98,798

    Looking at it now, it does seem like the priority...

    Looking at it now, it does seem like the priority thread support is not implemented very efficiently. If I recall, I added it at a later time. It was really just a way to give a boost to threads that...
  35. Replies
    17
    Views
    849

    Very interesting. You can, of course, add your...

    Very interesting. You can, of course, add your own implementation of the TeensyProf_open(), TeensyProf_close() and TeensyProf_write() functions to send the output to where you want. They're very...
  36. Replies
    17
    Views
    849

    You can look at TeensyFile.cpp for the very...

    You can look at TeensyFile.cpp for the very simple format used.

    You can also configure it to write out the file using hexadecimal and then use something like hex2bin to convert it to a file.
  37. Replies
    17
    Views
    849

    Yes. Don't use -pg on c or S files. Have you...

    Yes. Don't use -pg on c or S files.

    Have you tried it with the Arduino app, as described in README.md?

    Also, I'd like to see the complete command line options used for each compile to see if...
  38. Replies
    442
    Views
    98,798

    I suppose we could test more frequently, but it...

    I suppose we could test more frequently, but it may not make a difference. gprof is a sampling profiler so it relies on statistical distributions. If you run it for 1 minutes (60000 samples), it will...
  39. Replies
    17
    Views
    849

    That's a sophisticated Makefile. As a first...

    That's a sophisticated Makefile.

    As a first pass, remove FLAGS_COM from C_FLAGS and S_FLAGS. You probably don't want to put instrumentation on the core teensy files.

    Can you remove the "@"...
  40. Replies
    17
    Views
    849

    One theory: I believe this happens when you use...

    One theory: I believe this happens when you use the "-pg" option in the link stage. This is why the "boards.txt" file adds a new parameter "profile" with "-O0 -pg" and then only adds it in...
  41. Replies
    442
    Views
    98,798

    I think it would still be useful to see...

    I think it would still be useful to see per-thread CPU usage, but profiling is probably more useful.

    FYI, I just created a new TeensyGProf that's even better than TeensyProf. See...
  42. Replies
    17
    Views
    849

    Unsatisfied with the limits of this library, I...

    Unsatisfied with the limits of this library, I decided to do a more complete implementation of gprof. I used this previous work by Erich Styger as a guide:...
  43. Replies
    17
    Views
    849

    I forgot to mention this other modification: ...

    I forgot to mention this other modification:

    Modify `imxrt1062.ld` in the directory Arduino.../Contents/Java/hardware/teensy/avr/cores/teensy4. All references to `.text.itcm` must be changed to...
  44. Replies
    17
    Views
    849

    I should have explained more. When compiling...

    I should have explained more. When compiling ends, it copies the elf file to /tmp/build.elf. Then the program uploads and runs as normal. When the profiling ends, the Teensy (using the library) sends...
  45. Replies
    17
    Views
    849

    Profiling using gprof on Teensy 4

    I created a project to partially support gprof-style profiling of applications on Teensy 4. This shows how much time is spent in each function. In theory, this could also work on Teensy 3, but it...
  46. Replies
    442
    Views
    98,798

    This is an excellent idea. I committed a change...

    This is an excellent idea. I committed a change along your suggestion: https://github.com/ftrias/TeensyThreads/commit/ef3ef46441ea79d4849a674325685c7cb531905e

    If you uncomment '#define DEBUG' in...
  47. Replies
    442
    Views
    98,798

    I committed this to my github:...

    I committed this to my github: https://github.com/ftrias/TeensyThreads/commit/d61579a76428e59e9548204312a7b36da85df59c

    For Teensy 3, it works the same as before. For Teensy 4, it uses an unused...
  48. Replies
    442
    Views
    98,798

    The problem is the the context_switch_isr()...

    The problem is the the context_switch_isr() function as written must be called directly as an interrupt. It will unroll the special interrupt call stack frame to figure out where it was called from...
  49. Replies
    442
    Views
    98,798

    Paul was kind enough to send me a Teensy 4 so I...

    Paul was kind enough to send me a Teensy 4 so I was able to look into porting TeensyThreads. As a starting point, I used @mjs513's excellent code at...
  50. Replies
    442
    Views
    98,798

    Thanks, @mjs513, for porting the library to the...

    Thanks, @mjs513, for porting the library to the T4. Your changes look great. However, I do not currently own a T4 so I haven't tested them. I will try to buy one soon and try it out.
Results 1 to 50 of 164
Page 1 of 4 1 2 3 4