Pumpkin, Inc.

Pumpkin User Forums

Salvo MPLAB and command line build

If you're having difficulty installing Salvo, post it here.

Salvo MPLAB and command line build

Postby Unregistered User » Thu Oct 04, 2001 8:12 am

Hi,
I got Salvo, Hi Tech, MPLAB, and Codewright all working. I notice if I build
in Codewright I get a different size executable than from within MPLAB. It
seems tut6 built in MPLAB is using the libraries even though salvo source
files are included in the project??? Is this possible?
Thanks,
James

MPLAB tut6 output (tail end of output):
Memory Usage Map:
....
Program ROM $0000 - $0081 $0082 ( 130) words
Program ROM $04CC - $07FF $0334 ( 820) words
$03B6 ( 950) words total Program ROM

Bank 0 RAM $0020 - $0037 $0018 ( 24) bytes
Bank 0 RAM $0070 - $0072 $0003 ( 3) bytes
$001B ( 27) bytes total Bank 0 RAM

Bank 1 RAM $00A0 - $00B7 $0018 ( 24) bytes total Bank 1 RAM

Build completed successfully.

Codewright building same project:
....
::function _OSIdleTaskHook is never called (warning)

Memory Usage Map:

Program ROM $0000 - $007D $007E ( 126) words
Program ROM $0378 - $07FF $0488 ( 1160) words
$0506 ( 1286) words total Program ROM

Bank 0 RAM $0020 - $0069 $004A ( 74) bytes
Bank 0 RAM $0070 - $0072 $0003 ( 3) bytes
$004D ( 77) bytes total Bank 0 RAM

Unregistered User
 
Posts: 36
Joined: Thu Aug 09, 2001 11:00 pm

Re: Salvo MPLAB and command line build

Postby aek » Thu Oct 04, 2001 8:23 am

Congratulations on getting your environment up and running.

First, some observations:

1) It's helpful if you include the PICC linker line (not just the memory usage map) with a problem like this. This lists the files that were used to create the executable.

2) All of the demo, tutorial, example, etc. programs should compile without any warnings (or errors). So the "function _OSIdleTaskHook is never called (warning)" should be a tip-off that something is not quite right ...

Building salvo utorial u6sya u6.pjt in MPLAB (this project is a full source code build), I get:

code:
Linking:
Command line: "C:HT-PICBINPICC.EXE -G -INTEL -MTU6.map -16C77 -oTU6.HEX -fakelocal
-Isalvoinclude -Isalvosource
salvosourceDELAY.OBJ
salvosourceEVENT.OBJ
salvosourceINIT.OBJ
salvosourceINITECB.OBJ
salvosourceINITTASK.OBJ
salvosourceINITTCB.OBJ
salvosourceMEM.OBJ
salvosourceMSG.OBJ
salvosourceQINS.OBJ
salvosourceSCHED.OBJ
salvosourceTIMER.OBJ
salvosourceUTIL.OBJ
salvo utorial u6MAIN.OBJ "
Enter PICC -HELP for help

Memory Usage Map:

Program ROM $0000 - $0081 $0082 ( 130) words
Program ROM $04CE - $07FF $0332 ( 818) words
$03B4 ( 948) words total Program ROM

Bank 0 RAM $0020 - $0037 $0018 ( 24) bytes
Bank 0 RAM $0070 - $0072 $0003 ( 3) bytes
$001B ( 27) bytes total Bank 0 RAM

Bank 1 RAM $00A0 - $00B7 $0018 ( 24) bytes total Bank 1 RAM

Build completed successfully.


If I build salvo utorial u6sysa u6lib.pjt (this is a project that links to a standard library), I get:

code:
Linking:
Command line: "C:HT-PICBINPICC.EXE -G
-INTEL -MTU6LIB.map -16C77 -oTU6LIB.HEX
-fakelocal -Isalvoinclude -Isalvosource
salvo utorial u6MAIN.OBJ
salvolibrarySLP42CAB.LIB "
Enter PICC -HELP for help

Memory Usage Map:

Program ROM $0000 - $0083 $0084 ( 132) words
Program ROM $046B - $07FF $0395 ( 917) words
$0419 ( 1049) words total Program ROM

Bank 0 RAM $0020 - $0038 $0019 ( 25) bytes
Bank 0 RAM $0070 - $0072 $0003 ( 3) bytes
$001C ( 28) bytes total Bank 0 RAM

Bank 1 RAM $00A0 - $00D2 $0033 ( 51) bytes total Bank 1 RAM

Build completed successfully.


So from your screen dump it looks like you're doing a full-source build in MPLAB. I really can't tell what you're building in CodeWright -- the 77 bytes of Bank 0 RAM, and nothing in other banks (libraries and this project all default to putting Salvo's variables in Bank 1) suggest that something isn't right with your Codewright build ...

What do you mean by "Codewright building same project"? The project is defined only in MPLAB. If you want to build it from a command-line, you'll have to snag the correct files, have the right salvocfg.h, etc.

In Appendix C of the User Manual, under "Project Nomenclature", you'll find the naming conventions for Salvo projects that are in the distribution. By opening a project in MPLAB you'll see which files are included. The salvocfg.h that's associated with each project often requires certain predefined symbols (e.g. MAKE_WITH_STD_LIBRARY) for a successful build.

------------------

[This message has been edited by aek (edited October 04, 2001).]

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: Salvo MPLAB and command line build

Postby James » Fri Oct 05, 2001 8:36 am

"function_OSIdleTaskHook is never called (warning)" is generated when using a -W-9 compiler option in Hi Tech. The compiler spits out a dozen or more warnings about the Salvo source, including that one. What warning level should be used and why is it not warning free?
Moving on to the main issue. By "Codewright building same project" I mean from within Codewright I am compiling the same files. Codewright has the concept of projects, also. I took your advice and set up a Codewright build EXACTLY duplicating how MPLAB builds- I got identical results to MPLAB. I definitely need some more practice building, but, it seems dificult to tie down the salvocfg.h to predicatble results. Any comments? Can the compiler sometimes discover a different copy of salvocfg.h in another directory?
James
James
 
Posts: 12
Joined: Thu Oct 04, 2001 11:00 pm
Location: San Diego, CA, USA

Re: Salvo MPLAB and command line build

Postby Salvo Tech Support » Fri Oct 05, 2001 8:53 am

Hi (James).

The OSIdleTaskHook() warning could be happening for a variety of reasons, but it probably points to something wrong in salvocfg.h. Can you post your salvocfg.h file? Use the code tags (see the BB faq) to preserve formatting.

quote:
I got identical results to MPLAB.

I don't understand -- are these (new?)results different from the ones you originally posted? Because those two builds are quite different.

The only salvocfg.h file your project should "pick up" is the one specific to the project itself. Normally, when building a project, the following directories should be searched for *.h files, in this order:

1) project directory
2) salvoinclude
3) salvosource

This search path should NOT include subdirectories of the directories above. #3 above is needed only when in-lining certain functions, which you're not doing.

------------------
-----------------------
Salvo Technical Support
Please request all tech support through the Forums.

--------
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: Salvo MPLAB and command line build

Postby James » Fri Oct 05, 2001 9:11 am

Hi Andrew,
The OSIdleTaskHook() is in tu6 main.c and I assume is not called. If I use the default compiler warning level (as is the case in the tu6 MPLAB project) this warning is not generated. Why can I not build with a more severe warning level? What warning level to you recommend?
Yes, the (new) results are identical. I changed my build identical to MPLAB and got the same results. So, in this important point your advice helped. I still need to practice with salocfg.h so you might be hearing from me again.
James

James
 
Posts: 12
Joined: Thu Oct 04, 2001 11:00 pm
Location: San Diego, CA, USA

Re: Salvo MPLAB and command line build

Postby Salvo Tech Support » Fri Oct 05, 2001 9:37 am

Hi James.

I'm glad you've got things working.

In the tutorials, OSIdleTaskHook() is not called when you do a source code build. But it is called when you do a library build, because the libraries are generated with both OSENABLE_IDLE_TASK and OSENABLE_IDLE_TASK_HOOK set to TRUE. So if one wanted to avoid this error, one could add these two configuration options to the project's salvocfg.h. Looks like we'll do that to avoid confusion in the future.

BTW, in neither application does the idle task ever run -- that's because TaskCount() has a higher priority and is always eligible. But it needs to be there in order for library users (Salvo Lite and Salvo full version) to be able to build the tutorial programs.

We've done all our builds at the default warning level (-W0). This is the warning level we would recommend for v2.2.0. I did a quick check on a couple of programs in the v2.2.0 distribution and the only warning that comes up with -W-9 is the "function is not called" warning.

We'll take a look at this for the upcoming release and perhaps recommend a "more finicky" warning level (like -W-9) for v2.3.0.

------------------
-----------------------
Salvo Technical Support
Please request all tech support through the Forums.

--------
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 Installation

Who is online

Users browsing this forum: No registered users and 0 guests

cron