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.

Firmware update over the air

Status
Not open for further replies.
i know i cant use PC application,I just wanted to crosscheck whether it works or not

- - - Updated - - -

Do I need to calculate CRC for each line?
 

Do I need to calculate CRC for each line?

It's up to your fault tolerance, and the quality of electrical connections and signal integrity
If it is available, why not to take advantage of that ?
 

if there is error while calculating checksum..What needs to be done?Neeed to receive firmare again?
 

Hi,

if there is error while calculating checksum..What needs to be done?Neeed to receive firmare again?

Think about it.
What alternatives do you see?

Klaus
 

if there is error while calculating checksum..What needs to be done?Neeed to receive firmare again?

You perhaps didn't realise that the Intel HEX format is just an enveloped representation in hexadecimal ASCII characters of the binary code at a text file to be written at the target device, composed of several rows of bytes, each one containing its own CRC. It represents the whole code, but splitted within several lines. If there happened transmission error at some of these parts, you have to rewrite this line.
 

As previously mentioned, hex file checksum doesn't guarantee image consistency. It's purpose is to allow immediate retransmission of obviously corrupted data. But there can be e.g. missing lines and lines with not identified fault due to unsafe 8 bit checksum.

An appropriate check would be crc32 for the complete image.
 

I want to make placement for bootloader and use application.I tried but it doesnt run

user application script
Code:
INPUT("processor.o")

/*************************************************************************
 * Processor-specific peripheral libraries are optional
 *************************************************************************/
OPTIONAL("libmchp_peripheral.a")
OPTIONAL("libmchp_peripheral_32MX230F064D.a")

/*************************************************************************
 * For interrupt vector handling
 *************************************************************************/
PROVIDE(_vector_spacing = 0x00000001);
_ebase_address = 0x9D00d000;

/*************************************************************************
 * Memory Address Equates
 * _RESET_ADDR      -- Reset Vector
 * _BEV_EXCPT_ADDR  -- Boot exception Vector
 * _DBG_EXCPT_ADDR  -- In-circuit Debugging Exception Vector
 * _DBG_CODE_ADDR   -- In-circuit Debug Executive address
 * _DBG_CODE_SIZE   -- In-circuit Debug Executive size
 * _GEN_EXCPT_ADDR  -- General Exception Vector
 *************************************************************************/
_RESET_ADDR              = 0x9D000000+0x1000+0x970;
_BEV_EXCPT_ADDR          =  (0x9D000000 + 0x1000 + 0x970 + 0x380);

_DBG_EXCPT_ADDR          =  (0x9D000000 + 0x1000 + 0x970 + 0x480);

_DBG_CODE_ADDR           =  0xBFC02000;
_DBG_CODE_SIZE           =  0xFF0      ;
_GEN_EXCPT_ADDR          = _ebase_address + 0x180;

/*************************************************************************
 * Memory Regions
 *
 * Memory regions without attributes cannot be used for orphaned sections.
 * Only sections specifically assigned to these regions can be allocated
 * into these regions.
 *************************************************************************/
MEMORY
{
  kseg0_program_mem    (rx)  : ORIGIN =  (0x9D005000), LENGTH = 0x7690

  exception_mem              : ORIGIN = 0x9D00d000, LENGTH = 0x1000
  debug_exec_mem             :  ORIGIN = 0xBFC02000, LENGTH = 0xFF0
  kseg0_boot_mem             : ORIGIN = (0x9D00d000 - 0x0x970), LENGTH = 0x970
  kseg1_boot_mem             :  ORIGIN = (0x9D000000 + 0x1000 + 0x970), LENGTH = 0x490

  config3                    :  ORIGIN = 0xBFC02FF0, LENGTH = 0x4

  config2                    :  ORIGIN = 0xBFC02FF4, LENGTH = 0x4

  config1                    :  ORIGIN = 0xBFC02FF8, LENGTH = 0x4

  config0                    :  ORIGIN = 0xBFC02FFC, LENGTH = 0x4
  kseg1_data_mem       (w!x) :  ORIGIN = 0xA0000000, LENGTH = 0x20000
  sfrs                       : ORIGIN = 0xBF800000, LENGTH = 0x100000
  configsfrs                 :  ORIGIN = 0xBFC02FF0, LENGTH = 0x10

}

bootloader script

Code:
INPUT("processor.o")

/*************************************************************************
 * Processor-specific peripheral libraries are optional
 *************************************************************************/
OPTIONAL("libmchp_peripheral.a")
OPTIONAL("libmchp_peripheral_32MX230F064D.a")

/*************************************************************************
 * For interrupt vector handling
 *************************************************************************/
PROVIDE(_vector_spacing = 0x00000001);
_ebase_address =  0x9D000000;

/*************************************************************************
 * Memory Address Equates
 * _RESET_ADDR      -- Reset Vector
 * _BEV_EXCPT_ADDR  -- Boot exception Vector
 * _DBG_EXCPT_ADDR  -- In-circuit Debugging Exception Vector
 * _DBG_CODE_ADDR   -- In-circuit Debug Executive address
 * _DBG_CODE_SIZE   -- In-circuit Debug Executive size
 * _GEN_EXCPT_ADDR  -- General Exception Vector
 *************************************************************************/
_RESET_ADDR              = 0xBFC00000;
_BEV_EXCPT_ADDR          = (0xBFC00000 + 0x380);
_DBG_EXCPT_ADDR          = (0xBFC00000 + 0x480);
_DBG_CODE_ADDR          = 0x9FC00490;
_DBG_CODE_SIZE           = 0x760     ;
_GEN_EXCPT_ADDR          = _ebase_address + 0x180;

/*************************************************************************
 * Memory Regions
 *
 * Memory regions without attributes cannot be used for orphaned sections.
 * Only sections specifically assigned to these regions can be allocated
 * into these regions.
 *************************************************************************/
MEMORY
{
  kseg0_program_mem    (rx)  : ORIGIN = 0x9D001000, LENGTH = 0x3000 /* All C Files will be located here */ 
  exception_mem              : ORIGIN = 0x9D000000, LENGTH = 0x1000 /* Interrupt vector table */
  debug_exec_mem             : ORIGIN = 0x9FC00490, LENGTH = 0x760
  kseg0_boot_mem             : ORIGIN = 0x9FC00490, LENGTH = 0x0 /* This memory region is dummy */ 
  kseg1_boot_mem             : ORIGIN = 0xBFC00000, LENGTH = 0x490 /* C Startup code */
  config3                    : ORIGIN = 0xBFC00BF0, LENGTH = 0x4
  config2                    : ORIGIN = 0xBFC00BF4, LENGTH = 0x4
  config1                    : ORIGIN = 0xBFC00BF8, LENGTH = 0x4
  config0                    : ORIGIN = 0xBFC00BFC, LENGTH = 0x4
  kseg1_data_mem       (w!x) : ORIGIN = 0xA0000000, LENGTH = 0x4000
  sfrs                       : ORIGIN = 0xBF800000, LENGTH = 0x100000
  configsfrs                 : ORIGIN = 0xBFC00BF0, LENGTH = 0x10
}

- - - Updated - - -

if i change linker script of user application.NO changes made in placement if i download code through PICkit3.Viz if i change linker script of bootloader and download it through pickit3 it shows changes in execution memory.

What could b problem.i think in user application linkerscript is not added properly.

- - - Updated - - -

i dont see memory changes in map file if i change linker script addresses
 

Somehow i got it working but application interrupts are not working
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top