introduce new feature "HAVE_SPMINTEREFACE_MAGICVALUE" - adapt all asm-funcs
authorStephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
Wed, 14 Nov 2012 14:56:44 +0000 (15:56 +0100)
committerStephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
Wed, 14 Nov 2012 20:54:34 +0000 (20:54 +0000)
commite0005bc962914dfae56231b4c8e0b7663f1a6351
treeb7896b47ea3d9f0b9a83673e6b1ffafed6d1cc60
parent8c91580014f306b07bb6d972ad75970ae87a68d0
introduce new feature "HAVE_SPMINTEREFACE_MAGICVALUE" - adapt all asm-funcs

If this feature is enabled (value != 0), the configured 32bit value is
used as a magic value within spminterface. "bootloader__do_spm" will check
additional four (4) registers for this value and only proceed, if they contain
the right value. With this feature you can identify your board and avoid
updating the wrong bootloader to the wrong board!

Not all values are possible - "SPMINTEREFACE_MAGICVALUE" must be very sparse!
To avoid collisions, magic-values will be organized centrally by Stephan
Following values are definitly blocked or reserved and must not be used:
0x00000000, 0x12345678,
0x00a500a5, 0x00a5a500, 0xa50000a5, 0xa500a500,
0x005a005a, 0x005a5a00, 0x5a00005a, 0x5a005a00,
0x5aa55aa5, 0x5aa5a55a, 0xa55a5aa5, 0xa55aa55a,
0x5a5a5a5a, 0xa5a5a5a5,
0xffa5ffa5, 0xffa5a5ff, 0xa5ffffa5, 0xa5ffa5ff,
0xff5aff5a, 0xff5a5aff, 0x5affff5a, 0x5aff5aff,
0x00ff00ff, 0x00ffff00, 0xff0000ff, 0xff00ff00,
0xffffffff

To request your own magic, please send at least following information
about yourself and your board together within an informal request to:
stephan@matrixstorm.com / matrixstorm@gmx.de / stephan.baerwolf@tu-ilmenau.de
  - your name
  - your e-mail
  - your project (maybe an url?)
  - your type of MCU used
--> your used "BOOTLOADER_ADDRESS" (since same magics can be reused for different "BOOTLOADER_ADDRESS")

There may be no garanty for it, but Stephan will then send you an
response with a "SPMINTEREFACE_MAGICVALUE" just for your board/project...
WITH REQUESTING A MAGIC YOU AGREE TO PUBLISHED YOUR DATA SEND WITHIN THE REQUEST

Signed-off-by: Stephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
firmware/bootloaderconfig.h
firmware/spminterface.h