Page 1 of 2

boostc to hi-tech compiler

Posted: Wed Dec 08, 2010 9:35 am
by saschech@gmx.de
Hello

I copy a useful running project on my hardware,compiled with soorce-boost, in a folder named flowcode_hitech.
I set compiler option:
C:\Program Files\HI-TECH Software\PICC-18\PRO\9.63\bin\picc18.exe
--CHIP=%p -N48 %f.c
I set linker settings:
C:\Program Files\Matrix Multimedia\Flowcode V4\Tools\DoNothing

I config mplab 8.60 for hi-tech ...
build and download to my hardware with ICD3 > parts of the project are working ok ; other not ok on my real hardware.

The hex-file compiled with soorce-boost = 93kb
The hex-file compiled with hi-tech = 50kb

Anybody have a idee?

Regards Wolfgang

Re: boostc to hi-tech compiler

Posted: Thu Dec 09, 2010 5:12 pm
by Benj
Hello Wolfgang,

When I was creating the BoostC and HiTech interoperability I had problems using strings and arrays in HiTech. Since then the HiTech compiler was updated and I thought all of these problems had dissapeared.

Can you tell me what exactly you are having problems with on the HiTech compiler?

Re: boostc to hi-tech compiler

Posted: Fri Dec 10, 2010 7:15 am
by Mikat
Hi Ben


This does not involve the topic, but i put this problem here..
I like to use Hitec compiler, because its much faster,it can handle the floating point better and it should be compatible to proteus...
The Hitech compiler seems to have problems on custom glcd code...
When i try compile the flowchart witch have lcd init, it gives me this kind of errors..

File name: C:\Program Files\Matrix Multimedia\Flowcode V4\Omat\hitec\displ.c
Generated by: Flowcode v4.3.7.63
Date: Sunday, January 09, 2011 09:39:01
Licence: Professional
Registered to: Mika Silvennoinen


http://www.matrixmultimedia.com


Launching the compiler...
C:\Program Files\HI-TECH Software\PICC-18\PRO\9.65\bin\picc18.exe --CHIP=18F4685 -N48 displ.c
displ.c:
354: rom char* ASCII1 = {0x00 , 0x00 , 0x00 , 0x00 , 0x00,
^ (374) missing basic type; int assumed (warning)
^ (314) ";" expected
366: rom char* ASCII2 = {0x00 , 0xE0 , 0x60 , 0x00 , 0x00,
^ (374) missing basic type; int assumed (warning)
^ (314) ";" expected
378: rom char* ASCII3 = {0x36 , 0x49 , 0x49 , 0x49 , 0x36,
^ (374) missing basic type; int assumed (warning)
^ (314) ";" expected
390: rom char* ASCII4 = {0x7F , 0x41 , 0x41 , 0x41 , 0x3E,
^ (374) missing basic type; int assumed (warning)
^ (314) ";" expected
402: rom char* ASCII5 = {0x7F , 0x09 , 0x09 , 0x09 , 0x06,
^ (374) missing basic type; int assumed (warning)
^ (314) ";" expected
414: rom char* ASCII6 = {0x02 , 0x04 , 0x08 , 0x10 , 0x20,
^ (374) missing basic type; int assumed (warning)
^ (314) ";" expected
426: rom char* ASCII7 = {0x7F , 0x04 , 0x04 , 0x78 , 0x00,
^ (374) missing basic type; int assumed (warning)
^ (314) ";" expected
438: rom char* ASCII8 = {0x04 , 0x3E , 0x44 , 0x24 , 0x00,
^ (374) missing basic type; int assumed (warning)
^ (314) ";" expected
displ.c: FCD_Custom20_LCD_Print_String()
948: temp[count]=ASCII1[(pos_Str*5)+count];
^ (192) undefined identifier "ASCII1"
(981) pointer required ^
(981) pointer required ^
952: temp[count]=ASCII2[((pos_Str - 12)*5)+count];
^ (192) undefined identifier "ASCII2"
(981) pointer required ^
(981) pointer required ^
956: temp[count]=ASCII3[((pos_Str - 24)*5)+count];
^ (192) undefined identifier "ASCII3"
(981) pointer required ^
(981) pointer required ^
960: temp[count]=ASCII4[((pos_Str - 36)*5)+count];
^ (192) undefined identifier "ASCII4"
(981) pointer required ^
(981) pointer required ^
964: temp[count]=ASCII5[((pos_Str - 48)*5)+count];
^ (192) undefined identifier "ASCII5"
displ.c: 964: too many errors (21)
HI-TECH C PRO for the PIC18 MCU Family candidate build 7178 V9.65
Copyright (C) 1984-2010 HI-TECH SOFTWARE
licensed for evaluation purposes only
this licence will expire on Fri, 28 Jan 2011
(908) exit status = 1

Return code = 1

Vuokaavion C-koodin kääntäminen ei onnistu johtuen seuraavista virheistä:


Jos vuokaaviossasi on C-koodia, käy tämä huolellisesti läpi. Jos vuokaaviossasi ei ole C-koodia tai olet täysin tarkastanut sen, ota yhteyttä tekniseen tukeen.

FINISHED

Re: boostc to hi-tech compiler

Posted: Fri Dec 10, 2010 7:22 am
by saschech@gmx.de
Hello Benj

I think the best is,i send the fcd-file per pm. because it is big......

regards Wolfgang

Re: boostc to hi-tech compiler

Posted: Fri Dec 10, 2010 10:17 am
by Benj
Hi Wolfgang,

The ROM char* command is only supported by BoostC.

For the HiTech compiler you must instead use something like this.

const char array[11] = "Hello World";

The HiTech compiler manual can be found in the following directory once it is installed.

C:\Program Files\HI-TECH Software\PICC\9.70\docs

Here is the GLCD component. You can see how the array switching is done between compilers.

Code: Select all

//ASCII Pixel data
#ifdef _BOOSTC
	rom char* ASCII1 =
	%j
	rom char* ASCII2 =
	%k
	rom char* ASCII3 =
	%l
	rom char* ASCII4 =
	%m
	rom char* ASCII5 =
	%n
	rom char* ASCII6 =
	%o
	rom char* ASCII7 =
	%p
	rom char* ASCII8 =
	%q
#endif

#ifdef HI_TECH_C
	const char ASCII1[] =
	%j
	const char ASCII2[] =
	%k
	const char ASCII3[] =
	%l
	const char ASCII4[] =
	%m
	const char ASCII5[] =
	%n
	const char ASCII6[] =
	%o
	const char ASCII7[] =
	%p
	const char ASCII8[] =
	%q
#endif

Re: boostc to hi-tech compiler

Posted: Fri Dec 10, 2010 10:31 am
by saschech@gmx.de
Hello Benj

Do you mean Mikat with the answer?

Regards Wolfgang

Re: boostc to hi-tech compiler

Posted: Fri Dec 10, 2010 12:59 pm
by Mikat
I dont know how i replace those lines, because those "rom char* ASCII" erros point to lines where is the ASCII Pixel data in the custom component c code, so the ASCII Pixel data shoul be changed somehow...
And the "temp[count]=ASCII5[((pos_Str - 48)*5)+count];" errors point the Use correct buffer location in the print strig macro, both in the custom component c code....

Sorry, you answer my question before i even ask it... 8)

Still get these kind error messages...

C:\Program Files\HI-TECH Software\PICC-18\PRO\9.65\bin\picc18.exe --CHIP=18F4685 -N48 fcu27.c
fcu27.c:
1321: const char* ASCII1 = {0x00 , 0x00 , 0x00 , 0x00 , 0x00,
(316) "}" expected ^
(314) ";" expected ^
1333: const char* ASCII2 = {0x00 , 0xE0 , 0x60 , 0x00 , 0x00,
(316) "}" expected ^
(314) ";" expected ^
1345: const char* ASCII3 = {0x36 , 0x49 , 0x49 , 0x49 , 0x36,
^ (357) illegal conversion of integer to pointer (warning)
(316) "}" expected ^
(314) ";" expected ^
1357: const char* ASCII4 = {0x7F , 0x41 , 0x41 , 0x41 , 0x3E,
^ (357) illegal conversion of integer to pointer (warning)
(316) "}" expected ^
(314) ";" expected ^
1369: const char* ASCII5 = {0x7F , 0x09 , 0x09 , 0x09 , 0x06,
^ (357) illegal conversion of integer to pointer (warning)
(316) "}" expected ^
(314) ";" expected ^
1381: const char* ASCII6 = {0x02 , 0x04 , 0x08 , 0x10 , 0x20,
^ (357) illegal conversion of integer to pointer (warning)
(316) "}" expected ^
(314) ";" expected ^
1393: cont char* ASCII7 = {0x7F , 0x04 , 0x04 , 0x78 , 0x00,
^ (374) missing basic type; int assumed (warning)
^ (314) ";" expected
1405: const char* ASCII8 = {0x04 , 0x3E , 0x44 , 0x24 , 0x00,
^ (357) illegal conversion of integer to pointer (warning)
(316) "}" expected ^
(314) ";" expected ^
fcu27.c: FCD_Custom20_LCD_Print_String()
1941: temp[count]=ASCII7[((pos_Str - 72)*5)+count];
^ (192) undefined identifier "ASCII7"
(981) pointer required ^
(981) pointer required ^
fcu27.c: FCD_CAN0_Init()
3723: cancon = 0x80;
^ (192) undefined identifier "cancon"
3725: while( (canstat & 0xE0) != 0x80 );
^ (192) undefined identifier "canstat"
3731: brgcon3 = 3;
^ (192) undefined identifier "brgcon3"
fcu27.c: 3731: too many errors (21)

Mika

Re: boostc to hi-tech compiler

Posted: Fri Dec 10, 2010 2:36 pm
by Mikat
By the way, whats wrong those register names canstat,brgcon etc....

Re: boostc to hi-tech compiler

Posted: Fri Dec 10, 2010 3:07 pm
by Benj
Hello,

Yes sorry Wolfgang I did mean Mikat.

HiTech requires register names to be in upper case.

eg canstat becomes CANSTAT.

There is a "definitions.h" file in the FCD folder that should define lowercase register names for the uppercase registers.

Re: boostc to hi-tech compiler

Posted: Fri Dec 10, 2010 3:19 pm
by Mikat
Ok thats what i was thinking about those names...
But what about those warnings above?
I still cant compile if i use the custom glcd component....

Mika

Re: boostc to hi-tech compiler

Posted: Sat Dec 11, 2010 12:39 pm
by Benj
Hello Mikat,

You are missing the square brackets from the variable names. They should look like this. Also I noticed one of your const is actually spelt cont.

const char ASCII1[] = {0x00 , 0x00 , 0x00 , 0x00 , 0x00, .... };

Re: boostc to hi-tech compiler

Posted: Sat Dec 11, 2010 12:42 pm
by Benj
Any register problems can be solved by going to View -> Project options and then enabling complementary code and clicking edit.

Here in the defines box you can add defines for the lower case register names.

#define canstat CANSTAT

This tells the compiler to use CANSTAT whenever canstat is referenced. These defines should already be in place via the definitions include file so if you are redefining a register name you will get an error.

Re: boostc to hi-tech compiler

Posted: Mon Dec 13, 2010 6:57 am
by Mikat
Hi Ben.
Those square brackets i figured my self, but not the spelling (blind i guess...).
Thanks, the custom glcd component at least compiles now with few warnings..
I defined those registers in definitions.h, so thats ok..
But there is couple rows in can component witch wont compile..
The error is in:
case 0:
cancon = cancon & 0xE0;
cancon = cancon | 0x08;
st_bit(rxb0con, TXREQ); //Set Message Transmission Flag
while (ts_bit(rxb0con, TXREQ) && timeout) //Wait for message to send
timeout = timeout - 1;
break;
Code.
Its in (rxb0con, TXREQ), correct me if i am wrong, but the HI-Tech dont use register names before register bits, so it goes only TXREQ..
But then the compiler dont know witch rxb_con register it points. It seems that in HI-Tech those regiter bits are TXB0REQ,TXB1REQ,RXB0FUL....
At least the component compiles when i renamed those bits..
Btw why that TXREQ "points" to rxb0con register, What i look in datasheet that bit is in txb_con registers?

And then completely different thing, for a while ago i asked about that custom glcd component, about getting it "real" component, for working simulation, and support for Toshiba t6963c driver, any news about that?

Mika

Re: boostc to hi-tech compiler

Posted: Wed Dec 15, 2010 9:00 am
by saschech@gmx.de
Hello Benj

Do you have had access to the data information and facts, i send you?

Regards Wolfgang

Re: boostc to hi-tech compiler

Posted: Sat Dec 18, 2010 9:51 am
by saschech@gmx.de
Hello

Any news?

Regards Wolfgang

Re: boostc to hi-tech compiler

Posted: Mon Dec 20, 2010 10:02 am
by saschech@gmx.de
Hello Steve

I show you are here.Why nobody give me a answer?
if possible,i want work with hi-tec.....

Regards wolfgang

Re: boostc to hi-tech compiler

Posted: Mon Dec 20, 2010 10:38 am
by Steve
I do not have access to Ben's private messages, so I cannot see the information you have sent.

Ben has not been at work for a week, but is in today and will hopefully get around to helping with this problem later today.

Re: boostc to hi-tech compiler

Posted: Mon Dec 20, 2010 11:02 am
by saschech@gmx.de
Hello Steve

I understand,I send you the link immediately ; but i tell Benj give it to all expert....

Regards Wolfgang

Re: boostc to hi-tech compiler

Posted: Mon Dec 20, 2010 1:10 pm
by Benj
Hi Wolfgang,

I have looked at the files you have sent and the video. When you are compiling in MPLAB I see there are a couple of errors right at the top of the compilation output. However they are gone so fast that I cannot see what they are. Would you mind copying the MPLAB compilation errors from the HiTech version and I will see if I can help to get this working for you.

Re: boostc to hi-tech compiler

Posted: Mon Dec 20, 2010 1:45 pm
by saschech@gmx.de
Hello Benj

Ok no problem.

Why if i want compile inside flowcode the hi-tech compiler stop bevor end?

Regards Wolfgang

Re: boostc to hi-tech compiler

Posted: Tue Dec 21, 2010 3:39 pm
by Benj
Hello Wolfgang,

Right I have asked Steve if he can comment on the Flowcode compilation message seeming to stop short of completion.

Regarding the MPLAD IDE compiation errors they seem to point to the following lines of C code, 541 and 1393.

The compiler message seems to be saying that there is no type declaration for the variables that are being used.

Looking at the C file I cant really see any reason for the compilation to fail.

Perhaps its worth commenting out some of the functions and variables and trying to get it to compile a bit at a time rather then all at once just to see what the actual problem is.

Re: boostc to hi-tech compiler

Posted: Tue Dec 21, 2010 4:16 pm
by Benj
Hello Wolfgang,
Why if i want compile inside flowcode the hi-tech compiler stop bevor end?
Does the "msg.txt" files that gets generated by Flowcode have the same problem where the text stops half way through a warning?

Re: boostc to hi-tech compiler

Posted: Tue Dec 21, 2010 6:07 pm
by saschech@gmx.de
Hello Benj

Here the file,but he is also in the upload folder hi-tech.....

Regards Wolfgang

Re: boostc to hi-tech compiler

Posted: Wed Dec 22, 2010 7:47 am
by Steve
I'm not sure why the text is truncated. You could try turning compiler warnings off and compile again.

Re: boostc to hi-tech compiler

Posted: Wed Dec 22, 2010 8:05 am
by saschech@gmx.de
Hello Steve

Where i can do these ; compiling inside flowcode or mplab-ide?

Regards Wolfgang