![]() ![]() Here I use the number of my device, taken from the linker file. space GNU assembler directive is used to fill the memory with the pattern after the comma. This because the linker file has it splitted up too, with the flash configuration in between: The assembly file contains two things: one section for the interrupt vector table, and one for the text/code. * This is an assembly file which is used to erase the FLASH of the device The assembly file has the following content: Assembly FileĪs only source file I add an assembly file Erase.S to the project: I explicitly keep the flash configuration part for the Kinetis devices (so it does NOT get erased), to avoid that my device gets secured and potentially bricked (see “ How (not) to Secure my Microcontroller“). ![]() rodata* sections (constants, strings, etc.) */ rodata sections (constants, strings, etc.) */ * The program code and other data goes into internal flash */ KEEP(*(.FlashConfig)) /* Flash Configuration Field (FCF) */ * The startup code goes first into internal flash */ text: /* Linker file for GNU C Compiler */ What remains is are the MEMORY, the SECTIONS with interrupts, flash_config and the. As we do not need any startup code/etc, the linker file can be cleaned up too. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |