Forum Rule: Always post complete source code & details to reproduce any issue!
Tab Content
  • ftrias's Avatar
    08-29-2019, 01:19 PM
    Compiling Rust code is possible, but not within the Arduino IDE . You need to create a Makefile. For example, if you want to include a function from rust, you would code it as follows: #! # pub extern "C" fn...
    12 replies | 2870 view(s)
  • ftrias's Avatar
    08-25-2019, 10:59 PM
    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 had been suspended...
    418 replies | 83238 view(s)
  • ftrias's Avatar
    08-24-2019, 08:20 PM
    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 simple and emulate the...
    17 replies | 264 view(s)
  • ftrias's Avatar
    08-24-2019, 07:52 PM
    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.
    17 replies | 264 view(s)
  • ftrias's Avatar
    08-24-2019, 07:41 PM
    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 it's different than...
    17 replies | 264 view(s)
  • ftrias's Avatar
    08-24-2019, 07:30 PM
    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 catch the biggest...
    418 replies | 83238 view(s)
  • ftrias's Avatar
    08-24-2019, 07:23 PM
    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 "@" silencing prefixes and...
    17 replies | 264 view(s)
  • ftrias's Avatar
    08-24-2019, 04:49 PM
    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 "platform.txt" in the compile...
    17 replies | 264 view(s)
  • ftrias's Avatar
    08-24-2019, 01:25 PM
    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 https://github.com/ftrias/TeensyGProf...
    418 replies | 83238 view(s)
  • ftrias's Avatar
    08-24-2019, 01:22 PM
    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:...
    17 replies | 264 view(s)
  • ftrias's Avatar
    08-23-2019, 03:23 PM
    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 `.text`. Gprof expects...
    17 replies | 264 view(s)
  • ftrias's Avatar
    08-23-2019, 02:00 PM
    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 a specially...
    17 replies | 264 view(s)
  • ftrias's Avatar
    08-23-2019, 12:55 PM
    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 doesn't have enough...
    17 replies | 264 view(s)
  • ftrias's Avatar
    08-20-2019, 04:18 PM
    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 TeensyThreads.h, you...
    418 replies | 83238 view(s)
  • ftrias's Avatar
    08-18-2019, 02:50 AM
    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 GPT timer to schedule...
    418 replies | 83238 view(s)
  • ftrias's Avatar
    08-17-2019, 03:14 PM
    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 in order to know...
    418 replies | 83238 view(s)
  • ftrias's Avatar
    08-17-2019, 12:45 PM
    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...
    418 replies | 83238 view(s)
  • ftrias's Avatar
    08-13-2019, 02:07 PM
    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.
    418 replies | 83238 view(s)
No More Results
About ftrias

Basic Information

About ftrias
Biography:
Software developer and entrepreneur.
Location:
Boston, MA

Statistics


Total Posts
Total Posts
129
Posts Per Day
0.06
Last Post
Rust Language on Teensy 08-29-2019 01:19 PM
General Information
Last Activity
09-12-2019 02:33 PM
Join Date
09-17-2013