HEX file contains code over device bootloader area

Post Reply
Author
Message
dagragri
Posts: 1
Joined: 04 Mar 2018 20:40

HEX file contains code over device bootloader area

#1 Post by dagragri » 04 Mar 2018 21:54

I am a beginner in PIC programming and I have a problem when I try to program my PIC18F87j50, when I upload the code to my board via microbootloader it is shown this mesagge:
-HEX file contains code over device bootloader area

Code: Select all

#pragma config WDTEN = ON       // Watchdog Timer Enable bit (WDT enabled)
#pragma config PLLDIV = 1       // PLL Prescaler Selection bits (No prescale (4 MHz oscillator input drives PLL directly))
#pragma config STVREN = ON      // Stack Overflow/Underflow Reset Enable bit (Reset on stack overflow/underflow enabled)
#pragma config XINST = OFF      // Extended Instruction Set Enable bit (Instruction set extension and Indexed Addressing mode enabled)

// CONFIG1H
#pragma config CPUDIV = OSC1    // CPU System Clock Postscaler (No CPU system clock divide)
#pragma config CP0 = OFF        // Code Protection bit (Program memory is not code-protected)

// CONFIG2L
#pragma config FOSC = ECPLL     // Oscillator Selection bits (EC Oscillator with PLL, CLKO on RA6, ECPLL used by USB)
#pragma config FCMEN = ON       // Fail-Safe Clock Monitor Enable bit (Fail-Safe Clock Monitor enabled)
#pragma config IESO = ON        // Two-Speed Start-up (Internal/External Oscillator Switchover) Control bit (Two-Speed Start-up enabled)

// CONFIG2H
#pragma config WDTPS = 32768    // Watchdog Timer Postscaler Select bits (1:32768)

// CONFIG3L
#pragma config EASHFT = ON      // External Address Bus Shift Enable bit (Address shifting enabled, address on external bus is offset to start at 000000h)
#pragma config MODE = MM        // External Memory Bus Configuration bits (Microcontroller mode - External bus disabled)
#pragma config BW = 16          // Data Bus Width Select bit (16-bit external bus mode)
#pragma config WAIT = OFF       // External Bus Wait Enable bit (Wait states on the external bus are disabled)

// CONFIG3H
#pragma config CCP2MX = DEFAULT // ECCP2 MUX bit (ECCP2/P2A is multiplexed with RC1)
#pragma config ECCPMX = DEFAULT // ECCPx MUX bit (ECCP1 outputs (P1B/P1C) are multiplexed with RE6 and RE5; ECCP3 outputs (P3B/P3C) are multiplexed with RE4 and RE3)
#pragma config PMPMX = DEFAULT  // PMP Pin Multiplex bit (PMP pins placed on EMB)
#pragma config MSSPMSK = MSK7   // MSSP Address Masking Mode Select bit (7-Bit Address Masking mode enable)

// #pragma config statements should precede project file includes.
// Use project enums instead of #define for ON and OFF.

#include <stdio.h>
#include <stdlib.h>
#include <p18f87j50.h>
#define _XTAL_FREQ 20000000

void main()
{

  TRISD0 = 0x00;          //


  do {
      

    PORTD = 0xFF;        // 

  } while(1);            //  loop

}
I don't know where is the problem, cause is a simple program to blink an LED, and I copied the main function from another post.
Thank you before hand.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: HEX file contains code over device bootloader area

#2 Post by filip » 05 Mar 2018 14:18

Hi,

Please, can you attach you HEX here ?

Regards,
Filip.

Post Reply

Return to “mikroBootloader”