joepasquariello
Well-known member
Per Warren's suggestion, I used the arm version of nm.exe to list all of the symbols in the core library, fibers, and the ino file, which are the only objects the go into the exapmple application. Neither fiber_getsp nor _sstack appears.
I then modified the statement defining the Fibers object as shown below:
Fibers<6> fibers(2000); // instrument = false (by default)
Fibers<6> fibers(2000,false); // instrument = false
Fibers<6> fibers(2000,true); // instrument = true
For Teensy 3.2, the build succeeds when instrument=false and fails when instrument=true (on symbols fiber_getsp and _sstack). For Teensy 3.5, the build fails in all 3 cases. So, the symbols fiber_getsp and _sstack are not available, and somehow, while building for 3.2 but not for 3.5, the linker detects that those symbol are not required when "instrument = false".
In any case, commenting out the statements within the "if (instrument)" clause avoids the problem for both 3.2 and 3.5.
Warren, is there any reason to be concerned about rounding stack space up, i.e. allocation more bytes of stack than the user requested? Would it be safer to truncate, i.e. allocate the largest number of uint32_t possible for the requested number of bytes?
Joe
I then modified the statement defining the Fibers object as shown below:
Fibers<6> fibers(2000); // instrument = false (by default)
Fibers<6> fibers(2000,false); // instrument = false
Fibers<6> fibers(2000,true); // instrument = true
For Teensy 3.2, the build succeeds when instrument=false and fails when instrument=true (on symbols fiber_getsp and _sstack). For Teensy 3.5, the build fails in all 3 cases. So, the symbols fiber_getsp and _sstack are not available, and somehow, while building for 3.2 but not for 3.5, the linker detects that those symbol are not required when "instrument = false".
In any case, commenting out the statements within the "if (instrument)" clause avoids the problem for both 3.2 and 3.5.
Warren, is there any reason to be concerned about rounding stack space up, i.e. allocation more bytes of stack than the user requested? Would it be safer to truncate, i.e. allocate the largest number of uint32_t possible for the requested number of bytes?
Joe