Pumpkin, Inc.

Pumpkin User Forums

multitasking

For issues specific to Microchip's PICmicro® MCUs, including compilers (e.g. HI-TECH PICC & PICC-18, Microchip MPLAB®-C18) and IDEs (e.g. Microchip MPLAB®).

Re: multitasking

Postby larsbn » Sat May 10, 2008 4:40 am

Hi.
Thank you for trying so hard to help me. I really appreciate it.
I tried to use the other libraries as you suggested, but neither one of them works (I did adjust the salvocfg-file). I also tried small/large memory models, but whenever I use ANY library not starting with sfp87-, the Return Codes equals 2 for ALL OSCreateTasks.
I think it has to do with the PICC-18 compiler settings. When I look at the map-file, my compiler does not use the libraries your compiler used. It uses libraries "pic84--p.lib" and "pic87sdc.lib". I suppose that's why it doesn't work for me.
I haven't run it from source code, since, as far as I understand, you need a pro-license to do that.
Don't worry too much about it. I'm gonna try to change some compiler-settings and see if it works, but if not I just gonna give it up. I intend to use it in a students computer network and this might be too complex for us.
I don't want to waste any more of your time. You've been most helpful anyway.
larsbn
/L
larsbn
 
Posts: 18
Joined: Mon Mar 10, 2008 11:00 pm
Location: Gothenburg, Sweden

Re: multitasking

Postby aek » Sat May 10, 2008 5:49 am

What version of the PICC-18 compiler are you using? I used 9.50 ...

Your experience is correct in terms of nothing working when the library is not correct ... but when it is correct (e.g. with the 80 or 86 libraries), it should work fine. This is all because of the PIC18's banking, and why so many different libraries are required.

BTW, pic84--p.lib is fine ... my build uses that, too. But that's not the "library code" that matters ...

Also, I'm puzzled as to why your map file shows it going for an 87 library.

Can you post your Build results?

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

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

Re: multitasking

Postby aek » Sat May 10, 2008 7:32 am

Here is my map file as well:
code:
HI-TECH Software PICC-18 Compiler V9.50PL2

Linker command line:

--edf=C:Program FilesHI-TECH SoftwarePICC-189.50daten_msgs.txt
-h+PIC18F458_Probs.sym -z -Q18F458 -ol.obj -MPIC18F458_Probs.map -E1
-ver=PICC-18#V9.50PL2 -ACODE=00h-03FFFhx2 -ALOWCODE=00h-03FFFhx2
-ARAM=00h-0FFhx6 -ABIGRAM=00h-05FFh -ACOMRAM=00h-05Fh -ANVRAM=0500h-05FFh
-preset_vec=00h,intcode=08h,intcodelo=018h,powerup,init,end_init
-pramtop=0600h -ACONFIG=0300000h-030000Dh -pconfig=CONFIG
-AIDLOC=0200000h-0200007h -pidloc=IDLOC -AEEDATA=0F00000h-0F000FFh
-peeprom_data=EEDATA -pconst=end_init+0600h -plowtext=LOWCODE
-ptemp=COMRAM,nvrram=COMRAM,nvbit=COMRAM,rbss=COMRAM,rbit=COMRAM,rdata=COMRAM
-pstruct=COMRAM -pnvram=-NVRAM -AFARRAM=00h-00h
-pfarbss=FARRAM,fardata=FARRAM
-pintsave_regs=BIGRAM,bigbss=BIGRAM,bigdata=BIGRAM -pparam=RAM -pdata=RAM
-pidata=CODE,irdata=CODE,ibigdata=CODE,ifardata=CODE
C:DOCUME~1ADMINI~1LOCALS~1Tempsh8.obj
D:PumpkinCustomerLarsbnPIC18main.obj C:salvosrcmem.obj
C:salvolibhtpicc18sfp86smb.lib
C:Program FilesHI-TECH SoftwarePICC-189.50libpic84--p.lib
C:Program FilesHI-TECH SoftwarePICC-189.50libpic093pm.lib
C:Program FilesHI-TECH SoftwarePICC-189.50libpic86s-c.lib

Object code version is 3.7

Machine type is 18F458


Can you post yours?

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

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

Re: multitasking

Postby aek » Sat May 10, 2008 7:33 am

One more thing ... I'm very puzzled as to why we seem to be having different "compiler experiences" vis-a-vis the 'F458.

Have you tried another chip in MPLAB-SIM instead? E.g. a 'C452 (the very first member of the family) or the 'F8722 (a very popular member of the family)?

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

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

Re: multitasking

Postby larsbn » Sun May 11, 2008 3:38 am

Hi.
Today I’m a little embarrassed and I appologize.. I rechecked my code and all my settings from yesterday, and I made a mistake yesterday. When changing from sfp87smb-library to the sfp86smb-library, I forgot to uncheck the “Use 24-bit wide pointers to program space” under Build options >> Global. It took me a while to realize that difference between 87- and 86-libraries (sorry....). If I uncheck this box and recompile, all three OSCreateTask()-calls return code 0. In the simulator, all tasks are executed and I also ran the original 3-task program in hardware this morning and it works excellent.

You were absolutely right, with the sfp86smb-library it works great.

Again, thank you so much for your help and patience with me. I will certainly recommend Salvo and this support service to others.

/larsbn

/L
larsbn
 
Posts: 18
Joined: Mon Mar 10, 2008 11:00 pm
Location: Gothenburg, Sweden

Re: multitasking

Postby aek » Sun May 11, 2008 10:27 am

I'm glad it's working for you now ... once setup properly (and this is much harder with e.g. a PIC18 than with a single-memory-model MSP430), Salvo should "just work", and so this is why I was so puzzled and wanted to make sure I could get it working for you...

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

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

Previous

Return to PICmicro MCUs

Who is online

Users browsing this forum: No registered users and 4 guests

cron