KappaPeng
Joined: 06 Apr 2020 Posts: 1
|
ccsbootloader.exe 1.6 problem |
Posted: Mon Apr 06, 2020 4:57 pm |
|
|
I don't know how to use the ccsbootloader.exe 1.6 program available for download from the ccs website. I have been trying for so long to understand bootloaders and I'm at my wits end...
I am running the ex_bootloader.c with a pic18f4620.
#fuses is the same for my code.hex file but I can't even get there since I'm struggling to get the examples from CCS working.
Code: |
#include <18F4620.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay( crystal=20MHz )
//#use rs232(icd) //Text through the ICD
#use rs232(baud=115200, xmit=PIN_C6, rcv=PIN_C7) //Text through the UART
#define P_BTN_BOOT_SW2 PIN_B5
#define _BOOTLOADER
//#define BOOTLOADER_MODE2X
#include <bootloader.h>
#include <loader.c>
//#org LOADER_END+1,LOADER_END+2 // Example default for PIC16
#org LOADER_END+2,LOADER_END+4
void application(void) {
while(TRUE);
}
void main(void) {
if(!input(P_BTN_BOOT_SW2))
{
printf("\r\nBootloader Version 1.0\r\n");
// Let the user know it is ready to accept a download
printf("\r\nWaiting for download...");
load_program();
}
application();
}
#int_global
void isr(void) {
jump_to_isr(LOADER_END+5*(getenv("BITS_PER_INSTRUCTION")/8));
}
|
So this compiles and uploads to my pic18f4620 just fine, and I am able to put it into bootmode by pressing a button on PIN_B5 to pull it low and resetting it with a button on MCLR. The text appears to load the bootloader.
I disconnect Tera Term (which I used to confirm it is ready for a bootloader) but I cannot get the ccsbootloader.exe program to do anything. Same results if I don't use Tera Term at all and push the buttons.
When I open it, it immediately prompts with an edit box "Enter file name here:" so I do just that. I have my code.hex file (Which runs perfectly when programmed with the Pickit3) and I get the error message "PIC Not Responding".
Where am I supposed to set the options ?
PORT=COM8
BAUD=115200
DEBUGT=debug.txt
that the included readme.txt speaks of?? There is no command line interface. I have unzipped the ccsbootloader.exe file, but I don't know what to do with those files.
Entering anything other than a valid filename produces file not found errors.
The example in the readme.txt says:
ccsbootloader PORT=COM1 BAUD=9600 DEBUGT=debug.txt test.hex
but where do you enter this?? The only prompt I get when I run ccsbootloader.exe is "Enter file name:"
I tried running as administator.
TinyBootloader says this when I click "CheckPIC"
Connected to \\.\COM8 at 115200
Searching for PIC ..., Not found
ERROR!
Please someone help me here... I can't even get the example working with 2 days' struggles... |
|