It is currently 20 Apr 2018 03:59

All times are UTC + 1 hour




Post new topic Reply to topic  [ 75 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: 12 Nov 2010 15:18 
Offline

Joined: 18 Jun 2008 11:43
Posts: 3751
Location: Nieuwpoort, Belgium
janni wrote:
Not yet, Dany. Had to make more changes in strings lib after checking what the routines in official lib really do :roll: .
Ok. Thanks! :D

_________________
Kind regards,
Dany.
(happy user of mP PRO for PIC and dsPIC30/33 and PIC24, PicFlash2, RTClock, Max232 board, Ethernet PROTO board, MMC/SD Card Proto board, Yo2Lio's and Janni's libs)
http://www.rosseeld.be/DRO/PIC/index.htm


Last edited by Dany on 12 Nov 2010 15:39, edited 1 time in total.

Top
 Profile  
 
PostPosted: 12 Nov 2010 15:39 
Offline

Joined: 18 Jun 2008 11:43
Posts: 3751
Location: Nieuwpoort, Belgium
janni wrote:
I've noticed also how big the replacement lib became and how hard it may be to find desired procedure/function. Unfortunately, the way lib content is presented in Library Manager is a mirror of the order of routines in library unit (not, for example, the order of prototypes, which could easily be shuffled around :( ).
I'm still thinking how to solve this problem...
Why is this a problem? Are the routines normally displayed alfabetically perhaps?
Can "forward" declarations help in this?

_________________
Kind regards,
Dany.
(happy user of mP PRO for PIC and dsPIC30/33 and PIC24, PicFlash2, RTClock, Max232 board, Ethernet PROTO board, MMC/SD Card Proto board, Yo2Lio's and Janni's libs)
http://www.rosseeld.be/DRO/PIC/index.htm


Top
 Profile  
 
PostPosted: 12 Nov 2010 17:14 
Offline

Joined: 18 Feb 2006 13:17
Posts: 4892
Dany wrote:
Why is this a problem? Are the routines normally displayed alfabetically perhaps?
No, routines are not displayed alphabetically. Such an option could sometimes help, though only if one knew at least part of the searched routine name. In other cases it's much more convenient to users when the routines are listed according to some plan (like by type and conversion direction in conversions lib).

Quote:
Can "forward" declarations help in this?
The "forward" declarations are not necessary in units as compiler has all info from prototypes in interface section, so order of routines is not critical for compilation. The order, however, is of importance when one writes, and especially when one corrects the code. Placing similar or dependent routines close together greatly helps and prevents mistakes.
The order of prototypes, on the other hand, has little impact on programming itself, so it could be used for Library Manager listings. As it's not so at the moment, I'll have to reorganise the souce code in such a way that it'll be both convenient for updates and make sense in listings.

_________________
Replacement libraries for mP PRO and PIC18 processors, mP PRO tips & trics


Top
 Profile  
 
PostPosted: 13 Nov 2010 15:18 
Offline

Joined: 18 Feb 2006 13:17
Posts: 4892
New version of replacement libs' package is ready and may be downloaded from here.

I've finally found a way to present large sets of routines in Library Manager which, hopefully, will be convenient for users (including myself :) ). The trick comes to use of dummy routines as separators and descriptions and proper organisation of routines. Library version may also be presented in this way though I left version strings for those that use them in code to ascertain that proper libs are used.

The libs have been updated to last compiler version, taking into account all (I hope) documented and undocumented changes to official libs. Two new routines have been added to the string replacement library, namely PosEx and PosExC. Practically all routines operate now on strings of any length. Exceptions were made only where it seemed that strings up to 255 chars will be sufficient - at the same time saving processor resources.

New replacement, the Delays lib, offers slight advantage in code size and more precise VDelay_ms and VDelay_Advanced_ms procedures, which should be less dependent on chosen processor clock.

Enjoy :) !

_________________
Replacement libraries for mP PRO and PIC18 processors, mP PRO tips & trics


Top
 Profile  
 
PostPosted: 13 Nov 2010 16:13 
Offline

Joined: 18 Jun 2008 11:43
Posts: 3751
Location: Nieuwpoort, Belgium
janni wrote:
New version of replacement libs' package is ready and may be downloaded from here.

Enjoy :) !
Thanks! :D :D :D

_________________
Kind regards,
Dany.
(happy user of mP PRO for PIC and dsPIC30/33 and PIC24, PicFlash2, RTClock, Max232 board, Ethernet PROTO board, MMC/SD Card Proto board, Yo2Lio's and Janni's libs)
http://www.rosseeld.be/DRO/PIC/index.htm


Top
 Profile  
 
PostPosted: 13 Nov 2010 21:10 
Offline

Joined: 18 Jun 2008 11:43
Posts: 3751
Location: Nieuwpoort, Belgium
Hi, FYI: this is what I use to switch over from Janni's replacement libraries to the original ones and vice versa.
Sometimes it is needed that I do tests of my own units/projects to see if they work with both the original mE libraries and the replacement ones.

The way of working is the following:

* first of all the replacement libraries and the original libraries are placed each in their own directory, here respectively

C:\Program Files\Mikroelektronika\mikroPascal PRO for PIC\Uses\P18\Lib Replacements Janni and
C:\Program Files\Mikroelektronika\mikroPascal PRO for PIC\Uses\P18\Lib Originals (pré Win7)

C:\Users\Public\Documents\Mikroelektronika\mikroPascal PRO for PIC\Uses\P18\Lib Replacements Janni and
C:\Users\Public\Documents\Mikroelektronika\mikroPascal PRO for PIC\Uses\P18\Lib Originals (Win7)

Do not forget to make and fill these directories before running the below batch files!

* 2 batchfiles are created, one to switch over to the replacement libraries (1) and one to switch back (2)

(1)
@echo off
cd "C:\Program Files\Mikroelektronika\mikroPascal PRO for PIC\Uses\P18"
rem cd "C:\Users\Public\Documents\Mikroelektronika\mikroPascal PRO for PIC\Uses\P18"

copy /b /y "Lib Replacements Janni\__Lib_Conversions.mcl" __Lib_Conversions.mcl >> nul
copy /b /y "Lib Replacements Janni\__Lib_EEPROM_256.mcl" __Lib_EEPROM_256.mcl >> nul
copy /b /y "Lib Replacements Janni\__Lib_EEPROM_1024.mcl" __Lib_EEPROM_1024.mcl >> nul
copy /b /y "Lib Replacements Janni\__Lib_MathDouble.mcl" __Lib_MathDouble.mcl >> nul
copy /b /y "Lib Replacements Janni\__Lib_String.mcl" __Lib_String.mcl >> nul
copy /b /y "Lib Replacements Janni\__Lib_Delays.mcl" __Lib_Delays.mcl >> nul
copy /b /y "Lib Replacements Janni\__Lib_Delays.mpas" __Lib_Delays.mpas >> nul
copy /b /y "Lib Replacements Janni\__Lib_Trigon.mcl" __Lib_Trigon.mcl >> nul
copy /b /y "Lib Replacements Janni\__Lib_Trigonometry.mcl" __Lib_Trigonometry.mcl >> nul

copy /b /y "Lib Replacements Janni\pic_additional_string_library.mcl" pic_additional_string_library.mcl >> nul

rem copy /b /y "Lib Replacements Janni\__Lib_System.mcl" __Lib_System.mcl >> nul


(2)
@echo off
cd "C:\Program Files\Mikroelektronika\mikroPascal PRO for PIC\Uses\P18"
rem cd "C:\Users\Public\Documents\Mikroelektronika\mikroPascal PRO for PIC\Uses\P18"

copy /b /y "Lib Originals\__Lib_Conversions.mcl" __Lib_Conversions.mcl >> nul
copy /b /y "Lib Originals\__Lib_EEPROM_256.mcl" __Lib_EEPROM_256.mcl >> nul
copy /b /y "Lib Originals\__Lib_EEPROM_1024.mcl" __Lib_EEPROM_1024.mcl >> nul
copy /b /y "Lib Originals\__Lib_MathDouble.mcl" __Lib_MathDouble.mcl >> nul
copy /b /y "Lib Originals\__Lib_String.mcl" __Lib_String.mcl >> nul
copy /b /y "Lib Originals\__Lib_Delays.mcl" __Lib_Delays.mcl >> nul
copy /b /y "Lib Originals\__Lib_Delays.mpas" __Lib_Delays.mpas >> nul
copy /b /y "Lib Originals\__Lib_Trigon.mcl" __Lib_Trigon.mcl >> nul
copy /b /y "Lib Originals\__Lib_Trigonometry.mcl" __Lib_Trigonometry.mcl >> nul

copy /b /y "Lib Additions Yo2Lio\pic_additional_string_library.mcl" pic_additional_string_library.mcl >> nul

rem copy /b /y "Lib Originals\__Lib_System.mcl" __Lib_System.mcl >> nul


The bach files are named respectively "___ReplacementLibs.bat" and "___OriginalLibs.bat" and reside in "C:\Program Files\Mikroelektronika\mikroPascal PRO for PIC\Uses\P18" (pré Win7) or "C:\Users\Public\Documents\Mikroelektronika\mikroPascal PRO for PIC\Uses\P18" (Win7).

* Shortcuts of both batchfiles are placed on the desktop for easy switch-over.

Additionally: mP must not be running when a switch over occurs.

_________________
Kind regards,
Dany.
(happy user of mP PRO for PIC and dsPIC30/33 and PIC24, PicFlash2, RTClock, Max232 board, Ethernet PROTO board, MMC/SD Card Proto board, Yo2Lio's and Janni's libs)
http://www.rosseeld.be/DRO/PIC/index.htm


Last edited by Dany on 05 Feb 2011 13:20, edited 5 times in total.

Top
 Profile  
 
PostPosted: 14 Nov 2010 02:15 
Offline

Joined: 28 Jul 2008 16:25
Posts: 82
Having some problems. I have your libs in "mikroPascal PRO for PIC\Uses\P18" and also yo2lio's libs also. I was using these on my latest project. Had some problems at first with getting Unresolved extern error messages but then for some reason everything started working good. Then just now I updated your libs with you latest release for Mppro 4.15 and now I'm getting the Unresolved extern messages again. Specifically these funtions are giving me error now.

319 303 Identifier "Str_Insert_Chr" was not declared enc_unit.mpas
0 360 Unresolved extern 'Str_Insert_Chr' enc_unit.mpas
0 360 Unresolved extern 'Str_Replace_Chr' enc_unit.mpas
0 360 Unresolved extern 'Str_Cut_Chr' enc_unit.mpas
0 360 Unresolved extern 'Str2Long' enc_unit.mpas
0 360 Unresolved extern 'Str_Split' enc_unit.mpas
0 360 Unresolved extern 'Str2Long' enc_unit.mpas
0 360 Unresolved extern 'LongInt2Str' enc_unit.mpas

Now my paths are set correctly and pointing to "mikroPascal PRO for PIC\Uses\P18" where the libs are stored but for some reason they are not being recoginized or something. Version of MpPro I'm running is 4.1 and not 4.15 as I did not upgrade because it was suppose to have been minor changes anyways. Also in my USES I have "pic_additional_string_library".



Update.... well reinstalling yo2lio's libs fixed the problem somewhat. I'm not getting Unresolved extern error messages anymore. Now only these two error messages.
491 438 Call signature does not match the function definition signature 'StrnCpy' enc_unit.mpas
501 438 Call signature does not match the function definition signature 'StrReplace' enc_unit.mpas

Any idea why?

Thanks again.
Bryan

Well guess I worked this out myself. Problem was StrnCpy(var S1,S2:string; size:word); where I had size:byte instead of size:word. Same goes for StrReplace too.


Top
 Profile  
 
PostPosted: 14 Nov 2010 03:21 
Offline

Joined: 18 Feb 2006 13:17
Posts: 4892
Briansw wrote:
Well guess I worked this out myself. Problem was StrnCpy(var S1,S2:string; size:word); where I had size:byte instead of size:word. Same goes for StrReplace too.
Yes, many routines were changed to accomodate strings of any size. All units using them have to be recompiled. Same concerns the official lib (StrnCpy is there, as well, with identical definition), even if not all changes are reflected in help.

Quote:
Specifically these funtions are giving me error now.
319 303 Identifier "Str_Insert_Chr" was not declared enc_unit.mpas
...

Update.... well reinstalling yo2lio's libs fixed the problem somewhat. I'm not getting Unresolved extern error messages anymore.
Yeah, these routines were from Florins libs :) . I wonder, how you keep up with all those similar routines from different libs :wink: ...

_________________
Replacement libraries for mP PRO and PIC18 processors, mP PRO tips & trics


Top
 Profile  
 
PostPosted: 14 Nov 2010 18:06 
Offline

Joined: 28 Jul 2008 16:25
Posts: 82
I started with Florins libs awhile ago and stuck with them. Maybe it is time to look into using the other libs if they have similar functions as Florins libs. I really haven't looked into them that much yet.

Thanks,
Bryan

Ok, just got rid of pic_additional_string_library in my uses and switch over to using the other libs with similar functions and all is working well. :D

Thanks again


Top
 Profile  
 
PostPosted: 15 Nov 2010 16:56 
Offline

Joined: 18 Jun 2008 11:43
Posts: 3751
Location: Nieuwpoort, Belgium
Briansw wrote:
I started with Florins libs awhile ago and stuck with them. Maybe it is time to look into using the other libs if they have similar functions as Florins libs. I really haven't looked into them that much yet.
Ok, just got rid of pic_additional_string_library in my uses and switch over to using the other libs with similar functions and all is working well. :D

Thanks again
I you use the ethernet libraries of Florin (which provide an IP stack!) then you will still need 4 functions out of pic_additional_string_library. This pic_additional_string_library with only those functions is also in the set of libraries provided by Janni. It works toghether with the replacement libs from Janni.

_________________
Kind regards,
Dany.
(happy user of mP PRO for PIC and dsPIC30/33 and PIC24, PicFlash2, RTClock, Max232 board, Ethernet PROTO board, MMC/SD Card Proto board, Yo2Lio's and Janni's libs)
http://www.rosseeld.be/DRO/PIC/index.htm


Top
 Profile  
 
PostPosted: 15 Nov 2010 19:48 
Offline

Joined: 18 Jun 2008 11:43
Posts: 3751
Location: Nieuwpoort, Belgium
janni wrote:
New version of replacement libs' package is ready and may be downloaded from here.

I've finally found a way to present large sets of routines in Library Manager which, hopefully, will be convenient for users (including myself :) ). The trick comes to use of dummy routines as separators and descriptions and proper organisation of routines. Library version may also be presented in this way though I left version strings for those that use them in code to ascertain that proper libs are used.

Looks very nice in the Library manager!

_________________
Kind regards,
Dany.
(happy user of mP PRO for PIC and dsPIC30/33 and PIC24, PicFlash2, RTClock, Max232 board, Ethernet PROTO board, MMC/SD Card Proto board, Yo2Lio's and Janni's libs)
http://www.rosseeld.be/DRO/PIC/index.htm


Top
 Profile  
 
PostPosted: 16 Nov 2010 16:31 
Offline

Joined: 28 Dec 2005 16:42
Posts: 1379
Location: Laval,Québec,Canada,Earth... :-)
A big thx to janni for this update !!! That work like a charm ! I love his conversion and math lib ! I save a lot of time and memory to have string display like a want on LCD and GLCD with those libs.

Thx to share and Gratz for this nice work !!!

;-)


Top
 Profile  
 
PostPosted: 25 Nov 2010 17:49 
Offline

Joined: 27 May 2009 11:08
Posts: 12
I'm sorry but i don't understand how to replace/Install the dany libraries.
Copy and paste in the P18 folder ?


Anothe questio in the P18 folder there is a original lib " __Lib_Math.mcl"
Why this library does not appear in the library manager ?
Please help me... :oops:


Top
 Profile  
 
PostPosted: 25 Nov 2010 19:11 
Offline

Joined: 18 Feb 2006 13:17
Posts: 4892
Hi sem,

Some libs contain the basic code that compiler uses to transform higher-level language into assembly. Libs like System, Math, or MathDouble are used by the compiler itself and are not meant to be directly accessed by programmers. Therefore, they're not listed in Library Manager.

As for replacement libs, as the name suggests, they're supposed to replace the original libs. So, one should change the names of the originals (like replacing the *.mcl extention with *.old or *.mE) and then move or copy their replacements to the Uses/P18 subfolder.

_________________
Replacement libraries for mP PRO and PIC18 processors, mP PRO tips & trics


Top
 Profile  
 
PostPosted: 25 Nov 2010 20:36 
Offline

Joined: 18 Jun 2008 11:43
Posts: 3751
Location: Nieuwpoort, Belgium
sem wrote:
I'm sorry but i don't understand how to replace/Install the dany libraries.
Copy and paste in the P18 folder ?

Hi Sem, please see http://www.mikroe.com/forum/viewtopic.php?f=93&t=16051&p=137763#p137763.

_________________
Kind regards,
Dany.
(happy user of mP PRO for PIC and dsPIC30/33 and PIC24, PicFlash2, RTClock, Max232 board, Ethernet PROTO board, MMC/SD Card Proto board, Yo2Lio's and Janni's libs)
http://www.rosseeld.be/DRO/PIC/index.htm


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 75 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: