CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Using CCS RS232 Bootloader under other OS

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
micro_debugger



Joined: 08 Oct 2009
Posts: 73

View user's profile Send private message

Using CCS RS232 Bootloader under other OS
PostPosted: Tue Jul 09, 2013 7:26 am     Reply with quote

Hello everybody,

I have question, how to use the CCS RS232 bootloader under other OS like Linux or MAC OS. Is it possible to do it via terminal program, I tried, but without success. Have you any idea??
Processor I'm working fro this project is the PIC18F25K20 and Compiler Version is 5.008

Any ideas welcome
Thank you and Kind regards
temtronic



Joined: 01 Jul 2010
Posts: 9165
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Jul 09, 2013 1:30 pm     Reply with quote

obvious questions

Do you have it working under Windows? If so which version?

Also

Are you using a real comport or a USB<>RS232 module?

More information is needed to figure this out....
cheers
jay
micro_debugger



Joined: 08 Oct 2009
Posts: 73

View user's profile Send private message

PostPosted: Tue Jul 09, 2013 1:57 pm     Reply with quote

Hi,

It is working under windows very good with ccsbootloader.exe with "real" RS232 as also with FTDI. Both are working very well. I tried to upload it with XON/XOFF under teraterm, it is uploaded but never starts as in "standard way".
I tested it with Windows 7, but I need to have it working in all versions of windows and Linux or MAC OS. It is difficult to request from customers "dedicated" OS. For that reason I tried to use it with terminal program.
If you need I can upload the source, but nothing important has been changed compared to the original CCS version of ex_bootloader.
Thank you so much for your help.
Best Regards
micro_debugger



Joined: 08 Oct 2009
Posts: 73

View user's profile Send private message

PostPosted: Thu Jul 11, 2013 3:26 pm     Reply with quote

Any idea to help me anybody. Just a point where I have to start looking for.
Thank you in advance
BR
temtronic



Joined: 01 Jul 2010
Posts: 9165
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Jul 11, 2013 5:04 pm     Reply with quote

Without knowing how the ccsbootloader operates..
..and reading this from your original post...

I tried to upload it with XON/XOFF under teraterm, it is uploaded but never starts as in "standard way".

..
I have the following general comments.
1) Since you appear to have transferred your previously working code into the PIC, using XON/XOFF, Teraterm works.This would rule out any hardare issues as well as most software issues(like baudrate)

2) Since it never starts in "standard way" I have to ask , just how does the PIC know it should run the newly program. Does the bootloader reset the PIC? Do you have to manually reset the PIC? Do you have to remove the RS232 connection to start in 'standard way'? What is 'standard way'?

3) Does your latest version 'load and go' under Windows?You say you made some minor changes....perhaps that's the problem ?


The last bootloader I worked with was on 68HC11 systems but most follow a similar theme and since ccsbootloader worked fine for a previous PIC program under Windows, I doubt it's at fault,since you did load the new program into the PIC.It seems to be the 'go' command/operation that isn't being executed.

Also.. I assume this is the same PIC, not a different type....

Obviously, someone who uses this bootloader has real world experience and of course asking CCS would be a good idea.

hth
jay

hth
jay
gpsmikey



Joined: 16 Nov 2010
Posts: 588
Location: Kirkland, WA

View user's profile Send private message

PostPosted: Thu Jul 11, 2013 6:02 pm     Reply with quote

The most common issue I have run into when moving between the Linux and Windoze world tends to be how cr/lf or newlines are handled by the OS. I have run into more "strange" things in that corner - try reading a text file line by line using VBA in windows when the file was generated on a unix machine. VB blows up - I had to run a 'sed' script on the Unix side to convert the unix newline to the crlf that VB expects. Anyway, you might want to check that aspect out.

mikey
_________________
mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Fri Jul 12, 2013 1:13 am     Reply with quote

I can confirm, that the CCS bootloader basically works with any terminal program that is able to handle a
text download with XON/XOFF control. You will be missing however the feature of repeating unacknowledged
hex records. So it's essential that the bootloader is synchronized with the download application from the
start. As mentioned in the loader.c comment, RS232 TX buffering might cause bootloader failure.

Two points that should be considered when wriring your own download application: The bootloader executes
a restart on the type 1 record, before the trailing comments records have been received. It doesn't ACK comment
records.
micro_debugger



Joined: 08 Oct 2009
Posts: 73

View user's profile Send private message

PostPosted: Fri Jul 12, 2013 3:14 am     Reply with quote

Dear Friends,

Thank you so much for your help !!!!
I will do all mentioned points and return back to inform you when and if I solved it.

My Warmest Regards
micro_debugger



Joined: 08 Oct 2009
Posts: 73

View user's profile Send private message

PostPosted: Sun Jul 14, 2013 6:18 am     Reply with quote

Hi,

I done all tests. It is working very well with CCS Bootloader. It is not working with TeraTerm, as also not working with Siow download. Software is exactly as in example of ex_booloader provided by CCS, therefore I can not publish it. I have version of CCS compiler 5.009 which is working until now very well. I tried various settings in the TeraTerm as also with Serial Port Settings (i have in mind the buffers) - still the same - not working. I have tested it with a pure RS232 (part of the PC mother board) as also with FTDI installed on the PCB. I would like to have it working without dedicated software just with terminal. I have done little RS232 monitoring, and it shows me that when downloading with terminal it is not stopping when PIC send XOFF, and continuously sending data which are missing by PIC. If you have any idea about how to setup terminal or anything please help me.

Please see the data exchange between the PIC and PC using CCS Bootloader working very well.

[13/07/2013 16:25:44] - Written data
3a 30 34 30 35 30 30 30 30 39 42 45 46 30 32 46 :040500009BEF02F
30 37 42 0d 07B.

[13/07/2013 16:25:44] - Read data
13 06 11 ...

[13/07/2013 16:25:44] - Written data
3a 30 38 30 35 30 38 30 30 45 41 36 41 30 45 30 :08050800EA6A0E0
45 45 39 36 45 45 46 35 30 45 35 0d EE96EEF50E5.

[13/07/2013 16:25:44] - Read data
13 06 11

we can see that the XOFF/XON is full working


Please see the data exchange when working with a simple terminal download, similar data


[13/07/2013 16:27:36] - Written data
3a 30 34 30 35 30 30 30 30 39 42 45 46 30 32 46 :040500009BEF02F
30 37 42 0d 3a 30 38 30 35 30 38 30 30 45 41 36 07B.:08050800EA6
41 30 45 30 45 45 39 36 45 45 46 35 30 45 35 0d A0E0EE96EEF50E5.
3a 31 30 30 35 31 30 30 30 31 31 45 30 31 34 30 :1005100011E0140
45 30 31 36 45 42 46 30 45 30 30 36 45 30 34 30 E016EBF0E006E040
30 30 30 32 45 46 44 44 37 31 38 0d 3a 31 30 30 0002EFDD718.:100
35 5

[13/07/2013 16:27:36] - Read data
06 .

[13/07/2013 16:27:36] - Written data
32 30 30 30 30 31 32 45 46 39 44 37 42 46 30 45 2000012EF9D7BF0E
30 30 36 45 30 30 32 45 46 45 44 37 30 30 30 30 006E002EFED70000
30 34 30 30 38 41 0d 3a 31 30 30 35 33 30 30 30 04008A.:10053000
45 46 32 45 45 46 44 37 31 32 30 30 46 38 36 41 EF2EEFD71200F86A
44 30 38 45 46 45 30 45 30 30 36 45 30 36 30 45 D08EFE0E006E060E
37 38 0d 3a 31 30 30 35 34 30 30 30 30 31 36 45 78.:10054000016E
30 32 02

[13/07/2013 16:27:36] - Read data
06 06 06


We can see that XON/XOFF is missing.

same firmware. Read data are data sent to PC from PIC.

Any idea how to correct it???

Thank you in advance
BR
temtronic



Joined: 01 Jul 2010
Posts: 9165
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Jul 14, 2013 8:10 am     Reply with quote

Most( if not all) 'terminal' programs should have an option for 'handshaking',either using hardware(CTS/DTS) or software(XON/XOFF).

It appears'XON/XOFF' has not been selected as the data should stop after xx number of bytes to allow processing of data.


SIOW settings say 'software flow control', I'd set to 'both' and try...

I'd check the setting of the terminal program.

hth
jay
micro_debugger



Joined: 08 Oct 2009
Posts: 73

View user's profile Send private message

PostPosted: Sun Jul 14, 2013 2:42 pm     Reply with quote

Hi,

Thank you for your valuable suggestions. However I have done and check many times the handshaking to XON/XOFF as also change buffers to minimum.
Still the same.
The interesting point is that bootloader is working very well (100%) with standalone ccsbootloader program but does not with the SIOW downloading.
I have no idea what is wrong!!!! in my implementation.
BR
temtronic



Joined: 01 Jul 2010
Posts: 9165
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Jul 14, 2013 4:48 pm     Reply with quote

Sounds like it might be time to contact CCS directly, either email (support@ccsinfo.com) or phone, as they wrote SIOW. They should be able to help!!

hth
jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19350

View user's profile Send private message

PostPosted: Mon Jul 15, 2013 12:55 am     Reply with quote

Where are you setting the flow control?.

There are two places, and depending on the com port, both may need to be set.
SIOW itself has a flow control setting, and the port itself (in device manager) has a setting. The latter does seem sometimes to override the former.
Also the device manager setting, seems sometimes to be ignored if the port is already open.

So sequence is:
1) Make sure SIOW is closed.
2) Now set Xon/Xoff in device manager.
3) Launch SIOW, and make sure it's Xon/Xoff setting is 'on'.
At this point flow control does seem to work....

Whether the device manager setting overrides the SIOW setting, seems to depend on particular com ports, and the OS being used.

Best Wishes
micro_debugger



Joined: 08 Oct 2009
Posts: 73

View user's profile Send private message

PostPosted: Mon Jul 15, 2013 3:47 pm     Reply with quote

Hi,

I have tested everything, only the ccsbootloader is working, nothing else. I'm sending e-mail to CCS.

Will keep you informed.
BR
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group