View previous topic :: View next topic |
Author |
Message |
Grkan13
Joined: 06 Apr 2011 Posts: 14
|
Bootloader in linux |
Posted: Mon Jun 16, 2014 3:28 pm |
|
|
Hello,
I'm trying to program the PIC18f46k22 on linux via rs232.
I've used CCS C's ex_bootloader example. I can manage to update the firmware inside of the pic on windows by Tera Term.
But when I tried to do that on Linux with minicom, I can send the hex file but it doesn't change the firmware inside. Normally on Tera Term, after sending the file, it resets the pic and you can see the firmware is installed. But on minicom it does not reset the pic and when I try to reset it manually, I can see that it deleted the old firmware.
Can you please help me about this?
My compiler version is 5.021
And the firmware that I'm trying to send is :
Code: | #include <18F46K22.h>
#fuses NOWDT
#fuses nomclr
#use delay(internal=16MHz)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7)
#include <bootloader.h>
void main(void)
{
delay_ms(100);
printf("\r\nApplication Version 1.0\r\n");
while(TRUE)
{
output_toggle(pin_d1);
delay_ms(500);
}
} |
|
|
|
gpsmikey
Joined: 16 Nov 2010 Posts: 588 Location: Kirkland, WA
|
|
Posted: Mon Jun 16, 2014 11:18 pm |
|
|
I have not worked with that, but one thing that may be getting you is the difference between the windows/dos world and Linux as what constitutes a new line (on one side it is CR/LF, on the other , CR if I remember correctly).
See this link for more info: http://en.wikipedia.org/wiki/Unix2dos
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 |
|
|
LiLou
Joined: 04 Feb 2014 Posts: 26
|
|
Posted: Wed Jun 18, 2014 12:09 am |
|
|
What does Tera Term? Emulates the PIC? |
|
|
|