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

Search:

Type: Posts; User: defragster

Search: Search took 0.01 seconds.

  1. With a signature value (like p#41) the code...

    With a signature value (like p#41) the code would/should work on even Teensy's that don't Zero RAM on upload/reset. Then that state could be ID'd to know the value there was not from prior run.
    ...
  2. NOTE: On T_4.1 the above code works for .noinit -...

    NOTE: On T_4.1 the above code works for .noinit - except RAM is never set ZERO!!!! So the 'fresh start' detect is not valid! On Reset or UPLOAD!

    As noted some posts back - would need to hold a...
  3. @analog&RFmodels : nice it working there - ran...

    @analog&RFmodels : nice it working there - ran overnight here - another good summary point would be a view of the task/timeslice code in the end.

    * 14242 -14242
    refresh...
  4. and the short 1 sec wait version runs right too:...

    and the short 1 sec wait version runs right too:

    int maybe_saved1 __attribute__((section(".noinit")));
    int maybe_saved2 __attribute__((section(".noinit")));

    void setup()
    {
    ...
  5. The above ".noinit" idea in place is much better...

    The above ".noinit" idea in place is much better - it works and it doesn't hang. It will always use a known build defined address until the code changes - at which point the value is lost anyhow.
    ...
  6. the "maybe_"'s are pointers. To get the value...

    the "maybe_"'s are pointers. To get the value they point to rather than seeing the pointer value or changing the pointer value it has to be dereferenced.

    like this makes the compiler happy - two...
  7. If using a T_3.2 or better ... this whole...

    If using a T_3.2 or better ... this whole experiment could use TeensyThreads (p#7 ) - for RTC RAM - seems the desire was to use T_LC and make something work there with this prior scheme.

    So yes...
  8. @FrankB > post#2 noted battery backed RAM in...

    @FrankB > post#2 noted battery backed RAM in other Teensy - but this project seems T_LC specific.

    It looks like T_LC flushes ALL RAM in all the restarts I tried:



    int bar = 0;

    void...
  9. Haven't tried the direct address - but the .ld...

    Haven't tried the direct address - but the .ld shows this :: RAM (rwx) : ORIGIN = 0x1FFFF800, LENGTH = 8K

    Assume that is helpful? Make a static int and a stack int and print their addresses -...
  10. Not building with IDE? Are you on Windows? ...

    Not building with IDE? Are you on Windows?

    Accessing the timer unit if not enabled it will fault.

    Was the persistence of 'unused' RAM tested?
  11. @analog&RFmodels - would be interesting to see a...

    @analog&RFmodels - would be interesting to see a skeleton of it working. Wondering what these tasks are doing in turn.

    Seems an _isr_timer could set a flag to casually check and bail without much...
  12. Never looked much at .ld files until the 1062 ......

    Never looked much at .ld files until the 1062 ... the one for T_LC very simple.

    Maybe an edit to bump the stack down in : _estack = ORIGIN(RAM) + LENGTH(RAM);
    Reserve 64 or 256 Bytes there may...
  13. That part was in response to the initial...

    That part was in response to the initial 'non-restart' efforts with ... ' back to main c gets lost.'

    For restart - I'd see if the 'void' area above code data and below stack survives restart. If...
  14. Interesting ... not sure how that can work: > On...

    Interesting ... not sure how that can work:
    > On restart there is no state to return to.

    Any compiler controlled or stack objects will be initialized or random.

    Maybe a direct addressed part...
Results 1 to 14 of 14