cancel
Showing results for 
Search instead for 
Did you mean: 

[Solved]Error: Data mismatch found at address 0x00000000 (byte = 0x20 instead of 0x00)

Anare.1
Associate III

Hello folks,

I recently bought a stm32f410rb nucleo board and configured it in Linux(Ubuntu 18.04) using eclipse ,CUBEMx, IDE and programmer.Once build is through, I tried downloading the program and the verification is failing here.

Could anyone direct me how to resolve this issue? That would be really useful

22:15:32 : Memory Programming ...
22:15:32 : Opening and parsing file: test1.hex
22:15:32 :   File          : test1.hex
22:15:32 :   Size          : 4256 Bytes
22:15:32 :   Address       : 0x00000000 
22:15:32 : Erasing memory corresponding to segment 0:
22:15:32 : Download in Progress:
22:15:32 : File download complete
22:15:32 : Time elapsed during download operation: 00:00:00.031
22:15:32 : Verifying ...
22:15:32 : Read progress:
22:15:32 : Error: Data mismatch found at address  0x00000000 (byte = 0x20 instead of 0x00)
22:15:32 : Error: Download verification failed
22:15:32 : RUNNING Program ... 
22:15:32 :   Address:      : 0x00000000
22:15:32 : Application is running
22:15:32 : Start operation achieved successfully

1 ACCEPTED SOLUTION

Accepted Solutions
Uwe Bonnes
Principal III

Flash is located at 0x08000000. It may or may not be mapped at 0, depending on pin and/or option bit settings. So review your linker file and at least load at 0x08000000

View solution in original post

4 REPLIES 4
Uwe Bonnes
Principal III

Flash is located at 0x08000000. It may or may not be mapped at 0, depending on pin and/or option bit settings. So review your linker file and at least load at 0x08000000

Anare.1
Associate III

Thank you for your time and insights, Do I need to manipulate the Flash section always before loading the executable?

I found the following in mem.ld file.

/*
 * This file is part of the µOS++ distribution.
 *   (https://github.com/micro-os-plus)
 * Copyright (c) 2014 Liviu Ionescu.
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sublicense, and/or
 * sell copies of the Software, and to permit persons to whom
 * the Software is furnished to do so, subject to the following
 * conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 */
 
/*
 * Memory Spaces Definitions.
 *
 * Need modifying for a specific board. 
 *   FLASH.ORIGIN: starting address of flash
 *   FLASH.LENGTH: length of flash
 *   RAM.ORIGIN: starting address of RAM bank 0
 *   RAM.LENGTH: length of RAM bank 0
 *
 * The values below can be addressed in further linker scripts
 * using functions like 'ORIGIN(RAM)' or 'LENGTH(RAM)'.
 */
 
MEMORY
{
  FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 128K
  RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
 
  /*
   * Optional sections; define the origin and length to match
   * the the specific requirements of your hardware. The zero
   * length prevents inadvertent allocation.
   */
  CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 0
  FLASHB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
  EXTMEMB0 (rx) : ORIGIN = 0x00000000, LENGTH = 0
  EXTMEMB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
  EXTMEMB2 (rx) : ORIGIN = 0x00000000, LENGTH = 0
  EXTMEMB3 (rx) : ORIGIN = 0x00000000, LENGTH = 0
}
 
/*
 * For external ram use something like:
 *  RAM (xrw) : ORIGIN = 0x64000000, LENGTH = 2048K
 *
 * For special RAM areas use something like:
 *  MEMORY_ARRAY (xrw)  : ORIGIN = 0x20002000, LENGTH = 32
 */

So always, do I need to crosscheck the linker file for future projects/boards manually? Is to there any checklist I should crosscheck before loading hex?

I have 0x00000000 assigned to my flash memory in linker script in testfolder, Is manual manipulation needed for this?

Just adding these points for future reference for similar issues.

As shown above, the linker file was wrongly mapped to 0x00000000 in the Flash section.

Editing the linker file of the project with mapping to a0x08000000 nd rebuilding resolved the issue as suggested by @ Uwe Bonnes

.