I have a custom bootloader wich works without idcode.
When i set the idcode, i cannot flash the application.
I am guessing there is an flash authentification that i might do in the bootloader to enable writing
What do you mean by "When i set the idcode, i cannot flash the application"? Are you talking about the bootloader programming the code flash, or the debugger programming the code flash?
Are you using an S5 device and IAR Embedded Workbench (if so, which version)?
In reply to Jeremy:
In reply to WarrenM:
In reply to Ajith:
With the attached IAR project for S7G2-SK board and SSP 1.6.0, I have set the ID Bytes in the configuration :-
There is no need to alter any linker scripts or any of the SSP code when using SSP 1.6.0 to use the ID Code.
The first time I down this project it downloads ok as the ID bytes in the configuration area of flash were all FF when the device was reset. Subsequently, if the device is reset (e.g. by the debugger or the user), or the board is power cycled, then the ID bytes now programmed into the flash will now be used. So, if I stop the debug session, power cycle the board, and try to debug the same project again, the JLink ID code verification window pops up :-
If I enter the ID code :-
then the debug session starts successfully.
In RFP, the format of the ID code is different (annoyingly). During the setup of an RFP project connecting to an S7G2-SK board that has the above project programmed in to it (and has been power cycled), I have to set the ID bytes :-
Then the setup of the RFP project is sucessful.
Using the ALeRASE command via the debugger is not as simple as just entering the ID bytes as "ALeRASE", please use the attached batch file (inside the zip file, also please check the path to the JLink.exe is correct in the batch file), this should allow you to erase the S7G2 flash using the ALeRASE command using the JLink debugger :-
The project also programs and erases the top block of code flash with the ID bytes set.