This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I'm trying to configure boot settings by modifying number of boot pins using the syscfg. I'm not modifying anything else other than changing the Number of boot pins and Boot Def0 & Boot Def1. The rest of the options are set as is but when I tried to flash the program I received the following error message on the console
This is the setup in the dcsm syscfg:
I tried pulling the memory data using the uniflash and this is what I see:
Please let me know what is it that I'm missing here.
Thank you
It says that at address 0x78010 it's trying to program 0xA004. Is that correct data ? If you only want to configure BOOT setting then you should not enable other sections for configuration. Can you attach your dcsm.asm and dcsm.cmd file which is generated from syscfg.
Regards,
Vivek Singh
Hi Vivek,
Im not trying to program 0xA004 to 0x78010. Attaching the dcsm.asm and dcsm.cmd files.
;---------------------------------------------------------------------- ; Zone 1 ;---------------------------------------------------------------------- .sect "dcsm_otp_z1_linkpointer" .retain .long 0x1FFFFFFF .long 0xFFFFFFFF ;Reserved .long 0x1FFFFFFF .long 0xFFFFFFFF ;Reserved .long 0x1FFFFFFF .long 0xFFFFFFFF ;Reserved .sect "dcsm_otp_z1_pswdlock" .retain .long 0xFB7FFFFF .long 0x7FFFFFFF ;Reserved .sect "dcsm_otp_z1_crclock" .retain .long 0x4BFFFFFF .long 0x3FFFFFFF ;Reserved .sect "dcsm_otp_z1_gpreg" .retain .long 0x5AFFFF20 ;Z1OTP_BOOTPIN_CONFIG .long 0x5AFFFFff ;Z1OTP_GPREG2 .sect "dcsm_otp_z1_bootctrl" .retain .long 0xFFFF0303 ;Z1OTP_BOOTDEF_LOW .long 0xFFFFFFFF ;Z1OTP_BOOTDEF_HIGH .sect "dcsm_zsel_z1" .retain .long 0x000000F0 ;Z1-EXEONLYRAM .long 0x0000FFFF ;Z1-EXEONLYSECT .long 0x0000AA00 ;Z1-GRABRAM .long 0xAAAAAAAA ;Z1-GRABSECT .long 0xFFFFFFFF .long 0x47FFFFFF .long 0xFFFFFFFF .long 0xFFFFFFFF ;---------------------------------------------------------------------- ; For code security operation,after development has completed, prior to ; production, all other zone select block locations should be programmed ; to 0x0000 for maximum security. ; If the first zone select block at offset 0x10 is used, the section ; "dcsm_rsvd_z1" can be used to program these locations to 0x0000. ; This code is commented out for development. ; .sect "dcsm_rsvd_z1" ; .loop (1e0h) ; .int 0x0000 ; .endloop ;---------------------------------------------------------------------- ; Zone 2 ;---------------------------------------------------------------------- ;; .sect "dcsm_otp_z2_linkpointer" ;; .retain ;; .long 0x1FFFFFFF ;; .long 0xFFFFFFFF ;Reserved ;; .long 0x1FFFFFFF ;; .long 0xFFFFFFFF ;Reserved ;; .long 0x1FFFFFFF ;; .long 0xFFFFFFFF ;Reserved ;; ;; .sect "dcsm_otp_z2_pswdlock" ;; .retain ;; .long 0xBF7FFFFF ;; .long 0x77FFFFFF ;Reserved ;; ;; .sect "dcsm_otp_z2_crclock" ;; .retain ;; .long 0x0FFFFFFF ;; .long 0x37FFFFFF ;Reserved ;; ;; .sect "dcsm_otp_z2_gpreg" ;; .retain ;; .long 0x5AFF1820 ;Z2OTP_BOOTPIN_CONFIG ;; .long 0x5AFFFFff ;Z2OTP_GPREG2 ;; .sect "dcsm_otp_z2_bootctrl" ;; .retain ;; .long 0x00000000 ;Z2OTP_BOOTDEF_LOW ;; .long 0xFFFFFFFF ;Z2OTP_BOOTDEF_HIGH ;; ;; .sect "dcsm_zsel_z2" ;; .retain ;; .long 0x000000F0 ;z2-EXEONLYRAM ;; .long 0x0000FFFF ;z2-EXEONLYSECT ;; .long 0x0000AA00 ;z2-GRABRAM ;; .long 0xAAAAAAAA ;z2-GRABSECT ;; ;; .long 0xFFFFFFFF ;; .long 0xE3FFFFFF ;; .long 0xFFFFFFFF ;; .long 0xFFFFFFFF ;---------------------------------------------------------------------- ; For code security operation,after development has completed, prior to ; production, all other zone select block locations should be programmed ; to 0x0000 for maximum security. ; If the first zone select block at offset 0x10 is used, the section ; "dcsm_rsvd_z2" can be used to program these locations to 0x0000. ; This code is commented out for development. ; .sect "dcsm_rsvd_z2" ; .loop (1e0h) ; .int 0x0000 ; .endloop ;---------------------------------------------------------------------- ; End of file ;----------------------------------------------------------------------
/* this linker command file is to be included if user wants to use the DCSM feature on the device * DCSM means Dual Zone Code Security Module. * This linker command file works as an addendum ot the already existing Flash/RAM linker command file * that the project has. * The sections in the *_ZoneSelectBlock.asm source file is linked as per the commands given in the file * NOTE - please note fill=0xFFFF, this helps if users include this file in the project by mistake and * doesn't provide the needed proper *_ZoneSelectBlock.asm sources . * Please refer to the Blinky DCSM example in the controlsuite examples for proper usage of this. * * Once users are confident that they want to program the passwords in OTP, the DSECT section type can be removed. * */ MEMORY { PAGE 0 : /* Program Memory */ /* Z1 OTP. LinkPointers */ DCSM_OTP_Z1_LINKPOINTER : origin = 0x78000, length = 0x00000C /* Z1 OTP. GPREG1/GPREG2 */ DCSM_OTP_Z1_GPREG : origin = 0x7800C, length = 0x000004 /* Z1 OTP. PSWDLOCK/RESERVED */ DCSM_OTP_Z1_PSWDLOCK : origin = 0x78010, length = 0x000004 /* Z1 OTP. CRCLOCK/RESERVED */ DCSM_OTP_Z1_CRCLOCK : origin = 0x78014, length = 0x000004 /* Z1 OTP. RESERVED/BOOTCTRL */ DCSM_OTP_Z1_BOOTCTRL : origin = 0x7801C, length = 0x000004 /* DCSM Z1 Zone Select Contents (!!Movable!!) */ /* Z1 OTP. Z1 password locations / Flash and RAM partitioning */ DCSM_ZSEL_Z1_P0 : origin = 0x78020, length = 0x000010 /* Z2 OTP. LinkPointers */ DCSM_OTP_Z2_LINKPOINTER : origin = 0x78200, length = 0x00000C /* Z2 OTP. GPREG1/GPREG2 */ DCSM_OTP_Z2_GPREG : origin = 0x7820C, length = 0x000004 /* Z2 OTP. PSWDLOCK/RESERVED */ DCSM_OTP_Z2_PSWDLOCK : origin = 0x78210, length = 0x000004 /* Z2 OTP. CRCLOCK/RESERVED */ DCSM_OTP_Z2_CRCLOCK : origin = 0x78214, length = 0x000004 /* Z2 OTP. GPREG3/BOOTCTRL */ DCSM_OTP_Z2_BOOTCTRL : origin = 0x7821C, length = 0x000004 /* DCSM Z2 Zone Select Contents (!!Movable!!) */ /* Z2 OTP. Z2 password locations / Flash and RAM partitioning */ DCSM_ZSEL_Z2_P0 : origin = 0x78220, length = 0x000010 } SECTIONS { dcsm_otp_z1_linkpointer : > DCSM_OTP_Z1_LINKPOINTER PAGE = 0 dcsm_otp_z1_gpreg : > DCSM_OTP_Z1_GPREG PAGE = 0 dcsm_otp_z1_pswdlock : > DCSM_OTP_Z1_PSWDLOCK PAGE = 0 dcsm_otp_z1_crclock : > DCSM_OTP_Z1_CRCLOCK PAGE = 0 dcsm_otp_z1_bootctrl : > DCSM_OTP_Z1_BOOTCTRL PAGE = 0 dcsm_zsel_z1 : > DCSM_ZSEL_Z1_P0 PAGE = 0 dcsm_otp_z2_linkpointer : > DCSM_OTP_Z2_LINKPOINTER PAGE = 0, type = DSECT dcsm_otp_z2_gpreg : > DCSM_OTP_Z2_GPREG PAGE = 0, type = DSECT dcsm_otp_z2_pswdlock : > DCSM_OTP_Z2_PSWDLOCK PAGE = 0, type = DSECT dcsm_otp_z2_crclock : > DCSM_OTP_Z2_CRCLOCK PAGE = 0, type = DSECT dcsm_otp_z2_bootctrl : > DCSM_OTP_Z2_BOOTCTRL PAGE = 0, type = DSECT dcsm_zsel_z2 : > DCSM_ZSEL_Z2_P0 PAGE = 0, type = DSECT } /* //=========================================================================== // End of file. //=========================================================================== */
Ok, why don't you only enable the BOOT setting section for configuration in sysconfig and try the new generated code and see if that works ?
Hi Vivek,
If you look at my first post, the screen shot shows that I have already setup the syscfg DCSM to enable the boot setting section for configuration but I'm getting the error.
Yes, you have setup the syscfg to enable the BOOT setting but you have enabled other sections also which are not needed. You can disable other section configuration and only enable BOOT SETTING and see if that works.
Regards,
Vivek Singh
Hi Vivek,
This is the setting I tried and the error I'm getting.
This is the snap shot of the memory location
Also attaching the dcsm.cmd and dcsm.asm
;---------------------------------------------------------------------- ; Zone 1 ;---------------------------------------------------------------------- ;; .sect "dcsm_otp_z1_linkpointer" ;; .retain ;; .long 0x1FFFFFFF ;; .long 0xFFFFFFFF ;Reserved ;; .long 0x1FFFFFFF ;; .long 0xFFFFFFFF ;Reserved ;; .long 0x1FFFFFFF ;; .long 0xFFFFFFFF ;Reserved ;; .sect "dcsm_otp_z1_pswdlock" .retain .long 0xFB7FFFFF .long 0x7FFFFFFF ;Reserved .sect "dcsm_otp_z1_crclock" .retain .long 0x4BFFFFFF .long 0x3FFFFFFF ;Reserved .sect "dcsm_otp_z1_gpreg" .retain .long 0x5AFFFF20 ;Z1OTP_BOOTPIN_CONFIG .long 0x5AFFFFff ;Z1OTP_GPREG2 .sect "dcsm_otp_z1_bootctrl" .retain .long 0xFFFF0303 ;Z1OTP_BOOTDEF_LOW .long 0xFFFFFFFF ;Z1OTP_BOOTDEF_HIGH ;; ;; .sect "dcsm_zsel_z1" ;; .retain ;; .long 0x000000F0 ;Z1-EXEONLYRAM ;; .long 0x0000FFFF ;Z1-EXEONLYSECT ;; .long 0x0000AA00 ;Z1-GRABRAM ;; .long 0xAAAAAAAA ;Z1-GRABSECT ;; ;; .long 0xFFFFFFFF ;; .long 0x47FFFFFF ;; .long 0xFFFFFFFF ;; .long 0xFFFFFFFF ;---------------------------------------------------------------------- ; For code security operation,after development has completed, prior to ; production, all other zone select block locations should be programmed ; to 0x0000 for maximum security. ; If the first zone select block at offset 0x10 is used, the section ; "dcsm_rsvd_z1" can be used to program these locations to 0x0000. ; This code is commented out for development. ; .sect "dcsm_rsvd_z1" ; .loop (1e0h) ; .int 0x0000 ; .endloop ;---------------------------------------------------------------------- ; Zone 2 ;---------------------------------------------------------------------- ;; .sect "dcsm_otp_z2_linkpointer" ;; .retain ;; .long 0x1FFFFFFF ;; .long 0xFFFFFFFF ;Reserved ;; .long 0x1FFFFFFF ;; .long 0xFFFFFFFF ;Reserved ;; .long 0x1FFFFFFF ;; .long 0xFFFFFFFF ;Reserved ;; ;; .sect "dcsm_otp_z2_pswdlock" ;; .retain ;; .long 0xBF7FFFFF ;; .long 0x77FFFFFF ;Reserved ;; ;; .sect "dcsm_otp_z2_crclock" ;; .retain ;; .long 0x0FFFFFFF ;; .long 0x37FFFFFF ;Reserved ;; ;; .sect "dcsm_otp_z2_gpreg" ;; .retain ;; .long 0x5AFF1820 ;Z2OTP_BOOTPIN_CONFIG ;; .long 0x5AFFFFff ;Z2OTP_GPREG2 ;; .sect "dcsm_otp_z2_bootctrl" ;; .retain ;; .long 0x00000000 ;Z2OTP_BOOTDEF_LOW ;; .long 0xFFFFFFFF ;Z2OTP_BOOTDEF_HIGH ;; ;; .sect "dcsm_zsel_z2" ;; .retain ;; .long 0x000000F0 ;z2-EXEONLYRAM ;; .long 0x0000FFFF ;z2-EXEONLYSECT ;; .long 0x0000AA00 ;z2-GRABRAM ;; .long 0xAAAAAAAA ;z2-GRABSECT ;; ;; .long 0xFFFFFFFF ;; .long 0xE3FFFFFF ;; .long 0xFFFFFFFF ;; .long 0xFFFFFFFF ;---------------------------------------------------------------------- ; For code security operation,after development has completed, prior to ; production, all other zone select block locations should be programmed ; to 0x0000 for maximum security. ; If the first zone select block at offset 0x10 is used, the section ; "dcsm_rsvd_z2" can be used to program these locations to 0x0000. ; This code is commented out for development. ; .sect "dcsm_rsvd_z2" ; .loop (1e0h) ; .int 0x0000 ; .endloop ;---------------------------------------------------------------------- ; End of file ;----------------------------------------------------------------------
/* this linker command file is to be included if user wants to use the DCSM feature on the device * DCSM means Dual Zone Code Security Module. * This linker command file works as an addendum ot the already existing Flash/RAM linker command file * that the project has. * The sections in the *_ZoneSelectBlock.asm source file is linked as per the commands given in the file * NOTE - please note fill=0xFFFF, this helps if users include this file in the project by mistake and * doesn't provide the needed proper *_ZoneSelectBlock.asm sources . * Please refer to the Blinky DCSM example in the controlsuite examples for proper usage of this. * * Once users are confident that they want to program the passwords in OTP, the DSECT section type can be removed. * */ MEMORY { PAGE 0 : /* Program Memory */ /* Z1 OTP. LinkPointers */ DCSM_OTP_Z1_LINKPOINTER : origin = 0x78000, length = 0x00000C /* Z1 OTP. GPREG1/GPREG2 */ DCSM_OTP_Z1_GPREG : origin = 0x7800C, length = 0x000004 /* Z1 OTP. PSWDLOCK/RESERVED */ DCSM_OTP_Z1_PSWDLOCK : origin = 0x78010, length = 0x000004 /* Z1 OTP. CRCLOCK/RESERVED */ DCSM_OTP_Z1_CRCLOCK : origin = 0x78014, length = 0x000004 /* Z1 OTP. RESERVED/BOOTCTRL */ DCSM_OTP_Z1_BOOTCTRL : origin = 0x7801C, length = 0x000004 /* DCSM Z1 Zone Select Contents (!!Movable!!) */ /* Z1 OTP. Z1 password locations / Flash and RAM partitioning */ DCSM_ZSEL_Z1_P0 : origin = 0x78020, length = 0x000010 /* Z2 OTP. LinkPointers */ DCSM_OTP_Z2_LINKPOINTER : origin = 0x78200, length = 0x00000C /* Z2 OTP. GPREG1/GPREG2 */ DCSM_OTP_Z2_GPREG : origin = 0x7820C, length = 0x000004 /* Z2 OTP. PSWDLOCK/RESERVED */ DCSM_OTP_Z2_PSWDLOCK : origin = 0x78210, length = 0x000004 /* Z2 OTP. CRCLOCK/RESERVED */ DCSM_OTP_Z2_CRCLOCK : origin = 0x78214, length = 0x000004 /* Z2 OTP. GPREG3/BOOTCTRL */ DCSM_OTP_Z2_BOOTCTRL : origin = 0x7821C, length = 0x000004 /* DCSM Z2 Zone Select Contents (!!Movable!!) */ /* Z2 OTP. Z2 password locations / Flash and RAM partitioning */ DCSM_ZSEL_Z2_P0 : origin = 0x78220, length = 0x000010 } SECTIONS { dcsm_otp_z1_linkpointer : > DCSM_OTP_Z1_LINKPOINTER PAGE = 0, type = DSECT dcsm_otp_z1_gpreg : > DCSM_OTP_Z1_GPREG PAGE = 0 dcsm_otp_z1_pswdlock : > DCSM_OTP_Z1_PSWDLOCK PAGE = 0 dcsm_otp_z1_crclock : > DCSM_OTP_Z1_CRCLOCK PAGE = 0 dcsm_otp_z1_bootctrl : > DCSM_OTP_Z1_BOOTCTRL PAGE = 0 dcsm_zsel_z1 : > DCSM_ZSEL_Z1_P0 PAGE = 0, type = DSECT dcsm_otp_z2_linkpointer : > DCSM_OTP_Z2_LINKPOINTER PAGE = 0, type = DSECT dcsm_otp_z2_gpreg : > DCSM_OTP_Z2_GPREG PAGE = 0, type = DSECT dcsm_otp_z2_pswdlock : > DCSM_OTP_Z2_PSWDLOCK PAGE = 0, type = DSECT dcsm_otp_z2_crclock : > DCSM_OTP_Z2_CRCLOCK PAGE = 0, type = DSECT dcsm_otp_z2_bootctrl : > DCSM_OTP_Z2_BOOTCTRL PAGE = 0, type = DSECT dcsm_zsel_z2 : > DCSM_ZSEL_Z2_P0 PAGE = 0, type = DSECT } /* //=========================================================================== // End of file. //=========================================================================== */
The error says Error during Flash Programming. Address 0x00078010, Data 0x0000A004, FMSTAT 0x00000030;
How do I find out where is this 0xA004 coming from.
Look like address 0x78010 has been already programed with different value. See below snapshot from what you have provided.
Since this is programmed with value 0xFB7FFFF0 and not you are trying to program it with value 0xFB7FFFFF, you are getting error because this is not allowed. This is why I was asking you to not enable configuration of PSWDLOCK and CRCLOCK in sysconfig.
Hope it's clear.
Regards,
Vivek Singh
Hi Vivek,
Thanks that clarifies. I had to set Password Lock (PSWDLOCK) to Enable PWSDLOCK permanently in syscfg which generated 0xFB7FFFF0 at address 0x78010 and I was able to successfully program the OTP.
Regards,
Harsha