duff2013 / Zilch

Lean Scheduler Library for Teensy 3.x
MIT License
11 stars 2 forks source link

Memory usage example does not work (t3.6) #1

Closed crteensy closed 7 years ago

crteensy commented 7 years ago

When I compile the memory usage example for the teensy 3.6 and download it, USB Serial is not available and I can't see any results.

duff2013 commented 7 years ago

Strange I just used on my 3.6, use the Serial Plotter also.

crteensy commented 7 years ago

I tried again:

crteensy commented 7 years ago

Is it possible that you made some changes locally that are not yet pushed to github?

duff2013 commented 7 years ago

I'll check, what speed and optimization levels are you using?

crteensy commented 7 years ago

180 MHz, "Faster"

duff2013 commented 7 years ago

Just updated the library and tried the memory layout example on the 3.6/Faster/180MHz and it works for me.

crteensy commented 7 years ago

Still doesn't work for me. I downloaded a fresh copy of the library, restarted arduino, replugged the Teensy - no luck. It might be my hardware then, or something totally different.

Same observations on a Teensy 3.2, 72 MHz, Faster!

duff2013 commented 7 years ago

Maybe try to increase the stack sizes, and what version of Teensyduino are you using, I'm using 1.38 beta2.

crteensy commented 7 years ago

Teensyduino 1.39 release. I can't try it right now with increased stack sizes but I'll get back to it later today

duff2013 commented 7 years ago

I can confirm Teensyduino 1.39 breaks Zilch! I have to see what changed since 1.38 beta2. Kind of annoying!

crteensy commented 7 years ago

funky: the simple Zilch example doesn't work either, but a sketch I wrote myself does. I even doubled the stack size in the simple example. Both the simple example and my sketch use AllocateMemoryPool(), task.create() and task.begin().

crteensy commented 7 years ago

it's really obscure. I now use freeMemory() in my application and it works as intended. It's just the examples that don't run.

duff2013 commented 7 years ago

I think its all this event stuff paul added to the core which should be a library that gets added if I want it, now I have figure out some work around.

crteensy commented 7 years ago

Yes there was a discussion about yield() which might be relevant but I wasn't sure

duff2013 commented 7 years ago

It was that yield problem, looks like paul going to have fix soon. But if you want to fix it now, FrankB's patch works.

duff2013 commented 7 years ago

Pauls patch works and easier fix:)

crteensy commented 7 years ago

With the linked patch applied it works on T3.6 (memory layout example, simple example and own sketch).