Wayne Uroda wrote:
No there is no real way to do this from my experience (especially not at compile time). I did have success with using an empty function after my flash writer and then doing pointer arithmetic to find the size of the flash func, egvoid A() { ... } void B() {} //find size of A sizeofA = B - A; //something like that I didn't feel safe doing this though so in the end I just ended up starting at A and copying as much data as I could fit in my buffer because it doesn't matter if you copy far too much, better to be safe than sorry.
You are right not to feel safe - the compiler can reorder the functions in the object file. There are compiler flags that you can use to avoid such re-ordering, but it's best if you don't have to rely on particular flags for a module to compile correctly.
