This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

bootloader for rm42

Other Parts Discussed in Thread: TMS570LS3137, HALCOGEN

Hi everyone, 

i was trying out the file from http://processors.wiki.ti.com/index.php/RM4x_Hercules_MCU_Bootloader

However, i did not have any luck making it build successfully. I tried to include files that the project might need and after importing the project but i have compilation error such as gmake: *** No rule to make target .

I also did install F021 flash api and include it in the project. I believe the error is something to do with the flash api not linking correctly as the example project could be using a different version.

Any suggestion to make it work?

Regards,

YuanFa

  • YaunFa,

    I haven't tried to build this project and the author is traveling.  But looking briefly at the makefile that included in one of the project folders it looks like it expects to have certain CCS variables setup.  There is a file called 'bootloader_CCS_Variable_definition.docx' that lists some names.  I think you at least need to adapt the 'ORIGINAL_PROJECT_ROOT' variable to match the place on your build machine where you unpack the bootloader and in his example it's in a workspace folder pointing to one of the specific bootloaders.

    You may also need to make sure the other things are setup like the SW_ROOT and the INCLUDE path.

    The variable ORIGINAL_PROJECT_ROOT and SW_ROOT I believe you should setup on the "Linked Resources" tab:

    include paths are setup here:

    and the linker library would be set here:

    If none of these things help then you could try to setup a new / clean CCS project and then copy the sources from the bootloader .zip file into your new project - that may help you get to at least the step of builging.

  • YuanFa,

    the project in the published form contains several bugs.In theory it should work for several processors and bootloaders in Can, Uart and spi. It was not tested for all the possible configurations properly. It took me quite a while to get it running for the TMS570LS3137 in the CAN Version.

    Finally I was sucessful by the following procedure:

    By reading the arm sources (of the bootloader) I got a rough idea about the authors intentions.

    I prefered completely rewriting the PC side Code in my favoite C++ development system instead of getting the demonstration example working. As the example is very basic this was not a really big effort.

    As a next step you have to get the microcontroller code for your desired platform running. The configuration gives you a good starting point except the common problem adjusting all the paths. It was fiddling around a bit with the settings in the GUI and mixing the options with a working start exampe from HALCOGEN. Especially have an Eye on choosing the right gel file for you processor.

    Finally, once you have a compiling code you can debug through and syncronise the software with its PC counterpart. Do not be surprised if you encounter parts which cannot function in the form they have been written. Especially annoying is the fact, that in the CAN example every single data telegram causes a reply from the microcontroller. Timeout managment is very poor, checksums are no used. 

    You should get to a point where the transfer data arrives in the target system in the flash. You can follow this process by the debugger. Have an eye on the clock frequency and the right configuration of flash waitstates.

    Where the example is very helpful is the correct structure of the linker command files and helper routines copying ROM into RAM. The main feature of the bootloader is execution of parts relating to the flash process directly from the RAM. The corresponding copy job and linker setup is working fine. This is also valid for the descrition, of how the code being flashed to the device has to be linked.

    As I could not find any sources of the blinky expample to test the procedure rewritung this code is the next step. At least the linker command setup is documented.

    I wish you good look and a lot of patience.

    APD