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

Search:

Type: Posts; User: luni

Page 1 of 10 1 2 3 4

Search: Search took 0.02 seconds.

  1. Thread: TeensyTimerTool

    by luni
    Replies
    240
    Views
    12,401

    @MatA: Can you give the current version on GitHub...

    @MatA: Can you give the current version on GitHub a try (need to download from the master branch, there is no release yet)

    Tested on a LC with this code, which compiles and blinks now:

    ...
  2. Thread: TeensyTimerTool

    by luni
    Replies
    240
    Views
    12,401

    That looks like a bug. Sorry, I don't use the LC...

    That looks like a bug. Sorry, I don't use the LC much. Probably something LC specific.
    I'll have a look later today
  3. Thread: TeensyTimerTool

    by luni
    Replies
    240
    Views
    12,401

    Actually 'hours' is one of the functions from the...

    Actually 'hours' is one of the functions from the new (since c++11) std::chrono namespace which deals with handling time. Since v3.0 the TeensyTimerTool supports this namespace by default. If you...
  4. Replies
    28
    Views
    479

    Great, you can probably add the other options...

    Great, you can probably add the other options (e.g. optimization) to your FQBN (teensy:avr:teensy40:usb=serialmidiaudio) as well (see #15 for an example of a full FQBN). All in all the...
  5. Replies
    28
    Views
    479

    Isn't it a bit tedious and error prone to read...

    Isn't it a bit tedious and error prone to read out all those flags from boards.txt manually? Also some of those flags have dependencies which makes it even more complicated. The builder extracts...
  6. Thread: TeensyTimerTool

    by luni
    Replies
    240
    Views
    12,401

    I'd love to help you but, as I wrote in my last...

    I'd love to help you but, as I wrote in my last post, I really need to see your sketch. Ideally some minimal version which I can compile and which shows the behaviour you describe. Without seeing...
  7. Replies
    28
    Views
    479

    These define where the builder stores the...

    These define where the builder stores the binaries and the cache file. You can choose any path you like for them. Did you read the documentation I linked in the last post?
  8. Replies
    28
    Views
    479

    Honestly, I don't understand the question. This ...

    Honestly, I don't understand the question. This


    $(BUILDER) $(FLAGS) -prefs=build.extra_flags=-DMY_DEFINE=42 -build-path=$(BUILD_PATH) -build-cache=$(BUILD_CACHE) -fqbn=$(FQBN) $(HARDWARE)...
  9. Replies
    17
    Views
    604

    I added a top level section "Timing, delays and...

    I added a top level section "Timing, delays and clocks" and filled in some information about delayXX, millis and the elapsedXX functions. It also contains links to a recent dive into the std::chrono...
  10. Replies
    28
    Views
    479

    I just saw that you want to pass additional...

    I just saw that you want to pass additional defines to the compiler. This can also be done easily but you need to tweak platform.txt a little bit. Scroll down to the ##compile c++ files section and...
  11. Replies
    6
    Views
    200

    Nope, never did anything with audio but I'm sure...

    Nope, never did anything with audio but I'm sure answers will pop in quickly...
  12. Replies
    28
    Views
    479

    Maybe I misunderstand something, but couldn't you...

    Maybe I misunderstand something, but couldn't you simply call the arduino builder? Here a makefile I generated for you with VisualTeensy in "Ino-mode". The makefile is for Win10. Depending on the...
  13. Replies
    6
    Views
    200

    You can set the priority of any interrupt by ...

    You can set the priority of any interrupt by


    NVIC_SET_PRIORITY(irqnum, priority)

    irqnum is the number of the interrupt. For T4.x you find the irq numbers in imxrt.h...
  14. Thread: TeensyTimerTool

    by luni
    Replies
    240
    Views
    12,401

    I can have a look but I need your calling code...

    I can have a look but I need your calling code and some information how to identify your issue.

    Here already a few remarks to your code:


    Any reason why you define your timers in the sketch...
  15. I'm having a similar issue with the...

    I'm having a similar issue with the TeensyTimerTool. I solved it by using __has_include:

    config.h


    #pragma once

    #if __has_include("userConfig.h")
    #include "userConfig.h"
    #else
  16. Replies
    17
    Views
    604

    I already added a draft with notes about the...

    I already added a draft with notes about the content. If it gets big enough we might think of a own section indeed. https://github.com/TeensyUser/doc/wiki/Timers-and-delays

    He he, very smart...
  17. Replies
    17
    Views
    604

    Unfortunately, I have absolutely no knowledge...

    Unfortunately, I have absolutely no knowledge about it. But I just added a stub here: https://github.com/TeensyUser/doc/wiki/Snooze-Library Feel free to add some info.
  18. Interesting, do I understand correctly that it...

    Interesting, do I understand correctly that it actually calculates the sum of ITCM and DTCM and warns if this is > 99% of 512Mb?
  19. Replies
    17
    Views
    604

    I can add something tomorrow. Currently there is...

    I can add something tomorrow. Currently there is only information about the cycle counter and how to extend it to 64bit in it. https://github.com/TeensyUser/doc/wiki/Using-the-cycle-counter
  20. I might be completely wrong, but as I understand...

    I might be completely wrong, but as I understand it, ITCM and DTCM share a common 512kB RAM (RAM1). So, you need to make sure that the sum of ITCM and DTCM is not larger that 512kB. The linker...
  21. I use the following linker parameters in my...

    I use the following linker parameters in my makefiles:


    -Wl,--print-memory-usage,--gc-sections,--relax -T$(CORE_BASE)/imxrt1062.ld

    with the --print-memory-usage the linker will generate a much...
  22. Nor am I, but I can confirm that transferring...

    Nor am I, but I can confirm that transferring more than 10MB/s is not a problem, even with c# which definitely is not designed for speed. I assume that python won't be any slower but there certainly...
  23. Replies
    245
    Views
    19,501

    Nothing to apologise! PIO is well known around...

    Nothing to apologise! PIO is well known around here. If you like it just use it. It is a really great piece of software.

    If you are interested why VisualTeensy is around I recommend to read...
  24. Replies
    245
    Views
    19,501

    See here...

    See here https://github.com/luni64/VisualTeensy/releases for a version (v0.9.9.2) hopefully able to handle spaces in paths. I also activated the build cache which will accelerate Arduino-Builder...
  25. Replies
    245
    Views
    19,501

    Actually, the differences between a standard...

    Actually, the differences between a standard c/c++ program and an Arduino ino sketch are marginal. Mostly you need to take care that you declare your functions before you use them. Easiest is to...
  26. Replies
    245
    Views
    19,501

    Ok, looks like this time your path with spaces...

    Ok, looks like this time your path with spaces strikes. Can you try to add double quotes to line 23 of the makefile like shown here? This fixes it for me.


    BUILD_PATH := "$(abspath...
  27. Replies
    245
    Views
    19,501

    Funny, but I can reproduce it. I'll have a look....

    Funny, but I can reproduce it. I'll have a look.

    Any chance I can talk you into using the normal vsTeensy build system for new projects? It is so much better, works out of the box, has all your...
  28. Replies
    13
    Views
    316

    Glad it works. In case you are interested, here...

    Glad it works. In case you are interested, here some remarks:



    void activate()
    {
    pinMode(pin, OUTPUT);
    if (digitalRead(pin) == LOW)
    digitalToggle(pin);
    ...
  29. Thread: TeensyTimerTool

    by luni
    Replies
    240
    Views
    12,401

    As discussed per PM the reason for this is a...

    As discussed per PM the reason for this is a glitch in vsTeensy. The generated makefile double compiles libraries when you install them in the shared folder and additionally locally in your project...
  30. Thread: TeensyTimerTool

    by luni
    Replies
    240
    Views
    12,401

    Yes, that's true. You can opt out of the use of...

    Yes, that's true. You can opt out of the use of the chrono extensions if you don't like it. (But since you are doing a chronometer the new chrono stuff might come in handy? See also:...
  31. Replies
    13
    Views
    316

    Sure, here a solution using the TeensyTimerTool...

    Sure, here a solution using the TeensyTimerTool. BlinkAsync takes the number of blinks and the blink period. It then starts the blinking in the background. You can see that the sketch already prints...
  32. Replies
    245
    Views
    19,501

    No, that is new to me. Thanks for the pointer....

    No, that is new to me. Thanks for the pointer.
    Just gave it a try by adding --delegate to the makefile manually and it works nicely. It can also be used to workaround the current TyTool confusion...
  33. Results are easy to interpret: it takes 1-2Ás if...

    Results are easy to interpret: it takes 1-2Ás if Accelstep doesn't need to do any steps. it takes about 40Ás if it needs to do some steps. So, you won't be able to do more then 25`000 steps/sec with...
  34. Your code includes the time for print which is...

    Your code includes the time for print which is probably much longer thant he ticking takes...
    Do this instead:


    uint32_t start = micros();
    tickSteppers();
    uint32_t end = micros();...
  35. I'm not very familiar with AccelStepper. As far...

    I'm not very familiar with AccelStepper. As far as I remember it actively limits the max speed, but this might have changed.

    If you want to run your steppers with 64000 stp/s you need to make...
  36. moveAsync moves the motor in the background so...

    moveAsync moves the motor in the background so that you can do other stuff while they move. Your code starts the async move and then waits until the move is finished. If you want to do other stuff...
  37. The cast to double might not be atomic thus it...

    The cast to double might not be atomic thus it might get interrupted by doCount which could lead to weird effects. For a quick test you could disable interrupts during the cap_F calculation.

    Edit:...
  38. Replies
    16
    Views
    410

    :) . Yes, the library system sucks but I get...

    :) . Yes, the library system sucks but I get slowly used to it. However, adding 3d to the parts is much easier than with Eagle. And the simple *.step export is fantastic if you need to design...
  39. Replies
    6
    Views
    295

    I briefly looked over your code. This int...

    I briefly looked over your code.

    This

    int WireWrite(uint8_t command[], uint8_t ADDR, int I2CBUS)
    {
    int command_length = sizeof(command) / sizeof(command[0]);
    if (I2CBUS == 0)
    {
    ...
  40. Replies
    16
    Views
    410

    I used Eagle since about 1985 and it always just...

    I used Eagle since about 1985 and it always just worked. However, since it was integrated in AutoDesk (con)Fusion it gets more and more complicated to use. A couple of month ago I switched to KiCad...
  41. Replies
    69
    Views
    1,593

    To avoid confusion with users of 3rd party...

    To avoid confusion with users of 3rd party uploaders I want to mention that (in Serial mode) this update changes the usb device from a CDC class on device level to a composite device with a CDC class...
  42. I might be wrong, but isn't the correct way to...

    I might be wrong, but isn't the correct way to identify the Teensy RawHID and SerEMU interfaces by their HID usagepage/usage identifier?



    RAWHID: usage = 0xFFAB, usage page: 0x0200
    SEREMU:...
  43. You might also think of calling the run()...

    You might also think of calling the run() functions from an IntervalTimer. Thus, they are not blocked from long running foreground tasks.



    //....
    void tickSteppers()
    {
    ...
  44. Replies
    245
    Views
    19,501

    You might have overlooked my added comment in my...

    You might have overlooked my added comment in my last post showing how to fix this.


    Thanks, fixed
  45. Replies
    245
    Views
    19,501

    Glad you like it. Since you seem to be interested...

    Glad you like it. Since you seem to be interested in long term stable projects you might also think of using the normal build mode (at least for new projects). You then have an option to embed the...
  46. Replies
    245
    Views
    19,501

    Thanks for spotting this. Here the new...

    Thanks for spotting this.

    Here the new release: https://github.com/luni64/VisualTeensy/releases
  47. Replies
    245
    Views
    19,501

    Can you try the version I uploaded here:...

    Can you try the version I uploaded here: https://github.com/luni64/VisualTeensy/issues/29 ?
  48. Replies
    245
    Views
    19,501

    FYI Here the arguments to the builder from the...

    FYI Here the arguments to the builder from the IDE and from vsTeensy.



    ARDUINO:

    C:\Users\lutz\Documents\arduino-1.8.12-Teensyduino153\arduino-builder
    -dump-prefs
    -logger=machine ...
  49. Replies
    245
    Views
    19,501

    Great! I saw that Arduino additionally passes...

    Great!

    I saw that Arduino additionally passes

    -built-in-libraries C:\Users\lutz\Documents\arduino-1.8.12-Teensyduino153\libraries to the builder. Can you try if it works with this even if...
  50. Replies
    245
    Views
    19,501

    I tried it here with and without spaces. It works...

    I tried it here with and without spaces. It works with including external libraries after the manual change of the library folder in the makefile exactly as you did. I tried with a fresh install of...
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4