Page 2 of 3

Re: Release candidate for Z-Uno software version 2.0.7

Posted: 08 Dec 2016 12:57
by p0lyg0n1
I can take look to your code if you want. I try to find uCxx problems and fix it fast.

Re: Release candidate for Z-Uno software version 2.0.7

Posted: 08 Dec 2016 13:03
by michap
p0lyg0n1 wrote:I can take look to your code if you want. I try to find uCxx problems and fix it fast.
Thanks - my libs are working again with 2.0.7!
And code is better now - with more ">>" and "<<" instead of numeric operations ;)

Will cleanup it and publish the Bosch BMP280 / BME280 libraries then later - but need some spare time for this ;)

Thanks again for your help.

Michael

Re: Release candidate for Z-Uno software version 2.0.7

Posted: 08 Dec 2016 22:38
by A.Harrenberg
Hi p0lyg0n1,
p0lyg0n1 wrote:Hi, Andreas.
Can you, please, check the same code with this:

Code: Select all

static byte bufferSize;
bufferSize = sizeof(buffer_array);
testfunction( &bufferSize);
This code will be 100% work if you create bufferSize in the global area.
I just put

Code: Select all

static byte bufferSize = 2;
in the global area for testing and it is working.

But I think that it is not a solution to put all variables to the global area in order to be able to pass a pointer to a function. What is happening here "inside" the uCxx? I mean passing a pointer to a function is just plain standard code, it should work for localy created variables. The current behavior will break a lot working sketches...
- Optimized pointers parameters in function calls to minimize stack usage. All but char are now passed via XDATA instead of generic pointers.
What does that mean? Will the pointer be stored in XDATA or is the variable meant to be stored in XDATA?
Is there a way to "force" the generic pointers (by casting?)?

Regards,
Andreas.

Re: Release candidate for Z-Uno software version 2.0.7

Posted: 11 Dec 2016 14:40
by p0lyg0n1
Hi, Andreas. Don't worry. :-) We are understanding the problem... and we are working on it:
For release we will change behavior to the pervious. So, all user-pointers will be pass as generic pointers (so they can pointing to any memory area, not only to xdata). Specific pointers will use only for "this" pointers. May be we will add some specials #prama to get more optimal code in some special cases, but by default we have to use generic pointers anyway. There is no need to change your code. It's our issue. Thank you a lot for your help.

Re: Release candidate for Z-Uno software version 2.0.7

Posted: 11 Dec 2016 15:34
by A.Harrenberg
Hi p0lyg0n1,

thanks for the feedback.

Is there some way to force the old behavior in 2.07? Or do I have to step back to 2.06 until the next release candidate to continue working on the library?

Best regards,
Andreas.

Re: Release candidate for Z-Uno software version 2.0.7

Posted: 11 Dec 2016 16:57
by p0lyg0n1
You have to switch to 2.0.6 in the test-ucxx branch and then go back to main branch or wait a little. We try to make a new RC in 2 days.

Re: Release candidate for Z-Uno software version 2.0.7

Posted: 12 Dec 2016 17:07
by PoltoS
Hello!

Please try again our fixed 2.0.7 release candidate. You have to remove the package folder in Arduino folders and install 2.0.7 again. Only compiler options have changed - no need to burn new bootloader.

If everything will be ok, we will release it in a few days.

Andreas, please test your lib with it.

Re: Release candidate for Z-Uno software version 2.0.7

Posted: 12 Dec 2016 20:36
by A.Harrenberg
Hi,

I can confirm that using a pointer to a byte as an argument in a function call is working again with the update as before.

The library is compiling but not running/crashing due to the amount of stack used by the code (this was always the case, so no problem of some changes).

If I find something suspicious with the updated 2.07 package I will post it directly.

Regards,
Andreas.

Re: Release candidate for Z-Uno software version 2.0.7

Posted: 13 Dec 2016 00:04
by PoltoS
Thanks. We will certainly publish 2.0.7 on Wednesday if nothing found in it.

Re: Release candidate for Z-Uno software version 2.0.7

Posted: 16 Dec 2016 03:01
by PoltoS