I'm working with an S3A6 and its ID-code protection feature. My e2Studio and SSP versions are 7.6.0 and 1.6.2 respectively. The ID-code protection is working fine after downloading it to the microcontroller with a J-LINK EDU: I can set different codes without any problem and debug the whole program:
However, I have a problem when using the SEGGER FLASHER PORTABLE PLUS and J-FLASH software:
To program the S3A6 with SEGGER FLASHER I need to dowload the ".bin" file generated in the "debug" folder during the building process in e2Studio. The program is correctly dowloaded to the S3A6 and the PCB works as expected, but the ID-CODE is never updated. In other words, the valid ID-CODE to unlock the device is the last one that I burnt with J-LINK EDU and e2Studio, not the one that I burnt with FLASHER and J-FLASH
Is this happening because I haven't compiled the ".bin" properly? How can I solve this?
Thanks in advance!
In reply to WarrenM:
Hi Warren, thanks for your response.
My script doesn't use the word NOLOAD:
In addition, this is the end of my ".bin" file:
OSIS Register is saved in address 0x01010018, but in my ".bin" there's no code beyond address 15790.
How can I tell e2Studio to include the ID-CODE?
In reply to hardwariano:
How are you currently creating the binary file? Is there a reason you are using a binary file rather than an srecord file?
In reply to Jeremy:
The ".bin" file is being configured like this:
This is something new to me so I don't know if there are any other options or I've done something wrong.
The reason we're using a binary file is that it's easier for us read and use those files in other applications. However, we could use the other files if necessary.
The ID Codes are in their own sections (from the linker script file):-
So you would have to add those sections as well :-
To include the ID codes in the binary output, though the binary out file will be about 16MB in size, because the file will have to have padding added. Alternatively output an S-record file.
It worked! Thanks Warren!
It worked when I generated the S-record file the way you told me. However, when I tried to do the same with a binary file, J-Flash showed me this message:
What could be happening?