The CRC checksum needs to be contained in the last location of the section which the CRCSCAN is configured to check. This means that a CRC checksum needs to be calculated for an application using CRCSCAN, and added at the end, before the application is programmed to the device.
In this application note, the srec_input is the tool used to generate the checksum and add it to the end of the hex file. This is done through Atmel Studio, where srec_input is added as a post-build command for the project, and the end result will be a hex file which will contain the application code and its CRC checksum: