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.

Custom Bootloader for F280x

Other Parts Discussed in Thread: TMS320F28027

Hello TI team and community,

I have to develop a bootloader for the TMS320F28027 controller. Therefore, I plan to use flash A for the bootloader, flash B as data memory and flash C for the application code. As I know, the ROM bootloader entry point is at the adress 0x003F7FF6. Here is the branch instruction 'codestart' located. So far so good.

I use two CCS5 projects, one for the application and one for the bootloader. As a simple test, the bootloader turns a LED on. After that the application code shall be started. And here is the point where I have no idea how to realize it. The code has to be in C language (except the linker file). How can I enter another memory point and how should the memory/sections map look like? Have anyone such a project done and is able to provide some help?

Thank you in advance

  • Dominik,

    This is commonly done in bootloaders.  You'll first need to get a pointer to the function that you want to branch to and then you'll call it like this:

    ((void (*)(void))pAppEntry)();

    There is an example USB bootloader I wrote for the F2806x device that shows how to do this.  Look in the F2806x device support directory for the MWare/boot_loader folder.  You'll want to look at the bl_usb.c file for the call to the application and perhaps bl_entrytable.asm and the linker file as well to see how I get the entry point for the application.

    BR,

  • Hello,

    first at all, thank you for your reply. Finally i got my bootloader running and it was quite easier than expected.

    Since we cannot change the boot to flash entry point of the ROM bootloader i put my own bootloader to flash A and the application program to flash C. How metioned already in two seperated projects.

    Each project has the same memory map. I added a two word address areas for the second banch in flash C.

    The sections are different defined. The bootloader linker is pointing to flash A and the branch "codestart" is used.

    For the application sections the linker uses the flash C and a new branch "appcodestart" is introduced, while the "codestart" is deleted. This branch replaces the old branch in the file BootCodeStartBranch.asm of the application project. During uploading of the application project I tell CCS to upload without erasing flash A and for the bootloader without erasing flash C, D.

    Thank you again and solved.

    Regards

    Dominik