Tool/software: TI C/C++ Compiler
I would like to combine a customized bootloader with my application. In detail my bootload functionality would be placed in the last flash page (as BIM) and would then jump to my normal/remaining application. But when doing development and debugging I would like to download both via debugger to the processor. When I download now my application it overrides also the last flash page (at least by setting CCFG register) and then the bootloader is gone. But in principle I could have all funktionality in my application (at least I guess).
My idea: all the code that belongs to the bootloader functionality is moved from the linker into the last flash page. The linker command file (cc13x2r1f3.cmd) contains already a definition for FLASH_LAST_PAGE. All the remaining code from my application is moved to FLASH.
Normally code is put to .text section that is mapped to FLASH. When I define now a new section, e.g. .boottext, where the boot functions are put in and which is mapped to FLASH_LAST_PAGE I would get what I want, right? But I don't know how to tag my bootloader functions with .boottext (some #pragma???).
I still might have problems with data. Preferably my boot part can define global/static variables that are put at one address. The application part can then define also global variables but these could be located on those addresses that where already used from the bootload functionality. In principle for data also different sections, e.g. .bss and .bootbss, could be defined. But is it possible to overlap two sections? Even here I don't know how to define a new section for data and map a dedicated variable to this section.
Any help would be beneficial
Erwin

