It is currently 20 Apr 2018 04:09

All times are UTC + 1 hour




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: Version migration
PostPosted: 07 Aug 2017 22:28 
Offline

Joined: 07 Aug 2017 21:50
Posts: 7
Hello everyone!
I'm trying to import the files from an old version of MikroPascal: .ppp and .ppas to a new project. As per the research I've done, there's a need to change them to mpppi and mpas, and I'm working with the changes the program does not compile. I currently use version 4.60.
I've been trying mostly the udp bootloader demos, provided on http://www.microelemente.ro, but none compiles.
I ask for help because I used another compiler and I'm migrating to the compilers of Mikroelectronika, especially MikroC and MikroPascal.

Thanks in advance!


Last edited by techno on 09 Aug 2017 21:26, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Version migration
PostPosted: 08 Aug 2017 23:34 
Offline

Joined: 18 Feb 2006 13:17
Posts: 4892
Welcome to the forum :) .

I'm afraid that importing form old mP to mP PRO will not be easy, especially if it's a complex project. mikroPascal has changed quite a bit and most probably nobody can recall all the changes by now. There's a Migration Document in Help but it's rather limited in scope and probably not up to date.

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


Top
 Profile  
 
 Post subject: Re: Version migration
PostPosted: 09 Aug 2017 21:22 
Offline

Joined: 07 Aug 2017 21:50
Posts: 7
Thank you janni!


I changed .ppp to .mpppi and .ppas to .mpas. And opened the project by calling the .mpppi file. The files were not attached, so I manually added the .mpas and other files.


This is resullt:

0 155 Available RAM: 3947 [bytes], Available ROM: 65536 [bytes] 
0 133 Compilation Started C:\Users\techno\Desktop\ENC_V3_3_source\definitions_ENC.mpas
1 1015 Hint: Compiling unit "C:\Users\techno\Desktop\ENC_V3_3_source\definitions_ENC.mpas" definitions_ENC.mpas
1 304 Syntax error: Expected "program" but "unit" found definitions_ENC.mpas
0 102 Finished (with errors): 09 ago 2017, 15:42:28




I change "unit" to "program" in definitions_ENC.mpas file:


0 155 Available RAM: 3947 [bytes], Available ROM: 65536 [bytes] 
0 133 Compilation Started C:\Users\techno\Desktop\ENC_V3_3_source\definitions_ENC.mpas
1 1015 Hint: Compiling unit "C:\Users\techno\Desktop\ENC_V3_3_source\enc_lib_user.mpas" enc_lib_user.mpas
13 337 Unknown type "IpHeader" enc_lib_user.mpas
17 304 Syntax error: Expected ";" but "Procedure" found enc_lib_user.mpas
17 304 Syntax error: Expected "end" but "Eth_SetParameters" found enc_lib_user.mpas
17 304 Syntax error: Expected "." but ";" found enc_lib_user.mpas
0 134 Compiled Successfully C:\Users\techno\Desktop\ENC_V3_3_source\definitions_ENC.mpas
0 139 All files Compiled in 47 ms 
0 357 main function is not defined main function is not defined
0 453 Unsuccessful linking 'ENC_V3_3.mpppi' Unsuccessful linking 'ENC_V3_3.mpppi'
0 102 Finished (with errors): 09 ago 2017, 15:49:03 ENC_V3_3.mpppi



Follows the source files. The original file uses a pic18f2620. I would like to make a bootloader for a pic18f26k20. Could you see if they compile?


Attachments:
code.rar [135.65 KiB]
Downloaded 16 times
Top
 Profile  
 
 Post subject: Re: Version migration
PostPosted: 10 Aug 2017 16:12 
Offline
mikroElektronika team
User avatar

Joined: 15 Jan 2016 12:50
Posts: 1717
Hi,

Unfortunately, it doesn't compile in version 7.1.0,
you will need to make change in file definitions_ENC.mpas:

program definitions_ENC;


Only one file can starts with program, another ones are units,
you can change into:

unit definitions_ENC;


Also, you will need to add aditional_string_util.mpas file.

Kind regards,
Lana


Top
 Profile  
 
 Post subject: Re: Version migration
PostPosted: 10 Aug 2017 22:06 
Offline

Joined: 18 Feb 2006 13:17
Posts: 4892
techno wrote:
I changed .ppp to .mpppi and .ppas to .mpas. And opened the project by calling the .mpppi file. The files were not attached, so I manually added the .mpas and other files.
I don't think it's the right way to begin. There's the Project/Import Project option that should help you to start. Another way is to start new project and add source files to it (after renaming *.ppas files to *.mpas). Then you'll have to configure the processor and start correcting the code for new compiler. And it may prove hard, as I warned before.

Quote:
I change "unit" to "program" in definitions_ENC.mpas file:
It looks like you're trying to make a project from a library. If you have only the library, not a project (created under old compiler) then create a new project that uses this library.

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


Top
 Profile  
 
 Post subject: Re: Version migration
PostPosted: 10 Aug 2017 22:27 
Offline

Joined: 07 Aug 2017 21:50
Posts: 7
Thanks for the comments Lana.arsic and Janni!

It is very complicated to learn such a compiler. I have been seeing in the forum several questions about libraries on the same subject (UDP bootloader and Ethernet). The big problem is that these posts are very old.
I'll keep trying and put results tomorrow.


Top
 Profile  
 
 Post subject: Re: Version migration
PostPosted: 11 Aug 2017 16:47 
Offline
mikroElektronika team
User avatar

Joined: 15 Jan 2016 12:50
Posts: 1717
Hi,

@ janni

Thank you for always be so helpful.

@ techno

It should not be complicated, because there are a lot of examples,
Help file and we would gladly help you whenever you have some issue.

Kind regards,
Lana


Top
 Profile  
 
 Post subject: Re: Version migration
PostPosted: 13 Aug 2017 20:03 
Offline

Joined: 07 Aug 2017 21:50
Posts: 7
Friends,

Briefly I would like to see any of the codes provided in this post here: viewtopic.php?t=9093 compiling perfectly.
As I said before, the posts are very old and it seems to me that the authors no longer participate in this forum.
If they can compile, I would like you to tell me what procedure was used.
I even sent an e-mail to his author (Florin Madea), but he does not respond.


Top
 Profile  
 
 Post subject: Re: Version migration
PostPosted: 14 Aug 2017 18:21 
Offline
mikroElektronika team
User avatar

Joined: 15 Jan 2016 12:50
Posts: 1717
Hi,

You can try janni's suggestion, you can use Import Project
(Ctrl + I) and then to manually change the code so it can work in
the newest version, you can go through library by library which are used in project.

Or you can wait response from author.

Kind regards,
Lana


Top
 Profile  
 
 Post subject: Re: Version migration
PostPosted: 20 Aug 2017 06:25 
Offline

Joined: 07 Aug 2017 21:50
Posts: 7
Hello everyone!
Even following the recommendations. I still do not succeed. :cry:


Attachments:
1.JPG
1.JPG [ 191.75 KiB | Viewed 659 times ]
udp_boot_enc.rar [277.44 KiB]
Downloaded 17 times
Top
 Profile  
 
 Post subject: Re: Version migration
PostPosted: 20 Aug 2017 14:12 
Offline

Joined: 18 Feb 2006 13:17
Posts: 4892
You will have many more troubles, I'm afraid. Florin apparently introduced his own processor definition files and these will probably be incompatible with the new compiler. Besides, such files should be placed in Def directory to allow choosing "right" processor in IDE.

As for the present error, check in Project Manager whether main program file is added to sources.

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


Top
 Profile  
 
 Post subject: Re: Version migration
PostPosted: 20 Aug 2017 20:29 
Offline

Joined: 07 Aug 2017 21:50
Posts: 7
Janny :roll:
Main file would not be UDP_Boot_ENC28J60_V5.mpas? If yes it was added and you can see it in project manager ...
Can I still get a compiler with this older version? I think it will be the only way to know if this code actually works ... and then try to migrate ...


Thank you for your help!



Where is Florin ???????????????????


Top
 Profile  
 
 Post subject: Re: Version migration
PostPosted: 21 Aug 2017 01:28 
Offline

Joined: 18 Feb 2006 13:17
Posts: 4892
techno wrote:
Main file would not be UDP_Boot_ENC28J60_V5.mpas? If yes it was added and you can see it in project manager ...
Yes, this should be main file as it contains the keyword "program". Apparently something went wrong while importing the project. You could start with new project and then add the code files.

Quote:
Can I still get a compiler with this older version?
You could ask mE...

Quote:
Where is Florin ???????????????????
Probably busy with his life :) .

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


Top
 Profile  
 
 Post subject: Re: Version migration
PostPosted: 21 Aug 2017 16:55 
Offline
mikroElektronika team
User avatar

Joined: 15 Jan 2016 12:50
Posts: 1717
Hi,

techno wrote:
Can I still get a compiler with this older version?

I have sent you an e-mail, I suggest to continue our correspondence there.

Kind regards,
Lana


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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: