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.

RM48L950 UART Bootloader

Other Parts Discussed in Thread: RM48L950

I am trying to get the TI bootloader (by QJ Wang) to work on the RM48 USB with a rm48l950. It runs, and accepts my .bin file but hangs on executing the binary file. The example code seems to have changes made at different times. And the wiki is a bit short.

I have downloaded spna190 & spna196. I am using spna196, actually bundled as the CAN Bootloader, because it was updated by QJ in Feb 2016.

I have edited the bl_config.h to match the other examples and to keep everything consistent with 0x20000 as the bootloader space.

#define APP_START_ADDRESS 0x00020000

#define APP_STATUS_ADDRESS 0x0001FF00

//#define ENABLE_UPDATE_CHECK

all the other bootloader files have remained the same

In my blinky example I have used the following as the sys_link.cmd parameters:

MEMORY

{
VECTORS (X) : origin=0x00020000 length=0x00000020
FLASH0 (RX) : origin=0x00020020 length=0x0015FFE0
FLASH1 (RX) : origin=0x00180000 length=0x00180000
STACKS (RW) : origin=0x08000000 length=0x00001500
RAM (RW) : origin=0x08001500 length=0x0003EB00

SECTIONS

{
.intvecs : {} > VECTORS
.text : {} > FLASH0 | FLASH1
.const : {} > FLASH0 | FLASH1
.cinit : {} > FLASH0 | FLASH1
.pinit : {} > FLASH0 | FLASH1
.bss : {} > RAM
.data : {} > RAM
.sysmem : {} > RAM

After fixing the overwrites that were initially happening, the bootloader will now download the code, say successfully downloaded, and hang at execute.

Any ideas where I am going wrong?

  • Hello Jameson,
    If you use the memory browser to view the flash starting at 0x20000 do you see the application code programmed there?

    Did you reset the board and try again?

    If you single step will it take you to the application code starting at 0x20000? Where do it hang?
  • Found the error. Thank you.

    For the next guy that has no idea, I was starting with spna196 last changed Feb 13, 2016:

    Sys_intvecs.asm was pointed at 0x100F8

    bl_link.cmd had flash0 defined:

    FLASH0     (RX)  : origin=0x00001500 length=0x002FEB00

    which I changed to:

    FLASH0     (RX)  : origin=0x00001500 length=0x0000FFFF

    bl_config.h had to match with its defines:

    #define APP_START_ADDRESS 0x00010100

    #define APP_STATUS_ADDRESS 0x00010000

    and my applications need to have sys_link.cmd changed:  

    MEMORY
    {
        VECTORS (X)  : origin=0x00010100 length=0x00000020
        KERNEL  (RX) : origin=0x00010120 length=0x00008000
        FLASH0  (RX) : origin=0x00018120 length=0x00167EE0
        FLASH1  (RX) : origin=0x00180000 length=0x00180000
        STACKS  (RW) : origin=0x08000000 length=0x00000800
        KRAM    (RW) : origin=0x08000800 length=0x00000800
        RAM     (RW) : origin=(0x08000800+0x00000800) length=(0x0003F800 - 0x00000800)
    }

    You may have different memory plots based on silicon and RTOS or not. All that was done here is add 0x10100 to the origin, and then subtract that from FLASH0 size.

    I went with the Goldylocks approximation method here, I tried to do 0x20000 (sector 2) originally, but after being pointed at the memory browser I found a huge amount of blank space between bootloader and application. I then brought it back down to 0x08000 (Sector 0). That didn't work for some reason. 0x10000 is sector 1, and seems to be happy. I am running an RTOS+FAT and it's working.