Other Parts Discussed in Thread: ENERGIA
Tool/software: Code Composer Studio
Hello.
I've been wracking my brain for the past few days trying to figure out how to write a linker script for a RAM based bootloader. I have my main application firmware written with some mixed C/C++ code (Energia libraries mostly) and the linker and startup script for that works fine.
I realize there are examples for the bootloader in the tivaware/bootloader directory. Only, none of them are for GCC...
Perhaps I should explain my intent. I wish to have a RAM based bootloader leverage Petite FatFS for mounting an SD card, and flashing application firmware from a .bin file.
I don't even know where to begin on this in a simple sense... Code Composer Studio and TI's Compiler are so very different from GCC. I have found example code elsewhere on these forums, but they are all either for different IDE's or incomplete.
I have so many questions...
When a .S (Assembly startup file) is used, how does ccs know to use it?
How can a linker script/startup code be written if the bootloader has no main?
One of my biggest questions: How can I learn Why a GNU linker-script for C is different than one for C++? How can I learn how to write one? I guess I'm not finding the reference material I need.
I've read the Bootloader Users' Guide, and it says "bl_link.ld - The linker script used when the codered, gcc, or sourcerygxx compiler is being used to build the boot loader." and yet when I open that file, the top says "bl_link.ld - Scatter file for Gnu tools" ... What is a scatter file?
Is there an example somewhere containing BOTH a RAM-based bootloader with full source, linker-script, and startup file, for GNU GCC, as well as a matching Application project to be loaded by the former? Or perhaps instructions on building the same? I'd like to use CCS to upload the code, with GNU GCC as compiler and linker, and retain the ability to debug the same...
This is frustrating me to no end. I certainly hope I'm only missing a few things. Thanks in advance.