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

Search:

Type: Posts; User: jcw

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    569

    The link in #2 ties into the way stdio uses...

    The link in #2 ties into the way stdio uses _write - another option is, FWIW:


    int printf (const char *fmt ...) {
    va_list ap;
    va_start(ap, fmt);
    auto r = vdprintf((int) &Serial,...
  2. Replies
    21
    Views
    1,357

    Yes, good catch. I tried w/ bytes() as well, same...

    Yes, good catch. I tried w/ bytes() as well, same result alas. It's unfortunate (but understandable) that the HalfKay sources are not available, now it's down to guesswork on what it's expecting. The...
  3. Replies
    21
    Views
    1,357

    Yep, that's the first thing I tried: ...

    Yep, that's the first thing I tried:

    AttributeError: module 'hid' has no attribute 'Device'

    I'm on MacOS. I don't know how to get at version info, this is all I have:

    >>> hid.__file__...
  4. Replies
    21
    Views
    1,357

    I'm trying to limit dependencies. The Teensy...

    I'm trying to limit dependencies. The Teensy setup in PlatformIO already includes "teensy_{reboot,restart,serialmon}". There's also "teensy_loader_cli" which is fine for regular uploads, but won't...
  5. Replies
    21
    Views
    1,357

    Oh, wow, thanks for that. I've looked at the C#...

    Oh, wow, thanks for that. I've looked at the C# link, but then forgot to look a bit better at TyTools.
    I'm aiming for all cmd-line/scripted, i.e. just editing and (auto-) saving files, everything...
  6. Replies
    21
    Views
    1,357

    Yes, I'm on 1.54 - great, so state 4 should be...

    Yes, I'm on 1.54 - great, so state 4 should be rare. Good to know.
    And "teensy_loader_cli --mcu=TEENSY41 -b" will also get me from state 3 to 1.
    Looks like that should cover all the cases. Perfect....
  7. Replies
    21
    Views
    1,357

    To follow up ... in what I have so far, the...

    To follow up ... in what I have so far, the Teensy can be in one of four states:

    1. started up, and waiting for hex input
    2. running the ram-application code (it'll go back to 1 if the app ends...
  8. Replies
    21
    Views
    1,357

    Thanks, that explains the NOEXEC. The devil is in...

    Thanks, that explains the NOEXEC. The devil is in the detail, here's the workflow I have so far, which is already workable:

    * one shell window open on the flash-based core "bios" app, using...
  9. Replies
    21
    Views
    1,357

    Ok, the basic mechanism works, but it's rather...

    Ok, the basic mechanism works, but it's rather nasty: I have to reserve a generous area in ITCM as it looks like code cannot (?) execute in DTCM or in RAM2 (a bit surprising, perhaps due to a...
  10. Replies
    29
    Views
    1,720

    The Cortex-M7 is superscalar, i.e. it can process...

    The Cortex-M7 is superscalar, i.e. it can process more than one instruction per clock cycle.
    I think that can explain it - see https://en.wikipedia.org/wiki/ARM_Cortex-M#Cortex-M7

    See also...
  11. Replies
    21
    Views
    1,357

    Thanks @luni, that should help a lot to...

    Thanks @luni, that should help a lot to streamline the process once I get the uploads going. Appreciated.
  12. Replies
    21
    Views
    1,357

    Thank you @brtaylor - that's quite a bit of...

    Thank you @brtaylor - that's quite a bit of reading but it looks like it will get me up to date on all the options and solutions so far. Perfect. I also suspect that the HalfKay loader is flash-only...
  13. Replies
    21
    Views
    1,357

    To follow up, I'm not able to find the source...

    To follow up, I'm not able to find the source code for "teensy_reset" and "teensy_serial" - are these online somewhere?
  14. Replies
    21
    Views
    1,357

    Launching RAM-based applications

    I'd like to reproduce a workflow on the Teensy 4 which I've been using on STM32's: place a "BIOS-like" application in flash, with a variety of libraries and drivers included, which checks for the...
  15. Replies
    23
    Views
    4,622

    I've pasted the code at...

    I've pasted the code at https://gist.github.com/jcw/73b2c29fe0172ae8938fb577035d248d
    That way it can be edited/fixed/tweaked without cluttering up this forum with buggy code.
  16. Replies
    23
    Views
    4,622

    Yeah, my bad - I left out some important...

    Yeah, my bad - I left out some important definitions. Change the definition to:


    extern char _itcm_block_count [];.

    This is nasty linker stuff. The address is the value, it's not a variable,...
  17. Replies
    23
    Views
    4,622

    Here's some code to get to grips with memory...

    Here's some code to get to grips with memory layout and use (for the Teensy 4.1):


    void memInfo () {
    constexpr auto RAM_BASE = 0x2020'0000;
    constexpr auto RAM_SIZE = 512 << 10;
    ...
  18. Replies
    23
    Views
    4,622

    I don't know about audio, but you can find out...

    I don't know about audio, but you can find out where things live by comparing with the linker load map (tl062_t41.ld):


    ITCM (rwx): ORIGIN = 0x00000000, LENGTH = 512K
    DTCM (rwx): ORIGIN =...
  19. Replies
    29
    Views
    1,720

    At the risk of drawing out a long discussion...

    At the risk of drawing out a long discussion further ...

    Nope, that's not exactly what's going on. The first inner while runs w times, and then always 65535 (i.e. "(uint16_t) 0 - 1").
    If w were...
  20. Replies
    29
    Views
    1,720

    Careful ... on first iteration the w-loop runs N...

    Careful ... on first iteration the w-loop runs N times, but on the next iterations it won't, because w is now zero.
  21. Replies
    29
    Views
    1,720

    Careful ... your second loop does nothing,...

    Careful ... your second loop does nothing, because buffer_ptr hasn't been reset.


    #include <Arduino.h>

    #define BUFFER_SIZE 1024

    uint32_t buffer [BUFFER_SIZE];

    void setup () {
  22. Thread: c++17

    by jcw
    Replies
    9
    Views
    1,870

    Indeed, thanks!

    Indeed, thanks!
  23. Replies
    4
    Views
    468

    Found a related thread at...

    Found a related thread at https://forum.pjrc.com/threads/60846-T4-1-Ethernet-board?p=246596&viewfull=1#post246596
  24. Thread: c++17

    by jcw
    Replies
    9
    Views
    1,870

    Thanks, appreciated. I understand and fully...

    Thanks, appreciated. I understand and fully respect the need to trade off "stable" vs "the latest".
    I have quite some code which takes advantage of C++17 language features. But hey, just askin'
    ...
  25. Thread: c++17

    by jcw
    Replies
    9
    Views
    1,870

    Is C++17 on the roadmap? (I noticed that Teensy 4...

    Is C++17 on the roadmap? (I noticed that Teensy 4 is still using 5.4.1)
  26. Replies
    4
    Views
    468

    True, but that (and DC unbalance) could perhaps...

    True, but that (and DC unbalance) could perhaps be solved with 0.1 F caps in series.
    There have been experiments with this approach, e.g. http://www.youritronics.com/magnetic-less-ethernet/.
    It...
  27. Replies
    4
    Views
    468

    Ethernet without RJ45 jack?

    Would it be possible to connect a Teensy 4 to an Ethernet switch without the intermediate RJ45 jack + magnetics? I'm considering connecting a couple of them (each to its own switch port of course),...
  28. Replies
    17
    Views
    15,601

    Leave it off. Arduino pin 8 = PB0, and the...

    Leave it off. Arduino pin 8 = PB0, and the default of the EtherCard library is 8.
  29. Replies
    17
    Views
    15,601

    ENC28J60's CS should probably be connected to...

    ENC28J60's CS should probably be connected to Teensy's PB0, since Arduino's digital 8 = ATmega's PB0.
    The other SPI pins should indeed be connected to PB1, PB2, and PB3 - as mentioned before.
Results 1 to 29 of 29