Hi all,
I want to use a general purpose header file (config_device.h), to switch compilation dependency, e.g. for the password programmation to enable/disable jtag access (file passwords.asm). The two files I'm using are listed here above.
I'm not able to use correctly a #define declared in header file in my asm file. Where could I find info how to make this? Or some examples?
Thanks in advance,
Regards
Blaise
/**
* @file config_device.h
*/
#define TRUE 1
#define FALSE 0
/**
* Define program jtag password
*/
#define PROGRAM_JTAG_PW_DISABLE (FALSE)
/**
* Define program jtag password enable
*/
#define PROGRAM_JTAG_PW_ENABLE (TRUE)
/**
* program jtag password selector
*
*/
#define PROGRAM_JTAG_PW (PROGRAM_JTAG_PW_ENABLE)
* File: passwords.asm
***********************************************************************
***********************************************************************
* Dummy passwords of 0xFFFF are shown. The user can change these to
* desired values.
*
* CAUTION: Do not use 0x0000 for all 8 passwords or the CSM module will
* be permanently locked. See References [8-12] for more information.
***********************************************************************
.cdecls C, NOLIST, "config.h"
.if PROGRAM_JTAG_PW = TRUE
.mmsg "program JTAG password enable"
.sect "csmpasswds"
.int 0x5555 ; PWL0 (LSW of 128-bit password)
.int 0x5555 ; PWL1
.int 0x5555 ; PWL2
.int 0x5555 ; PWL3
.int 0x5555 ; PWL4
.int 0x5555 ; PWL5
.int 0x5555 ; PWL6
.int 0x5555 ; PWL7 (MSW of 128-bit password)
.else
.mmsg "program JTAG password disable"
.sect "csmpasswds"
.int 0xFFFF ; PWL0 (LSW of 128-bit password)
.int 0xFFFF ; PWL1
.int 0xFFFF ; PWL2
.int 0xFFFF ; PWL3
.int 0xFFFF ; PWL4
.int 0xFFFF ; PWL5
.int 0xFFFF ; PWL6
.int 0xFFFF ; PWL7 (MSW of 128-bit password)
.endif
;----------------------------------------------------------------------
.sect "csm_rsvd"
.loop (3F7FF5h - 3F7F80h + 1)
.int 0x0000
.endloop
;----------------------------------------------------------------------
;.end ;end of file passwords.asm