Pumpkin, Inc.

Pumpkin User Forums

LIBRARY and new versions of HiTec C

If you can't make Salvo do what you want it to do, post it here.

LIBRARY and new versions of HiTec C

Postby luben » Sun Dec 17, 2000 8:50 am

Hello,

If the new version HiTech C appears, what will happen with your freeware libraries (.LIB). Should we change them every time when new HiTech release appears?

By the way, I read in manueal that the libraries are precompiled for configuration described in salvoconfig.h in their directory. Does that mean that if I use other configuration I should not include them in my project (for example for project with more events or timeouts, then allowed in salvoconfig.h in LIB directory). I still can't understand the way how this libraries work - do they override the HiTech ones?

Regards
Luben

luben
 
Posts: 324
Joined: Sun Nov 19, 2000 12:00 am
Location: Sofia, Bulgaria

Re: LIBRARY and new versions of HiTec C

Postby Salvo Tech Support » Sun Dec 17, 2000 9:22 am

Hi Luben.

1) There do not appear to be any incompatibilities between Salvo freeware libraries compiled under PIC C v7.86 PL3 and later versions. We intend to continue to compile the freeware libraries under v7.86 PL3 (the latest free upgrade).

2) In order to use the freeware libraries, you must use _exactly_ the same salvocfg.h as was used to compile them, with the exception of OSTASKS and OSEVENTS. That means that you cannot add

code:
#define OSENABLE_TIMEOUTS TRUE
#define OSTIMER_PRESCALAR 5

to your salvocfg.h. In order for these configuration parameters to have an effect, you would have to recompile the freeware libraries -- you need the full version of Salvo to do that.

So, your salvocfg.h should only have the following in it:

code:
#define OSCOMPILER               OSHT_PICC
#define OSENABLE_IDLE_TASK TRUE
#define OSENABLE_IDLE_TASK_HOOK TRUE
#define OSTARGET OSPIC16
#define OSLOC_ECB bank1
#define OSLOC_TCB bank1

#define OSEVENTS 5
#define OSTASKS 4


This salvocfg.h will allocate enough RAM for 5 events (0-4) and 4 tasks (0-3, where task #3 is the idle task).

The freeware libraries are designed for you to get a simple multitasking, event-driven application up and running using a minimum of memory. Because of the high degree of Salvo's configurability (2**(number of configuration options)), we felt this is the simplest way for people to use Salvo and get a feel for its capabilities.

If you need more advanced features (like timeouts, 16-bit delays, statistics, timer prescalar) then you should consider the full version of Salvo.

The Salvo libraries contain only Salvo user services -- they are used in addition to the usual HI-TECH libraries.

Please see App Note AN-1 for a complete, step-by-step description of how to use the freeware libraries with PIC C.

[This message has been edited by Salvo Tech Support (edited December 17, 2000).]

--------
Salvo Technical Support
Please request all tech support through the Forums.
Salvo Tech Support
 
Posts: 173
Joined: Sun Nov 19, 2000 12:00 am

Re: LIBRARY and new versions of HiTec C

Postby luben » Mon Dec 18, 2000 2:07 am

Hello,

Does that mean that every time I build my project I should add a node that is some library? For example if I use 16F877 and will use delays and events - the appropriate library from LibHi-TechFPI4xxde should be used?

Regards
Luben

luben
 
Posts: 324
Joined: Sun Nov 19, 2000 12:00 am
Location: Sofia, Bulgaria

Re: LIBRARY and new versions of HiTec C

Postby luben » Mon Dec 18, 2000 4:06 am

Hello,

Maybe I didn't ask correctly my question. My question is - are the Freeware libraries a part of Salvo or they exist only in free version (maybe after buying the full version the user can access the sources).

This question is because I'm using Franklin C compiler for ATMEL. If you need to make such libraries for every processor this will take a lot of time and it's doubtful that you can soon offer Salvo for wide range of uP. So, maybe the second question is - do you intend to cover more uP with Salvo, except PIC.

Regards
Luben

luben
 
Posts: 324
Joined: Sun Nov 19, 2000 12:00 am
Location: Sofia, Bulgaria

Re: LIBRARY and new versions of HiTec C

Postby luben » Mon Dec 18, 2000 7:50 am

Hi,

Thank you for your reply. Now I began to understand the way Salvo is working. So:

- if you own the full version you can add like a node a libraries. You should never exceed the limitations in the libraries - if you compiled them for example for 8 tasks, you should keep in mind that your tasks should be =< 8. And if you didn't add some of the features of the functions (like timeouts) you should recompile new library for the project. The other way for owners of the full version is to #include the source files into their project diretly. Because the full version contents all source files, you can compile any confuguration into LIB files.

-if you are a user of the free version (my case) you can use only the precompiled libraries, because you don't have the source files. So, if my project don't fit to the freeware libraries I have two choices - to change the structure, so it could fit to the precompiled freeware libraries, or to purshue the Salvo.

Because the real Salvo is just the source codes and they are written like C programs, there is no problem to incorporate the Salvo to any processor that has ANSI C compatible compiler or to make your own libraries for any desired configuration. Well, because of the differences between the compilers (some pragma declaration, additional specific commands) the implementation of Salvo to new processors needs deep knowleges both in C and hardware.

And the advantage of using libraries is that in compilation time of the final HEX file, you take only this pieces from the library that are used somewhere in the project (reduction of the code size).

By the way, talking about compilation of libraries I found that in MPLAB would be impossible. If you're using HiTech C you should go directly in DOS window - the MPLAB IDE doesn't support LIB destination in project.

And talking about these things I can say that like product Salvo is excellent, but for beginners like me it's very unfriendly. One wizard that leads us into process of which libraries or source files include/exclude into the project will be grate. Or at least one list (something like quick view) with names of the fuctions/macros and the needed source files or libraries. In your manual is really written everything and I can't say that if you read it carefully you will not find an answer to any question. The problem is that all we don't have so much time.... we like to go trought short ways.

Regards
Luben

luben
 
Posts: 324
Joined: Sun Nov 19, 2000 12:00 am
Location: Sofia, Bulgaria

Re: LIBRARY and new versions of HiTec C

Postby Salvo Tech Support » Mon Dec 18, 2000 8:17 am

Hi Luben.

1) The freeware libraries are in both the demo version and the full version of Salvo. Since most users of the full version will want to use its advanced features, they're more likely to create their own library or just have all the necessary source files as nodes in their project.

If you use a Salvo library, it must be rebuilt whenever you change anything in salvocfg.h (except OSTASKS and OSEVENTS when using the freeware libraries).

NOTE: for testing purposes in-house, the only time we link a project to a library is when we test the freeware libraries. In all other cases, we add all the necessary source files as nodes in a project. That way we can change salvocfg.h and immediately rebuild the project. If we were linking to a Salvo library, we'd have to rebuild the library first, then re-build the application. in MPLAB or HPDPIC this would be a two-step process. With a Makefile, it would be only one, but few PIC users are using Makefiles. There are some situations where linking to a library created with the full version of Salvo would be appropriate -- e.g. Salvo applications with more than one programmer writing code for the project.

2) We will be offering Salvo for a wide array of processors. We will make freeware libraries for each processor we support. Again, these libraries will have a simple level of functionality. Users of the full version of Salvo won't have any problems compiling their projects for supported processor types other than the PIC.

[This message has been edited by Salvo Tech Support (edited December 18, 2000).]

--------
Salvo Technical Support
Please request all tech support through the Forums.
Salvo Tech Support
 
Posts: 173
Joined: Sun Nov 19, 2000 12:00 am

Re: LIBRARY and new versions of HiTec C

Postby Salvo Tech Support » Mon Dec 18, 2000 8:26 am

Hi Luben.

Re: your library build question -- you are correct. Each time you create a project, you'll want to add a node that is a library.

For a 16F877, which is a lot like a 16C77, to use delays and events in your Salvo application you'd link to the salvofreewarelibhi-techfpi4xxdefpi422de.lib freeware library.

If you changed your application and didn't use delays any more, then you'd need to link to salvofreewarelibhi-techfpi4xxefpi422e.lib.

As a practical matter, unless you're running out of memory in RAM Bank 3, it would be easiest to stick with fpi422de.lib for all your 16F877 projects that use the Salvo freeware libraries.

[This message has been edited by Salvo Tech Support (edited December 18, 2000).]

--------
Salvo Technical Support
Please request all tech support through the Forums.
Salvo Tech Support
 
Posts: 173
Joined: Sun Nov 19, 2000 12:00 am

Re: LIBRARY and new versions of HiTec C

Postby Salvo Tech Support » Tue Dec 19, 2000 8:19 am

Hi Luben.

Your undertandings are correct overall. There is some "tweaking" you can do if you include all the source files in your project instead of creating a separate library -- see the OSENABLE_XYZ configuration options.

The User Manual is intended primarily as a reference, though it does have a few examples. The App Notes (available on our website) are complete, specific examples that address some of the questions new users may have.

--------
Salvo Technical Support
Please request all tech support through the Forums.
Salvo Tech Support
 
Posts: 173
Joined: Sun Nov 19, 2000 12:00 am


Return to Coding

Who is online

Users browsing this forum: No registered users and 1 guest

cron