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.
We are currently trying to implement the Serial Flash Programmer functionality in production. However, we are having difficulty uploading the production version of the firmware to the processor.
When we include the functionality to set the DCSM Password in the output HEX file. We get either a checksum error or a blank error (If the processor was preprogrammed). Here is the file we are including (in addition to the password file itself), We can't seem to find anything specific to cause the problems. If we compile to an .OUT file and use UniFlash to send it to the processor everything works properly.
/* 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. 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 DCSM_ZSEL_Z1_P1 : origin = 0x78030, length = 0x000010 DCSM_ZSEL_Z1_P2 : origin = 0x78040, length = 0x000010 DCSM_ZSEL_Z1_P3 : origin = 0x78050, length = 0x000010 DCSM_ZSEL_Z1_P4 : origin = 0x78060, length = 0x000010 DCSM_ZSEL_Z1_P5 : origin = 0x78070, length = 0x000010 DCSM_ZSEL_Z1_P6 : origin = 0x78080, length = 0x000010 DCSM_ZSEL_Z1_P7 : origin = 0x78090, length = 0x000010 DCSM_ZSEL_Z1_P8 : origin = 0x780A0, length = 0x000010 DCSM_ZSEL_Z1_P9 : origin = 0x780B0, length = 0x000010 DCSM_ZSEL_Z1_P10 : origin = 0x780C0, 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 Z1 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_pswdlock : > DCSM_OTP_Z1_PSWDLOCK PAGE = 0//, type = DSECT dcsm_otp_z1_crclock : > DCSM_OTP_Z1_CRCLOCK PAGE = 0//, type = DSECT dcsm_otp_z1_bootctrl : > DCSM_OTP_Z1_BOOTCTRL PAGE = 0//, type = DSECT dcsm_zsel_z1 : > DCSM_ZSEL_Z1_P0 PAGE = 0//, type = DSECT // dcsm_zsel_z1 : > DCSM_ZSEL_Z1_P1 PAGE = 0//, type = DSECT dcsm_otp_z2_linkpointer : > DCSM_OTP_Z2_LINKPOINTER 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. //=========================================================================== */
Are there any ideas as to what could be causing the problem. We've been able to overcome everything else so far including the (Align 8) issue.
Ben
Hi Ben,
Thanks for your question. I'll need some more time to read more into the DCSM and get back to you as soon as possible on what could be causing the issue.
Thanks,
Charles
Hi Ben,
Do you know the location that the Checksum error and/or Blank Check error occurs at? OTP should not have blanks in certain locations.
Charles
Ben,
For your application, do you have or need DATA_SECTION set? In the example for DCSM programming of the DCSM cmd file under sections, section definitions are provided (you can change the names if you like).
Also, on the start of Z1 and Z2, the length does not go to the next OTP origin/declaration, is this intentional?
Charles
I believe it is intentional. Is that what is making it not work correctly? Keep in mind that the only thing we are doing in the process which is not working (serial load) is the conversion to .HEX. Using Uniflash and .OUT files works perfectly with the currently written firmware.
Ben
Ben,
Ok that seems fine. For the .OUT file mentioned above, what is the alignment like for the sections? It should be using ALIGN (8) for flash sectors in the flash linker cmd file. Asking because the serial loader expects the hex file in a certain format.
Following this thread on UniFlash vs. CCS hex output, it seems similar to your situation. A Blank_Error indicates a return on erase error. You may need to modify the linker cmd file with FILL values to fill holes in the memory range.
Charles
Our flash linker cmd file includes the ALIGN (8). If we do not include the DSCM linker file, it creates a usable .HEX file which uploads fine. It is only when we include the above file that it fails.
Ben
Ben,
Ok, good to know about the alignment. How did the Z1 Linker get created? Was this DCSM linker cmd file generated a certain way, or was it modified from the example?
Charles
Have you tried to load the example for DCSM and not your project, does that compile for the device?