Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[Moved] PIC18f4550 C18 boot loader complier

Status
Not open for further replies.

kushal nandanwar

Full Member level 3
Joined
Jun 9, 2013
Messages
177
Helped
6
Reputation
12
Reaction score
6
Trophy points
18
Activity points
1,258
Hello ,

I'm looking for USB boot loader for PIC18f4550, I'm using C18 compiler for programming
 


Hello sir ,

i'm getting this error

MPLINK 5.00, LINKER
Device Database Version 1.17
Copyright (c) 1998-2013 Microchip Technology Inc.
Error - section '_cinit_scn' can not fit the section. Section '_cinit_scn' length=0x0000009e
Errors : 1
 

which compiler are you using
I tried for the PIC18f4550
C:\microchip_solutions\USB\Device - Bootloaders\HID\Firmware - PIC18 Non-J\HID Bootloader PIC18F4550 Family.mcp

using mcc18.exe it compiled Ok
when I tried with xc8.exe it crashed - no idea why - will have to investigate further
 

I'm also using same

- - - Updated - - -

MPLINK 5.00, LINKER
Device Database Version 1.17
Copyright (c) 1998-2013 Microchip Technology Inc.
Error - section '_cinit_scn' can not fit the section. Section '_cinit_scn' length=0x0000009e
Errors : 1
 

just downloaded the latest version of Microchip's MLA and tried to build
C:\microchip\mla\v2013_12_20\apps\usb\device\bootloaders\firmware\pic18_non_j

using MPLABX and I get
Code:
CLEAN SUCCESSFUL (total time: 55ms)
make -f nbproject/Makefile-PIC18F4550_XC8.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `C:/microchip/mla/v2013_12_20/apps/usb/device/bootloaders/firmware/pic18_non_j/MPLAB.X'
make  -f nbproject/Makefile-PIC18F4550_XC8.mk dist/PIC18F4550_XC8/production/MPLAB.X.production.hex
make[2]: Entering directory `C:/microchip/mla/v2013_12_20/apps/usb/device/bootloaders/firmware/pic18_non_j/MPLAB.X'
"C:\Program Files (x86)\Microchip\xc8\v1.31\bin\xc8.exe" --pass1  --chip=18F4550 -Q -G  --double=32 --float=32 --emi=wordwrite --rom=default,-1000-7FFF --opt=default,+asm,-asmfile,-speed,+space,-debug --addrqual=require --mode=pro -P -N255 --warn=0 --cci --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,+keep,-no_startup,-download,+config,+clib,+plib --output=-mcof,+elf "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s"    -obuild/PIC18F4550_XC8/production/_ext/1360937237/BootPIC18NonJ.p1  ../src/BootPIC18NonJ.c 
"C:\Program Files (x86)\Microchip\xc8\v1.31\bin\xc8.exe" --pass1  --chip=18F4550 -Q -G  --double=32 --float=32 --emi=wordwrite --rom=default,-1000-7FFF --opt=default,+asm,-asmfile,-speed,+space,-debug --addrqual=require --mode=pro -P -N255 --warn=0 --cci --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,+keep,-no_startup,-download,+config,+clib,+plib --output=-mcof,+elf "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s"    -obuild/PIC18F4550_XC8/production/_ext/1360937237/main.p1  ../src/main.c 
(908) exit status = 1
make[2]: *** [build/PIC18F4550_XC8/production/_ext/1360937237/main.p1] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
../src/main.c:714: warning: #warning: "Recommended to implement code here to check VDD.  Voltage detection can be done using ADC, HVLD, comparators, or other means."
../src/main.c:922: error: #error: "This bootloader project must be built in PRO mode to fit within the reserved region.  Double click this message for more details."
make[2]: Leaving directory `C:/microchip/mla/v2013_12_20/apps/usb/device/bootloaders/firmware/pic18_non_j/MPLAB.X'
make[1]: Leaving directory `C:/microchip/mla/v2013_12_20/apps/usb/device/bootloaders/firmware/pic18_non_j/MPLAB.X'

BUILD FAILED (exit value 2, total time: 2s)

the above was using the XC8 compiler - I get the same error using MCC18


perhaps it is time to get onto the Microchip forum

just built the PIC24 version OK
C:\microchip\mla\v2013_12_20\apps\usb\device\bootloaders\firmware\pic24_dspic\MPLAB.X
 
Last edited:

use this address


C:\microchip_solutions\USB\Device - Bootloaders\HID\Firmware - PIC18 Non-J\HID Bootloader PIC18F4550 Family.mcp
 

I think the error message is pretty clear:
"This bootloader project must be built in PRO mode to fit within the reserved region. Double click this message for more details."
In other words, the project depends on compiler optimization features not available with the free version.
 
then there should be problem in code or hardware.Post the code
 

circuit diagram


bldr_schematic.png
 

Try tiny bootloader which best bootloader and you can customize it. and also u will get some idea of bootloader.
 

void main()
{

/*
TRISC=0b00000000; // Set Port B as output port
LATC=0;

*/
LATD=0;
TRISD=0;

/*

TXSTA=0x20;
RCSTA=0x90;
BAUDCON=0x00; */
SPBRG=25; // 1200

TXSTAbits.TXEN = 1;
RCSTAbits.SPEN = 1;
TRISCbits.TRISC7 = 0;
TRISCbits.TRISC6 = 1;
PORTDbits.RD2=1;
led1=1;
led2=1;

////////////////////////////single character transmission code//////////////////////

/*
while(1)

{
led=1;
delay_ms(100);
TXREG='B';
delay_ms(1);
while(PIR1bits.TXIF==0);
delay_ms(1);
while(TXSTAbits.TRMT==0);
led=0;
delay_ms(100);
}
*/

//////////////////////// string transmission code////////////////////////////////////

while(name!='!')
{

delay_ms(100);
TXREG=name;
delay_ms(1);
while(PIR1bits.TXIF==0);
delay_ms(1);
while(TXSTAbits.TRMT==0);

delay_ms(100);
i++;
}
}


I connected LED on PORTD 2 and 3 , which are not blinking after flashing about code using boot loader
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top