Other Parts Discussed in Thread: MSP430F169
Hi all,
I have been trying to perform the following several days now and I always hit a deadend. Any kind of help will be greatly appreciated.
I have written a bootloading module that will be used for uploading new firmware to an MSP430F169. I want to link that module with my main software program but I want the bootloading module to be placed high in the flash say in address 0xF800. Every way i tried to do that hits a deadend.
1) If you try to compile the Main Software and the Bootloader as simple C files (and place all the routines of the bootloader from address 0xF800 and higher) both using the same Cstartup and DLIB the thing works ok. the main software is placed nicely in the lower flash and the bootloader is placed nicely from 0xF800 and higher. The problem with this is that DLIB routines are used by the bootloader and DLIB routines are placed in the lower flash just above the main software. Hence when bootloading takes place and the bootloader start erasing the flash, it will delete routines that he requires and hence crash the program.
2) If you try to compile the bootloading module as a separate project (module) and define that the start address of it will be at 0xF800 and all the DLIB routines used by it will be also be over 0xF800 then again this works ok. A single operational module is produced that starts at 0xF800 and works perfectly. When however i try to incoorporate that into my main program as a library module then the linker instead of placing it high at address 0xF800 it places it very low, even below the main software.
Does anyone know how can someone locate a library module at an exact location in the flash? Is it even possible?
I mean the first solution would work great if only i could relocate the DLIB routines I used at the same region with the bootloading module, but that seems impossible.
Just to let you know I am coding in C. I know that If I was coding in assembly then i could locate the bootloading module exactly where I would like it to be and it wouldn't call any library routines located elsewhere
Thanks for your help in advance.